summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/markup
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /devtools/client/inspector/markup
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/inspector/markup')
-rw-r--r--devtools/client/inspector/markup/components/TextNode.js88
-rw-r--r--devtools/client/inspector/markup/components/moz.build9
-rw-r--r--devtools/client/inspector/markup/markup-context-menu.js951
-rw-r--r--devtools/client/inspector/markup/markup.js2682
-rw-r--r--devtools/client/inspector/markup/markup.xhtml43
-rw-r--r--devtools/client/inspector/markup/moz.build19
-rw-r--r--devtools/client/inspector/markup/test/browser.ini249
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_accessibility_focus_blur.js77
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_accessibility_navigation.js277
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_accessibility_navigation_after_edit.js126
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_accessibility_new_selection.js34
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_accessibility_semantics.js146
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_anonymous_01.js46
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_anonymous_03.js41
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_anonymous_04.js38
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_copy_html.js93
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_copy_image_data.js81
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_01.js130
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_02.js103
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_03.js52
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_display_node_01.js91
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_display_node_02.js165
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dom_mutation_breakpoints.js196
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll_01.js48
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll_02.js46
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_before_marker_pseudo.js78
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_distance.js48
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_dragRootNode.js21
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_draggable.js62
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_escapeKeyPress.js38
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_invalidNodes.js67
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_reorder.js111
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_dragdrop_tooltip.js36
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events-overflow.js104
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events-windowed-host.js80
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_01.js132
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_02.js123
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_03.js88
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_04.js124
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_chrome_blocked.js46
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_chrome_not_blocked.js53
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_click_to_close.js102
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_jquery_1.0.js224
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_jquery_1.1.js231
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_jquery_1.11.1.js160
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_jquery_1.2.js141
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_jquery_1.3.js150
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_jquery_1.4.js185
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_jquery_1.6.js351
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_jquery_1.7.js201
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js160
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_object_listener.js43
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1.js113
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1_jsx.js116
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1.js113
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1_jsx.js116
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0.js133
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0_jsx.js114
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_source_map.js54
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_events_toggle.js295
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_flex_display_badge.js107
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_flex_display_badge_telemetry.js53
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_grid_display_badge_01.js91
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_grid_display_badge_02.js256
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_grid_display_badge_03.js82
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_grid_display_badge_telemetry.js45
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_html_edit_01.js111
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_html_edit_02.js157
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_html_edit_03.js305
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_html_edit_04.js101
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_html_edit_undo-redo.js88
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_iframe_blocked_by_csp.js53
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_image_tooltip.js63
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js95
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_keybindings_01.js48
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_keybindings_02.js31
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_keybindings_03.js64
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_keybindings_04.js71
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_keybindings_delete_attributes.js73
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_keybindings_scrolltonode.js100
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_links_01.js178
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_links_02.js40
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_links_03.js39
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_links_04.js150
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_links_05.js74
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_links_06.js60
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_links_07.js134
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_load_01.js74
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_mutation_01.js419
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_mutation_02.js191
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_navigation.js128
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_node_names.js34
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_node_names_namespaced.js52
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_node_not_displayed_01.js37
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_node_not_displayed_02.js147
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_overflow_badge.js101
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_pagesize_01.js91
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_pagesize_02.js48
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_pseudo_on_reload.js44
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_remove_xul_attributes.js36
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_screenshot_node.js25
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_screenshot_node_about_page.js46
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_screenshot_node_iframe.js46
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_screenshot_node_shadowdom.js41
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_screenshot_node_warning.js38
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_scrollable_badge.js67
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_scrollable_badge_click.js155
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_search_01.js56
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom.js290
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_clickreveal.js108
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_clickreveal_scroll.js88
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_copy_paths.js80
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_delete.js105
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_dynamic.js155
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_hover.js78
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_marker_and_before_pseudos.js117
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_maxchildren.js122
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_mutations_shadow.js85
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_navigation.js97
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_nested_pick_inspect.js132
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_noslot.js107
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger.js133
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger_pretty_printed.js53
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_shadowroot_mode.js52
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_show_nodes_button.js51
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_slotted_keyboard_focus.js71
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_slotupdate.js68
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets.js104
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets_with_nac.js70
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_subgrid_display_badge.js78
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_delete_whitespace_node.js79
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_01.js73
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_02.js46
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_03.js68
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_04-backspace.js64
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_04-delete.js64
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_05.js85
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_06.js95
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_07.js152
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_08.js140
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_09.js74
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_10.js39
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_11.js37
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_12.js103
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_13-other.js39
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_avoid_refocus.js51
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_tag_edit_long-classname.js51
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_template.js55
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_textcontent_display.js123
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_textcontent_edit_01.js110
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_textcontent_edit_02.js121
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_toggle_01.js59
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_toggle_02.js61
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_toggle_03.js51
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_toggle_04.js40
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_toggle_closing_tag_line.js54
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js57
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_view-original-source.js55
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_view-source.js126
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_void_elements_html.js51
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_void_elements_xhtml.js33
-rw-r--r--devtools/client/inspector/markup/test/browser_markup_whitespace.js106
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_anonymous.html32
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_dragdrop.html45
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_dragdrop_autoscroll_01.html87
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_dragdrop_autoscroll_02.html40
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_edit.html48
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events-overflow.html19
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events-source_map.html10
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_01.html118
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_02.html115
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_03.html103
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_04.html101
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_chrome_listeners.html9
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_jquery.html69
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_object_listener.html40
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_react_development_15.4.1.html73
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_react_development_15.4.1_jsx.html51
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_react_production_15.3.1.html73
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_react_production_15.3.1_jsx.html51
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_react_production_16.2.0.html80
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_react_production_16.2.0_jsx.html50
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_events_toggle.html25
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_flashing.html15
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_html_mixed_case.html12
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_image_and_canvas.html24
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_image_and_canvas_2.html25
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_links.html42
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_mutation.html42
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_navigation.html28
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_not_displayed.html18
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_pagesize_01.html32
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_pagesize_02.html33
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_pseudo.html11
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_search.html11
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_shadowdom_open_debugger_pretty_printed.html11
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_subgrid.html53
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_svg_attributes.html8
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_toggle.html28
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_tooltip.pngbin0 -> 1095 bytes
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_1.html1
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_2.html1
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_view-original-source.html9
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_void_elements.html18
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_void_elements.xhtml21
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_whitespace.html25
-rw-r--r--devtools/client/inspector/markup/test/doc_markup_xul.xhtml9
-rw-r--r--devtools/client/inspector/markup/test/events_bundle.js94
-rw-r--r--devtools/client/inspector/markup/test/events_bundle.js.map1
-rw-r--r--devtools/client/inspector/markup/test/events_original.js15
-rw-r--r--devtools/client/inspector/markup/test/head.js670
-rw-r--r--devtools/client/inspector/markup/test/helper_attributes_test_runner.js161
-rw-r--r--devtools/client/inspector/markup/test/helper_diff.js286
-rw-r--r--devtools/client/inspector/markup/test/helper_events_test_runner.js229
-rw-r--r--devtools/client/inspector/markup/test/helper_markup_accessibility_navigation.js92
-rw-r--r--devtools/client/inspector/markup/test/helper_outerhtml_test_runner.js99
-rw-r--r--devtools/client/inspector/markup/test/helper_style_attr_test_runner.js151
-rw-r--r--devtools/client/inspector/markup/test/lib_babel_6.21.0_min.js24
-rw-r--r--devtools/client/inspector/markup/test/lib_jquery_1.0.js1814
-rw-r--r--devtools/client/inspector/markup/test/lib_jquery_1.1.js2172
-rw-r--r--devtools/client/inspector/markup/test/lib_jquery_1.11.1_min.js4
-rw-r--r--devtools/client/inspector/markup/test/lib_jquery_1.2_min.js32
-rw-r--r--devtools/client/inspector/markup/test/lib_jquery_1.3_min.js19
-rw-r--r--devtools/client/inspector/markup/test/lib_jquery_1.4_min.js151
-rw-r--r--devtools/client/inspector/markup/test/lib_jquery_1.6_min.js16
-rw-r--r--devtools/client/inspector/markup/test/lib_jquery_1.7_min.js4
-rw-r--r--devtools/client/inspector/markup/test/lib_jquery_2.1.1_min.js4
-rw-r--r--devtools/client/inspector/markup/test/lib_react_16.2.0_min.js21
-rw-r--r--devtools/client/inspector/markup/test/lib_react_dom_15.3.1_min.js12
-rw-r--r--devtools/client/inspector/markup/test/lib_react_dom_16.2.0_min.js193
-rw-r--r--devtools/client/inspector/markup/test/lib_react_with_addons_15.3.1_min.js16
-rw-r--r--devtools/client/inspector/markup/test/react_external_listeners.js10
-rw-r--r--devtools/client/inspector/markup/test/shadowdom_open_debugger.min.js1
-rw-r--r--devtools/client/inspector/markup/utils.js136
-rw-r--r--devtools/client/inspector/markup/utils/l10n.js15
-rw-r--r--devtools/client/inspector/markup/utils/moz.build9
-rw-r--r--devtools/client/inspector/markup/views/element-container.js257
-rw-r--r--devtools/client/inspector/markup/views/element-editor.js1149
-rw-r--r--devtools/client/inspector/markup/views/html-editor.js177
-rw-r--r--devtools/client/inspector/markup/views/markup-container.js868
-rw-r--r--devtools/client/inspector/markup/views/moz.build19
-rw-r--r--devtools/client/inspector/markup/views/read-only-container.js36
-rw-r--r--devtools/client/inspector/markup/views/read-only-editor.js82
-rw-r--r--devtools/client/inspector/markup/views/root-container.js60
-rw-r--r--devtools/client/inspector/markup/views/slotted-node-container.js76
-rw-r--r--devtools/client/inspector/markup/views/slotted-node-editor.js63
-rw-r--r--devtools/client/inspector/markup/views/text-container.js44
-rw-r--r--devtools/client/inspector/markup/views/text-editor.js143
248 files changed, 30336 insertions, 0 deletions
diff --git a/devtools/client/inspector/markup/components/TextNode.js b/devtools/client/inspector/markup/components/TextNode.js
new file mode 100644
index 0000000000..1cb88f2538
--- /dev/null
+++ b/devtools/client/inspector/markup/components/TextNode.js
@@ -0,0 +1,88 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const {
+ createElement,
+ createRef,
+ Fragment,
+ PureComponent,
+} = require("resource://devtools/client/shared/vendor/react.js");
+const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
+const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
+const {
+ editableItem,
+} = require("resource://devtools/client/shared/inplace-editor.js");
+
+const {
+ getStr,
+ getFormatStr,
+} = require("resource://devtools/client/inspector/markup/utils/l10n.js");
+
+class TextNode extends PureComponent {
+ static get propTypes() {
+ return {
+ showTextEditor: PropTypes.func.isRequired,
+ type: PropTypes.string.isRequired,
+ value: PropTypes.string.isRequired,
+ };
+ }
+
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ value: this.props.value,
+ };
+
+ this.valuePreRef = createRef();
+ }
+
+ componentDidMount() {
+ editableItem(
+ {
+ element: this.valuePreRef.current,
+ trigger: "dblclick",
+ },
+ element => {
+ this.props.showTextEditor(element);
+ }
+ );
+ }
+
+ render() {
+ const { value } = this.state;
+ const isComment = this.props.type === "comment";
+ const isWhiteSpace = !/[^\s]/.exec(value);
+
+ return createElement(
+ Fragment,
+ null,
+ isComment ? dom.span({}, "<!--") : null,
+ dom.pre(
+ {
+ className: isWhiteSpace ? "whitespace" : "",
+ ref: this.valuePreRef,
+ style: {
+ display: "inline-block",
+ whiteSpace: "normal",
+ },
+ tabIndex: -1,
+ title: isWhiteSpace
+ ? getFormatStr(
+ "markupView.whitespaceOnly",
+ value.replace(/\n/g, "⏎").replace(/\t/g, "⇥").replace(/ /g, "◦")
+ )
+ : "",
+ "data-label": getStr("markupView.whitespaceOnly.label"),
+ },
+ value
+ ),
+ isComment ? dom.span({}, "-->") : null
+ );
+ }
+}
+
+module.exports = TextNode;
diff --git a/devtools/client/inspector/markup/components/moz.build b/devtools/client/inspector/markup/components/moz.build
new file mode 100644
index 0000000000..13e4ee411d
--- /dev/null
+++ b/devtools/client/inspector/markup/components/moz.build
@@ -0,0 +1,9 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DevToolsModules(
+ "TextNode.js",
+)
diff --git a/devtools/client/inspector/markup/markup-context-menu.js b/devtools/client/inspector/markup/markup-context-menu.js
new file mode 100644
index 0000000000..38ee79d6ba
--- /dev/null
+++ b/devtools/client/inspector/markup/markup-context-menu.js
@@ -0,0 +1,951 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const {
+ PSEUDO_CLASSES,
+} = require("resource://devtools/shared/css/constants.js");
+const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
+
+loader.lazyRequireGetter(
+ this,
+ "Menu",
+ "resource://devtools/client/framework/menu.js"
+);
+loader.lazyRequireGetter(
+ this,
+ "MenuItem",
+ "resource://devtools/client/framework/menu-item.js"
+);
+loader.lazyRequireGetter(
+ this,
+ "clipboardHelper",
+ "resource://devtools/shared/platform/clipboard.js"
+);
+
+loader.lazyGetter(this, "TOOLBOX_L10N", function () {
+ return new LocalizationHelper("devtools/client/locales/toolbox.properties");
+});
+
+const INSPECTOR_L10N = new LocalizationHelper(
+ "devtools/client/locales/inspector.properties"
+);
+
+/**
+ * Context menu for the Markup view.
+ */
+class MarkupContextMenu {
+ constructor(markup) {
+ this.markup = markup;
+ this.inspector = markup.inspector;
+ this.selection = this.inspector.selection;
+ this.target = this.inspector.currentTarget;
+ this.telemetry = this.inspector.telemetry;
+ this.toolbox = this.inspector.toolbox;
+ this.walker = this.inspector.walker;
+ }
+
+ destroy() {
+ this.markup = null;
+ this.inspector = null;
+ this.selection = null;
+ this.target = null;
+ this.telemetry = null;
+ this.toolbox = null;
+ this.walker = null;
+ }
+
+ show(event) {
+ if (
+ !Element.isInstance(event.originalTarget) ||
+ event.originalTarget.closest("input[type=text]") ||
+ event.originalTarget.closest("input:not([type])") ||
+ event.originalTarget.closest("textarea")
+ ) {
+ return;
+ }
+
+ event.stopPropagation();
+ event.preventDefault();
+
+ this._openMenu({
+ screenX: event.screenX,
+ screenY: event.screenY,
+ target: event.target,
+ });
+ }
+
+ /**
+ * This method is here for the benefit of copying links.
+ */
+ _copyAttributeLink(link) {
+ this.inspector.inspectorFront
+ .resolveRelativeURL(link, this.selection.nodeFront)
+ .then(url => {
+ clipboardHelper.copyString(url);
+ }, console.error);
+ }
+
+ /**
+ * Copy the full CSS Path of the selected Node to the clipboard.
+ */
+ _copyCssPath() {
+ if (!this.selection.isNode()) {
+ return;
+ }
+
+ this.telemetry.scalarSet("devtools.copy.full.css.selector.opened", 1);
+ this.selection.nodeFront
+ .getCssPath()
+ .then(path => {
+ clipboardHelper.copyString(path);
+ })
+ .catch(console.error);
+ }
+
+ /**
+ * Copy the data-uri for the currently selected image in the clipboard.
+ */
+ _copyImageDataUri() {
+ const container = this.markup.getContainer(this.selection.nodeFront);
+ if (container && container.isPreviewable()) {
+ container.copyImageDataUri();
+ }
+ }
+
+ /**
+ * Copy the innerHTML of the selected Node to the clipboard.
+ */
+ _copyInnerHTML() {
+ this.markup.copyInnerHTML();
+ }
+
+ /**
+ * Copy the outerHTML of the selected Node to the clipboard.
+ */
+ _copyOuterHTML() {
+ this.markup.copyOuterHTML();
+ }
+
+ /**
+ * Copy a unique selector of the selected Node to the clipboard.
+ */
+ _copyUniqueSelector() {
+ if (!this.selection.isNode()) {
+ return;
+ }
+
+ this.telemetry.scalarSet("devtools.copy.unique.css.selector.opened", 1);
+ this.selection.nodeFront
+ .getUniqueSelector()
+ .then(selector => {
+ clipboardHelper.copyString(selector);
+ })
+ .catch(console.error);
+ }
+
+ /**
+ * Copy the XPath of the selected Node to the clipboard.
+ */
+ _copyXPath() {
+ if (!this.selection.isNode()) {
+ return;
+ }
+
+ this.telemetry.scalarSet("devtools.copy.xpath.opened", 1);
+ this.selection.nodeFront
+ .getXPath()
+ .then(path => {
+ clipboardHelper.copyString(path);
+ })
+ .catch(console.error);
+ }
+
+ /**
+ * Delete the selected node.
+ */
+ _deleteNode() {
+ if (!this.selection.isNode() || this.selection.isRoot()) {
+ return;
+ }
+
+ const nodeFront = this.selection.nodeFront;
+
+ // If the markup panel is active, use the markup panel to delete
+ // the node, making this an undoable action.
+ if (this.markup) {
+ this.markup.deleteNode(nodeFront);
+ } else {
+ // remove the node from content
+ nodeFront.walkerFront.removeNode(nodeFront);
+ }
+ }
+
+ /**
+ * Duplicate the selected node
+ */
+ _duplicateNode() {
+ if (
+ !this.selection.isElementNode() ||
+ this.selection.isRoot() ||
+ this.selection.isAnonymousNode() ||
+ this.selection.isPseudoElementNode()
+ ) {
+ return;
+ }
+
+ const nodeFront = this.selection.nodeFront;
+ nodeFront.walkerFront.duplicateNode(nodeFront).catch(console.error);
+ }
+
+ /**
+ * Edit the outerHTML of the selected Node.
+ */
+ _editHTML() {
+ if (!this.selection.isNode()) {
+ return;
+ }
+ this.markup.beginEditingHTML(this.selection.nodeFront);
+ }
+
+ /**
+ * Jumps to the custom element definition in the debugger.
+ */
+ _jumpToCustomElementDefinition() {
+ const { url, line, column } =
+ this.selection.nodeFront.customElementLocation;
+ this.toolbox.viewSourceInDebugger(
+ url,
+ line,
+ column,
+ null,
+ "show_custom_element"
+ );
+ }
+
+ /**
+ * Add attribute to node.
+ * Used for node context menu and shouldn't be called directly.
+ */
+ _onAddAttribute() {
+ const container = this.markup.getContainer(this.selection.nodeFront);
+ container.addAttribute();
+ }
+
+ /**
+ * Copy attribute value for node.
+ * Used for node context menu and shouldn't be called directly.
+ */
+ _onCopyAttributeValue() {
+ clipboardHelper.copyString(this.nodeMenuTriggerInfo.value);
+ }
+
+ /**
+ * This method is here for the benefit of the node-menu-link-copy menu item
+ * in the inspector contextual-menu.
+ */
+ _onCopyLink() {
+ this._copyAttributeLink(this.contextMenuTarget.dataset.link);
+ }
+
+ /**
+ * Edit attribute for node.
+ * Used for node context menu and shouldn't be called directly.
+ */
+ _onEditAttribute() {
+ const container = this.markup.getContainer(this.selection.nodeFront);
+ container.editAttribute(this.nodeMenuTriggerInfo.name);
+ }
+
+ /**
+ * This method is here for the benefit of the node-menu-link-follow menu item
+ * in the inspector contextual-menu.
+ */
+ _onFollowLink() {
+ const type = this.contextMenuTarget.dataset.type;
+ const link = this.contextMenuTarget.dataset.link;
+ this.markup.followAttributeLink(type, link);
+ }
+
+ /**
+ * Remove attribute from node.
+ * Used for node context menu and shouldn't be called directly.
+ */
+ _onRemoveAttribute() {
+ const container = this.markup.getContainer(this.selection.nodeFront);
+ container.removeAttribute(this.nodeMenuTriggerInfo.name);
+ }
+
+ /**
+ * Paste the contents of the clipboard as adjacent HTML to the selected Node.
+ *
+ * @param {String} position
+ * The position as specified for Element.insertAdjacentHTML
+ * (i.e. "beforeBegin", "afterBegin", "beforeEnd", "afterEnd").
+ */
+ _pasteAdjacentHTML(position) {
+ const content = this._getClipboardContentForPaste();
+ if (!content) {
+ return Promise.reject("No clipboard content for paste");
+ }
+
+ const node = this.selection.nodeFront;
+ return this.markup.insertAdjacentHTMLToNode(node, position, content);
+ }
+
+ /**
+ * Paste the contents of the clipboard into the selected Node's inner HTML.
+ */
+ _pasteInnerHTML() {
+ const content = this._getClipboardContentForPaste();
+ if (!content) {
+ return Promise.reject("No clipboard content for paste");
+ }
+
+ const node = this.selection.nodeFront;
+ return this.markup.getNodeInnerHTML(node).then(oldContent => {
+ this.markup.updateNodeInnerHTML(node, content, oldContent);
+ });
+ }
+
+ /**
+ * Paste the contents of the clipboard into the selected Node's outer HTML.
+ */
+ _pasteOuterHTML() {
+ const content = this._getClipboardContentForPaste();
+ if (!content) {
+ return Promise.reject("No clipboard content for paste");
+ }
+
+ const node = this.selection.nodeFront;
+ return this.markup.getNodeOuterHTML(node).then(oldContent => {
+ this.markup.updateNodeOuterHTML(node, content, oldContent);
+ });
+ }
+
+ /**
+ * Show Accessibility properties for currently selected node
+ */
+ async _showAccessibilityProperties() {
+ const a11yPanel = await this.toolbox.selectTool("accessibility");
+ // Select the accessible object in the panel and wait for the event that
+ // tells us it has been done.
+ const onSelected = a11yPanel.once("new-accessible-front-selected");
+ a11yPanel.selectAccessibleForNode(
+ this.selection.nodeFront,
+ "inspector-context-menu"
+ );
+ await onSelected;
+ }
+
+ /**
+ * Show DOM properties
+ */
+ _showDOMProperties() {
+ this.toolbox.openSplitConsole().then(() => {
+ const { hud } = this.toolbox.getPanel("webconsole");
+ hud.ui.wrapper.dispatchEvaluateExpression("inspect($0, true)");
+ });
+ }
+
+ /**
+ * Use in Console.
+ *
+ * Takes the currently selected node in the inspector and assigns it to a
+ * temp variable on the content window. Also opens the split console and
+ * autofills it with the temp variable.
+ */
+ async _useInConsole() {
+ await this.toolbox.openSplitConsole();
+ const { hud } = this.toolbox.getPanel("webconsole");
+
+ const evalString = `{ let i = 0;
+ while (window.hasOwnProperty("temp" + i) && i < 1000) {
+ i++;
+ }
+ window["temp" + i] = $0;
+ "temp" + i;
+ }`;
+
+ const res = await this.toolbox.commands.scriptCommand.execute(evalString, {
+ selectedNodeActor: this.selection.nodeFront.actorID,
+ });
+ hud.setInputValue(res.result);
+ this.inspector.emit("console-var-ready");
+ }
+
+ _getAttributesSubmenu(isEditableElement) {
+ const attributesSubmenu = new Menu();
+ const nodeInfo = this.nodeMenuTriggerInfo;
+ const isAttributeClicked =
+ isEditableElement && nodeInfo && nodeInfo.type === "attribute";
+
+ attributesSubmenu.append(
+ new MenuItem({
+ id: "node-menu-add-attribute",
+ label: INSPECTOR_L10N.getStr("inspectorAddAttribute.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorAddAttribute.accesskey"),
+ disabled: !isEditableElement,
+ click: () => this._onAddAttribute(),
+ })
+ );
+ attributesSubmenu.append(
+ new MenuItem({
+ id: "node-menu-copy-attribute",
+ label: INSPECTOR_L10N.getFormatStr(
+ "inspectorCopyAttributeValue.label",
+ isAttributeClicked ? `${nodeInfo.value}` : ""
+ ),
+ accesskey: INSPECTOR_L10N.getStr(
+ "inspectorCopyAttributeValue.accesskey"
+ ),
+ disabled: !isAttributeClicked,
+ click: () => this._onCopyAttributeValue(),
+ })
+ );
+ attributesSubmenu.append(
+ new MenuItem({
+ id: "node-menu-edit-attribute",
+ label: INSPECTOR_L10N.getFormatStr(
+ "inspectorEditAttribute.label",
+ isAttributeClicked ? `${nodeInfo.name}` : ""
+ ),
+ accesskey: INSPECTOR_L10N.getStr("inspectorEditAttribute.accesskey"),
+ disabled: !isAttributeClicked,
+ click: () => this._onEditAttribute(),
+ })
+ );
+ attributesSubmenu.append(
+ new MenuItem({
+ id: "node-menu-remove-attribute",
+ label: INSPECTOR_L10N.getFormatStr(
+ "inspectorRemoveAttribute.label",
+ isAttributeClicked ? `${nodeInfo.name}` : ""
+ ),
+ accesskey: INSPECTOR_L10N.getStr("inspectorRemoveAttribute.accesskey"),
+ disabled: !isAttributeClicked,
+ click: () => this._onRemoveAttribute(),
+ })
+ );
+
+ return attributesSubmenu;
+ }
+
+ /**
+ * Returns the clipboard content if it is appropriate for pasting
+ * into the current node's outer HTML, otherwise returns null.
+ */
+ _getClipboardContentForPaste() {
+ const content = clipboardHelper.getText();
+ if (content && content.trim().length) {
+ return content;
+ }
+ return null;
+ }
+
+ _getCopySubmenu(markupContainer, isElement, isFragment) {
+ const copySubmenu = new Menu();
+ copySubmenu.append(
+ new MenuItem({
+ id: "node-menu-copyinner",
+ label: INSPECTOR_L10N.getStr("inspectorCopyInnerHTML.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorCopyInnerHTML.accesskey"),
+ disabled: !isElement && !isFragment,
+ click: () => this._copyInnerHTML(),
+ })
+ );
+ copySubmenu.append(
+ new MenuItem({
+ id: "node-menu-copyouter",
+ label: INSPECTOR_L10N.getStr("inspectorCopyOuterHTML.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorCopyOuterHTML.accesskey"),
+ disabled: !isElement,
+ click: () => this._copyOuterHTML(),
+ })
+ );
+ copySubmenu.append(
+ new MenuItem({
+ id: "node-menu-copyuniqueselector",
+ label: INSPECTOR_L10N.getStr("inspectorCopyCSSSelector.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorCopyCSSSelector.accesskey"),
+ disabled: !isElement,
+ click: () => this._copyUniqueSelector(),
+ })
+ );
+ copySubmenu.append(
+ new MenuItem({
+ id: "node-menu-copycsspath",
+ label: INSPECTOR_L10N.getStr("inspectorCopyCSSPath.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorCopyCSSPath.accesskey"),
+ disabled: !isElement,
+ click: () => this._copyCssPath(),
+ })
+ );
+ copySubmenu.append(
+ new MenuItem({
+ id: "node-menu-copyxpath",
+ label: INSPECTOR_L10N.getStr("inspectorCopyXPath.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorCopyXPath.accesskey"),
+ disabled: !isElement,
+ click: () => this._copyXPath(),
+ })
+ );
+ copySubmenu.append(
+ new MenuItem({
+ id: "node-menu-copyimagedatauri",
+ label: INSPECTOR_L10N.getStr("inspectorImageDataUri.label"),
+ disabled:
+ !isElement || !markupContainer || !markupContainer.isPreviewable(),
+ click: () => this._copyImageDataUri(),
+ })
+ );
+
+ return copySubmenu;
+ }
+
+ _getDOMBreakpointSubmenu(isElement) {
+ const menu = new Menu();
+ const mutationBreakpoints = this.selection.nodeFront.mutationBreakpoints;
+
+ menu.append(
+ new MenuItem({
+ id: "node-menu-mutation-breakpoint-subtree",
+ checked: mutationBreakpoints.subtree,
+ click: () => this.markup.toggleMutationBreakpoint("subtree"),
+ disabled: !isElement,
+ label: INSPECTOR_L10N.getStr("inspectorSubtreeModification.label"),
+ type: "checkbox",
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ id: "node-menu-mutation-breakpoint-attribute",
+ checked: mutationBreakpoints.attribute,
+ click: () => this.markup.toggleMutationBreakpoint("attribute"),
+ disabled: !isElement,
+ label: INSPECTOR_L10N.getStr("inspectorAttributeModification.label"),
+ type: "checkbox",
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ checked: mutationBreakpoints.removal,
+ click: () => this.markup.toggleMutationBreakpoint("removal"),
+ disabled: !isElement,
+ label: INSPECTOR_L10N.getStr("inspectorNodeRemoval.label"),
+ type: "checkbox",
+ })
+ );
+
+ return menu;
+ }
+
+ /**
+ * Link menu items can be shown or hidden depending on the context and
+ * selected node, and their labels can vary.
+ *
+ * @return {Array} list of visible menu items related to links.
+ */
+ _getNodeLinkMenuItems() {
+ const linkFollow = new MenuItem({
+ id: "node-menu-link-follow",
+ visible: false,
+ click: () => this._onFollowLink(),
+ });
+ const linkCopy = new MenuItem({
+ id: "node-menu-link-copy",
+ visible: false,
+ click: () => this._onCopyLink(),
+ });
+
+ // Get information about the right-clicked node.
+ const popupNode = this.contextMenuTarget;
+ if (!popupNode || !popupNode.classList.contains("link")) {
+ return [linkFollow, linkCopy];
+ }
+
+ const type = popupNode.dataset.type;
+ if (type === "uri" || type === "cssresource" || type === "jsresource") {
+ // Links can't be opened in new tabs in the browser toolbox.
+ if (type === "uri" && !this.toolbox.isBrowserToolbox) {
+ linkFollow.visible = true;
+ linkFollow.label = INSPECTOR_L10N.getStr(
+ "inspector.menu.openUrlInNewTab.label"
+ );
+ } else if (type === "cssresource") {
+ linkFollow.visible = true;
+ linkFollow.label = TOOLBOX_L10N.getStr(
+ "toolbox.viewCssSourceInStyleEditor.label"
+ );
+ } else if (type === "jsresource") {
+ linkFollow.visible = true;
+ linkFollow.label = TOOLBOX_L10N.getStr(
+ "toolbox.viewJsSourceInDebugger.label"
+ );
+ }
+
+ linkCopy.visible = true;
+ linkCopy.label = INSPECTOR_L10N.getStr(
+ "inspector.menu.copyUrlToClipboard.label"
+ );
+ } else if (type === "idref") {
+ linkFollow.visible = true;
+ linkFollow.label = INSPECTOR_L10N.getFormatStr(
+ "inspector.menu.selectElement.label",
+ popupNode.dataset.link
+ );
+ }
+
+ return [linkFollow, linkCopy];
+ }
+
+ _getPasteSubmenu(isElement, isFragment, isAnonymous) {
+ const isPasteable =
+ !isAnonymous &&
+ (isFragment || isElement) &&
+ this._getClipboardContentForPaste();
+ const disableAdjacentPaste =
+ !isPasteable ||
+ !isElement ||
+ this.selection.isRoot() ||
+ this.selection.isBodyNode() ||
+ this.selection.isHeadNode();
+ const disableFirstLastPaste =
+ !isPasteable ||
+ !isElement ||
+ (this.selection.isHTMLNode() && this.selection.isRoot());
+
+ const pasteSubmenu = new Menu();
+ pasteSubmenu.append(
+ new MenuItem({
+ id: "node-menu-pasteinnerhtml",
+ label: INSPECTOR_L10N.getStr("inspectorPasteInnerHTML.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorPasteInnerHTML.accesskey"),
+ disabled: !isPasteable,
+ click: () => this._pasteInnerHTML(),
+ })
+ );
+ pasteSubmenu.append(
+ new MenuItem({
+ id: "node-menu-pasteouterhtml",
+ label: INSPECTOR_L10N.getStr("inspectorPasteOuterHTML.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorPasteOuterHTML.accesskey"),
+ disabled: !isPasteable || !isElement,
+ click: () => this._pasteOuterHTML(),
+ })
+ );
+ pasteSubmenu.append(
+ new MenuItem({
+ id: "node-menu-pastebefore",
+ label: INSPECTOR_L10N.getStr("inspectorHTMLPasteBefore.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorHTMLPasteBefore.accesskey"),
+ disabled: disableAdjacentPaste,
+ click: () => this._pasteAdjacentHTML("beforeBegin"),
+ })
+ );
+ pasteSubmenu.append(
+ new MenuItem({
+ id: "node-menu-pasteafter",
+ label: INSPECTOR_L10N.getStr("inspectorHTMLPasteAfter.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorHTMLPasteAfter.accesskey"),
+ disabled: disableAdjacentPaste,
+ click: () => this._pasteAdjacentHTML("afterEnd"),
+ })
+ );
+ pasteSubmenu.append(
+ new MenuItem({
+ id: "node-menu-pastefirstchild",
+ label: INSPECTOR_L10N.getStr("inspectorHTMLPasteFirstChild.label"),
+ accesskey: INSPECTOR_L10N.getStr(
+ "inspectorHTMLPasteFirstChild.accesskey"
+ ),
+ disabled: disableFirstLastPaste,
+ click: () => this._pasteAdjacentHTML("afterBegin"),
+ })
+ );
+ pasteSubmenu.append(
+ new MenuItem({
+ id: "node-menu-pastelastchild",
+ label: INSPECTOR_L10N.getStr("inspectorHTMLPasteLastChild.label"),
+ accesskey: INSPECTOR_L10N.getStr(
+ "inspectorHTMLPasteLastChild.accesskey"
+ ),
+ disabled: disableFirstLastPaste,
+ click: () => this._pasteAdjacentHTML("beforeEnd"),
+ })
+ );
+
+ return pasteSubmenu;
+ }
+
+ _getPseudoClassSubmenu(isElement) {
+ const menu = new Menu();
+
+ // Set the pseudo classes
+ for (const name of PSEUDO_CLASSES) {
+ const menuitem = new MenuItem({
+ id: "node-menu-pseudo-" + name.substr(1),
+ label: name.substr(1),
+ type: "checkbox",
+ click: () => this.inspector.togglePseudoClass(name),
+ });
+
+ if (isElement) {
+ const checked = this.selection.nodeFront.hasPseudoClassLock(name);
+ menuitem.checked = checked;
+ } else {
+ menuitem.disabled = true;
+ }
+
+ menu.append(menuitem);
+ }
+
+ return menu;
+ }
+
+ _getEditMarkupString() {
+ if (this.selection.isHTMLNode()) {
+ return "inspectorHTMLEdit";
+ } else if (this.selection.isSVGNode()) {
+ return "inspectorSVGEdit";
+ } else if (this.selection.isMathMLNode()) {
+ return "inspectorMathMLEdit";
+ }
+ return "inspectorXMLEdit";
+ }
+
+ _openMenu({ target, screenX = 0, screenY = 0 } = {}) {
+ if (this.selection.isSlotted()) {
+ // Slotted elements should not show any context menu.
+ return null;
+ }
+
+ const markupContainer = this.markup.getContainer(this.selection.nodeFront);
+
+ this.contextMenuTarget = target;
+ this.nodeMenuTriggerInfo =
+ markupContainer && markupContainer.editor.getInfoAtNode(target);
+
+ const isFragment = this.selection.isDocumentFragmentNode();
+ const isAnonymous = this.selection.isAnonymousNode();
+ const isElement =
+ this.selection.isElementNode() && !this.selection.isPseudoElementNode();
+ const isDuplicatableElement =
+ isElement && !isAnonymous && !this.selection.isRoot();
+ const isScreenshotable =
+ isElement && this.selection.nodeFront.isTreeDisplayed;
+
+ const menu = new Menu();
+ menu.append(
+ new MenuItem({
+ id: "node-menu-edithtml",
+ label: INSPECTOR_L10N.getStr(`${this._getEditMarkupString()}.label`),
+ accesskey: INSPECTOR_L10N.getStr("inspectorHTMLEdit.accesskey"),
+ disabled: isAnonymous || (!isElement && !isFragment),
+ click: () => this._editHTML(),
+ })
+ );
+ menu.append(
+ new MenuItem({
+ id: "node-menu-add",
+ label: INSPECTOR_L10N.getStr("inspectorAddNode.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorAddNode.accesskey"),
+ disabled: !this.inspector.canAddHTMLChild(),
+ click: () => this.inspector.addNode(),
+ })
+ );
+ menu.append(
+ new MenuItem({
+ id: "node-menu-duplicatenode",
+ label: INSPECTOR_L10N.getStr("inspectorDuplicateNode.label"),
+ disabled: !isDuplicatableElement,
+ click: () => this._duplicateNode(),
+ })
+ );
+ menu.append(
+ new MenuItem({
+ id: "node-menu-delete",
+ label: INSPECTOR_L10N.getStr("inspectorHTMLDelete.label"),
+ accesskey: INSPECTOR_L10N.getStr("inspectorHTMLDelete.accesskey"),
+ disabled: !this.markup.isDeletable(this.selection.nodeFront),
+ click: () => this._deleteNode(),
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ label: INSPECTOR_L10N.getStr("inspectorAttributesSubmenu.label"),
+ accesskey: INSPECTOR_L10N.getStr(
+ "inspectorAttributesSubmenu.accesskey"
+ ),
+ submenu: this._getAttributesSubmenu(isElement && !isAnonymous),
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ type: "separator",
+ })
+ );
+
+ if (
+ Services.prefs.getBoolPref(
+ "devtools.markup.mutationBreakpoints.enabled"
+ ) &&
+ this.selection.nodeFront.mutationBreakpoints
+ ) {
+ menu.append(
+ new MenuItem({
+ label: INSPECTOR_L10N.getStr("inspectorBreakpointSubmenu.label"),
+ // FIXME(bug 1598952): This doesn't work in shadow trees at all, but
+ // we still display the active menu. Also, this should probably be
+ // enabled for ShadowRoot, at least the non-attribute breakpoints.
+ submenu: this._getDOMBreakpointSubmenu(isElement),
+ id: "node-menu-mutation-breakpoint",
+ })
+ );
+ }
+
+ menu.append(
+ new MenuItem({
+ id: "node-menu-useinconsole",
+ label: INSPECTOR_L10N.getStr("inspectorUseInConsole.label"),
+ click: () => this._useInConsole(),
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ id: "node-menu-showdomproperties",
+ label: INSPECTOR_L10N.getStr("inspectorShowDOMProperties.label"),
+ click: () => this._showDOMProperties(),
+ })
+ );
+
+ if (this.selection.isElementNode() || this.selection.isTextNode()) {
+ menu.append(
+ new MenuItem({
+ id: "node-menu-showaccessibilityproperties",
+ label: INSPECTOR_L10N.getStr(
+ "inspectorShowAccessibilityProperties.label"
+ ),
+ click: () => this._showAccessibilityProperties(),
+ })
+ );
+ }
+
+ if (this.selection.nodeFront.customElementLocation) {
+ menu.append(
+ new MenuItem({
+ id: "node-menu-jumptodefinition",
+ label: INSPECTOR_L10N.getStr(
+ "inspectorCustomElementDefinition.label"
+ ),
+ click: () => this._jumpToCustomElementDefinition(),
+ })
+ );
+ }
+
+ menu.append(
+ new MenuItem({
+ type: "separator",
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ label: INSPECTOR_L10N.getStr("inspectorPseudoClassSubmenu.label"),
+ submenu: this._getPseudoClassSubmenu(isElement),
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ id: "node-menu-screenshotnode",
+ label: INSPECTOR_L10N.getStr("inspectorScreenshotNode.label"),
+ disabled: !isScreenshotable,
+ click: () => this.inspector.screenshotNode().catch(console.error),
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ id: "node-menu-scrollnodeintoview",
+ label: INSPECTOR_L10N.getStr("inspectorScrollNodeIntoView.label"),
+ accesskey: INSPECTOR_L10N.getStr(
+ "inspectorScrollNodeIntoView.accesskey"
+ ),
+ disabled: !isElement,
+ click: () => this.markup.scrollNodeIntoView(),
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ type: "separator",
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ label: INSPECTOR_L10N.getStr("inspectorCopyHTMLSubmenu.label"),
+ submenu: this._getCopySubmenu(markupContainer, isElement, isFragment),
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ label: INSPECTOR_L10N.getStr("inspectorPasteHTMLSubmenu.label"),
+ submenu: this._getPasteSubmenu(isElement, isFragment, isAnonymous),
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ type: "separator",
+ })
+ );
+
+ const isNodeWithChildren =
+ this.selection.isNode() && markupContainer.hasChildren;
+ menu.append(
+ new MenuItem({
+ id: "node-menu-expand",
+ label: INSPECTOR_L10N.getStr("inspectorExpandNode.label"),
+ disabled: !isNodeWithChildren,
+ click: () => this.markup.expandAll(this.selection.nodeFront),
+ })
+ );
+ menu.append(
+ new MenuItem({
+ id: "node-menu-collapse",
+ label: INSPECTOR_L10N.getStr("inspectorCollapseAll.label"),
+ disabled: !isNodeWithChildren || !markupContainer.expanded,
+ click: () => this.markup.collapseAll(this.selection.nodeFront),
+ })
+ );
+
+ const nodeLinkMenuItems = this._getNodeLinkMenuItems();
+ if (nodeLinkMenuItems.filter(item => item.visible).length) {
+ menu.append(
+ new MenuItem({
+ id: "node-menu-link-separator",
+ type: "separator",
+ })
+ );
+ }
+
+ for (const menuitem of nodeLinkMenuItems) {
+ menu.append(menuitem);
+ }
+
+ menu.popup(screenX, screenY, this.toolbox.doc);
+ return menu;
+ }
+}
+
+module.exports = MarkupContextMenu;
diff --git a/devtools/client/inspector/markup/markup.js b/devtools/client/inspector/markup/markup.js
new file mode 100644
index 0000000000..849af6c155
--- /dev/null
+++ b/devtools/client/inspector/markup/markup.js
@@ -0,0 +1,2682 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const flags = require("resource://devtools/shared/flags.js");
+const nodeConstants = require("resource://devtools/shared/dom-node-constants.js");
+const nodeFilterConstants = require("resource://devtools/shared/dom-node-filter-constants.js");
+const EventEmitter = require("resource://devtools/shared/event-emitter.js");
+const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
+const { PluralForm } = require("resource://devtools/shared/plural-form.js");
+const AutocompletePopup = require("resource://devtools/client/shared/autocomplete-popup.js");
+const KeyShortcuts = require("resource://devtools/client/shared/key-shortcuts.js");
+const {
+ scrollIntoViewIfNeeded,
+} = require("resource://devtools/client/shared/scroll.js");
+const { PrefObserver } = require("resource://devtools/client/shared/prefs.js");
+const MarkupElementContainer = require("resource://devtools/client/inspector/markup/views/element-container.js");
+const MarkupReadOnlyContainer = require("resource://devtools/client/inspector/markup/views/read-only-container.js");
+const MarkupTextContainer = require("resource://devtools/client/inspector/markup/views/text-container.js");
+const RootContainer = require("resource://devtools/client/inspector/markup/views/root-container.js");
+const WalkerEventListener = require("resource://devtools/client/inspector/shared/walker-event-listener.js");
+
+loader.lazyRequireGetter(
+ this,
+ ["createDOMMutationBreakpoint", "deleteDOMMutationBreakpoint"],
+ "resource://devtools/client/framework/actions/index.js",
+ true
+);
+loader.lazyRequireGetter(
+ this,
+ "MarkupContextMenu",
+ "resource://devtools/client/inspector/markup/markup-context-menu.js"
+);
+loader.lazyRequireGetter(
+ this,
+ "SlottedNodeContainer",
+ "resource://devtools/client/inspector/markup/views/slotted-node-container.js"
+);
+loader.lazyRequireGetter(
+ this,
+ "getLongString",
+ "resource://devtools/client/inspector/shared/utils.js",
+ true
+);
+loader.lazyRequireGetter(
+ this,
+ "openContentLink",
+ "resource://devtools/client/shared/link.js",
+ true
+);
+loader.lazyRequireGetter(
+ this,
+ "HTMLTooltip",
+ "resource://devtools/client/shared/widgets/tooltip/HTMLTooltip.js",
+ true
+);
+loader.lazyRequireGetter(
+ this,
+ "UndoStack",
+ "resource://devtools/client/shared/undo.js",
+ true
+);
+loader.lazyRequireGetter(
+ this,
+ "clipboardHelper",
+ "resource://devtools/shared/platform/clipboard.js"
+);
+loader.lazyRequireGetter(
+ this,
+ "beautify",
+ "resource://devtools/shared/jsbeautify/beautify.js"
+);
+loader.lazyRequireGetter(
+ this,
+ "getTabPrefs",
+ "resource://devtools/shared/indentation.js",
+ true
+);
+
+const INSPECTOR_L10N = new LocalizationHelper(
+ "devtools/client/locales/inspector.properties"
+);
+
+// Page size for pageup/pagedown
+const PAGE_SIZE = 10;
+const DEFAULT_MAX_CHILDREN = 100;
+const DRAG_DROP_AUTOSCROLL_EDGE_MAX_DISTANCE = 50;
+const DRAG_DROP_AUTOSCROLL_EDGE_RATIO = 0.1;
+const DRAG_DROP_MIN_AUTOSCROLL_SPEED = 2;
+const DRAG_DROP_MAX_AUTOSCROLL_SPEED = 8;
+const DRAG_DROP_HEIGHT_TO_SPEED = 500;
+const DRAG_DROP_HEIGHT_TO_SPEED_MIN = 0.5;
+const DRAG_DROP_HEIGHT_TO_SPEED_MAX = 1;
+const ATTR_COLLAPSE_ENABLED_PREF = "devtools.markup.collapseAttributes";
+const ATTR_COLLAPSE_LENGTH_PREF = "devtools.markup.collapseAttributeLength";
+const BEAUTIFY_HTML_ON_COPY_PREF = "devtools.markup.beautifyOnCopy";
+
+/**
+ * These functions are called when a shortcut (as defined in `_initShortcuts`) occurs.
+ * Each property in the following object corresponds to one of the shortcut that is
+ * handled by the markup-view.
+ * Each property value is a function that takes the markup-view instance as only
+ * argument, and returns a boolean that signifies whether the event should be consumed.
+ * By default, the event gets consumed after the shortcut handler returns,
+ * this means its propagation is stopped. If you do want the shortcut event
+ * to continue propagating through DevTools, then return true from the handler.
+ */
+const shortcutHandlers = {
+ // Localizable keys
+ "markupView.hide.key": markupView => {
+ const node = markupView._selectedContainer.node;
+ const walkerFront = node.walkerFront;
+
+ if (node.hidden) {
+ walkerFront.unhideNode(node);
+ } else {
+ walkerFront.hideNode(node);
+ }
+ },
+ "markupView.edit.key": markupView => {
+ markupView.beginEditingHTML(markupView._selectedContainer.node);
+ },
+ "markupView.scrollInto.key": markupView => {
+ markupView.scrollNodeIntoView();
+ },
+ // Generic keys
+ Delete: markupView => {
+ markupView.deleteNodeOrAttribute();
+ },
+ Backspace: markupView => {
+ markupView.deleteNodeOrAttribute(true);
+ },
+ Home: markupView => {
+ const rootContainer = markupView.getContainer(markupView._rootNode);
+ markupView.navigate(rootContainer.children.firstChild.container);
+ },
+ Left: markupView => {
+ if (markupView._selectedContainer.expanded) {
+ markupView.collapseNode(markupView._selectedContainer.node);
+ } else {
+ const parent = markupView._selectionWalker().parentNode();
+ if (parent) {
+ markupView.navigate(parent.container);
+ }
+ }
+ },
+ Right: markupView => {
+ if (
+ !markupView._selectedContainer.expanded &&
+ markupView._selectedContainer.hasChildren
+ ) {
+ markupView._expandContainer(markupView._selectedContainer);
+ } else {
+ const next = markupView._selectionWalker().nextNode();
+ if (next) {
+ markupView.navigate(next.container);
+ }
+ }
+ },
+ Up: markupView => {
+ const previousNode = markupView._selectionWalker().previousNode();
+ if (previousNode) {
+ markupView.navigate(previousNode.container);
+ }
+ },
+ Down: markupView => {
+ const nextNode = markupView._selectionWalker().nextNode();
+ if (nextNode) {
+ markupView.navigate(nextNode.container);
+ }
+ },
+ PageUp: markupView => {
+ const walker = markupView._selectionWalker();
+ let selection = markupView._selectedContainer;
+ for (let i = 0; i < PAGE_SIZE; i++) {
+ const previousNode = walker.previousNode();
+ if (!previousNode) {
+ break;
+ }
+ selection = previousNode.container;
+ }
+ markupView.navigate(selection);
+ },
+ PageDown: markupView => {
+ const walker = markupView._selectionWalker();
+ let selection = markupView._selectedContainer;
+ for (let i = 0; i < PAGE_SIZE; i++) {
+ const nextNode = walker.nextNode();
+ if (!nextNode) {
+ break;
+ }
+ selection = nextNode.container;
+ }
+ markupView.navigate(selection);
+ },
+ Enter: markupView => {
+ if (!markupView._selectedContainer.canFocus) {
+ markupView._selectedContainer.canFocus = true;
+ markupView._selectedContainer.focus();
+ return false;
+ }
+ return true;
+ },
+ Space: markupView => {
+ if (!markupView._selectedContainer.canFocus) {
+ markupView._selectedContainer.canFocus = true;
+ markupView._selectedContainer.focus();
+ return false;
+ }
+ return true;
+ },
+ Esc: markupView => {
+ if (markupView.isDragging) {
+ markupView.cancelDragging();
+ return false;
+ }
+ // Prevent cancelling the event when not
+ // dragging, to allow the split console to be toggled.
+ return true;
+ },
+};
+
+/**
+ * Vocabulary for the purposes of this file:
+ *
+ * MarkupContainer - the structure that holds an editor and its
+ * immediate children in the markup panel.
+ * - MarkupElementContainer: markup container for element nodes
+ * - MarkupTextContainer: markup container for text / comment nodes
+ * - MarkupReadonlyContainer: markup container for other nodes
+ * Node - A content node.
+ * object.elt - A UI element in the markup panel.
+ */
+
+/**
+ * The markup tree. Manages the mapping of nodes to MarkupContainers,
+ * updating based on mutations, and the undo/redo bindings.
+ *
+ * @param {Inspector} inspector
+ * The inspector we're watching.
+ * @param {iframe} frame
+ * An iframe in which the caller has kindly loaded markup.xhtml.
+ * @param {XULWindow} controllerWindow
+ * Will enable the undo/redo feature from devtools/client/shared/undo.
+ * Should be a XUL window, will typically point to the toolbox window.
+ */
+function MarkupView(inspector, frame, controllerWindow) {
+ EventEmitter.decorate(this);
+
+ this.controllerWindow = controllerWindow;
+ this.inspector = inspector;
+ this.highlighters = inspector.highlighters;
+ this.walker = this.inspector.walker;
+ this._frame = frame;
+ this.win = this._frame.contentWindow;
+ this.doc = this._frame.contentDocument;
+ this._elt = this.doc.getElementById("root");
+ this.telemetry = this.inspector.telemetry;
+ this._breakpointIDsInLocalState = new Map();
+ this._containersToUpdate = new Map();
+
+ this.maxChildren = Services.prefs.getIntPref(
+ "devtools.markup.pagesize",
+ DEFAULT_MAX_CHILDREN
+ );
+
+ this.collapseAttributes = Services.prefs.getBoolPref(
+ ATTR_COLLAPSE_ENABLED_PREF
+ );
+ this.collapseAttributeLength = Services.prefs.getIntPref(
+ ATTR_COLLAPSE_LENGTH_PREF
+ );
+
+ // Creating the popup to be used to show CSS suggestions.
+ // The popup will be attached to the toolbox document.
+ this.popup = new AutocompletePopup(inspector.toolbox.doc, {
+ autoSelect: true,
+ });
+
+ this._containers = new Map();
+ // This weakmap will hold keys used with the _containers map, in order to retrieve the
+ // slotted container for a given node front.
+ this._slottedContainerKeys = new WeakMap();
+
+ // Binding functions that need to be called in scope.
+ this._handleRejectionIfNotDestroyed =
+ this._handleRejectionIfNotDestroyed.bind(this);
+ this._isImagePreviewTarget = this._isImagePreviewTarget.bind(this);
+ this._onWalkerMutations = this._onWalkerMutations.bind(this);
+ this._onBlur = this._onBlur.bind(this);
+ this._onContextMenu = this._onContextMenu.bind(this);
+ this._onCopy = this._onCopy.bind(this);
+ this._onCollapseAttributesPrefChange =
+ this._onCollapseAttributesPrefChange.bind(this);
+ this._onWalkerNodeStatesChanged = this._onWalkerNodeStatesChanged.bind(this);
+ this._onFocus = this._onFocus.bind(this);
+ this._onResourceAvailable = this._onResourceAvailable.bind(this);
+ this._onTargetAvailable = this._onTargetAvailable.bind(this);
+ this._onTargetDestroyed = this._onTargetDestroyed.bind(this);
+ this._onMouseClick = this._onMouseClick.bind(this);
+ this._onMouseMove = this._onMouseMove.bind(this);
+ this._onMouseOut = this._onMouseOut.bind(this);
+ this._onMouseUp = this._onMouseUp.bind(this);
+ this._onNewSelection = this._onNewSelection.bind(this);
+ this._onToolboxPickerCanceled = this._onToolboxPickerCanceled.bind(this);
+ this._onToolboxPickerHover = this._onToolboxPickerHover.bind(this);
+ this._onDomMutation = this._onDomMutation.bind(this);
+
+ // Listening to various events.
+ this._elt.addEventListener("blur", this._onBlur, true);
+ this._elt.addEventListener("click", this._onMouseClick);
+ this._elt.addEventListener("contextmenu", this._onContextMenu);
+ this._elt.addEventListener("mousemove", this._onMouseMove);
+ this._elt.addEventListener("mouseout", this._onMouseOut);
+ this._frame.addEventListener("focus", this._onFocus);
+ this.inspector.selection.on("new-node-front", this._onNewSelection);
+ this._unsubscribeFromToolboxStore = this.inspector.toolbox.store.subscribe(
+ this._onDomMutation
+ );
+
+ if (flags.testing) {
+ // In tests, we start listening immediately to avoid having to simulate a mousemove.
+ this._initTooltips();
+ }
+
+ this.win.addEventListener("copy", this._onCopy);
+ this.win.addEventListener("mouseup", this._onMouseUp);
+ this.inspector.toolbox.nodePicker.on(
+ "picker-node-canceled",
+ this._onToolboxPickerCanceled
+ );
+ this.inspector.toolbox.nodePicker.on(
+ "picker-node-hovered",
+ this._onToolboxPickerHover
+ );
+
+ // Event listeners for highlighter events
+ this.onHighlighterShown = data =>
+ this.handleHighlighterEvent("highlighter-shown", data);
+ this.onHighlighterHidden = data =>
+ this.handleHighlighterEvent("highlighter-hidden", data);
+ this.inspector.highlighters.on("highlighter-shown", this.onHighlighterShown);
+ this.inspector.highlighters.on(
+ "highlighter-hidden",
+ this.onHighlighterHidden
+ );
+
+ this._onNewSelection();
+ if (this.inspector.selection.nodeFront) {
+ this.expandNode(this.inspector.selection.nodeFront);
+ }
+
+ this._prefObserver = new PrefObserver("devtools.markup");
+ this._prefObserver.on(
+ ATTR_COLLAPSE_ENABLED_PREF,
+ this._onCollapseAttributesPrefChange
+ );
+ this._prefObserver.on(
+ ATTR_COLLAPSE_LENGTH_PREF,
+ this._onCollapseAttributesPrefChange
+ );
+
+ this._initShortcuts();
+
+ this._walkerEventListener = new WalkerEventListener(this.inspector, {
+ "display-change": this._onWalkerNodeStatesChanged,
+ "scrollable-change": this._onWalkerNodeStatesChanged,
+ "overflow-change": this._onWalkerNodeStatesChanged,
+ mutations: this._onWalkerMutations,
+ });
+
+ this.resourceCommand = this.inspector.toolbox.resourceCommand;
+ this.resourceCommand.watchResources([this.resourceCommand.TYPES.ROOT_NODE], {
+ onAvailable: this._onResourceAvailable,
+ });
+
+ this.targetCommand = this.inspector.commands.targetCommand;
+ this.targetCommand.watchTargets({
+ types: [this.targetCommand.TYPES.FRAME],
+ onAvailable: this._onTargetAvailable,
+ onDestroyed: this._onTargetDestroyed,
+ });
+}
+
+MarkupView.prototype = {
+ /**
+ * How long does a node flash when it mutates (in ms).
+ */
+ CONTAINER_FLASHING_DURATION: 500,
+
+ _selectedContainer: null,
+
+ get contextMenu() {
+ if (!this._contextMenu) {
+ this._contextMenu = new MarkupContextMenu(this);
+ }
+
+ return this._contextMenu;
+ },
+
+ get eventDetailsTooltip() {
+ if (!this._eventDetailsTooltip) {
+ // This tooltip will be attached to the toolbox document.
+ this._eventDetailsTooltip = new HTMLTooltip(this.toolbox.doc, {
+ type: "arrow",
+ consumeOutsideClicks: false,
+ });
+ }
+
+ return this._eventDetailsTooltip;
+ },
+
+ get toolbox() {
+ return this.inspector.toolbox;
+ },
+
+ get undo() {
+ if (!this._undo) {
+ this._undo = new UndoStack();
+ this._undo.installController(this.controllerWindow);
+ }
+
+ return this._undo;
+ },
+
+ _onDomMutation() {
+ const domMutationBreakpoints =
+ this.inspector.toolbox.store.getState().domMutationBreakpoints
+ .breakpoints;
+ const breakpointIDsInCurrentState = [];
+ for (const breakpoint of domMutationBreakpoints) {
+ const nodeFront = breakpoint.nodeFront;
+ const mutationType = breakpoint.mutationType;
+ const enabledStatus = breakpoint.enabled;
+ breakpointIDsInCurrentState.push(breakpoint.id);
+ // If breakpoint is not in local state
+ if (!this._breakpointIDsInLocalState.has(breakpoint.id)) {
+ this._breakpointIDsInLocalState.set(breakpoint.id, breakpoint);
+ if (!this._containersToUpdate.has(nodeFront)) {
+ this._containersToUpdate.set(nodeFront, new Map());
+ }
+ }
+ this._containersToUpdate.get(nodeFront).set(mutationType, enabledStatus);
+ }
+ // If a breakpoint is in local state but not current state, it has been
+ // removed by the user.
+ for (const id of this._breakpointIDsInLocalState.keys()) {
+ if (breakpointIDsInCurrentState.includes(id) === false) {
+ const nodeFront = this._breakpointIDsInLocalState.get(id).nodeFront;
+ const mutationType =
+ this._breakpointIDsInLocalState.get(id).mutationType;
+ this._containersToUpdate.get(nodeFront).delete(mutationType);
+ this._breakpointIDsInLocalState.delete(id);
+ }
+ }
+ // Update each container
+ for (const nodeFront of this._containersToUpdate.keys()) {
+ const mutationBreakpoints = this._containersToUpdate.get(nodeFront);
+ const container = this.getContainer(nodeFront);
+ container.update(mutationBreakpoints);
+ if (this._containersToUpdate.get(nodeFront).size === 0) {
+ this._containersToUpdate.delete(nodeFront);
+ }
+ }
+ },
+
+ /**
+ * Handle promise rejections for various asynchronous actions, and only log errors if
+ * the markup view still exists.
+ * This is useful to silence useless errors that happen when the markup view is
+ * destroyed while still initializing (and making protocol requests).
+ */
+ _handleRejectionIfNotDestroyed(e) {
+ if (!this._destroyed) {
+ console.error(e);
+ }
+ },
+
+ _initTooltips() {
+ if (this.imagePreviewTooltip) {
+ return;
+ }
+ // The tooltips will be attached to the toolbox document.
+ this.imagePreviewTooltip = new HTMLTooltip(this.toolbox.doc, {
+ type: "arrow",
+ useXulWrapper: true,
+ });
+ this._enableImagePreviewTooltip();
+ },
+
+ _enableImagePreviewTooltip() {
+ this.imagePreviewTooltip.startTogglingOnHover(
+ this._elt,
+ this._isImagePreviewTarget
+ );
+ },
+
+ _disableImagePreviewTooltip() {
+ this.imagePreviewTooltip.stopTogglingOnHover();
+ },
+
+ _onToolboxPickerHover(nodeFront) {
+ this.showNode(nodeFront).then(() => {
+ this._showNodeAsHovered(nodeFront);
+ }, console.error);
+ },
+
+ /**
+ * If the element picker gets canceled, make sure and re-center the view on the
+ * current selected element.
+ */
+ _onToolboxPickerCanceled() {
+ if (this._selectedContainer) {
+ scrollIntoViewIfNeeded(this._selectedContainer.editor.elt);
+ }
+ },
+
+ isDragging: false,
+ _draggedContainer: null,
+
+ _onMouseMove(event) {
+ // Note that in tests, we start listening immediately from the constructor to avoid having to simulate a mousemove.
+ // Also note that initTooltips bails out if it is called many times, so it isn't an issue to call it a second
+ // time from here in case tests are doing a mousemove.
+ this._initTooltips();
+
+ let target = event.target;
+
+ if (this._draggedContainer) {
+ this._draggedContainer.onMouseMove(event);
+ }
+ // Auto-scroll if we're dragging.
+ if (this.isDragging) {
+ event.preventDefault();
+ this._autoScroll(event);
+ return;
+ }
+
+ // Show the current container as hovered and highlight it.
+ // This requires finding the current MarkupContainer (walking up the DOM).
+ while (!target.container) {
+ if (target.tagName.toLowerCase() === "body") {
+ return;
+ }
+ target = target.parentNode;
+ }
+
+ const container = target.container;
+ if (this._hoveredContainer !== container) {
+ this._showBoxModel(container.node);
+ }
+ this._showContainerAsHovered(container);
+
+ this.emit("node-hover");
+ },
+
+ /**
+ * If focus is moved outside of the markup view document and there is a
+ * selected container, make its contents not focusable by a keyboard.
+ */
+ _onBlur(event) {
+ if (!this._selectedContainer) {
+ return;
+ }
+
+ const { relatedTarget } = event;
+ if (relatedTarget && relatedTarget.ownerDocument === this.doc) {
+ return;
+ }
+
+ if (this._selectedContainer) {
+ this._selectedContainer.clearFocus();
+ }
+ },
+
+ _onContextMenu(event) {
+ this.contextMenu.show(event);
+ },
+
+ /**
+ * Executed on each mouse-move while a node is being dragged in the view.
+ * Auto-scrolls the view to reveal nodes below the fold to drop the dragged
+ * node in.
+ */
+ _autoScroll(event) {
+ const docEl = this.doc.documentElement;
+
+ if (this._autoScrollAnimationFrame) {
+ this.win.cancelAnimationFrame(this._autoScrollAnimationFrame);
+ }
+
+ // Auto-scroll when the mouse approaches top/bottom edge.
+ const fromBottom = docEl.clientHeight - event.pageY + this.win.scrollY;
+ const fromTop = event.pageY - this.win.scrollY;
+ const edgeDistance = Math.min(
+ DRAG_DROP_AUTOSCROLL_EDGE_MAX_DISTANCE,
+ docEl.clientHeight * DRAG_DROP_AUTOSCROLL_EDGE_RATIO
+ );
+
+ // The smaller the screen, the slower the movement.
+ const heightToSpeedRatio = Math.max(
+ DRAG_DROP_HEIGHT_TO_SPEED_MIN,
+ Math.min(
+ DRAG_DROP_HEIGHT_TO_SPEED_MAX,
+ docEl.clientHeight / DRAG_DROP_HEIGHT_TO_SPEED
+ )
+ );
+
+ if (fromBottom <= edgeDistance) {
+ // Map our distance range to a speed range so that the speed is not too
+ // fast or too slow.
+ const speed = map(
+ fromBottom,
+ 0,
+ edgeDistance,
+ DRAG_DROP_MIN_AUTOSCROLL_SPEED,
+ DRAG_DROP_MAX_AUTOSCROLL_SPEED
+ );
+
+ this._runUpdateLoop(() => {
+ docEl.scrollTop -=
+ heightToSpeedRatio * (speed - DRAG_DROP_MAX_AUTOSCROLL_SPEED);
+ });
+ }
+
+ if (fromTop <= edgeDistance) {
+ const speed = map(
+ fromTop,
+ 0,
+ edgeDistance,
+ DRAG_DROP_MIN_AUTOSCROLL_SPEED,
+ DRAG_DROP_MAX_AUTOSCROLL_SPEED
+ );
+
+ this._runUpdateLoop(() => {
+ docEl.scrollTop +=
+ heightToSpeedRatio * (speed - DRAG_DROP_MAX_AUTOSCROLL_SPEED);
+ });
+ }
+ },
+
+ /**
+ * Run a loop on the requestAnimationFrame.
+ */
+ _runUpdateLoop(update) {
+ const loop = () => {
+ update();
+ this._autoScrollAnimationFrame = this.win.requestAnimationFrame(loop);
+ };
+ loop();
+ },
+
+ _onMouseClick(event) {
+ // From the target passed here, let's find the parent MarkupContainer
+ // and forward the event if needed.
+ let parentNode = event.target;
+ let container;
+ while (parentNode !== this.doc.body) {
+ if (parentNode.container) {
+ container = parentNode.container;
+ break;
+ }
+ parentNode = parentNode.parentNode;
+ }
+
+ if (typeof container.onContainerClick === "function") {
+ // Forward the event to the container if it implements onContainerClick.
+ container.onContainerClick(event);
+ }
+ },
+
+ _onMouseUp(event) {
+ if (this._draggedContainer) {
+ this._draggedContainer.onMouseUp(event);
+ }
+
+ this.indicateDropTarget(null);
+ this.indicateDragTarget(null);
+ if (this._autoScrollAnimationFrame) {
+ this.win.cancelAnimationFrame(this._autoScrollAnimationFrame);
+ }
+ },
+
+ _onCollapseAttributesPrefChange() {
+ this.collapseAttributes = Services.prefs.getBoolPref(
+ ATTR_COLLAPSE_ENABLED_PREF
+ );
+ this.collapseAttributeLength = Services.prefs.getIntPref(
+ ATTR_COLLAPSE_LENGTH_PREF
+ );
+ this.update();
+ },
+
+ cancelDragging() {
+ if (!this.isDragging) {
+ return;
+ }
+
+ for (const [, container] of this._containers) {
+ if (container.isDragging) {
+ container.cancelDragging();
+ break;
+ }
+ }
+
+ this.indicateDropTarget(null);
+ this.indicateDragTarget(null);
+ if (this._autoScrollAnimationFrame) {
+ this.win.cancelAnimationFrame(this._autoScrollAnimationFrame);
+ }
+ },
+
+ _hoveredContainer: null,
+
+ /**
+ * Show a NodeFront's container as being hovered
+ *
+ * @param {NodeFront} nodeFront
+ * The node to show as hovered
+ */
+ _showNodeAsHovered(nodeFront) {
+ const container = this.getContainer(nodeFront);
+ this._showContainerAsHovered(container);
+ },
+
+ _showContainerAsHovered(container) {
+ if (this._hoveredContainer === container) {
+ return;
+ }
+
+ if (this._hoveredContainer) {
+ this._hoveredContainer.hovered = false;
+ }
+
+ container.hovered = true;
+ this._hoveredContainer = container;
+ },
+
+ async _onMouseOut(event) {
+ // Emulate mouseleave by skipping any relatedTarget inside the markup-view.
+ if (this._elt.contains(event.relatedTarget)) {
+ return;
+ }
+
+ if (this._autoScrollAnimationFrame) {
+ this.win.cancelAnimationFrame(this._autoScrollAnimationFrame);
+ }
+ if (this.isDragging) {
+ return;
+ }
+
+ await this._hideBoxModel();
+ if (this._hoveredContainer) {
+ this._hoveredContainer.hovered = false;
+ }
+ this._hoveredContainer = null;
+
+ this.emit("leave");
+ },
+
+ /**
+ * Show the Box Model Highlighter on a given node front
+ *
+ * @param {NodeFront} nodeFront
+ * The node for which to show the highlighter.
+ * @param {Object} options
+ * Configuration object with options for the Box Model Highlighter.
+ * @return {Promise} Resolves after the highlighter for this nodeFront is shown.
+ */
+ _showBoxModel(nodeFront, options) {
+ return this.inspector.highlighters.showHighlighterTypeForNode(
+ this.inspector.highlighters.TYPES.BOXMODEL,
+ nodeFront,
+ options
+ );
+ },
+
+ /**
+ * Hide the Box Model Highlighter for any node that may be highlighted.
+ *
+ * @return {Promise} Resolves when the highlighter is hidden.
+ */
+ _hideBoxModel() {
+ return this.inspector.highlighters.hideHighlighterType(
+ this.inspector.highlighters.TYPES.BOXMODEL
+ );
+ },
+
+ /**
+ * Delegate handler for highlighter events.
+ *
+ * This is the place to observe for highlighter events, check the highlighter type and
+ * event name, then react for example by modifying the DOM.
+ *
+ * @param {String} eventName
+ * Highlighter event name. One of: "highlighter-hidden", "highlighter-shown"
+ * @param {Object} data
+ * Object with data associated with the highlighter event.
+ * {String} data.type
+ * Highlighter type
+ * {NodeFront} data.nodeFront
+ * NodeFront of the node associated with the highlighter event
+ * {Object} data.options
+ * Optional configuration passed to the highlighter when shown
+ * {CustomHighlighterFront} data.highlighter
+ * Highlighter instance
+ *
+ */
+ handleHighlighterEvent(eventName, data) {
+ switch (data.type) {
+ // Toggle the "active" CSS class name on flex and grid display badges next to
+ // elements in the Markup view when a coresponding flex or grid highlighter is
+ // shown or hidden for a node.
+ case this.inspector.highlighters.TYPES.FLEXBOX:
+ case this.inspector.highlighters.TYPES.GRID:
+ const { nodeFront } = data;
+ if (!nodeFront) {
+ return;
+ }
+
+ // Find the badge corresponding to the node from the highlighter event payload.
+ const container = this.getContainer(nodeFront);
+ const badge = container?.editor?.displayBadge;
+ if (badge) {
+ badge.classList.toggle("active", eventName == "highlighter-shown");
+ }
+
+ // There is a limit to how many grid highlighters can be active at the same time.
+ // If the limit was reached, disable all non-active grid badges.
+ if (data.type === this.inspector.highlighters.TYPES.GRID) {
+ // Matches badges for "grid", "inline-grid" and "subgrid"
+ const selector = "[data-display*='grid']:not(.active)";
+ const isLimited =
+ this.inspector.highlighters.isGridHighlighterLimitReached();
+ Array.from(this._elt.querySelectorAll(selector)).map(el => {
+ el.classList.toggle("interactive", !isLimited);
+ });
+ }
+ break;
+ }
+ },
+
+ /**
+ * Used by tests
+ */
+ getSelectedContainer() {
+ return this._selectedContainer;
+ },
+
+ /**
+ * Get the MarkupContainer object for a given node, or undefined if
+ * none exists.
+ *
+ * @param {NodeFront} nodeFront
+ * The node to get the container for.
+ * @param {Boolean} slotted
+ * true to get the slotted version of the container.
+ * @return {MarkupContainer} The container for the provided node.
+ */
+ getContainer(node, slotted) {
+ const key = this._getContainerKey(node, slotted);
+ return this._containers.get(key);
+ },
+
+ /**
+ * Register a given container for a given node/slotted node.
+ *
+ * @param {NodeFront} nodeFront
+ * The node to set the container for.
+ * @param {Boolean} slotted
+ * true if the container represents the slotted version of the node.
+ */
+ setContainer(node, container, slotted) {
+ const key = this._getContainerKey(node, slotted);
+ return this._containers.set(key, container);
+ },
+
+ /**
+ * Check if a MarkupContainer object exists for a given node/slotted node
+ *
+ * @param {NodeFront} nodeFront
+ * The node to check.
+ * @param {Boolean} slotted
+ * true to check for a container matching the slotted version of the node.
+ * @return {Boolean} True if a container exists, false otherwise.
+ */
+ hasContainer(node, slotted) {
+ const key = this._getContainerKey(node, slotted);
+ return this._containers.has(key);
+ },
+
+ _getContainerKey(node, slotted) {
+ if (!slotted) {
+ return node;
+ }
+
+ if (!this._slottedContainerKeys.has(node)) {
+ this._slottedContainerKeys.set(node, { node });
+ }
+ return this._slottedContainerKeys.get(node);
+ },
+
+ _isContainerSelected(container) {
+ if (!container) {
+ return false;
+ }
+
+ const selection = this.inspector.selection;
+ return (
+ container.node == selection.nodeFront &&
+ container.isSlotted() == selection.isSlotted()
+ );
+ },
+
+ update() {
+ const updateChildren = node => {
+ this.getContainer(node).update();
+ for (const child of node.treeChildren()) {
+ updateChildren(child);
+ }
+ };
+
+ // Start with the documentElement
+ let documentElement;
+ for (const node of this._rootNode.treeChildren()) {
+ if (node.isDocumentElement === true) {
+ documentElement = node;
+ break;
+ }
+ }
+
+ // Recursively update each node starting with documentElement.
+ updateChildren(documentElement);
+ },
+
+ /**
+ * Executed when the mouse hovers over a target in the markup-view and is used
+ * to decide whether this target should be used to display an image preview
+ * tooltip.
+ * Delegates the actual decision to the corresponding MarkupContainer instance
+ * if one is found.
+ *
+ * @return {Promise} the promise returned by
+ * MarkupElementContainer._isImagePreviewTarget
+ */
+ async _isImagePreviewTarget(target) {
+ // From the target passed here, let's find the parent MarkupContainer
+ // and ask it if the tooltip should be shown
+ if (this.isDragging) {
+ return false;
+ }
+
+ let parent = target,
+ container;
+ while (parent) {
+ if (parent.container) {
+ container = parent.container;
+ break;
+ }
+ parent = parent.parentNode;
+ }
+
+ if (container instanceof MarkupElementContainer) {
+ return container.isImagePreviewTarget(target, this.imagePreviewTooltip);
+ }
+
+ return false;
+ },
+
+ /**
+ * Given the known reason, should the current selection be briefly highlighted
+ * In a few cases, we don't want to highlight the node:
+ * - If the reason is null (used to reset the selection),
+ * - if it's "inspector-default-selection" (initial node selected, either when
+ * opening the inspector or after a navigation/reload)
+ * - if it's "picker-node-picked" or "picker-node-previewed" (node selected with the
+ * node picker. Note that this does not include the "Inspect element" context menu,
+ * which has a dedicated reason, "browser-context-menu").
+ * - if it's "test" (this is a special case for mochitest. In tests, we often
+ * need to select elements but don't necessarily want the highlighter to come
+ * and go after a delay as this might break test scenarios)
+ * We also do not want to start a brief highlight timeout if the node is
+ * already being hovered over, since in that case it will already be
+ * highlighted.
+ */
+ _shouldNewSelectionBeHighlighted() {
+ const reason = this.inspector.selection.reason;
+ const unwantedReasons = [
+ "inspector-default-selection",
+ "nodeselected",
+ "picker-node-picked",
+ "picker-node-previewed",
+ "test",
+ ];
+
+ const isHighlight = this._isContainerSelected(this._hoveredContainer);
+ return !isHighlight && reason && !unwantedReasons.includes(reason);
+ },
+
+ /**
+ * React to new-node-front selection events.
+ * Highlights the node if needed, and make sure it is shown and selected in
+ * the view.
+ */
+ _onNewSelection(nodeFront, reason) {
+ const selection = this.inspector.selection;
+ // this will probably leak.
+ // TODO: use resource api listeners?
+ if (nodeFront) {
+ nodeFront.walkerFront.on(
+ "display-change",
+ this._onWalkerNodeStatesChanged
+ );
+ nodeFront.walkerFront.on(
+ "scrollable-change",
+ this._onWalkerNodeStatesChanged
+ );
+ nodeFront.walkerFront.on(
+ "overflow-change",
+ this._onWalkerNodeStatesChanged
+ );
+ nodeFront.walkerFront.on("mutations", this._onWalkerMutations);
+ }
+
+ if (this.htmlEditor) {
+ this.htmlEditor.hide();
+ }
+ if (this._isContainerSelected(this._hoveredContainer)) {
+ this._hoveredContainer.hovered = false;
+ this._hoveredContainer = null;
+ }
+
+ if (!selection.isNode()) {
+ this.unmarkSelectedNode();
+ return;
+ }
+
+ const done = this.inspector.updating("markup-view");
+ let onShowBoxModel;
+
+ // Highlight the element briefly if needed.
+ if (this._shouldNewSelectionBeHighlighted()) {
+ onShowBoxModel = this._showBoxModel(nodeFront, {
+ duration: this.inspector.HIGHLIGHTER_AUTOHIDE_TIMER,
+ });
+ }
+
+ const slotted = selection.isSlotted();
+ const smoothScroll = reason === "reveal-from-slot";
+ const onShow = this.showNode(selection.nodeFront, { slotted, smoothScroll })
+ .then(() => {
+ // We could be destroyed by now.
+ if (this._destroyed) {
+ return Promise.reject("markupview destroyed");
+ }
+
+ // Mark the node as selected.
+ const container = this.getContainer(selection.nodeFront, slotted);
+ this._markContainerAsSelected(container);
+
+ // Make sure the new selection is navigated to.
+ this.maybeNavigateToNewSelection();
+ return undefined;
+ })
+ .catch(this._handleRejectionIfNotDestroyed);
+
+ Promise.all([onShowBoxModel, onShow]).then(done);
+ },
+
+ /**
+ * Maybe make selected the current node selection's MarkupContainer depending
+ * on why the current node got selected.
+ */
+ async maybeNavigateToNewSelection() {
+ const { reason, nodeFront } = this.inspector.selection;
+
+ // The list of reasons that should lead to navigating to the node.
+ const reasonsToNavigate = [
+ // If the user picked an element with the element picker.
+ "picker-node-picked",
+ // If the user shift-clicked (previewed) an element.
+ "picker-node-previewed",
+ // If the user selected an element with the browser context menu.
+ "browser-context-menu",
+ // If the user added a new node by clicking in the inspector toolbar.
+ "node-inserted",
+ ];
+
+ // If the user performed an action with a keyboard, move keyboard focus to
+ // the markup tree container.
+ if (reason && reason.endsWith("-keyboard")) {
+ this.getContainer(this._rootNode).elt.focus();
+ }
+
+ if (reasonsToNavigate.includes(reason)) {
+ // not sure this is necessary
+ const root = await nodeFront.walkerFront.getRootNode();
+ this.getContainer(root).elt.focus();
+ this.navigate(this.getContainer(nodeFront));
+ }
+ },
+
+ /**
+ * Create a TreeWalker to find the next/previous
+ * node for selection.
+ */
+ _selectionWalker(start) {
+ const walker = this.doc.createTreeWalker(
+ start || this._elt,
+ nodeFilterConstants.SHOW_ELEMENT,
+ function (element) {
+ if (
+ element.container &&
+ element.container.elt === element &&
+ element.container.visible
+ ) {
+ return nodeFilterConstants.FILTER_ACCEPT;
+ }
+ return nodeFilterConstants.FILTER_SKIP;
+ }
+ );
+ walker.currentNode = this._selectedContainer.elt;
+ return walker;
+ },
+
+ _onCopy(evt) {
+ // Ignore copy events from editors
+ if (this._isInputOrTextarea(evt.target)) {
+ return;
+ }
+
+ const selection = this.inspector.selection;
+ if (selection.isNode()) {
+ this.copyOuterHTML();
+ }
+ evt.stopPropagation();
+ evt.preventDefault();
+ },
+
+ /**
+ * Copy the outerHTML of the selected Node to the clipboard.
+ */
+ copyOuterHTML() {
+ if (!this.inspector.selection.isNode()) {
+ return;
+ }
+ const node = this.inspector.selection.nodeFront;
+
+ switch (node.nodeType) {
+ case nodeConstants.ELEMENT_NODE:
+ copyLongHTMLString(node.walkerFront.outerHTML(node));
+ break;
+ case nodeConstants.COMMENT_NODE:
+ getLongString(node.getNodeValue()).then(comment => {
+ clipboardHelper.copyString("<!--" + comment + "-->");
+ });
+ break;
+ case nodeConstants.DOCUMENT_TYPE_NODE:
+ clipboardHelper.copyString(node.doctypeString);
+ break;
+ }
+ },
+
+ /**
+ * Copy the innerHTML of the selected Node to the clipboard.
+ */
+ copyInnerHTML() {
+ const nodeFront = this.inspector.selection.nodeFront;
+ if (!this.inspector.selection.isNode()) {
+ return;
+ }
+
+ copyLongHTMLString(nodeFront.walkerFront.innerHTML(nodeFront));
+ },
+
+ /**
+ * Given a type and link found in a node's attribute in the markup-view,
+ * attempt to follow that link (which may result in opening a new tab, the
+ * style editor or debugger).
+ */
+ followAttributeLink(type, link) {
+ if (!type || !link) {
+ return;
+ }
+
+ const nodeFront = this.inspector.selection.nodeFront;
+ if (type === "uri" || type === "cssresource" || type === "jsresource") {
+ // Open link in a new tab.
+ nodeFront.inspectorFront
+ .resolveRelativeURL(link, this.inspector.selection.nodeFront)
+ .then(url => {
+ if (type === "uri") {
+ openContentLink(url);
+ } else if (type === "cssresource") {
+ return this.toolbox.viewGeneratedSourceInStyleEditor(url);
+ } else if (type === "jsresource") {
+ return this.toolbox.viewGeneratedSourceInDebugger(url);
+ }
+ return null;
+ })
+ .catch(console.error);
+ } else if (type == "idref") {
+ // Select the node in the same document.
+ nodeFront.walkerFront
+ .document(nodeFront)
+ .then(doc => {
+ return nodeFront.walkerFront
+ .querySelector(doc, "#" + CSS.escape(link))
+ .then(node => {
+ if (!node) {
+ this.emit("idref-attribute-link-failed");
+ return;
+ }
+ this.inspector.selection.setNodeFront(node);
+ });
+ })
+ .catch(console.error);
+ }
+ },
+
+ /**
+ * Register all key shortcuts.
+ */
+ _initShortcuts() {
+ const shortcuts = new KeyShortcuts({
+ window: this.win,
+ });
+
+ // Keep a pointer on shortcuts to destroy them when destroying the markup
+ // view.
+ this._shortcuts = shortcuts;
+
+ this._onShortcut = this._onShortcut.bind(this);
+
+ // Process localizable keys
+ [
+ "markupView.hide.key",
+ "markupView.edit.key",
+ "markupView.scrollInto.key",
+ ].forEach(name => {
+ const key = INSPECTOR_L10N.getStr(name);
+ shortcuts.on(key, event => this._onShortcut(name, event));
+ });
+
+ // Process generic keys:
+ [
+ "Delete",
+ "Backspace",
+ "Home",
+ "Left",
+ "Right",
+ "Up",
+ "Down",
+ "PageUp",
+ "PageDown",
+ "Esc",
+ "Enter",
+ "Space",
+ ].forEach(key => {
+ shortcuts.on(key, event => this._onShortcut(key, event));
+ });
+ },
+
+ /**
+ * Key shortcut listener.
+ */
+ _onShortcut(name, event) {
+ if (this._isInputOrTextarea(event.target)) {
+ return;
+ }
+
+ const handler = shortcutHandlers[name];
+ const shouldPropagate = handler(this);
+ if (shouldPropagate) {
+ return;
+ }
+
+ event.stopPropagation();
+ event.preventDefault();
+ },
+
+ /**
+ * Check if a node is an input or textarea
+ */
+ _isInputOrTextarea(element) {
+ const name = element.tagName.toLowerCase();
+ return name === "input" || name === "textarea";
+ },
+
+ /**
+ * If there's an attribute on the current node that's currently focused, then
+ * delete this attribute, otherwise delete the node itself.
+ *
+ * @param {Boolean} moveBackward
+ * If set to true and if we're deleting the node, focus the previous
+ * sibling after deletion, otherwise the next one.
+ */
+ deleteNodeOrAttribute(moveBackward) {
+ const focusedAttribute = this.doc.activeElement
+ ? this.doc.activeElement.closest(".attreditor")
+ : null;
+ if (focusedAttribute) {
+ // The focused attribute might not be in the current selected container.
+ const container = focusedAttribute.closest("li.child").container;
+ container.removeAttribute(focusedAttribute.dataset.attr);
+ } else {
+ this.deleteNode(this._selectedContainer.node, moveBackward);
+ }
+ },
+
+ /**
+ * Returns a value indicating whether a node can be deleted.
+ *
+ * @param {NodeFront} nodeFront
+ * The node to test for deletion
+ */
+ isDeletable(nodeFront) {
+ return !(
+ nodeFront.isDocumentElement ||
+ nodeFront.nodeType == nodeConstants.DOCUMENT_NODE ||
+ nodeFront.nodeType == nodeConstants.DOCUMENT_TYPE_NODE ||
+ nodeFront.nodeType == nodeConstants.DOCUMENT_FRAGMENT_NODE ||
+ nodeFront.isAnonymous
+ );
+ },
+
+ /**
+ * Delete a node from the DOM.
+ * This is an undoable action.
+ *
+ * @param {NodeFront} node
+ * The node to remove.
+ * @param {Boolean} moveBackward
+ * If set to true, focus the previous sibling, otherwise the next one.
+ */
+ deleteNode(node, moveBackward) {
+ if (!this.isDeletable(node)) {
+ return;
+ }
+
+ const container = this.getContainer(node);
+
+ // Retain the node so we can undo this...
+ node.walkerFront
+ .retainNode(node)
+ .then(() => {
+ const parent = node.parentNode();
+ let nextSibling = null;
+ this.undo.do(
+ () => {
+ node.walkerFront.removeNode(node).then(siblings => {
+ nextSibling = siblings.nextSibling;
+ const prevSibling = siblings.previousSibling;
+ let focusNode = moveBackward ? prevSibling : nextSibling;
+
+ // If we can't move as the user wants, we move to the other direction.
+ // If there is no sibling elements anymore, move to the parent node.
+ if (!focusNode) {
+ focusNode = nextSibling || prevSibling || parent;
+ }
+
+ const isNextSiblingText = nextSibling
+ ? nextSibling.nodeType === nodeConstants.TEXT_NODE
+ : false;
+ const isPrevSiblingText = prevSibling
+ ? prevSibling.nodeType === nodeConstants.TEXT_NODE
+ : false;
+
+ // If the parent had two children and the next or previous sibling
+ // is a text node, then it now has only a single text node, is about
+ // to be in-lined; and focus should move to the parent.
+ if (
+ parent.numChildren === 2 &&
+ (isNextSiblingText || isPrevSiblingText)
+ ) {
+ focusNode = parent;
+ }
+
+ if (container.selected) {
+ this.navigate(this.getContainer(focusNode));
+ }
+ });
+ },
+ () => {
+ const isValidSibling = nextSibling && !nextSibling.isPseudoElement;
+ nextSibling = isValidSibling ? nextSibling : null;
+ node.walkerFront.insertBefore(node, parent, nextSibling);
+ }
+ );
+ })
+ .catch(console.error);
+ },
+
+ /**
+ * Scroll the node into view.
+ */
+ scrollNodeIntoView() {
+ if (!this.inspector.selection.isNode()) {
+ return;
+ }
+
+ this.inspector.selection.nodeFront.scrollIntoView();
+ },
+
+ async toggleMutationBreakpoint(name) {
+ if (!this.inspector.selection.isElementNode()) {
+ return;
+ }
+
+ const toolboxStore = this.inspector.toolbox.store;
+ const nodeFront = this.inspector.selection.nodeFront;
+
+ if (nodeFront.mutationBreakpoints[name]) {
+ toolboxStore.dispatch(deleteDOMMutationBreakpoint(nodeFront, name));
+ } else {
+ toolboxStore.dispatch(createDOMMutationBreakpoint(nodeFront, name));
+ }
+ },
+
+ /**
+ * If an editable item is focused, select its container.
+ */
+ _onFocus(event) {
+ let parent = event.target;
+ while (!parent.container) {
+ parent = parent.parentNode;
+ }
+ if (parent) {
+ this.navigate(parent.container);
+ }
+ },
+
+ /**
+ * Handle a user-requested navigation to a given MarkupContainer,
+ * updating the inspector's currently-selected node.
+ *
+ * @param {MarkupContainer} container
+ * The container we're navigating to.
+ */
+ navigate(container) {
+ if (!container) {
+ return;
+ }
+
+ this._markContainerAsSelected(container, "treepanel");
+ },
+
+ /**
+ * Make sure a node is included in the markup tool.
+ *
+ * @param {NodeFront} node
+ * The node in the content document.
+ * @param {Boolean} flashNode
+ * Whether the newly imported node should be flashed
+ * @param {Boolean} slotted
+ * Whether we are importing the slotted version of the node.
+ * @return {MarkupContainer} The MarkupContainer object for this element.
+ */
+ importNode(node, flashNode, slotted) {
+ if (!node) {
+ return null;
+ }
+
+ if (this.hasContainer(node, slotted)) {
+ return this.getContainer(node, slotted);
+ }
+
+ let container;
+ const { nodeType, isPseudoElement } = node;
+ if (node === node.walkerFront.rootNode) {
+ container = new RootContainer(this, node);
+ this._elt.appendChild(container.elt);
+ }
+ if (node === this.walker.rootNode) {
+ this._rootNode = node;
+ } else if (slotted) {
+ container = new SlottedNodeContainer(this, node, this.inspector);
+ } else if (nodeType == nodeConstants.ELEMENT_NODE && !isPseudoElement) {
+ container = new MarkupElementContainer(this, node, this.inspector);
+ } else if (
+ nodeType == nodeConstants.COMMENT_NODE ||
+ nodeType == nodeConstants.TEXT_NODE
+ ) {
+ container = new MarkupTextContainer(this, node, this.inspector);
+ } else {
+ container = new MarkupReadOnlyContainer(this, node, this.inspector);
+ }
+
+ if (flashNode) {
+ container.flashMutation();
+ }
+
+ this.setContainer(node, container, slotted);
+ this._forceUpdateChildren(container);
+
+ this.inspector.emit("container-created", container);
+
+ return container;
+ },
+
+ async _onResourceAvailable(resources) {
+ for (const resource of resources) {
+ if (
+ !this.resourceCommand ||
+ resource.resourceType !== this.resourceCommand.TYPES.ROOT_NODE ||
+ resource.isDestroyed()
+ ) {
+ // Only handle alive root-node resources
+ continue;
+ }
+
+ if (resource.targetFront.isTopLevel && resource.isTopLevelDocument) {
+ // The topmost root node will lead to the destruction and recreation of
+ // the MarkupView. This is handled by the inspector.
+ continue;
+ }
+
+ const parentNodeFront = resource.parentNode();
+ const container = this.getContainer(parentNodeFront);
+ if (container) {
+ // If there is no container for the parentNodeFront, the markup view is
+ // currently not watching this part of the tree.
+ this._forceUpdateChildren(container, {
+ flash: true,
+ updateLevel: true,
+ });
+ }
+ }
+ },
+
+ _onTargetAvailable({ targetFront }) {},
+
+ _onTargetDestroyed({ targetFront, isModeSwitching }) {
+ // Bug 1776250: We only watch targets in order to update containers which
+ // might no longer be able to display children hosted in remote processes,
+ // which corresponds to a Browser Toolbox mode switch.
+ if (isModeSwitching) {
+ const container = this.getContainer(targetFront.getParentNodeFront());
+ if (container) {
+ this._forceUpdateChildren(container, {
+ updateLevel: true,
+ });
+ }
+ }
+ },
+
+ /**
+ * Mutation observer used for included nodes.
+ */
+ _onWalkerMutations(mutations) {
+ for (const mutation of mutations) {
+ const type = mutation.type;
+ const target = mutation.target;
+
+ const container = this.getContainer(target);
+ if (!container) {
+ // Container might not exist if this came from a load event for a node
+ // we're not viewing.
+ continue;
+ }
+
+ if (
+ type === "attributes" ||
+ type === "characterData" ||
+ type === "customElementDefined" ||
+ type === "events" ||
+ type === "pseudoClassLock"
+ ) {
+ container.update();
+ } else if (
+ type === "childList" ||
+ type === "slotchange" ||
+ type === "shadowRootAttached"
+ ) {
+ this._forceUpdateChildren(container, {
+ flash: true,
+ updateLevel: true,
+ });
+ } else if (type === "inlineTextChild") {
+ this._forceUpdateChildren(container, { flash: true });
+ container.update();
+ }
+ }
+
+ this._waitForChildren().then(() => {
+ if (this._destroyed) {
+ // Could not fully update after markup mutations, the markup-view was destroyed
+ // while waiting for children. Bail out silently.
+ return;
+ }
+ this._flashMutatedNodes(mutations);
+ this.inspector.emit("markupmutation", mutations);
+
+ // Since the htmlEditor is absolutely positioned, a mutation may change
+ // the location in which it should be shown.
+ if (this.htmlEditor) {
+ this.htmlEditor.refresh();
+ }
+ });
+ },
+
+ /**
+ * React to display-change and scrollable-change events from the walker. These are
+ * events that tell us when something of interest changed on a collection of nodes:
+ * whether their display type changed, or whether they became scrollable.
+ *
+ * @param {Array} nodes
+ * An array of nodeFronts
+ */
+ _onWalkerNodeStatesChanged(nodes) {
+ for (const node of nodes) {
+ const container = this.getContainer(node);
+ if (container) {
+ container.update();
+ }
+ }
+ },
+
+ /**
+ * Given a list of mutations returned by the mutation observer, flash the
+ * corresponding containers to attract attention.
+ */
+ _flashMutatedNodes(mutations) {
+ const addedOrEditedContainers = new Set();
+ const removedContainers = new Set();
+
+ for (const { type, target, added, removed, newValue } of mutations) {
+ const container = this.getContainer(target);
+
+ if (container) {
+ if (type === "characterData") {
+ addedOrEditedContainers.add(container);
+ } else if (type === "attributes" && newValue === null) {
+ // Removed attributes should flash the entire node.
+ // New or changed attributes will flash the attribute itself
+ // in ElementEditor.flashAttribute.
+ addedOrEditedContainers.add(container);
+ } else if (type === "childList") {
+ // If there has been removals, flash the parent
+ if (removed.length) {
+ removedContainers.add(container);
+ }
+
+ // If there has been additions, flash the nodes if their associated
+ // container exist (so if their parent is expanded in the inspector).
+ added.forEach(node => {
+ const addedContainer = this.getContainer(node);
+ if (addedContainer) {
+ addedOrEditedContainers.add(addedContainer);
+
+ // The node may be added as a result of an append, in which case
+ // it will have been removed from another container first, but in
+ // these cases we don't want to flash both the removal and the
+ // addition
+ removedContainers.delete(container);
+ }
+ });
+ }
+ }
+ }
+
+ for (const container of removedContainers) {
+ container.flashMutation();
+ }
+ for (const container of addedOrEditedContainers) {
+ container.flashMutation();
+ }
+ },
+
+ /**
+ * Make sure the given node's parents are expanded and the
+ * node is scrolled on to screen.
+ */
+ showNode(node, { centered = true, slotted, smoothScroll = false } = {}) {
+ if (slotted && !this.hasContainer(node, slotted)) {
+ throw new Error("Tried to show a slotted node not previously imported");
+ } else {
+ this._ensureNodeImported(node);
+ }
+
+ return this._waitForChildren()
+ .then(() => {
+ if (this._destroyed) {
+ return Promise.reject("markupview destroyed");
+ }
+ return this._ensureVisible(node);
+ })
+ .then(() => {
+ const container = this.getContainer(node, slotted);
+ scrollIntoViewIfNeeded(container.editor.elt, centered, smoothScroll);
+ }, this._handleRejectionIfNotDestroyed);
+ },
+
+ _ensureNodeImported(node) {
+ let parent = node;
+
+ this.importNode(node);
+
+ while ((parent = this._getParentInTree(parent))) {
+ this.importNode(parent);
+ this.expandNode(parent);
+ }
+ },
+
+ /**
+ * Expand the container's children.
+ */
+ _expandContainer(container) {
+ return this._updateChildren(container, { expand: true }).then(() => {
+ if (this._destroyed) {
+ // Could not expand the node, the markup-view was destroyed in the meantime. Just
+ // silently give up.
+ return;
+ }
+ container.setExpanded(true);
+ });
+ },
+
+ /**
+ * Expand the node's children.
+ */
+ expandNode(node) {
+ const container = this.getContainer(node);
+ return this._expandContainer(container);
+ },
+
+ /**
+ * Expand the entire tree beneath a container.
+ *
+ * @param {MarkupContainer} container
+ * The container to expand.
+ */
+ _expandAll(container) {
+ return this._expandContainer(container)
+ .then(() => {
+ let child = container.children.firstChild;
+ const promises = [];
+ while (child) {
+ promises.push(this._expandAll(child.container));
+ child = child.nextSibling;
+ }
+ return Promise.all(promises);
+ })
+ .catch(console.error);
+ },
+
+ /**
+ * Expand the entire tree beneath a node.
+ *
+ * @param {DOMNode} node
+ * The node to expand, or null to start from the top.
+ * @return {Promise} promise that resolves once all children are expanded.
+ */
+ expandAll(node) {
+ node = node || this._rootNode;
+ return this._expandAll(this.getContainer(node));
+ },
+
+ /**
+ * Collapse the node's children.
+ */
+ collapseNode(node) {
+ const container = this.getContainer(node);
+ container.setExpanded(false);
+ },
+
+ _collapseAll(container) {
+ container.setExpanded(false);
+ const children = container.getChildContainers() || [];
+ children.forEach(child => this._collapseAll(child));
+ },
+
+ /**
+ * Collapse the entire tree beneath a node.
+ *
+ * @param {DOMNode} node
+ * The node to collapse.
+ * @return {Promise} promise that resolves once all children are collapsed.
+ */
+ collapseAll(node) {
+ this._collapseAll(this.getContainer(node));
+
+ // collapseAll is synchronous, return a promise for consistency with expandAll.
+ return Promise.resolve();
+ },
+
+ /**
+ * Returns either the innerHTML or the outerHTML for a remote node.
+ *
+ * @param {NodeFront} node
+ * The NodeFront to get the outerHTML / innerHTML for.
+ * @param {Boolean} isOuter
+ * If true, makes the function return the outerHTML,
+ * otherwise the innerHTML.
+ * @return {Promise} that will be resolved with the outerHTML / innerHTML.
+ */
+ _getNodeHTML(node, isOuter) {
+ let walkerPromise = null;
+
+ if (isOuter) {
+ walkerPromise = node.walkerFront.outerHTML(node);
+ } else {
+ walkerPromise = node.walkerFront.innerHTML(node);
+ }
+
+ return getLongString(walkerPromise);
+ },
+
+ /**
+ * Retrieve the outerHTML for a remote node.
+ *
+ * @param {NodeFront} node
+ * The NodeFront to get the outerHTML for.
+ * @return {Promise} that will be resolved with the outerHTML.
+ */
+ getNodeOuterHTML(node) {
+ return this._getNodeHTML(node, true);
+ },
+
+ /**
+ * Retrieve the innerHTML for a remote node.
+ *
+ * @param {NodeFront} node
+ * The NodeFront to get the innerHTML for.
+ * @return {Promise} that will be resolved with the innerHTML.
+ */
+ getNodeInnerHTML(node) {
+ return this._getNodeHTML(node);
+ },
+
+ /**
+ * Listen to mutations, expect a given node to be removed and try and select
+ * the node that sits at the same place instead.
+ * This is useful when changing the outerHTML or the tag name so that the
+ * newly inserted node gets selected instead of the one that just got removed.
+ */
+ reselectOnRemoved(removedNode, reason) {
+ // Only allow one removed node reselection at a time, so that when there are
+ // more than 1 request in parallel, the last one wins.
+ this.cancelReselectOnRemoved();
+
+ // Get the removedNode index in its parent node to reselect the right node.
+ const isRootElement = ["html", "svg"].includes(
+ removedNode.tagName.toLowerCase()
+ );
+ const oldContainer = this.getContainer(removedNode);
+ const parentContainer = this.getContainer(removedNode.parentNode());
+ const childIndex = parentContainer
+ .getChildContainers()
+ .indexOf(oldContainer);
+
+ const onMutations = (this._removedNodeObserver = mutations => {
+ let isNodeRemovalMutation = false;
+ for (const mutation of mutations) {
+ const containsRemovedNode =
+ mutation.removed && mutation.removed.some(n => n === removedNode);
+ if (
+ mutation.type === "childList" &&
+ (containsRemovedNode || isRootElement)
+ ) {
+ isNodeRemovalMutation = true;
+ break;
+ }
+ }
+ if (!isNodeRemovalMutation) {
+ return;
+ }
+
+ this.inspector.off("markupmutation", onMutations);
+ this._removedNodeObserver = null;
+
+ // Don't select the new node if the user has already changed the current
+ // selection.
+ if (
+ this.inspector.selection.nodeFront === parentContainer.node ||
+ (this.inspector.selection.nodeFront === removedNode && isRootElement)
+ ) {
+ const childContainers = parentContainer.getChildContainers();
+ if (childContainers?.[childIndex]) {
+ const childContainer = childContainers[childIndex];
+ this._markContainerAsSelected(childContainer, reason);
+ if (childContainer.hasChildren) {
+ this.expandNode(childContainer.node);
+ }
+ this.emit("reselectedonremoved");
+ }
+ }
+ });
+
+ // Start listening for mutations until we find a childList change that has
+ // removedNode removed.
+ this.inspector.on("markupmutation", onMutations);
+ },
+
+ /**
+ * Make sure to stop listening for node removal markupmutations and not
+ * reselect the corresponding node when that happens.
+ * Useful when the outerHTML/tagname edition failed.
+ */
+ cancelReselectOnRemoved() {
+ if (this._removedNodeObserver) {
+ this.inspector.off("markupmutation", this._removedNodeObserver);
+ this._removedNodeObserver = null;
+ this.emit("canceledreselectonremoved");
+ }
+ },
+
+ /**
+ * Replace the outerHTML of any node displayed in the inspector with
+ * some other HTML code
+ *
+ * @param {NodeFront} node
+ * Node which outerHTML will be replaced.
+ * @param {String} newValue
+ * The new outerHTML to set on the node.
+ * @param {String} oldValue
+ * The old outerHTML that will be used if the user undoes the update.
+ * @return {Promise} that will resolve when the outer HTML has been updated.
+ */
+ updateNodeOuterHTML(node, newValue) {
+ const container = this.getContainer(node);
+ if (!container) {
+ return Promise.reject();
+ }
+
+ // Changing the outerHTML removes the node which outerHTML was changed.
+ // Listen to this removal to reselect the right node afterwards.
+ this.reselectOnRemoved(node, "outerhtml");
+ return node.walkerFront.setOuterHTML(node, newValue).catch(() => {
+ this.cancelReselectOnRemoved();
+ });
+ },
+
+ /**
+ * Replace the innerHTML of any node displayed in the inspector with
+ * some other HTML code
+ * @param {Node} node
+ * node which innerHTML will be replaced.
+ * @param {String} newValue
+ * The new innerHTML to set on the node.
+ * @param {String} oldValue
+ * The old innerHTML that will be used if the user undoes the update.
+ * @return {Promise} that will resolve when the inner HTML has been updated.
+ */
+ updateNodeInnerHTML(node, newValue, oldValue) {
+ const container = this.getContainer(node);
+ if (!container) {
+ return Promise.reject();
+ }
+
+ return new Promise((resolve, reject) => {
+ container.undo.do(
+ () => {
+ node.walkerFront.setInnerHTML(node, newValue).then(resolve, reject);
+ },
+ () => {
+ node.walkerFront.setInnerHTML(node, oldValue);
+ }
+ );
+ });
+ },
+
+ /**
+ * Insert adjacent HTML to any node displayed in the inspector.
+ *
+ * @param {NodeFront} node
+ * The reference node.
+ * @param {String} position
+ * The position as specified for Element.insertAdjacentHTML
+ * (i.e. "beforeBegin", "afterBegin", "beforeEnd", "afterEnd").
+ * @param {String} newValue
+ * The adjacent HTML.
+ * @return {Promise} that will resolve when the adjacent HTML has
+ * been inserted.
+ */
+ insertAdjacentHTMLToNode(node, position, value) {
+ const container = this.getContainer(node);
+ if (!container) {
+ return Promise.reject();
+ }
+
+ let injectedNodes = [];
+
+ return new Promise((resolve, reject) => {
+ container.undo.do(
+ () => {
+ // eslint-disable-next-line no-unsanitized/method
+ node.walkerFront
+ .insertAdjacentHTML(node, position, value)
+ .then(nodeArray => {
+ injectedNodes = nodeArray.nodes;
+ return nodeArray;
+ })
+ .then(resolve, reject);
+ },
+ () => {
+ node.walkerFront.removeNodes(injectedNodes);
+ }
+ );
+ });
+ },
+
+ /**
+ * Open an editor in the UI to allow editing of a node's html.
+ *
+ * @param {NodeFront} node
+ * The NodeFront to edit.
+ */
+ beginEditingHTML(node) {
+ // We use outer html for elements, but inner html for fragments.
+ const isOuter = node.nodeType == nodeConstants.ELEMENT_NODE;
+ const html = isOuter
+ ? this.getNodeOuterHTML(node)
+ : this.getNodeInnerHTML(node);
+ html.then(oldValue => {
+ const container = this.getContainer(node);
+ if (!container) {
+ return;
+ }
+ // Load load and create HTML Editor as it is rarely used and fetch complex deps
+ if (!this.htmlEditor) {
+ const HTMLEditor = require("resource://devtools/client/inspector/markup/views/html-editor.js");
+ this.htmlEditor = new HTMLEditor(this.doc);
+ }
+ this.htmlEditor.show(container.tagLine, oldValue);
+ const start = this.telemetry.msSystemNow();
+ this.htmlEditor.once("popuphidden", (commit, value) => {
+ // Need to focus the <html> element instead of the frame / window
+ // in order to give keyboard focus back to doc (from editor).
+ this.doc.documentElement.focus();
+
+ if (commit) {
+ if (isOuter) {
+ this.updateNodeOuterHTML(node, value, oldValue);
+ } else {
+ this.updateNodeInnerHTML(node, value, oldValue);
+ }
+ }
+
+ const end = this.telemetry.msSystemNow();
+ this.telemetry.recordEvent("edit_html", "inspector", null, {
+ made_changes: commit,
+ time_open: end - start,
+ });
+ });
+
+ this.emit("begin-editing");
+ });
+ },
+
+ /**
+ * Expand or collapse the given node.
+ *
+ * @param {NodeFront} node
+ * The NodeFront to update.
+ * @param {Boolean} expanded
+ * Whether the node should be expanded/collapsed.
+ * @param {Boolean} applyToDescendants
+ * Whether all descendants should also be expanded/collapsed
+ */
+ setNodeExpanded(node, expanded, applyToDescendants) {
+ if (expanded) {
+ if (applyToDescendants) {
+ this.expandAll(node);
+ } else {
+ this.expandNode(node);
+ }
+ } else if (applyToDescendants) {
+ this.collapseAll(node);
+ } else {
+ this.collapseNode(node);
+ }
+ },
+
+ /**
+ * Mark the given node selected, and update the inspector.selection
+ * object's NodeFront to keep consistent state between UI and selection.
+ *
+ * @param {NodeFront} aNode
+ * The NodeFront to mark as selected.
+ * @param {String} reason
+ * The reason for marking the node as selected.
+ * @return {Boolean} False if the node is already marked as selected, true
+ * otherwise.
+ */
+ markNodeAsSelected(node, reason = "nodeselected") {
+ const container = this.getContainer(node);
+ return this._markContainerAsSelected(container);
+ },
+
+ _markContainerAsSelected(container, reason) {
+ if (!container || this._selectedContainer === container) {
+ return false;
+ }
+
+ const { node } = container;
+
+ // Un-select and remove focus from the previous container.
+ if (this._selectedContainer) {
+ this._selectedContainer.selected = false;
+ this._selectedContainer.clearFocus();
+ }
+
+ // Select the new container.
+ this._selectedContainer = container;
+ if (node) {
+ this._selectedContainer.selected = true;
+ }
+
+ // Change the current selection if needed.
+ if (!this._isContainerSelected(this._selectedContainer)) {
+ const isSlotted = container.isSlotted();
+ this.inspector.selection.setNodeFront(node, { reason, isSlotted });
+ }
+
+ return true;
+ },
+
+ /**
+ * Make sure that every ancestor of the selection are updated
+ * and included in the list of visible children.
+ */
+ _ensureVisible(node) {
+ while (node) {
+ const container = this.getContainer(node);
+ const parent = this._getParentInTree(node);
+ if (!container.elt.parentNode) {
+ const parentContainer = this.getContainer(parent);
+ if (parentContainer) {
+ this._forceUpdateChildren(parentContainer, { expand: true });
+ }
+ }
+
+ node = parent;
+ }
+ return this._waitForChildren();
+ },
+
+ /**
+ * Unmark selected node (no node selected).
+ */
+ unmarkSelectedNode() {
+ if (this._selectedContainer) {
+ this._selectedContainer.selected = false;
+ this._selectedContainer = null;
+ }
+ },
+
+ /**
+ * Check if the current selection is a descendent of the container.
+ * if so, make sure it's among the visible set for the container,
+ * and set the dirty flag if needed.
+ *
+ * @return The node that should be made visible, if any.
+ */
+ _checkSelectionVisible(container) {
+ let centered = null;
+ let node = this.inspector.selection.nodeFront;
+ while (node) {
+ if (this._getParentInTree(node) === container.node) {
+ centered = node;
+ break;
+ }
+ node = this._getParentInTree(node);
+ }
+
+ return centered;
+ },
+
+ async _forceUpdateChildren(container, options = {}) {
+ const { flash, updateLevel, expand } = options;
+
+ // Set childrenDirty to true to force fetching new children.
+ container.childrenDirty = true;
+
+ // Update the children to take care of changes in the markup view DOM
+ await this._updateChildren(container, { expand, flash });
+
+ // The markup view may have been destroyed in the meantime
+ if (this._destroyed) {
+ return;
+ }
+
+ if (updateLevel) {
+ // Update container (and its subtree) DOM tree depth level for
+ // accessibility where necessary.
+ container.updateLevel();
+ }
+ },
+
+ /**
+ * Make sure all children of the given container's node are
+ * imported and attached to the container in the right order.
+ *
+ * Children need to be updated only in the following circumstances:
+ * a) We just imported this node and have never seen its children.
+ * container.childrenDirty will be set by importNode in this case.
+ * b) We received a childList mutation on the node.
+ * container.childrenDirty will be set in that case too.
+ * c) We have changed the selection, and the path to that selection
+ * wasn't loaded in a previous children request (because we only
+ * grab a subset).
+ * container.childrenDirty should be set in that case too!
+ *
+ * @param {MarkupContainer} container
+ * The markup container whose children need updating
+ * @param {Object} options
+ * Options are {expand:boolean,flash:boolean}
+ * @return {Promise} that will be resolved when the children are ready
+ * (which may be immediately).
+ */
+ _updateChildren(container, options) {
+ // Slotted containers do not display any children.
+ if (container.isSlotted()) {
+ return Promise.resolve(container);
+ }
+
+ const expand = options?.expand;
+ const flash = options?.flash;
+
+ container.hasChildren = container.node.hasChildren;
+ // Accessibility should either ignore empty children or semantically
+ // consider them a group.
+ container.setChildrenRole();
+
+ if (!this._queuedChildUpdates) {
+ this._queuedChildUpdates = new Map();
+ }
+
+ if (this._queuedChildUpdates.has(container)) {
+ return this._queuedChildUpdates.get(container);
+ }
+
+ if (!container.childrenDirty) {
+ return Promise.resolve(container);
+ }
+
+ // Before bailing out for other conditions, check if the unavailable
+ // children badge needs updating (Bug 1776250).
+ if (
+ typeof container?.editor?.hasUnavailableChildren == "function" &&
+ container.editor.hasUnavailableChildren() !=
+ container.node.childrenUnavailable
+ ) {
+ container.update();
+ }
+
+ if (
+ container.inlineTextChild &&
+ container.inlineTextChild != container.node.inlineTextChild
+ ) {
+ // This container was doing double duty as a container for a single
+ // text child, back that out.
+ this._containers.delete(container.inlineTextChild);
+ container.clearInlineTextChild();
+
+ if (container.hasChildren && container.selected) {
+ container.setExpanded(true);
+ }
+ }
+
+ if (container.node.inlineTextChild) {
+ container.setExpanded(false);
+ // this container will do double duty as the container for the single
+ // text child.
+ while (container.children.firstChild) {
+ container.children.firstChild.remove();
+ }
+
+ container.setInlineTextChild(container.node.inlineTextChild);
+
+ this.setContainer(container.node.inlineTextChild, container);
+ container.childrenDirty = false;
+ return Promise.resolve(container);
+ }
+
+ if (!container.hasChildren) {
+ while (container.children.firstChild) {
+ container.children.firstChild.remove();
+ }
+ container.childrenDirty = false;
+ container.setExpanded(false);
+ return Promise.resolve(container);
+ }
+
+ // If we're not expanded (or asked to update anyway), we're done for
+ // now. Note that this will leave the childrenDirty flag set, so when
+ // expanded we'll refresh the child list.
+ if (!(container.expanded || expand)) {
+ return Promise.resolve(container);
+ }
+
+ // We're going to issue a children request, make sure it includes the
+ // centered node.
+ const centered = this._checkSelectionVisible(container);
+
+ // Children aren't updated yet, but clear the childrenDirty flag anyway.
+ // If the dirty flag is re-set while we're fetching we'll need to fetch
+ // again.
+ container.childrenDirty = false;
+
+ const isShadowHost = container.node.isShadowHost;
+ const updatePromise = this._getVisibleChildren(container, centered)
+ .then(children => {
+ if (!this._containers) {
+ return Promise.reject("markup view destroyed");
+ }
+ this._queuedChildUpdates.delete(container);
+
+ // If children are dirty, we got a change notification for this node
+ // while the request was in progress, we need to do it again.
+ if (container.childrenDirty) {
+ return this._updateChildren(container, {
+ expand: centered || expand,
+ });
+ }
+
+ const fragment = this.doc.createDocumentFragment();
+
+ for (const child of children.nodes) {
+ const slotted = !isShadowHost && child.isDirectShadowHostChild;
+ const childContainer = this.importNode(child, flash, slotted);
+ fragment.appendChild(childContainer.elt);
+ }
+
+ while (container.children.firstChild) {
+ container.children.firstChild.remove();
+ }
+
+ if (!children.hasFirst) {
+ const topItem = this.buildMoreNodesButtonMarkup(container);
+ fragment.insertBefore(topItem, fragment.firstChild);
+ }
+ if (!children.hasLast) {
+ const bottomItem = this.buildMoreNodesButtonMarkup(container);
+ fragment.appendChild(bottomItem);
+ }
+
+ container.children.appendChild(fragment);
+ return container;
+ })
+ .catch(this._handleRejectionIfNotDestroyed);
+ this._queuedChildUpdates.set(container, updatePromise);
+ return updatePromise;
+ },
+
+ buildMoreNodesButtonMarkup(container) {
+ const elt = this.doc.createElement("li");
+ elt.classList.add("more-nodes", "devtools-class-comment");
+
+ const label = this.doc.createElement("span");
+ label.textContent = INSPECTOR_L10N.getStr("markupView.more.showing");
+ elt.appendChild(label);
+
+ const button = this.doc.createElement("button");
+ button.setAttribute("href", "#");
+ const showAllString = PluralForm.get(
+ container.node.numChildren,
+ INSPECTOR_L10N.getStr("markupView.more.showAll2")
+ );
+ button.textContent = showAllString.replace(
+ "#1",
+ container.node.numChildren
+ );
+ elt.appendChild(button);
+
+ button.addEventListener("click", () => {
+ container.maxChildren = -1;
+ this._forceUpdateChildren(container);
+ });
+
+ return elt;
+ },
+
+ _waitForChildren() {
+ if (!this._queuedChildUpdates) {
+ return Promise.resolve(undefined);
+ }
+
+ return Promise.all([...this._queuedChildUpdates.values()]);
+ },
+
+ /**
+ * Return a list of the children to display for this container.
+ */
+ async _getVisibleChildren(container, centered) {
+ let maxChildren = container.maxChildren || this.maxChildren;
+ if (maxChildren == -1) {
+ maxChildren = undefined;
+ }
+
+ // We have to use node's walker and not a top level walker
+ // as for fission frames, we are going to have multiple walkers
+ const inspectorFront = await container.node.targetFront.getFront(
+ "inspector"
+ );
+ return inspectorFront.walker.children(container.node, {
+ maxNodes: maxChildren,
+ center: centered,
+ });
+ },
+
+ /**
+ * The parent of a given node as rendered in the markup view is not necessarily
+ * node.parentNode(). For instance, shadow roots don't have a parentNode, but a host
+ * element. However they are represented as parent and children in the markup view.
+ *
+ * Use this method when you are interested in the parent of a node from the perspective
+ * of the markup-view tree, and not from the perspective of the actual DOM.
+ */
+ _getParentInTree(node) {
+ const parent = node.parentOrHost();
+ if (!parent) {
+ return null;
+ }
+
+ // If the parent node belongs to a different target while the node's target is the
+ // one selected by the user in the iframe picker, we don't want to go further up.
+ if (
+ node.targetFront !== parent.targetFront &&
+ node.targetFront ==
+ this.inspector.commands.targetCommand.selectedTargetFront
+ ) {
+ return null;
+ }
+
+ return parent;
+ },
+
+ /**
+ * Tear down the markup panel.
+ */
+ destroy() {
+ if (this._destroyed) {
+ return;
+ }
+
+ this._destroyed = true;
+
+ this._hoveredContainer = null;
+
+ if (this._contextMenu) {
+ this._contextMenu.destroy();
+ this._contextMenu = null;
+ }
+
+ if (this._eventDetailsTooltip) {
+ this._eventDetailsTooltip.destroy();
+ this._eventDetailsTooltip = null;
+ }
+
+ if (this.htmlEditor) {
+ this.htmlEditor.destroy();
+ this.htmlEditor = null;
+ }
+
+ if (this.imagePreviewTooltip) {
+ this.imagePreviewTooltip.destroy();
+ this.imagePreviewTooltip = null;
+ }
+
+ if (this._undo) {
+ this._undo.destroy();
+ this._undo = null;
+ }
+
+ if (this._shortcuts) {
+ this._shortcuts.destroy();
+ this._shortcuts = null;
+ }
+
+ this.popup.destroy();
+ this.popup = null;
+ this._selectedContainer = null;
+
+ this._elt.removeEventListener("blur", this._onBlur, true);
+ this._elt.removeEventListener("click", this._onMouseClick);
+ this._elt.removeEventListener("contextmenu", this._onContextMenu);
+ this._elt.removeEventListener("mousemove", this._onMouseMove);
+ this._elt.removeEventListener("mouseout", this._onMouseOut);
+ this._frame.removeEventListener("focus", this._onFocus);
+ this._unsubscribeFromToolboxStore();
+ this.inspector.selection.off("new-node-front", this._onNewSelection);
+ this.resourceCommand.unwatchResources(
+ [this.resourceCommand.TYPES.ROOT_NODE],
+ { onAvailable: this._onResourceAvailable }
+ );
+ this.targetCommand.unwatchTargets({
+ types: [this.targetCommand.TYPES.FRAME],
+ onAvailable: this._onTargetAvailable,
+ onDestroyed: this._onTargetDestroyed,
+ });
+ this.inspector.toolbox.nodePicker.off(
+ "picker-node-hovered",
+ this._onToolboxPickerHover
+ );
+ this.inspector.toolbox.nodePicker.off(
+ "picker-node-canceled",
+ this._onToolboxPickerCanceled
+ );
+ this.inspector.highlighters.off(
+ "highlighter-shown",
+ this.onHighlighterShown
+ );
+ this.inspector.highlighters.off(
+ "highlighter-hidden",
+ this.onHighlighterHidden
+ );
+ this.win.removeEventListener("copy", this._onCopy);
+ this.win.removeEventListener("mouseup", this._onMouseUp);
+
+ this._walkerEventListener.destroy();
+ this._walkerEventListener = null;
+
+ this._prefObserver.off(
+ ATTR_COLLAPSE_ENABLED_PREF,
+ this._onCollapseAttributesPrefChange
+ );
+ this._prefObserver.off(
+ ATTR_COLLAPSE_LENGTH_PREF,
+ this._onCollapseAttributesPrefChange
+ );
+ this._prefObserver.destroy();
+
+ for (const [, container] of this._containers) {
+ container.destroy();
+ }
+ this._containers = null;
+
+ this._elt.innerHTML = "";
+ this._elt = null;
+
+ this.controllerWindow = null;
+ this.doc = null;
+ this.highlighters = null;
+ this.walker = null;
+ this.resourceCommand = null;
+ this.win = null;
+
+ this._lastDropTarget = null;
+ this._lastDragTarget = null;
+ },
+
+ /**
+ * Find the closest element with class tag-line. These are used to indicate
+ * drag and drop targets.
+ *
+ * @param {DOMNode} el
+ * @return {DOMNode}
+ */
+ findClosestDragDropTarget(el) {
+ return el.classList.contains("tag-line")
+ ? el
+ : el.querySelector(".tag-line") || el.closest(".tag-line");
+ },
+
+ /**
+ * Takes an element as it's only argument and marks the element
+ * as the drop target
+ */
+ indicateDropTarget(el) {
+ if (this._lastDropTarget) {
+ this._lastDropTarget.classList.remove("drop-target");
+ }
+
+ if (!el) {
+ return;
+ }
+
+ const target = this.findClosestDragDropTarget(el);
+ if (target) {
+ target.classList.add("drop-target");
+ this._lastDropTarget = target;
+ }
+ },
+
+ /**
+ * Takes an element to mark it as indicator of dragging target's initial place
+ */
+ indicateDragTarget(el) {
+ if (this._lastDragTarget) {
+ this._lastDragTarget.classList.remove("drag-target");
+ }
+
+ if (!el) {
+ return;
+ }
+
+ const target = this.findClosestDragDropTarget(el);
+ if (target) {
+ target.classList.add("drag-target");
+ this._lastDragTarget = target;
+ }
+ },
+
+ /**
+ * Used to get the nodes required to modify the markup after dragging the
+ * element (parent/nextSibling).
+ */
+ get dropTargetNodes() {
+ const target = this._lastDropTarget;
+
+ if (!target) {
+ return null;
+ }
+
+ let parent, nextSibling;
+
+ if (
+ target.previousElementSibling &&
+ target.previousElementSibling.nodeName.toLowerCase() === "ul"
+ ) {
+ parent = target.parentNode.container.node;
+ nextSibling = null;
+ } else {
+ parent = target.parentNode.container.node.parentNode();
+ nextSibling = target.parentNode.container.node;
+ }
+
+ if (nextSibling) {
+ while (
+ nextSibling.isMarkerPseudoElement ||
+ nextSibling.isBeforePseudoElement
+ ) {
+ nextSibling =
+ this.getContainer(nextSibling).elt.nextSibling.container.node;
+ }
+ if (nextSibling.isAfterPseudoElement) {
+ parent = target.parentNode.container.node.parentNode();
+ nextSibling = null;
+ }
+ }
+
+ if (parent.nodeType !== nodeConstants.ELEMENT_NODE) {
+ return null;
+ }
+
+ return { parent, nextSibling };
+ },
+};
+
+/**
+ * Copy the content of a longString containing HTML code to the clipboard.
+ * The string is retrieved, and possibly beautified if the user has the right pref set and
+ * then placed in the clipboard.
+ *
+ * @param {Promise} longStringActorPromise
+ * The promise expected to resolve a LongStringActor instance
+ */
+async function copyLongHTMLString(longStringActorPromise) {
+ let string = await getLongString(longStringActorPromise);
+
+ if (Services.prefs.getBoolPref(BEAUTIFY_HTML_ON_COPY_PREF)) {
+ const { indentUnit, indentWithTabs } = getTabPrefs();
+ string = beautify.html(string, {
+ // eslint-disable-next-line camelcase
+ preserve_newlines: false,
+ // eslint-disable-next-line camelcase
+ indent_size: indentWithTabs ? 1 : indentUnit,
+ // eslint-disable-next-line camelcase
+ indent_char: indentWithTabs ? "\t" : " ",
+ unformatted: [],
+ });
+ }
+
+ clipboardHelper.copyString(string);
+}
+
+/**
+ * Map a number from one range to another.
+ */
+function map(value, oldMin, oldMax, newMin, newMax) {
+ const ratio = oldMax - oldMin;
+ if (ratio == 0) {
+ return value;
+ }
+ return newMin + (newMax - newMin) * ((value - oldMin) / ratio);
+}
+
+module.exports = MarkupView;
diff --git a/devtools/client/inspector/markup/markup.xhtml b/devtools/client/inspector/markup/markup.xhtml
new file mode 100644
index 0000000000..dd8115bdc1
--- /dev/null
+++ b/devtools/client/inspector/markup/markup.xhtml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link
+ rel="stylesheet"
+ href="chrome://devtools/skin/badge.css"
+ type="text/css"
+ />
+ <link
+ rel="stylesheet"
+ href="chrome://devtools/skin/markup.css"
+ type="text/css"
+ />
+ <link
+ rel="stylesheet"
+ href="chrome://devtools/content/shared/sourceeditor/codemirror/lib/codemirror.css"
+ type="text/css"
+ />
+ <link
+ rel="stylesheet"
+ href="chrome://devtools/content/shared/sourceeditor/codemirror/addon/dialog/dialog.css"
+ type="text/css"
+ />
+ <link
+ rel="stylesheet"
+ href="chrome://devtools/content/shared/sourceeditor/codemirror/mozilla.css"
+ type="text/css"
+ />
+
+ <script src="chrome://devtools/content/shared/theme-switching.js"></script>
+ </head>
+ <body class="theme-body devtools-monospace" role="application">
+ <div id="root-wrapper" role="presentation">
+ <div id="root" role="presentation"></div>
+ </div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/moz.build b/devtools/client/inspector/markup/moz.build
new file mode 100644
index 0000000000..1fcba80d9b
--- /dev/null
+++ b/devtools/client/inspector/markup/moz.build
@@ -0,0 +1,19 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DIRS += [
+ "components",
+ "utils",
+ "views",
+]
+
+DevToolsModules(
+ "markup-context-menu.js",
+ "markup.js",
+ "utils.js",
+)
+
+BROWSER_CHROME_MANIFESTS += ["test/browser.ini"]
diff --git a/devtools/client/inspector/markup/test/browser.ini b/devtools/client/inspector/markup/test/browser.ini
new file mode 100644
index 0000000000..6ebc393626
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser.ini
@@ -0,0 +1,249 @@
+[DEFAULT]
+prefs =
+ # Bug 1520383 - Force devtools.chrome.enabled to false regardless of whether
+ # we're in an official build so we don't show event bubbles from chrome event
+ # listeners in the inspector on unprivileged test pages.
+ devtools.chrome.enabled=false
+tags = devtools
+subsuite = devtools
+support-files =
+ doc_markup_anonymous.html
+ doc_markup_dragdrop.html
+ doc_markup_dragdrop_autoscroll_01.html
+ doc_markup_dragdrop_autoscroll_02.html
+ doc_markup_edit.html
+ doc_markup_events_01.html
+ doc_markup_events_02.html
+ doc_markup_events_03.html
+ doc_markup_events_04.html
+ doc_markup_events_chrome_listeners.html
+ doc_markup_events_jquery.html
+ doc_markup_events_object_listener.html
+ doc_markup_events-overflow.html
+ doc_markup_events_react_development_15.4.1.html
+ doc_markup_events_react_development_15.4.1_jsx.html
+ doc_markup_events_react_production_15.3.1.html
+ doc_markup_events_react_production_15.3.1_jsx.html
+ doc_markup_events_react_production_16.2.0.html
+ doc_markup_events_react_production_16.2.0_jsx.html
+ doc_markup_events-source_map.html
+ doc_markup_events_toggle.html
+ doc_markup_flashing.html
+ doc_markup_html_mixed_case.html
+ doc_markup_image_and_canvas.html
+ doc_markup_image_and_canvas_2.html
+ doc_markup_links.html
+ doc_markup_mutation.html
+ doc_markup_navigation.html
+ doc_markup_not_displayed.html
+ doc_markup_pagesize_01.html
+ doc_markup_pagesize_02.html
+ doc_markup_pseudo.html
+ doc_markup_search.html
+ doc_markup_subgrid.html
+ doc_markup_svg_attributes.html
+ doc_markup_toggle.html
+ doc_markup_tooltip.png
+ doc_markup_void_elements.html
+ doc_markup_void_elements.xhtml
+ doc_markup_whitespace.html
+ doc_markup_xul.xhtml
+ doc_markup_update-on-navigtion_1.html
+ doc_markup_update-on-navigtion_2.html
+ doc_markup_view-original-source.html
+ doc_markup_shadowdom_open_debugger_pretty_printed.html
+ events_bundle.js
+ events_bundle.js.map
+ events_original.js
+ head.js
+ helper_attributes_test_runner.js
+ helper_diff.js
+ helper_events_test_runner.js
+ helper_markup_accessibility_navigation.js
+ helper_outerhtml_test_runner.js
+ helper_style_attr_test_runner.js
+ lib_babel_6.21.0_min.js
+ lib_jquery_1.0.js
+ lib_jquery_1.1.js
+ lib_jquery_1.2_min.js
+ lib_jquery_1.3_min.js
+ lib_jquery_1.4_min.js
+ lib_jquery_1.6_min.js
+ lib_jquery_1.7_min.js
+ lib_jquery_1.11.1_min.js
+ lib_jquery_2.1.1_min.js
+ lib_react_16.2.0_min.js
+ lib_react_dom_15.3.1_min.js
+ lib_react_dom_15.4.1.js
+ lib_react_dom_16.2.0_min.js
+ lib_react_with_addons_15.3.1_min.js
+ lib_react_with_addons_15.4.1.js
+ react_external_listeners.js
+ shadowdom_open_debugger.min.js
+ !/devtools/client/debugger/test/mochitest/shared-head.js
+ !/devtools/client/inspector/test/head.js
+ !/devtools/client/inspector/test/shared-head.js
+ !/devtools/client/shared/test/shared-head.js
+ !/devtools/client/shared/test/telemetry-test-helpers.js
+ !/devtools/client/shared/test/highlighter-test-actor.js
+
+[browser_markup_accessibility_focus_blur.js]
+skip-if = os == "mac" # Full keyboard navigation on OSX only works if Full Keyboard Access setting is set to All Control in System Keyboard Preferences
+[browser_markup_accessibility_navigation.js]
+skip-if = os == "mac" # Full keyboard navigation on OSX only works if Full Keyboard Access setting is set to All Control in System Keyboard Preferences
+[browser_markup_accessibility_new_selection.js]
+[browser_markup_accessibility_navigation_after_edit.js]
+skip-if = os == "mac" # Full keyboard navigation on OSX only works if Full Keyboard Access setting is set to All Control in System Keyboard Preferences
+[browser_markup_accessibility_semantics.js]
+[browser_markup_anonymous_01.js]
+[browser_markup_anonymous_03.js]
+[browser_markup_anonymous_04.js]
+[browser_markup_copy_html.js]
+[browser_markup_copy_image_data.js]
+[browser_markup_css_completion_style_attribute_01.js]
+[browser_markup_css_completion_style_attribute_02.js]
+[browser_markup_css_completion_style_attribute_03.js]
+[browser_markup_display_node_01.js]
+[browser_markup_display_node_02.js]
+[browser_markup_dom_mutation_breakpoints.js]
+[browser_markup_dragdrop_autoscroll_01.js]
+[browser_markup_dragdrop_autoscroll_02.js]
+[browser_markup_dragdrop_before_marker_pseudo.js]
+[browser_markup_dragdrop_distance.js]
+[browser_markup_dragdrop_draggable.js]
+[browser_markup_dragdrop_dragRootNode.js]
+[browser_markup_dragdrop_escapeKeyPress.js]
+[browser_markup_dragdrop_invalidNodes.js]
+[browser_markup_dragdrop_reorder.js]
+[browser_markup_dragdrop_tooltip.js]
+[browser_markup_events_01.js]
+[browser_markup_events_02.js]
+[browser_markup_events_03.js]
+[browser_markup_events_04.js]
+[browser_markup_events_chrome_blocked.js]
+[browser_markup_events_chrome_not_blocked.js]
+[browser_markup_events_click_to_close.js]
+[browser_markup_events_jquery_1.0.js]
+[browser_markup_events_jquery_1.1.js]
+[browser_markup_events_jquery_1.2.js]
+[browser_markup_events_jquery_1.3.js]
+[browser_markup_events_jquery_1.4.js]
+[browser_markup_events_jquery_1.6.js]
+[browser_markup_events_jquery_1.7.js]
+[browser_markup_events_jquery_1.11.1.js]
+[browser_markup_events_jquery_2.1.1.js]
+[browser_markup_events_object_listener.js]
+[browser_markup_events-overflow.js]
+skip-if = true # Bug 1177550
+[browser_markup_events_react_development_15.4.1.js]
+[browser_markup_events_react_development_15.4.1_jsx.js]
+[browser_markup_events_react_production_15.3.1.js]
+[browser_markup_events_react_production_15.3.1_jsx.js]
+[browser_markup_events_react_production_16.2.0.js]
+[browser_markup_events_react_production_16.2.0_jsx.js]
+[browser_markup_events_source_map.js]
+[browser_markup_events_toggle.js]
+[browser_markup_events-windowed-host.js]
+[browser_markup_flex_display_badge.js]
+[browser_markup_flex_display_badge_telemetry.js]
+[browser_markup_grid_display_badge_01.js]
+[browser_markup_grid_display_badge_02.js]
+[browser_markup_grid_display_badge_03.js]
+[browser_markup_grid_display_badge_telemetry.js]
+[browser_markup_iframe_blocked_by_csp.js]
+[browser_markup_links_01.js]
+[browser_markup_links_02.js]
+[browser_markup_links_03.js]
+[browser_markup_links_04.js]
+[browser_markup_links_05.js]
+[browser_markup_links_06.js]
+[browser_markup_links_07.js]
+[browser_markup_load_01.js]
+skip-if = true # Bug 1706833, times out waiting for context menu to open
+[browser_markup_html_edit_01.js]
+[browser_markup_html_edit_02.js]
+[browser_markup_html_edit_03.js]
+[browser_markup_html_edit_04.js]
+[browser_markup_html_edit_undo-redo.js]
+[browser_markup_image_tooltip.js]
+[browser_markup_image_tooltip_mutations.js]
+[browser_markup_keybindings_01.js]
+[browser_markup_keybindings_02.js]
+[browser_markup_keybindings_03.js]
+[browser_markup_keybindings_04.js]
+[browser_markup_keybindings_delete_attributes.js]
+[browser_markup_keybindings_scrolltonode.js]
+[browser_markup_mutation_01.js]
+[browser_markup_mutation_02.js]
+[browser_markup_navigation.js]
+[browser_markup_node_names.js]
+[browser_markup_node_names_namespaced.js]
+[browser_markup_node_not_displayed_01.js]
+[browser_markup_node_not_displayed_02.js]
+[browser_markup_overflow_badge.js]
+[browser_markup_pagesize_01.js]
+[browser_markup_pagesize_02.js]
+[browser_markup_pseudo_on_reload.js]
+[browser_markup_remove_xul_attributes.js]
+[browser_markup_screenshot_node.js]
+[browser_markup_screenshot_node_about_page.js]
+[browser_markup_screenshot_node_iframe.js]
+[browser_markup_screenshot_node_shadowdom.js]
+[browser_markup_screenshot_node_warning.js]
+[browser_markup_scrollable_badge.js]
+[browser_markup_scrollable_badge_click.js]
+[browser_markup_search_01.js]
+[browser_markup_shadowdom.js]
+[browser_markup_shadowdom_clickreveal.js]
+[browser_markup_shadowdom_clickreveal_scroll.js]
+[browser_markup_shadowdom_copy_paths.js]
+[browser_markup_shadowdom_delete.js]
+[browser_markup_shadowdom_dynamic.js]
+[browser_markup_shadowdom_hover.js]
+[browser_markup_shadowdom_marker_and_before_pseudos.js]
+[browser_markup_shadowdom_maxchildren.js]
+[browser_markup_shadowdom_mutations_shadow.js]
+[browser_markup_shadowdom_navigation.js]
+[browser_markup_shadowdom_nested_pick_inspect.js]
+[browser_markup_shadowdom_noslot.js]
+[browser_markup_shadowdom_open_debugger.js]
+[browser_markup_shadowdom_open_debugger_pretty_printed.js]
+[browser_markup_shadowdom_shadowroot_mode.js]
+[browser_markup_shadowdom_show_nodes_button.js]
+[browser_markup_shadowdom_slotted_keyboard_focus.js]
+[browser_markup_shadowdom_slotupdate.js]
+[browser_markup_shadowdom_ua_widgets.js]
+[browser_markup_shadowdom_ua_widgets_with_nac.js]
+[browser_markup_subgrid_display_badge.js]
+[browser_markup_tag_delete_whitespace_node.js]
+[browser_markup_tag_edit_01.js]
+[browser_markup_tag_edit_02.js]
+[browser_markup_tag_edit_03.js]
+[browser_markup_tag_edit_04-backspace.js]
+[browser_markup_tag_edit_04-delete.js]
+[browser_markup_tag_edit_05.js]
+[browser_markup_tag_edit_06.js]
+[browser_markup_tag_edit_07.js]
+[browser_markup_tag_edit_08.js]
+[browser_markup_tag_edit_09.js]
+[browser_markup_tag_edit_10.js]
+[browser_markup_tag_edit_11.js]
+[browser_markup_tag_edit_12.js]
+[browser_markup_tag_edit_13-other.js]
+[browser_markup_tag_edit_avoid_refocus.js]
+[browser_markup_tag_edit_long-classname.js]
+[browser_markup_template.js]
+[browser_markup_textcontent_display.js]
+[browser_markup_textcontent_edit_01.js]
+[browser_markup_textcontent_edit_02.js]
+[browser_markup_toggle_01.js]
+[browser_markup_toggle_02.js]
+[browser_markup_toggle_03.js]
+[browser_markup_toggle_04.js]
+[browser_markup_toggle_closing_tag_line.js]
+[browser_markup_update-on-navigtion.js]
+[browser_markup_view-source.js]
+[browser_markup_view-original-source.js]
+[browser_markup_void_elements_html.js]
+[browser_markup_void_elements_xhtml.js]
+[browser_markup_whitespace.js]
diff --git a/devtools/client/inspector/markup/test/browser_markup_accessibility_focus_blur.js b/devtools/client/inspector/markup/test/browser_markup_accessibility_focus_blur.js
new file mode 100644
index 0000000000..6be70144d8
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_accessibility_focus_blur.js
@@ -0,0 +1,77 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+// Test inspector markup view handling focus and blur when moving between markup
+// view, its root and other containers, and other parts of inspector.
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>"
+ );
+ const markup = inspector.markup;
+ const doc = markup.doc;
+ const win = doc.defaultView;
+
+ const spanContainer = await getContainerForSelector("span", inspector);
+ const rootContainer = markup.getContainer(markup._rootNode);
+
+ is(
+ doc.activeElement,
+ doc.body,
+ "Keyboard focus by default is on document body"
+ );
+
+ await selectNode("span", inspector);
+
+ is(doc.activeElement, doc.body, "Keyboard focus is still on document body");
+
+ info("Focusing on the test span node using 'Return' key");
+ // Focus on the tree element.
+ rootContainer.elt.focus();
+ EventUtils.synthesizeKey("VK_RETURN", {}, win);
+
+ is(
+ doc.activeElement,
+ spanContainer.editor.tag,
+ "Keyboard focus should be on tag element of focused container"
+ );
+
+ info("Focusing on search box, external to markup view document");
+ await focusSearchBoxUsingShortcut(inspector.panelWin);
+
+ is(
+ doc.activeElement,
+ doc.body,
+ "Keyboard focus should be removed from focused container"
+ );
+
+ info("Selecting the test span node again");
+ await selectNode("span", inspector);
+
+ is(
+ doc.activeElement,
+ doc.body,
+ "Keyboard focus should again be on document body"
+ );
+
+ info("Focusing on the test span node using 'Space' key");
+ // Focus on the tree element.
+ rootContainer.elt.focus();
+ EventUtils.synthesizeKey("VK_SPACE", {}, win);
+
+ is(
+ doc.activeElement,
+ spanContainer.editor.tag,
+ "Keyboard focus should again be on tag element of focused container"
+ );
+
+ await clickOnInspectMenuItem("h1");
+ is(
+ doc.activeElement,
+ rootContainer.elt,
+ "When inspect menu item is used keyboard focus should move to tree."
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation.js b/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation.js
new file mode 100644
index 0000000000..d7eaffae82
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation.js
@@ -0,0 +1,277 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* import-globals-from helper_markup_accessibility_navigation.js */
+
+"use strict";
+
+// Test keyboard navigation accessibility of inspector's markup view.
+
+loadHelperScript("helper_markup_accessibility_navigation.js");
+
+/**
+ * Test data has the format of:
+ * {
+ * desc {String} description for better logging
+ * key {String} key event's key
+ * options {?Object} optional event data such as shiftKey, etc
+ * focused {String} path to expected focused element relative to
+ * its container
+ * activedescendant {String} path to expected aria-activedescendant element
+ * relative to its container
+ * waitFor {String} optional event to wait for if keyboard actions
+ * result in asynchronous updates
+ * }
+ */
+const TESTS = [
+ {
+ desc: "Collapse body container",
+ focused: "root.elt",
+ activedescendant: "body.tagLine",
+ key: "VK_LEFT",
+ options: {},
+ waitFor: "collapsed",
+ },
+ {
+ desc: "Expand body container",
+ focused: "root.elt",
+ activedescendant: "body.tagLine",
+ key: "VK_RIGHT",
+ options: {},
+ waitFor: "expanded",
+ },
+ {
+ desc: "Select header container",
+ focused: "root.elt",
+ activedescendant: "header.tagLine",
+ key: "VK_DOWN",
+ options: {},
+ waitFor: "inspector-updated",
+ },
+ {
+ desc: "Expand header container",
+ focused: "root.elt",
+ activedescendant: "header.tagLine",
+ key: "VK_RIGHT",
+ options: {},
+ waitFor: "expanded",
+ },
+ {
+ desc: "Select text container",
+ focused: "root.elt",
+ activedescendant: "container-0.tagLine",
+ key: "VK_DOWN",
+ options: {},
+ waitFor: "inspector-updated",
+ },
+ {
+ desc: "Select header container again",
+ focused: "root.elt",
+ activedescendant: "header.tagLine",
+ key: "VK_UP",
+ options: {},
+ waitFor: "inspector-updated",
+ },
+ {
+ desc: "Collapse header container",
+ focused: "root.elt",
+ activedescendant: "header.tagLine",
+ key: "VK_LEFT",
+ options: {},
+ waitFor: "collapsed",
+ },
+ {
+ desc: "Focus on header container tag",
+ focused: "header.focusableElms.0",
+ activedescendant: "header.tagLine",
+ key: "VK_RETURN",
+ options: {},
+ },
+ {
+ desc: "Remove focus from header container tag",
+ focused: "root.elt",
+ activedescendant: "header.tagLine",
+ key: "VK_ESCAPE",
+ options: {},
+ },
+ {
+ desc: "Focus on header container tag again",
+ focused: "header.focusableElms.0",
+ activedescendant: "header.tagLine",
+ key: "VK_SPACE",
+ options: {},
+ },
+ {
+ desc: "Focus on header id attribute",
+ focused: "header.focusableElms.1",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Focus on header class attribute",
+ focused: "header.focusableElms.2",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Focus on header new attribute",
+ focused: "header.focusableElms.3",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Circle back and focus on header tag again",
+ focused: "header.focusableElms.0",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Circle back and focus on header new attribute again",
+ focused: "header.focusableElms.3",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: { shiftKey: true },
+ },
+ {
+ desc: "Tab back and focus on header class attribute",
+ focused: "header.focusableElms.2",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: { shiftKey: true },
+ },
+ {
+ desc: "Tab back and focus on header id attribute",
+ focused: "header.focusableElms.1",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: { shiftKey: true },
+ },
+ {
+ desc: "Tab back and focus on header tag",
+ focused: "header.focusableElms.0",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: { shiftKey: true },
+ },
+ {
+ desc: "Expand header container, ensure that focus is still on header tag",
+ focused: "header.focusableElms.0",
+ activedescendant: "header.tagLine",
+ key: "VK_RIGHT",
+ options: {},
+ waitFor: "expanded",
+ },
+ {
+ desc: "Activate header tag editor",
+ focused: "header.editor.tag.inplaceEditor.input",
+ activedescendant: "header.tagLine",
+ key: "VK_RETURN",
+ options: {},
+ },
+ {
+ desc: "Activate header id attribute editor",
+ focused: "header.editor.attrList.children.0.children.1.inplaceEditor.input",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Deselect text in header id attribute editor",
+ focused: "header.editor.attrList.children.0.children.1.inplaceEditor.input",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Activate header class attribute editor",
+ focused: "header.editor.attrList.children.1.children.1.inplaceEditor.input",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Deselect text in header class attribute editor",
+ focused: "header.editor.attrList.children.1.children.1.inplaceEditor.input",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Activate header new attribute editor",
+ focused: "header.editor.newAttr.inplaceEditor.input",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Circle back and activate header tag editor again",
+ focused: "header.editor.tag.inplaceEditor.input",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Circle back and activate header new attribute editor again",
+ focused: "header.editor.newAttr.inplaceEditor.input",
+ activedescendant: "header.tagLine",
+ key: "VK_TAB",
+ options: { shiftKey: true },
+ },
+ {
+ desc: "Exit edit mode and keep focus on header new attribute",
+ focused: "header.focusableElms.3",
+ activedescendant: "header.tagLine",
+ key: "VK_ESCAPE",
+ options: {},
+ },
+ {
+ desc: "Move the selection to body and reset focus to container tree",
+ focused: "docBody",
+ activedescendant: "body.tagLine",
+ key: "VK_UP",
+ options: {},
+ waitFor: "inspector-updated",
+ },
+];
+
+let containerID = 0;
+let elms = {};
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(`data:text/html;charset=utf-8,
+ <h1 id="some-id" class="some-class">foo<span>Child span<span></h1>`);
+
+ // Record containers that are created after inspector is initialized to be
+ // useful in testing.
+ inspector.on("container-created", memorizeContainer);
+ registerCleanupFunction(() => {
+ inspector.off("container-created", memorizeContainer);
+ });
+
+ elms.docBody = inspector.markup.doc.body;
+ elms.root = inspector.markup.getContainer(inspector.markup._rootNode);
+ elms.header = await getContainerForSelector("h1", inspector);
+ elms.body = await getContainerForSelector("body", inspector);
+
+ // Initial focus is on root element and active descendant should be set on
+ // body tag line.
+ testNavigationState(inspector, elms, elms.docBody, elms.body.tagLine);
+
+ // Focus on the tree element.
+ elms.root.elt.focus();
+
+ for (const testData of TESTS) {
+ await runAccessibilityNavigationTest(inspector, elms, testData);
+ }
+
+ elms = null;
+});
+
+// Record all containers that are created dynamically into elms object.
+function memorizeContainer(container) {
+ elms[`container-${containerID++}`] = container;
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation_after_edit.js b/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation_after_edit.js
new file mode 100644
index 0000000000..7f3782fab0
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation_after_edit.js
@@ -0,0 +1,126 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* import-globals-from helper_markup_accessibility_navigation.js */
+
+"use strict";
+
+// Test keyboard navigation accessibility is preserved after editing attributes.
+
+loadHelperScript("helper_markup_accessibility_navigation.js");
+
+const TEST_URI = '<div id="some-id" class="some-class"></div>';
+
+/**
+ * Test data has the format of:
+ * {
+ * desc {String} description for better logging
+ * key {String} key event's key
+ * options {?Object} optional event data such as shiftKey, etc
+ * focused {String} path to expected focused element relative to
+ * its container
+ * activedescendant {String} path to expected aria-activedescendant element
+ * relative to its container
+ * waitFor {String} optional event to wait for if keyboard actions
+ * result in asynchronous updates
+ * }
+ */
+const TESTS = [
+ {
+ desc: "Select header container",
+ focused: "root.elt",
+ activedescendant: "div.tagLine",
+ key: "VK_DOWN",
+ options: {},
+ waitFor: "inspector-updated",
+ },
+ {
+ desc: "Focus on header tag",
+ focused: "div.focusableElms.0",
+ activedescendant: "div.tagLine",
+ key: "VK_RETURN",
+ options: {},
+ },
+ {
+ desc: "Activate header tag editor",
+ focused: "div.editor.tag.inplaceEditor.input",
+ activedescendant: "div.tagLine",
+ key: "VK_RETURN",
+ options: {},
+ },
+ {
+ desc: "Activate header id attribute editor",
+ focused: "div.editor.attrList.children.0.children.1.inplaceEditor.input",
+ activedescendant: "div.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Deselect text in header id attribute editor",
+ focused: "div.editor.attrList.children.0.children.1.inplaceEditor.input",
+ activedescendant: "div.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Move the cursor to the left",
+ focused: "div.editor.attrList.children.0.children.1.inplaceEditor.input",
+ activedescendant: "div.tagLine",
+ key: "VK_LEFT",
+ options: {},
+ },
+ {
+ desc: "Modify the attribute",
+ focused: "div.editor.attrList.children.0.children.1.inplaceEditor.input",
+ activedescendant: "div.tagLine",
+ key: "A",
+ options: {},
+ },
+ {
+ desc: "Commit the attribute change",
+ focused: "div.focusableElms.1",
+ activedescendant: "div.tagLine",
+ key: "VK_RETURN",
+ options: {},
+ waitFor: "inspector-updated",
+ },
+ {
+ desc: "Tab and focus on header class attribute",
+ focused: "div.focusableElms.2",
+ activedescendant: "div.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+ {
+ desc: "Tab and focus on header new attribute node",
+ focused: "div.focusableElms.3",
+ activedescendant: "div.tagLine",
+ key: "VK_TAB",
+ options: {},
+ },
+];
+
+let elms = {};
+
+add_task(async function () {
+ const url = `data:text/html;charset=utf-8,${TEST_URI}`;
+ const { inspector } = await openInspectorForURL(url);
+
+ elms.docBody = inspector.markup.doc.body;
+ elms.root = inspector.markup.getContainer(inspector.markup._rootNode);
+ elms.div = await getContainerForSelector("div", inspector);
+ elms.body = await getContainerForSelector("body", inspector);
+
+ // Initial focus is on root element and active descendant should be set on
+ // body tag line.
+ testNavigationState(inspector, elms, elms.docBody, elms.body.tagLine);
+
+ // Focus on the tree element.
+ elms.root.elt.focus();
+
+ for (const testData of TESTS) {
+ await runAccessibilityNavigationTest(inspector, elms, testData);
+ }
+
+ elms = null;
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_accessibility_new_selection.js b/devtools/client/inspector/markup/test/browser_markup_accessibility_new_selection.js
new file mode 100644
index 0000000000..f1a6d3d769
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_accessibility_new_selection.js
@@ -0,0 +1,34 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+// Test inspector markup view handling new node selection that is triggered by
+// the user keyboard action. In this case markup tree container must receive
+// keyboard focus so that further interactions continue within the markup tree.
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>"
+ );
+ const markup = inspector.markup;
+ const doc = markup.doc;
+ const rootContainer = markup.getContainer(markup._rootNode);
+
+ is(
+ doc.activeElement,
+ doc.body,
+ "Keyboard focus by default is on document body"
+ );
+
+ await selectNode("span", inspector, "test");
+ is(doc.activeElement, doc.body, "Keyboard focus remains on document body.");
+
+ await selectNode("h1", inspector, "test-keyboard");
+ is(
+ doc.activeElement,
+ rootContainer.elt,
+ "Keyboard focus must be on the markup tree conainer."
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_accessibility_semantics.js b/devtools/client/inspector/markup/test/browser_markup_accessibility_semantics.js
new file mode 100644
index 0000000000..8aa5a2e335
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_accessibility_semantics.js
@@ -0,0 +1,146 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+// Test that inspector markup view has all expected ARIA properties set and
+// updated.
+
+const TOP_CONTAINER_LEVEL = 3;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(`
+ data:text/html;charset=utf-8,
+ <h1>foo</h1>
+ <span>bar</span>
+ <dl>
+ <dt></dt>
+ </dl>`);
+ const markup = inspector.markup;
+ const doc = markup.doc;
+ const win = doc.defaultView;
+
+ const rootElt = markup.getContainer(markup._rootNode).elt;
+ const bodyContainer = await getContainerForSelector("body", inspector);
+ const spanContainer = await getContainerForSelector("span", inspector);
+ const headerContainer = await getContainerForSelector("h1", inspector);
+ const listContainer = await getContainerForSelector("dl", inspector);
+
+ // Focus on the tree element.
+ rootElt.focus();
+
+ // Test tree related semantics
+ is(
+ rootElt.getAttribute("role"),
+ "tree",
+ "Root container should have tree semantics"
+ );
+ is(
+ rootElt.getAttribute("aria-dropeffect"),
+ "none",
+ "By default root container's drop effect should be set to none"
+ );
+ is(
+ rootElt.getAttribute("aria-activedescendant"),
+ bodyContainer.tagLine.getAttribute("id"),
+ "Default active descendant should be set to body"
+ );
+ is(
+ parseInt(bodyContainer.tagLine.getAttribute("aria-level"), 10),
+ TOP_CONTAINER_LEVEL - 1,
+ "Body container tagLine should have nested level up to date"
+ );
+ [spanContainer, headerContainer, listContainer].forEach(container => {
+ const treeitem = container.tagLine;
+ is(
+ treeitem.getAttribute("role"),
+ "treeitem",
+ "Child container tagLine elements should have tree item semantics"
+ );
+ is(
+ parseInt(treeitem.getAttribute("aria-level"), 10),
+ TOP_CONTAINER_LEVEL,
+ "Child container tagLine should have nested level up to date"
+ );
+ is(
+ treeitem.getAttribute("aria-grabbed"),
+ "false",
+ "Child container should be draggable but not grabbed by default"
+ );
+ is(
+ container.children.getAttribute("role"),
+ "group",
+ "Container with children should have its children element have group " +
+ "semantics"
+ );
+ ok(treeitem.id, "Tree item should have id assigned");
+ if (container.closeTagLine) {
+ is(
+ container.closeTagLine.getAttribute("role"),
+ "presentation",
+ "Ignore closing tag"
+ );
+ }
+ if (container.expander) {
+ is(
+ container.expander.getAttribute("role"),
+ "presentation",
+ "Ignore expander"
+ );
+ }
+ });
+
+ // Test expanding/expandable semantics
+ ok(
+ !spanContainer.tagLine.hasAttribute("aria-expanded"),
+ "Non expandable tree items should not have aria-expanded attribute"
+ );
+ ok(
+ !headerContainer.tagLine.hasAttribute("aria-expanded"),
+ "Non expandable tree items should not have aria-expanded attribute"
+ );
+ is(
+ listContainer.tagLine.getAttribute("aria-expanded"),
+ "false",
+ "Closed tree item should have aria-expanded unset"
+ );
+
+ info("Selecting and expanding list container");
+ await selectNode("dl", inspector);
+ EventUtils.synthesizeKey("VK_RIGHT", {}, win);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ is(
+ rootElt.getAttribute("aria-activedescendant"),
+ listContainer.tagLine.getAttribute("id"),
+ "Active descendant should not be set to list container tagLine"
+ );
+ is(
+ listContainer.tagLine.getAttribute("aria-expanded"),
+ "true",
+ "Open tree item should have aria-expanded set"
+ );
+ const listItemContainer = await getContainerForSelector("dt", inspector);
+ is(
+ parseInt(listItemContainer.tagLine.getAttribute("aria-level"), 10),
+ TOP_CONTAINER_LEVEL + 1,
+ "Grand child container tagLine should have nested level up to date"
+ );
+ is(
+ listItemContainer.children.getAttribute("role"),
+ "presentation",
+ "Container with no children should have its children element ignored by " +
+ "accessibility"
+ );
+
+ info("Collapsing list container");
+ EventUtils.synthesizeKey("VK_LEFT", {}, win);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ is(
+ listContainer.tagLine.getAttribute("aria-expanded"),
+ "false",
+ "Closed tree item should have aria-expanded unset"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_anonymous_01.js b/devtools/client/inspector/markup/test/browser_markup_anonymous_01.js
new file mode 100644
index 0000000000..4cf50de11e
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_anonymous_01.js
@@ -0,0 +1,46 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test native anonymous content in the markupview.
+const TEST_URL = URL_ROOT + "doc_markup_anonymous.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ const pseudo = await getNodeFront("#pseudo", inspector);
+
+ // Markup looks like: <div><::before /><span /><::after /></div>
+ const children = await inspector.walker.children(pseudo);
+ is(children.nodes.length, 3, "Children returned from walker");
+
+ info("Checking the ::before pseudo element");
+ const before = children.nodes[0];
+ await isEditingMenuDisabled(before, inspector);
+
+ info("Checking the normal child element");
+ const span = children.nodes[1];
+ await isEditingMenuEnabled(span, inspector);
+
+ info("Checking the ::after pseudo element");
+ const after = children.nodes[2];
+ await isEditingMenuDisabled(after, inspector);
+
+ const native = await getNodeFront("#native", inspector);
+
+ // Markup looks like: <div><input type="file"></div>
+ const nativeChildren = await inspector.walker.children(native);
+ is(nativeChildren.nodes.length, 1, "Children returned from walker");
+
+ info("Checking the input element");
+ const child = nativeChildren.nodes[0];
+ ok(!child.isAnonymous, "<input type=file> is not anonymous");
+
+ const grandchildren = await inspector.walker.children(child);
+ is(
+ grandchildren.nodes.length,
+ 0,
+ "No native children returned from walker for <input type=file> by default"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_anonymous_03.js b/devtools/client/inspector/markup/test/browser_markup_anonymous_03.js
new file mode 100644
index 0000000000..2d251a884a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_anonymous_03.js
@@ -0,0 +1,41 @@
+/* Any copyright is dedicated to the Public Domain.
+http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test shadow DOM content in the markupview.
+// Note that many features are not yet enabled, but basic listing
+// of elements should be working.
+const TEST_URL = URL_ROOT + "doc_markup_anonymous.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ const shadowHostFront = await getNodeFront("#shadow", inspector.markup);
+ is(shadowHostFront.numChildren, 3, "Children of the shadow host are correct");
+
+ await inspector.markup.expandNode(shadowHostFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ const shadowContainer = inspector.markup.getContainer(shadowHostFront);
+ const containers = shadowContainer.getChildContainers();
+
+ info("Checking the ::before pseudo element");
+ const before = containers[1].node;
+ await isEditingMenuDisabled(before, inspector);
+
+ info("Checking shadow dom children");
+ const shadowRootFront = containers[0].node;
+ const children = await inspector.walker.children(shadowRootFront);
+
+ is(shadowRootFront.numChildren, 2, "Children of the shadow root are counted");
+ is(children.nodes.length, 2, "Children returned from walker");
+
+ info("Checking the <h3> shadow element");
+ const shadowChild1 = children.nodes[0];
+ await isEditingMenuEnabled(shadowChild1, inspector);
+
+ info("Checking the <select> shadow element");
+ const shadowChild2 = children.nodes[1];
+ await isEditingMenuEnabled(shadowChild2, inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_anonymous_04.js b/devtools/client/inspector/markup/test/browser_markup_anonymous_04.js
new file mode 100644
index 0000000000..f40006b88b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_anonymous_04.js
@@ -0,0 +1,38 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test native anonymous content in the markupview with
+// devtools.inspector.showAllAnonymousContent set to true
+const TEST_URL = URL_ROOT + "doc_markup_anonymous.html";
+const PREF = "devtools.inspector.showAllAnonymousContent";
+
+add_task(async function () {
+ Services.prefs.setBoolPref(PREF, true);
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ const native = await getNodeFront("#native", inspector);
+
+ // Markup looks like: <div><input type="file"></div>
+ const nativeChildren = await inspector.walker.children(native);
+ is(nativeChildren.nodes.length, 1, "Children returned from walker");
+
+ info("Checking the input element");
+ const child = nativeChildren.nodes[0];
+ ok(!child.isAnonymous, "<input type=file> is not anonymous");
+
+ const grandchildren = await inspector.walker.children(child);
+ is(
+ grandchildren.nodes.length,
+ 2,
+ "<input type=file> has native anonymous children"
+ );
+
+ for (const node of grandchildren.nodes) {
+ ok(node.isAnonymous, "Child is anonymous");
+ ok(node._form.isNativeAnonymous, "Child is native anonymous");
+ await isEditingMenuDisabled(node, inspector);
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_copy_html.js b/devtools/client/inspector/markup/test/browser_markup_copy_html.js
new file mode 100644
index 0000000000..e1693a6366
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_copy_html.js
@@ -0,0 +1,93 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test the copy inner and outer html menu options.
+
+// The nicely formatted HTML code.
+const FORMATTED_HTML = `<body>
+ <style>
+ div {
+ color: red;
+ }
+
+ span {
+ text-decoration: underline;
+ }
+ </style>
+ <div><span><em>Hello</em></span></div>
+ <script>
+ console.log("Hello!");
+ </script>
+</body>`;
+
+// The inner HTML of the body node from the code above.
+const FORMATTED_INNER_HTML = FORMATTED_HTML.replace(/<\/*body>/g, "")
+ .trim()
+ .replace(/^ {2}/gm, "");
+
+// The formatted outer HTML, using tabs rather than spaces.
+const TABS_FORMATTED_HTML = FORMATTED_HTML.replace(/[ ]{2}/g, "\t");
+
+// The formatted outer HTML, using 3 spaces instead of 2.
+const THREE_SPACES_FORMATTED_HTML = FORMATTED_HTML.replace(/[ ]{2}/g, " ");
+
+// Uglify the formatted code by removing all spaces and line breaks.
+const UGLY_HTML = FORMATTED_HTML.replace(/[\r\n\s]+/g, "");
+
+// And here is the inner html of the body node from the ugly code above.
+const UGLY_INNER_HTML = UGLY_HTML.replace(/<\/*body>/g, "");
+
+add_task(async function () {
+ // Load the ugly code in a new tab and open the inspector.
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8," + encodeURIComponent(UGLY_HTML)
+ );
+
+ info("Get the inner and outer html copy menu items");
+ const allMenuItems = openContextMenuAndGetAllItems(inspector);
+ const outerHtmlMenu = allMenuItems.find(
+ ({ id }) => id === "node-menu-copyouter"
+ );
+ const innerHtmlMenu = allMenuItems.find(
+ ({ id }) => id === "node-menu-copyinner"
+ );
+
+ info("Try to copy the outer html");
+ await waitForClipboardPromise(() => outerHtmlMenu.click(), UGLY_HTML);
+
+ info("Try to copy the inner html");
+ await waitForClipboardPromise(() => innerHtmlMenu.click(), UGLY_INNER_HTML);
+
+ info("Set the pref for beautifying html on copy");
+ await pushPref("devtools.markup.beautifyOnCopy", true);
+
+ info("Try to copy the beautified outer html");
+ await waitForClipboardPromise(() => outerHtmlMenu.click(), FORMATTED_HTML);
+
+ info("Try to copy the beautified inner html");
+ await waitForClipboardPromise(
+ () => innerHtmlMenu.click(),
+ FORMATTED_INNER_HTML
+ );
+
+ info("Set the pref to stop expanding tabs into spaces");
+ await pushPref("devtools.editor.expandtab", false);
+
+ info("Check that the beautified outer html uses tabs");
+ await waitForClipboardPromise(
+ () => outerHtmlMenu.click(),
+ TABS_FORMATTED_HTML
+ );
+
+ info("Set the pref to expand tabs to 3 spaces");
+ await pushPref("devtools.editor.expandtab", true);
+ await pushPref("devtools.editor.tabsize", 3);
+
+ info("Try to copy the beautified outer html");
+ await waitForClipboardPromise(
+ () => outerHtmlMenu.click(),
+ THREE_SPACES_FORMATTED_HTML
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_copy_image_data.js b/devtools/client/inspector/markup/test/browser_markup_copy_image_data.js
new file mode 100644
index 0000000000..0386551c41
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_copy_image_data.js
@@ -0,0 +1,81 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that image nodes have the "copy data-uri" contextual menu item enabled
+// and that clicking it puts the image data into the clipboard
+
+add_task(async function () {
+ await addTab(URL_ROOT + "doc_markup_image_and_canvas.html");
+ const { inspector } = await openInspector();
+
+ await selectNode("div", inspector);
+ await assertCopyImageDataNotAvailable(inspector);
+
+ await selectNode("img", inspector);
+ await assertCopyImageDataAvailable(inspector);
+ const expectedSrc = await getContentPageElementAttribute("img", "src");
+ await triggerCopyImageUrlAndWaitForClipboard(expectedSrc, inspector);
+
+ await selectNode("canvas", inspector);
+ await assertCopyImageDataAvailable(inspector);
+ const expectedURL = await SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [],
+ () => content.document.querySelector(".canvas").toDataURL()
+ );
+ await triggerCopyImageUrlAndWaitForClipboard(expectedURL, inspector);
+
+ // Check again that the menu isn't available on the DIV (to make sure our
+ // menu updating mechanism works)
+ await selectNode("div", inspector);
+ await assertCopyImageDataNotAvailable(inspector);
+});
+
+function assertCopyImageDataNotAvailable(inspector) {
+ const allMenuItems = openContextMenuAndGetAllItems(inspector);
+ const item = allMenuItems.find(i => i.id === "node-menu-copyimagedatauri");
+
+ ok(item, "The menu item was found in the contextual menu");
+ ok(item.disabled, "The menu item is disabled");
+}
+
+function assertCopyImageDataAvailable(inspector) {
+ const allMenuItems = openContextMenuAndGetAllItems(inspector);
+ const item = allMenuItems.find(i => i.id === "node-menu-copyimagedatauri");
+
+ ok(item, "The menu item was found in the contextual menu");
+ ok(!item.disabled, "The menu item is enabled");
+}
+
+function triggerCopyImageUrlAndWaitForClipboard(expected, inspector) {
+ return new Promise(resolve => {
+ SimpleTest.waitForClipboard(
+ expected,
+ () => {
+ inspector.markup
+ .getContainer(inspector.selection.nodeFront)
+ .copyImageDataUri();
+ },
+ () => {
+ ok(
+ true,
+ "The clipboard contains the expected value " +
+ expected.substring(0, 50) +
+ "..."
+ );
+ resolve();
+ },
+ () => {
+ ok(
+ false,
+ "The clipboard doesn't contain the expected value " +
+ expected.substring(0, 50) +
+ "..."
+ );
+ resolve();
+ }
+ );
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_01.js b/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_01.js
new file mode 100644
index 0000000000..40879836ab
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_01.js
@@ -0,0 +1,130 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_style_attr_test_runner.js */
+
+"use strict";
+
+// Test CSS state is correctly determined and the corresponding suggestions are
+// displayed. i.e. CSS property suggestions are shown when cursor is like:
+// ```style="di|"``` where | is the cursor; And CSS value suggestion is
+// displayed when the cursor is like: ```style="display:n|"``` properly. No
+// suggestions should ever appear when the attribute is not a style attribute.
+// The correctness and cycling of the suggestions is covered in the ruleview
+// tests.
+
+loadHelperScript("helper_style_attr_test_runner.js");
+
+const TEST_URL = URL_ROOT + "doc_markup_edit.html";
+
+const COLOR_MIX_ENABLED = SpecialPowers.getBoolPref(
+ "layout.css.color-mix.enabled"
+);
+
+// test data format :
+// [
+// what key to press,
+// expected input box value after keypress,
+// expected input.selectionStart,
+// expected input.selectionEnd,
+// is popup expected to be open ?
+// ]
+const TEST_DATA = [
+ ["s", "s", 1, 1, false],
+ ["t", "st", 2, 2, false],
+ ["y", "sty", 3, 3, false],
+ ["l", "styl", 4, 4, false],
+ ["e", "style", 5, 5, false],
+ ["=", "style=", 6, 6, false],
+ ['"', 'style="', 7, 7, false],
+ ["d", 'style="display', 8, 14, true],
+ ["VK_TAB", 'style="display', 14, 14, true],
+ ["VK_TAB", 'style="dominant-baseline', 24, 24, true],
+ ["VK_TAB", 'style="d', 8, 8, true],
+ ["VK_TAB", 'style="direction', 16, 16, true],
+ ["click_2", 'style="display', 14, 14, false],
+ [":", 'style="display:block', 15, 20, true],
+ ["n", 'style="display:none', 16, 19, false],
+ ["VK_BACK_SPACE", 'style="display:n', 16, 16, false],
+ ["VK_BACK_SPACE", 'style="display:', 15, 15, false],
+ [" ", 'style="display: block', 16, 21, true],
+ [" ", 'style="display: block', 17, 22, true],
+ ["i", 'style="display: inherit', 18, 24, true],
+ ["VK_RIGHT", 'style="display: inherit', 24, 24, false],
+ [";", 'style="display: inherit;', 25, 25, false],
+ [" ", 'style="display: inherit; ', 26, 26, false],
+ [" ", 'style="display: inherit; ', 27, 27, false],
+ ["VK_LEFT", 'style="display: inherit; ', 26, 26, false],
+ ["c", 'style="display: inherit; color ', 27, 31, true],
+ ["VK_RIGHT", 'style="display: inherit; color ', 31, 31, false],
+ [" ", 'style="display: inherit; color ', 32, 32, false],
+ ["c", 'style="display: inherit; color c ', 33, 33, false],
+ ["VK_BACK_SPACE", 'style="display: inherit; color ', 32, 32, false],
+ [":", 'style="display: inherit; color :aliceblue ', 33, 42, true],
+ ["c", 'style="display: inherit; color :color ', 34, 38, true],
+ COLOR_MIX_ENABLED
+ ? ["VK_DOWN", 'style="display: inherit; color :color-mix ', 34, 42, true]
+ : ["VK_DOWN", 'style="display: inherit; color :coral ', 34, 38, true],
+ COLOR_MIX_ENABLED
+ ? ["VK_RIGHT", 'style="display: inherit; color :color-mix ', 42, 42, false]
+ : ["VK_RIGHT", 'style="display: inherit; color :coral ', 38, 38, false],
+ COLOR_MIX_ENABLED
+ ? [
+ " ",
+ 'style="display: inherit; color :color-mix aliceblue ',
+ 43,
+ 52,
+ true,
+ ]
+ : [" ", 'style="display: inherit; color :coral aliceblue ', 39, 48, true],
+ COLOR_MIX_ENABLED
+ ? [
+ "!",
+ 'style="display: inherit; color :color-mix !important; ',
+ 44,
+ 54,
+ false,
+ ]
+ : [
+ "!",
+ 'style="display: inherit; color :coral !important; ',
+ 40,
+ 50,
+ false,
+ ],
+ COLOR_MIX_ENABLED
+ ? [
+ "VK_RIGHT",
+ 'style="display: inherit; color :color-mix !important; ',
+ 54,
+ 54,
+ false,
+ ]
+ : [
+ "VK_RIGHT",
+ 'style="display: inherit; color :coral !important; ',
+ 50,
+ 50,
+ false,
+ ],
+ COLOR_MIX_ENABLED
+ ? [
+ "VK_RETURN",
+ 'style="display: inherit; color :color-mix !important;"',
+ -1,
+ -1,
+ false,
+ ]
+ : [
+ "VK_RETURN",
+ 'style="display: inherit; color :coral !important;"',
+ -1,
+ -1,
+ false,
+ ],
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await runStyleAttributeAutocompleteTests(inspector, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_02.js b/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_02.js
new file mode 100644
index 0000000000..d934fc4e2c
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_02.js
@@ -0,0 +1,103 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_style_attr_test_runner.js */
+
+"use strict";
+
+// Test CSS autocompletion of the style attributes stops after closing the
+// attribute using a matching quote.
+
+loadHelperScript("helper_style_attr_test_runner.js");
+
+const TEST_URL = URL_ROOT + "doc_markup_edit.html";
+
+// test data format :
+// [
+// what key to press,
+// expected input box value after keypress,
+// expected input.selectionStart,
+// expected input.selectionEnd,
+// is popup expected to be open ?
+// ]
+const TEST_DATA_DOUBLE = [
+ ["s", "s", 1, 1, false],
+ ["t", "st", 2, 2, false],
+ ["y", "sty", 3, 3, false],
+ ["l", "styl", 4, 4, false],
+ ["e", "style", 5, 5, false],
+ ["=", "style=", 6, 6, false],
+ ['"', 'style="', 7, 7, false],
+ ["c", 'style="color', 8, 12, true],
+ ["VK_RIGHT", 'style="color', 12, 12, false],
+ [":", 'style="color:aliceblue', 13, 22, true],
+ ["b", 'style="color:beige', 14, 18, true],
+ ["VK_RIGHT", 'style="color:beige', 18, 18, false],
+ ['"', 'style="color:beige"', 19, 19, false],
+ [" ", 'style="color:beige" ', 20, 20, false],
+ ["d", 'style="color:beige" d', 21, 21, false],
+ ["a", 'style="color:beige" da', 22, 22, false],
+ ["t", 'style="color:beige" dat', 23, 23, false],
+ ["a", 'style="color:beige" data', 24, 24, false],
+ ["VK_RETURN", 'style="color:beige"', -1, -1, false],
+];
+
+// Check that single quote attribute is also supported
+const TEST_DATA_SINGLE = [
+ ["s", "s", 1, 1, false],
+ ["t", "st", 2, 2, false],
+ ["y", "sty", 3, 3, false],
+ ["l", "styl", 4, 4, false],
+ ["e", "style", 5, 5, false],
+ ["=", "style=", 6, 6, false],
+ ["'", "style='", 7, 7, false],
+ ["c", "style='color", 8, 12, true],
+ ["VK_RIGHT", "style='color", 12, 12, false],
+ [":", "style='color:aliceblue", 13, 22, true],
+ ["b", "style='color:beige", 14, 18, true],
+ ["VK_RIGHT", "style='color:beige", 18, 18, false],
+ ["'", "style='color:beige'", 19, 19, false],
+ [" ", "style='color:beige' ", 20, 20, false],
+ ["d", "style='color:beige' d", 21, 21, false],
+ ["a", "style='color:beige' da", 22, 22, false],
+ ["t", "style='color:beige' dat", 23, 23, false],
+ ["a", "style='color:beige' data", 24, 24, false],
+ ["VK_RETURN", 'style="color:beige"', -1, -1, false],
+];
+
+// Check that autocompletion is still enabled after using url('1)
+const TEST_DATA_INNER = [
+ ["s", "s", 1, 1, false],
+ ["t", "st", 2, 2, false],
+ ["y", "sty", 3, 3, false],
+ ["l", "styl", 4, 4, false],
+ ["e", "style", 5, 5, false],
+ ["=", "style=", 6, 6, false],
+ ['"', 'style="', 7, 7, false],
+ ["b", 'style="border', 8, 13, true],
+ ["a", 'style="background', 9, 17, true],
+ ["VK_RIGHT", 'style="background', 17, 17, false],
+ [":", 'style="background:aliceblue', 18, 27, true],
+ ["u", 'style="background:unset', 19, 23, true],
+ ["r", 'style="background:url', 20, 21, false],
+ ["l", 'style="background:url', 21, 21, false],
+ ["(", 'style="background:url()', 22, 22, false],
+ ["'", "style=\"background:url(')", 23, 23, false],
+ ["1", "style=\"background:url('1)", 24, 24, false],
+ ["'", "style=\"background:url('1')", 25, 25, false],
+ [")", "style=\"background:url('1')", 26, 26, false],
+ [";", "style=\"background:url('1');", 27, 27, false],
+ [" ", "style=\"background:url('1'); ", 28, 28, false],
+ ["c", "style=\"background:url('1'); color", 29, 33, true],
+ ["VK_RIGHT", "style=\"background:url('1'); color", 33, 33, false],
+ [":", "style=\"background:url('1'); color:aliceblue", 34, 43, true],
+ ["b", "style=\"background:url('1'); color:beige", 35, 39, true],
+ ["VK_RETURN", "style=\"background:url('1'); color:beige\"", -1, -1, false],
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await runStyleAttributeAutocompleteTests(inspector, TEST_DATA_DOUBLE);
+ await runStyleAttributeAutocompleteTests(inspector, TEST_DATA_SINGLE);
+ await runStyleAttributeAutocompleteTests(inspector, TEST_DATA_INNER);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_03.js b/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_03.js
new file mode 100644
index 0000000000..038bf33f8b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_css_completion_style_attribute_03.js
@@ -0,0 +1,52 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_style_attr_test_runner.js */
+
+"use strict";
+
+// Test CSS autocompletion of the style attribute can be triggered when the
+// caret is before a non-word character.
+
+loadHelperScript("helper_style_attr_test_runner.js");
+
+const TEST_URL = URL_ROOT + "doc_markup_edit.html";
+
+// test data format :
+// [
+// what key to press,
+// expected input box value after keypress,
+// expected input.selectionStart,
+// expected input.selectionEnd,
+// is popup expected to be open ?
+// ]
+const TEST_DATA = [
+ ["s", "s", 1, 1, false],
+ ["t", "st", 2, 2, false],
+ ["y", "sty", 3, 3, false],
+ ["l", "styl", 4, 4, false],
+ ["e", "style", 5, 5, false],
+ ["=", "style=", 6, 6, false],
+ ['"', 'style="', 7, 7, false],
+ ['"', 'style=""', 8, 8, false],
+ ["VK_LEFT", 'style=""', 7, 7, false],
+ ["c", 'style="color"', 8, 12, true],
+ ["o", 'style="color"', 9, 12, true],
+ ["VK_RIGHT", 'style="color"', 12, 12, false],
+ [":", 'style="color:aliceblue"', 13, 22, true],
+ ["b", 'style="color:beige"', 14, 18, true],
+ ["VK_RIGHT", 'style="color:beige"', 18, 18, false],
+ [";", 'style="color:beige;"', 19, 19, false],
+ [";", 'style="color:beige;;"', 20, 20, false],
+ ["VK_LEFT", 'style="color:beige;;"', 19, 19, false],
+ ["p", 'style="color:beige;padding;"', 20, 26, true],
+ ["VK_RIGHT", 'style="color:beige;padding;"', 26, 26, false],
+ [":", 'style="color:beige;padding:inherit;"', 27, 34, true],
+ ["0", 'style="color:beige;padding:0;"', 28, 28, false],
+ ["VK_RETURN", 'style="color:beige;padding:0;"', -1, -1, false],
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await runStyleAttributeAutocompleteTests(inspector, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_display_node_01.js b/devtools/client/inspector/markup/test/browser_markup_display_node_01.js
new file mode 100644
index 0000000000..6082d586c1
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_display_node_01.js
@@ -0,0 +1,91 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that markup display node shows for only for grid and flex containers.
+
+const TEST_URI = `
+ <style type="text/css">
+ #grid {
+ display: grid;
+ }
+ #subgrid {
+ display: grid;
+ grid: subgrid / subgrid;
+ }
+ #flex {
+ display: flex;
+ }
+ #block {
+ display: block;
+ }
+ </style>
+ <div id="grid">
+ <div id="subgrid"></div>
+ </div>
+ <div id="flex">Flex</div>
+ <div id="block">Block</div>
+ <span>HELLO WORLD</span>
+`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)
+ );
+
+ info("Check the display node is shown and the value of #grid.");
+ await selectNode("#grid", inspector);
+ const gridContainer = await getContainerForSelector("#grid", inspector);
+ const gridDisplayNode = gridContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ ok(gridDisplayNode, "#grid display node is shown.");
+ is(
+ gridDisplayNode.textContent,
+ "grid",
+ "Got the correct display type for #grid."
+ );
+
+ info("Check the display node is shown and the value of #subgrid.");
+ await selectNode("#subgrid", inspector);
+ const subgridContainer = await getContainerForSelector("#subgrid", inspector);
+ const subgridDisplayNode = subgridContainer.elt.querySelector(
+ ".inspector-badge[data-display]"
+ );
+ ok(subgridDisplayNode, "#subgrid display node is shown");
+ is(
+ subgridDisplayNode.textContent,
+ "subgrid",
+ "Got the correct display type for #subgrid"
+ );
+
+ info("Check the display node is shown and the value of #flex.");
+ await selectNode("#flex", inspector);
+ const flexContainer = await getContainerForSelector("#flex", inspector);
+ const flexDisplayNode = flexContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ ok(flexDisplayNode, "#flex display node is shown.");
+ is(
+ flexDisplayNode.textContent,
+ "flex",
+ "Got the correct display type for #flex"
+ );
+
+ info("Check the display node is hidden for #block.");
+ await selectNode("#block", inspector);
+ const blockContainer = await getContainerForSelector("#block", inspector);
+ const blockDisplayNode = blockContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ ok(!blockDisplayNode, "#block display node is hidden.");
+
+ info("Check the display node is hidden for span.");
+ await selectNode("span", inspector);
+ const spanContainer = await getContainerForSelector("span", inspector);
+ const spanDisplayNode = spanContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ ok(!spanDisplayNode, "span display node is hidden.");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_display_node_02.js b/devtools/client/inspector/markup/test/browser_markup_display_node_02.js
new file mode 100644
index 0000000000..365562410e
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_display_node_02.js
@@ -0,0 +1,165 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that markup display node are updated when their display changes.
+
+const TEST_URI = `
+ <style type="text/css">
+ #grid {
+ display: grid;
+ }
+ #flex {
+ display: flex;
+ }
+ #flex[hidden] {
+ display: none;
+ }
+ #block {
+ display: block;
+ }
+ #flex
+ </style>
+ <div id="grid">Grid</div>
+ <div id="flex" hidden="">Flex</div>
+ <div id="block">Block</div>
+`;
+
+const TEST_DATA = [
+ {
+ desc: "Hiding the #grid display node by changing its style property",
+ selector: "#grid",
+ before: {
+ textContent: "grid",
+ visible: true,
+ },
+ async changeStyle() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const node = content.document.getElementById("grid");
+ node.style.display = "block";
+ });
+ },
+ after: {
+ visible: false,
+ },
+ },
+ {
+ desc: "Reusing the 'grid' node, updating the display to 'grid again",
+ selector: "#grid",
+ before: {
+ visible: false,
+ },
+ async changeStyle() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const node = content.document.getElementById("grid");
+ node.style.display = "grid";
+ });
+ },
+ after: {
+ textContent: "grid",
+ visible: true,
+ },
+ },
+ {
+ desc: "Showing a 'grid' node by changing its style property",
+ selector: "#block",
+ before: {
+ visible: false,
+ },
+ async changeStyle() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const node = content.document.getElementById("block");
+ node.style.display = "grid";
+ });
+ },
+ after: {
+ textContent: "grid",
+ visible: true,
+ },
+ },
+ {
+ desc: "Showing a 'flex' node by removing its hidden attribute",
+ selector: "#flex",
+ before: {
+ visible: false,
+ },
+ async changeStyle() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () =>
+ content.document.getElementById("flex").removeAttribute("hidden")
+ );
+ },
+ after: {
+ textContent: "flex",
+ visible: true,
+ },
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)
+ );
+
+ for (const data of TEST_DATA) {
+ info("Running test case: " + data.desc);
+ await runTestData(inspector, data);
+ }
+});
+
+async function runTestData(
+ inspector,
+ { selector, before, changeStyle, after }
+) {
+ await selectNode(selector, inspector);
+ const container = await getContainerForSelector(selector, inspector);
+
+ const beforeBadge = container.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ is(
+ !!beforeBadge,
+ before.visible,
+ `Display badge is visible as expected for ${selector}: ${before.visible}`
+ );
+ if (before.visible) {
+ is(
+ beforeBadge.textContent,
+ before.textContent,
+ `Got the correct before display type for ${selector}: ${beforeBadge.textContent}`
+ );
+ }
+
+ info("Listening for the display-change event");
+ const onDisplayChanged = inspector.markup.walker.once("display-change");
+ info("Making style changes");
+ await changeStyle();
+ const nodes = await onDisplayChanged;
+
+ info("Verifying that the list of changed nodes include our container");
+ ok(nodes.length, "The display-change event was received with a nodes");
+ let foundContainer = false;
+ for (const node of nodes) {
+ if (getContainerForNodeFront(node, inspector) === container) {
+ foundContainer = true;
+ break;
+ }
+ }
+ ok(foundContainer, "Container is part of the list of changed nodes");
+
+ const afterBadge = container.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ is(
+ !!afterBadge,
+ after.visible,
+ `Display badge is visible as expected for ${selector}: ${after.visible}`
+ );
+ if (after.visible) {
+ is(
+ afterBadge.textContent,
+ after.textContent,
+ `Got the correct after display type for ${selector}: ${afterBadge.textContent}`
+ );
+ }
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_dom_mutation_breakpoints.js b/devtools/client/inspector/markup/test/browser_markup_dom_mutation_breakpoints.js
new file mode 100644
index 0000000000..b17864ea53
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dom_mutation_breakpoints.js
@@ -0,0 +1,196 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+Services.scriptloader.loadSubScript(
+ "chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/shared-head.js",
+ this
+);
+
+function toggleMutationBreakpoint(inspector) {
+ const allMenuItems = openContextMenuAndGetAllItems(inspector);
+ const attributeMenuItem = allMenuItems.find(
+ ({ id }) => id === "node-menu-mutation-breakpoint-attribute"
+ );
+ attributeMenuItem.click();
+}
+
+// Test inspector markup view handling DOM mutation breakpoints icons
+// The icon should display when a breakpoint exists for a given node
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>"
+ );
+
+ await selectNode("span", inspector);
+ toggleMutationBreakpoint(inspector);
+
+ const span = await getContainerForSelector("span", inspector);
+ const mutationMarker = span.tagLine.querySelector(
+ ".markup-tag-mutation-marker"
+ );
+
+ ok(
+ mutationMarker.classList.contains("has-mutations"),
+ "has-mutations class is present"
+ );
+
+ toggleMutationBreakpoint(inspector);
+ await waitFor(() => !mutationMarker.classList.contains("has-mutations"));
+
+ ok(true, "has-mutations class is not present");
+});
+
+// Test that the inspector markup view dom mutation breakpoint icon behaves
+// correctly when disabled
+add_task(async function () {
+ await pushPref("devtools.debugger.dom-mutation-breakpoints-visible", true);
+ const { inspector, toolbox } = await openInspectorForURL(
+ "data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>"
+ );
+
+ await selectNode("span", inspector);
+ toggleMutationBreakpoint(inspector);
+
+ const span = await getContainerForSelector("span", inspector);
+ const mutationMarker = span.tagLine.querySelector(
+ ".markup-tag-mutation-marker"
+ );
+
+ ok(
+ mutationMarker.classList.contains("has-mutations"),
+ "has-mutations class is present"
+ );
+ is(
+ mutationMarker.classList.contains("mutation-breakpoint-disabled"),
+ false,
+ "mutation-breakpoint-disabled class is not present"
+ );
+
+ info("Switch over to the debugger pane");
+ await toolbox.selectTool("jsdebugger");
+
+ const dbg = createDebuggerContext(toolbox);
+
+ const mutationItem = await waitForElement(dbg, "domMutationItem");
+ mutationItem.scrollIntoView();
+
+ info("Disable the DOM mutation breakpoint");
+ const checkbox = mutationItem.querySelector("input");
+ checkbox.click();
+ await waitFor(() => !checkbox.checked);
+
+ await waitFor(
+ () =>
+ mutationMarker.classList.contains("has-mutations") &&
+ mutationMarker.classList.contains("mutation-breakpoint-disabled")
+ );
+
+ ok(
+ true,
+ "has-mutations and mutation-breakpoint-disabled classes are both present"
+ );
+
+ info("Re-enable the DOM mutation breakpoint");
+ checkbox.click();
+ await waitFor(() => checkbox.checked);
+
+ await waitFor(
+ () =>
+ mutationMarker.classList.contains("has-mutations") &&
+ !mutationMarker.classList.contains("mutation-breakpoint-disabled")
+ );
+
+ ok(
+ true,
+ "has-mutation class is present, mutation-breakpoint-disabled is not present"
+ );
+
+ // Test re-enabling disabled dom mutation breakpoint from inspector
+ info("Disable the DOM mutation breakpoint");
+ checkbox.click();
+ await waitFor(() => !checkbox.checked);
+
+ await waitFor(
+ () =>
+ mutationMarker.classList.contains("has-mutations") &&
+ mutationMarker.classList.contains("mutation-breakpoint-disabled")
+ );
+
+ ok(
+ true,
+ "has-mutations and mutation-breakpoint-disabled classes are both present"
+ );
+
+ info("Switch over to the inspector pane");
+ await toolbox.selectTool("inspector");
+
+ toggleMutationBreakpoint(inspector);
+ await waitFor(
+ () =>
+ mutationMarker.classList.contains("has-mutations") &&
+ !mutationMarker.classList.contains("mutation-breakpoint-disabled")
+ );
+
+ ok(
+ true,
+ "has-mutation class is present, mutation-breakpoint-disabled is not present"
+ );
+});
+
+// Test icon behavior with multiple breakpoints on the same node.
+add_task(async function () {
+ await pushPref("devtools.debugger.dom-mutation-breakpoints-visible", true);
+ const { inspector, toolbox } = await openInspectorForURL(
+ "data:text/html;charset=utf-8,<h1>foo</h1><span>bar</span>"
+ );
+
+ await selectNode("span", inspector);
+ const span = await getContainerForSelector("span", inspector);
+ const mutationMarker = span.tagLine.querySelector(
+ ".markup-tag-mutation-marker"
+ );
+
+ info("Add 2 DOM mutation breakpoints");
+ const allMenuItems = openContextMenuAndGetAllItems(inspector);
+
+ const attributeMenuItem = allMenuItems.find(
+ item => item.id === "node-menu-mutation-breakpoint-attribute"
+ );
+ attributeMenuItem.click();
+
+ const subtreeMenuItem = allMenuItems.find(
+ item => item.id === "node-menu-mutation-breakpoint-subtree"
+ );
+ subtreeMenuItem.click();
+
+ info("Switch over to the debugger pane");
+ await toolbox.selectTool("jsdebugger");
+
+ const dbg = createDebuggerContext(toolbox);
+
+ info("Confirm that DOM mutation breakpoints exists");
+ await waitForAllElements(dbg, "domMutationItem", 2, true);
+
+ const mutationItem = await waitForElement(dbg, "domMutationItem");
+
+ mutationItem.scrollIntoView();
+
+ info("Disable 1 dom mutation breakpoint");
+ const checkbox = mutationItem.querySelector("input");
+ checkbox.click();
+ await waitFor(() => !checkbox.checked);
+
+ await waitFor(
+ () =>
+ mutationMarker.classList.contains("has-mutations") &&
+ !mutationMarker.classList.contains("mutation-breakpoint-disabled")
+ );
+
+ ok(
+ true,
+ "has-mutation class is present, mutation-breakpoint-disabled is not present"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll_01.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll_01.js
new file mode 100644
index 0000000000..d0ec2e2427
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll_01.js
@@ -0,0 +1,48 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that dragging a node near the top or bottom edge of the markup-view
+// auto-scrolls the view on a large toolbox.
+
+const TEST_URL = URL_ROOT + "doc_markup_dragdrop_autoscroll_01.html";
+
+add_task(async function () {
+ // Set the toolbox as large as it would get. The toolbox automatically shrinks
+ // to not overflow to window.
+ await pushPref("devtools.toolbox.footer.height", 10000);
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const markup = inspector.markup;
+ const viewHeight = markup.doc.documentElement.clientHeight;
+
+ info("Pretend the markup-view is dragging");
+ markup.isDragging = true;
+
+ info("Simulate a mousemove on the view, at the bottom, and expect scrolling");
+
+ markup._onMouseMove({
+ preventDefault: () => {},
+ target: markup.doc.body,
+ pageY: viewHeight + markup.doc.defaultView.scrollY,
+ });
+
+ const bottomScrollPos = await waitForScrollStop(markup.doc);
+ ok(bottomScrollPos > 0, "The view was scrolled down");
+
+ info("Simulate a mousemove at the top and expect more scrolling");
+
+ markup._onMouseMove({
+ preventDefault: () => {},
+ target: markup.doc.body,
+ pageY: markup.doc.defaultView.scrollY,
+ });
+
+ const topScrollPos = await waitForScrollStop(markup.doc);
+ ok(topScrollPos < bottomScrollPos, "The view was scrolled up");
+ is(topScrollPos, 0, "The view was scrolled up to the top");
+
+ info("Simulate a mouseup to stop dragging");
+ markup._onMouseUp();
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll_02.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll_02.js
new file mode 100644
index 0000000000..1dc69a4ebb
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_autoscroll_02.js
@@ -0,0 +1,46 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that dragging a node near the top or bottom edge of the markup-view
+// auto-scrolls the view on a small toolbox.
+
+const TEST_URL = URL_ROOT + "doc_markup_dragdrop_autoscroll_02.html";
+
+add_task(async function () {
+ // Set the toolbox to very small in size.
+ await pushPref("devtools.toolbox.footer.height", 150);
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const markup = inspector.markup;
+ const viewHeight = markup.doc.documentElement.clientHeight;
+
+ info("Pretend the markup-view is dragging");
+ markup.isDragging = true;
+
+ info("Simulate a mousemove on the view, at the bottom, and expect scrolling");
+
+ markup._onMouseMove({
+ preventDefault: () => {},
+ target: markup.doc.body,
+ pageY: viewHeight + markup.doc.defaultView.scrollY,
+ });
+
+ const bottomScrollPos = await waitForScrollStop(markup.doc);
+ ok(bottomScrollPos > 0, "The view was scrolled down");
+ info("Simulate a mousemove at the top and expect more scrolling");
+
+ markup._onMouseMove({
+ preventDefault: () => {},
+ target: markup.doc.body,
+ pageY: markup.doc.defaultView.scrollY,
+ });
+
+ const topScrollPos = await waitForScrollStop(markup.doc);
+ ok(topScrollPos < bottomScrollPos, "The view was scrolled up");
+ is(topScrollPos, 0, "The view was scrolled up to the top");
+
+ info("Simulate a mouseup to stop dragging");
+ markup._onMouseUp();
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_before_marker_pseudo.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_before_marker_pseudo.js
new file mode 100644
index 0000000000..7cca09ce94
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_before_marker_pseudo.js
@@ -0,0 +1,78 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test drag and dropping a node before a ::marker pseudo.
+
+const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Expand #list node");
+ const parentFront = await getNodeFront("#list", inspector);
+ await inspector.markup.expandNode(parentFront.parentNode());
+ await inspector.markup.expandNode(parentFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ info("Scroll #list into view");
+ const parentContainer = await getContainerForNodeFront(
+ parentFront,
+ inspector
+ );
+ parentContainer.elt.scrollIntoView(true);
+
+ info("Test placing an element before a ::marker psuedo");
+ await moveElementBeforeMarker("#last-list-child", parentFront, inspector);
+ const childNodes = await getChildrenOf(parentFront, inspector);
+ is(
+ childNodes[0],
+ "_moz_generated_content_marker",
+ "::marker is still the first child of #list"
+ );
+ is(
+ childNodes[1],
+ "last-list-child",
+ "#last-list-child is now the second child of #list"
+ );
+ is(
+ childNodes[2],
+ "first-list-child",
+ "#first-list-child is now the last child of #list"
+ );
+});
+
+async function moveElementBeforeMarker(selector, parentFront, inspector) {
+ info(`Placing ${selector} before its parent's ::marker`);
+
+ const container = await getContainerForSelector(selector, inspector);
+ const parentContainer = await getContainerForNodeFront(
+ parentFront,
+ inspector
+ );
+ const offsetY =
+ parentContainer.tagLine.offsetTop +
+ parentContainer.tagLine.offsetHeight -
+ container.tagLine.offsetTop;
+
+ const onMutated = inspector.once("markupmutation");
+ const uiUpdate = inspector.once("inspector-updated");
+
+ await simulateNodeDragAndDrop(inspector, selector, 0, offsetY);
+
+ const mutations = await onMutated;
+ await uiUpdate;
+
+ is(mutations.length, 2, "2 mutations were received");
+}
+
+async function getChildrenOf(parentFront, { walker }) {
+ const { nodes } = await walker.children(parentFront);
+ return nodes.map(node => {
+ if (node.isMarkerPseudoElement) {
+ return node.displayName;
+ }
+ return node.id;
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_distance.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_distance.js
new file mode 100644
index 0000000000..6718d33317
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_distance.js
@@ -0,0 +1,48 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that nodes don't start dragging before the mouse has moved by at least
+// the minimum vertical distance defined in markup-view.js by
+// DRAG_DROP_MIN_INITIAL_DISTANCE.
+
+const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html";
+const TEST_NODE = "#test";
+
+// Keep this in sync with DRAG_DROP_MIN_INITIAL_DISTANCE in markup-view.js
+const MIN_DISTANCE = 10;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Drag the test node by half of the minimum distance");
+ await simulateNodeDrag(inspector, TEST_NODE, 0, MIN_DISTANCE / 2);
+ await checkIsDragging(inspector, TEST_NODE, false);
+
+ info("Drag the test node by exactly the minimum distance");
+ await simulateNodeDrag(inspector, TEST_NODE, 0, MIN_DISTANCE);
+ await checkIsDragging(inspector, TEST_NODE, true);
+ inspector.markup.cancelDragging();
+
+ info("Drag the test node by more than the minimum distance");
+ await simulateNodeDrag(inspector, TEST_NODE, 0, MIN_DISTANCE * 2);
+ await checkIsDragging(inspector, TEST_NODE, true);
+ inspector.markup.cancelDragging();
+
+ info("Drag the test node by minus the minimum distance");
+ await simulateNodeDrag(inspector, TEST_NODE, 0, MIN_DISTANCE * -1);
+ await checkIsDragging(inspector, TEST_NODE, true);
+ inspector.markup.cancelDragging();
+});
+
+async function checkIsDragging(inspector, selector, isDragging) {
+ const container = await getContainerForSelector(selector, inspector);
+ if (isDragging) {
+ ok(container.isDragging, "The container is being dragged");
+ ok(inspector.markup.isDragging, "And the markup-view knows it");
+ } else {
+ ok(!container.isDragging, "The container hasn't been marked as dragging");
+ ok(!inspector.markup.isDragging, "And the markup-view either");
+ }
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_dragRootNode.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_dragRootNode.js
new file mode 100644
index 0000000000..4c29fcc509
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_dragRootNode.js
@@ -0,0 +1,21 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the root node isn't draggable (as well as head and body).
+
+const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html";
+const TEST_DATA = ["html", "head", "body"];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ for (const selector of TEST_DATA) {
+ info("Try to drag/drop node " + selector);
+ await simulateNodeDrag(inspector, selector);
+
+ const container = await getContainerForSelector(selector, inspector);
+ ok(!container.isDragging, "The container hasn't been marked as dragging");
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_draggable.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_draggable.js
new file mode 100644
index 0000000000..949161b01f
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_draggable.js
@@ -0,0 +1,62 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+
+// Test which nodes are consider draggable by the markup-view.
+
+const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html";
+
+// Test cases should be objects with the following properties:
+// - node {String|Function} A CSS selector that uniquely identifies the node to
+// be tested. Or a generator function called in a Task that should return the
+// corresponding MarkupContainer object to be tested.
+// - draggable {Boolean} Whether or not the node should be draggable.
+const TEST_DATA = [
+ { node: "head", draggable: false },
+ { node: "body", draggable: false },
+ { node: "html", draggable: false },
+ { node: "style", draggable: true },
+ { node: "a", draggable: true },
+ { node: "p", draggable: true },
+ { node: "input", draggable: true },
+ { node: "div", draggable: true },
+ {
+ async node(inspector) {
+ const parentFront = await getNodeFront("#before", inspector);
+ const { nodes } = await inspector.walker.children(parentFront);
+ // Getting the comment node.
+ return getContainerForNodeFront(nodes[1], inspector);
+ },
+ draggable: true,
+ },
+ {
+ async node(inspector) {
+ const parentFront = await getNodeFront("#test", inspector);
+ const { nodes } = await inspector.walker.children(parentFront);
+ // Getting the ::before pseudo element.
+ return getContainerForNodeFront(nodes[0], inspector);
+ },
+ draggable: false,
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ await inspector.markup.expandAll();
+
+ for (const { node, draggable } of TEST_DATA) {
+ let container;
+ let name;
+ if (typeof node === "string") {
+ container = await getContainerForSelector(node, inspector);
+ name = node;
+ } else {
+ container = await node(inspector);
+ name = container.toString();
+ }
+
+ const status = draggable ? "draggable" : "not draggable";
+ info(`Testing ${name}, expecting it to be ${status}`);
+ is(container.isDraggable(), draggable, `The node is ${status}`);
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_escapeKeyPress.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_escapeKeyPress.js
new file mode 100644
index 0000000000..0c66fe4761
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_escapeKeyPress.js
@@ -0,0 +1,38 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test whether ESCAPE keypress cancels dragging of an element.
+
+const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+
+ info("Get a test container");
+ await selectNode("#test", inspector);
+ const container = await getContainerForSelector("#test", inspector);
+
+ info("Simulate a drag/drop on this container");
+ await simulateNodeDrag(inspector, "#test");
+
+ ok(
+ container.isDragging && markup.isDragging,
+ "The container is being dragged"
+ );
+ ok(
+ markup.doc.body.classList.contains("dragging"),
+ "The dragging css class was added"
+ );
+
+ info("Simulate ESCAPE keypress");
+ EventUtils.sendKey("escape", inspector.panelWin);
+
+ ok(!container.isDragging && !markup.isDragging, "The dragging has stopped");
+ ok(
+ !markup.doc.body.classList.contains("dragging"),
+ "The dragging css class was removed"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_invalidNodes.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_invalidNodes.js
new file mode 100644
index 0000000000..e12299394a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_invalidNodes.js
@@ -0,0 +1,67 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Check that pseudo-elements, anonymous nodes and slotted nodes are not draggable.
+
+const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html";
+
+add_task(async function () {
+ await pushPref("devtools.inspector.showAllAnonymousContent", true);
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Expanding nodes below #test");
+ const parentFront = await getNodeFront("#test", inspector);
+ await inspector.markup.expandNode(parentFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ info("Getting the ::before pseudo element and selecting it");
+ const parentContainer = await getContainerForNodeFront(
+ parentFront,
+ inspector
+ );
+ const beforePseudo = parentContainer.elt.children[1].firstChild.container;
+ parentContainer.elt.scrollIntoView(true);
+ await selectNode(beforePseudo.node, inspector);
+
+ info("Simulate dragging the ::before pseudo element");
+ await simulateNodeDrag(inspector, beforePseudo);
+
+ ok(!beforePseudo.isDragging, "::before pseudo element isn't dragging");
+
+ info("Expanding nodes below #anonymousParent");
+ const inputFront = await getNodeFront("#anonymousParent", inspector);
+ await inspector.markup.expandNode(inputFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ info("Getting the anonymous node and selecting it");
+ const inputContainer = await getContainerForNodeFront(inputFront, inspector);
+ const anonymousDiv = inputContainer.elt.children[1].firstChild.container;
+ inputContainer.elt.scrollIntoView(true);
+ await selectNode(anonymousDiv.node, inspector);
+
+ info("Simulate dragging the anonymous node");
+ await simulateNodeDrag(inspector, anonymousDiv);
+
+ ok(!anonymousDiv.isDragging, "anonymous node isn't dragging");
+
+ info("Expanding all nodes below test-component");
+ const testComponentFront = await getNodeFront("test-component", inspector);
+ await inspector.markup.expandAll(testComponentFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ info("Getting a slotted node and selecting it");
+ // Directly use the markup getContainer API in order to retrieve the slotted container
+ // for a given node front.
+ const slotted1Front = await getNodeFront(".slotted1", inspector);
+ const slottedContainer = inspector.markup.getContainer(slotted1Front, true);
+ slottedContainer.elt.scrollIntoView(true);
+ await selectNode(slotted1Front, inspector, "no-reason", true);
+
+ info("Simulate dragging the slotted node");
+ await simulateNodeDrag(inspector, slottedContainer);
+
+ ok(!slottedContainer.isDragging, "slotted node isn't dragging");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_reorder.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_reorder.js
new file mode 100644
index 0000000000..cbcc86fa74
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_reorder.js
@@ -0,0 +1,111 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+requestLongerTimeout(2);
+
+// Test different kinds of drag and drop node re-ordering.
+
+const TEST_URL = URL_ROOT + "doc_markup_dragdrop.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ let ids;
+
+ info("Expand #test node");
+ const parentFront = await getNodeFront("#test", inspector);
+ await inspector.markup.expandNode(parentFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ info("Scroll #test into view");
+ const parentContainer = await getContainerForNodeFront(
+ parentFront,
+ inspector
+ );
+ parentContainer.elt.scrollIntoView(true);
+
+ info("Test putting an element back at its original place");
+ await dragElementToOriginalLocation("#firstChild", inspector);
+ ids = await getChildrenIDsOf(parentFront, inspector);
+ is(ids[0], "firstChild", "#firstChild is still the first child of #test");
+ is(ids[1], "middleChild", "#middleChild is still the second child of #test");
+
+ info("Testing switching elements inside their parent");
+ await moveElementDown("#firstChild", "#middleChild", inspector);
+ ids = await getChildrenIDsOf(parentFront, inspector);
+ is(ids[0], "middleChild", "#firstChild is now the second child of #test");
+ is(ids[1], "firstChild", "#middleChild is now the first child of #test");
+
+ info("Testing switching elements with a last child");
+ await moveElementDown("#firstChild", "#lastChild", inspector);
+ ids = await getChildrenIDsOf(parentFront, inspector);
+ is(ids[1], "lastChild", "#lastChild is now the second child of #test");
+ is(ids[2], "firstChild", "#firstChild is now the last child of #test");
+
+ info("Testing appending element to a parent");
+ await moveElementDown("#before", "#test", inspector);
+ ids = await getChildrenIDsOf(parentFront, inspector);
+ is(ids.length, 4, "New element appended to #test");
+ is(
+ ids[0],
+ "before",
+ "New element is appended at the right place (currently first child)"
+ );
+
+ info("Testing moving element to after it's parent");
+ await moveElementDown("#firstChild", "#test", inspector);
+ ids = await getChildrenIDsOf(parentFront, inspector);
+ is(ids.length, 3, "#firstChild is no longer #test's child");
+ const siblingFront = await inspector.walker.nextSibling(parentFront);
+ is(
+ siblingFront.id,
+ "firstChild",
+ "#firstChild is now #test's nextElementSibling"
+ );
+});
+
+async function dragElementToOriginalLocation(selector, inspector) {
+ info("Picking up and putting back down " + selector);
+
+ function onMutation() {
+ ok(false, "Mutation received from dragging a node back to its location");
+ }
+ inspector.on("markupmutation", onMutation);
+ await simulateNodeDragAndDrop(inspector, selector, 0, 0);
+
+ // Wait a bit to make sure the event never fires.
+ // This doesn't need to catch *all* cases, since the mutation
+ // will cause failure later in the test when it checks element ordering.
+ await wait(500);
+ inspector.off("markupmutation", onMutation);
+}
+
+async function moveElementDown(selector, next, inspector) {
+ info("Switching " + selector + " with " + next);
+
+ const container = await getContainerForSelector(next, inspector);
+ const height = container.tagLine.getBoundingClientRect().height;
+
+ const onMutated = inspector.once("markupmutation");
+ const uiUpdate = inspector.once("inspector-updated");
+
+ await simulateNodeDragAndDrop(inspector, selector, 0, Math.round(height) + 2);
+
+ const mutations = await onMutated;
+ await uiUpdate;
+
+ is(mutations.length, 2, "2 mutations were received");
+}
+
+async function getChildrenIDsOf(parentFront, { walker }) {
+ const { nodes } = await walker.children(parentFront);
+ // Filter out non-element nodes since children also returns pseudo-elements.
+ return nodes
+ .filter(node => {
+ return !node.isPseudoElement;
+ })
+ .map(node => {
+ return node.id;
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_dragdrop_tooltip.js b/devtools/client/inspector/markup/test/browser_markup_dragdrop_tooltip.js
new file mode 100644
index 0000000000..30e5567bc4
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_dragdrop_tooltip.js
@@ -0,0 +1,36 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+
+// Test that tooltips don't appear when dragging over tooltip targets.
+
+const TEST_URL = 'data:text/html;charset=utf8,<img src="about:logo" /><div>';
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+
+ info("Get the tooltip target element for the image's src attribute");
+ const img = await getContainerForSelector("img", inspector);
+ const target = img.editor.getAttributeElement("src").querySelector(".link");
+
+ info("Check that the src attribute of the image is a valid tooltip target");
+ await assertTooltipShownOnHover(markup.imagePreviewTooltip, target);
+ await assertTooltipHiddenOnMouseOut(markup.imagePreviewTooltip, target);
+
+ info("Start dragging the test div");
+ await simulateNodeDrag(inspector, "div");
+
+ info("Now check that the src attribute of the image isn't a valid target");
+ const isValid = await markup.imagePreviewTooltip._toggle.isValidHoverTarget(
+ target
+ );
+ ok(!isValid, "The element is not a valid tooltip target");
+
+ info("Stop dragging the test div");
+ await simulateNodeDrop(inspector, "div");
+
+ info("Check again the src attribute of the image");
+ await assertTooltipShownOnHover(markup.imagePreviewTooltip, target);
+ await assertTooltipHiddenOnMouseOut(markup.imagePreviewTooltip, target);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events-overflow.js b/devtools/client/inspector/markup/test/browser_markup_events-overflow.js
new file mode 100644
index 0000000000..ab7819f78b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events-overflow.js
@@ -0,0 +1,104 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+
+const TEST_URL = URL_ROOT + "doc_markup_events-overflow.html";
+const TEST_DATA = [
+ {
+ desc: "editor overflows container",
+ // scroll to bottom
+ initialScrollTop: -1,
+ // last header
+ headerToClick: 49,
+ alignBottom: true,
+ alignTop: false,
+ },
+ {
+ desc: "header overflows the container",
+ initialScrollTop: 2,
+ headerToClick: 0,
+ alignBottom: false,
+ alignTop: true,
+ },
+ {
+ desc: "neither header nor editor overflows the container",
+ initialScrollTop: 2,
+ headerToClick: 5,
+ alignBottom: false,
+ alignTop: false,
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ const markupContainer = await getContainerForSelector("#events", inspector);
+ const evHolder = markupContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-event]"
+ );
+ const tooltip = inspector.markup.eventDetailsTooltip;
+
+ info("Clicking to open event tooltip.");
+ EventUtils.synthesizeMouseAtCenter(
+ evHolder,
+ {},
+ inspector.markup.doc.defaultView
+ );
+ await tooltip.once("shown");
+ info("EventTooltip visible.");
+
+ const container = tooltip.panel;
+ const containerRect = container.getBoundingClientRect();
+ const headers = container.querySelectorAll(".event-header");
+
+ for (const data of TEST_DATA) {
+ info("Testing scrolling when " + data.desc);
+
+ if (data.initialScrollTop < 0) {
+ info("Scrolling container to the bottom.");
+ const newScrollTop = container.scrollHeight - container.clientHeight;
+ data.initialScrollTop = container.scrollTop = newScrollTop;
+ } else {
+ info("Scrolling container by " + data.initialScrollTop + "px");
+ container.scrollTop = data.initialScrollTop;
+ }
+
+ is(container.scrollTop, data.initialScrollTop, "Container scrolled.");
+
+ info("Clicking on header #" + data.headerToClick);
+ const header = headers[data.headerToClick];
+
+ const ready = tooltip.once("event-tooltip-ready");
+ EventUtils.synthesizeMouseAtCenter(header, {}, header.ownerGlobal);
+ await ready;
+
+ info("Event handler expanded.");
+
+ // Wait for any scrolling to finish.
+ await promiseNextTick();
+
+ if (data.alignTop) {
+ const headerRect = header.getBoundingClientRect();
+
+ is(
+ Math.round(headerRect.top),
+ Math.round(containerRect.top),
+ "Clicked header is aligned with the container top."
+ );
+ } else if (data.alignBottom) {
+ const editorRect = header.nextElementSibling.getBoundingClientRect();
+
+ is(
+ Math.round(editorRect.bottom),
+ Math.round(containerRect.bottom),
+ "Clicked event handler code is aligned with the container bottom."
+ );
+ } else {
+ is(
+ container.scrollTop,
+ data.initialScrollTop,
+ "Container did not scroll, as expected."
+ );
+ }
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events-windowed-host.js b/devtools/client/inspector/markup/test/browser_markup_events-windowed-host.js
new file mode 100644
index 0000000000..40d404ae86
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events-windowed-host.js
@@ -0,0 +1,80 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+
+/*
+ * Test that the event details tooltip can be hidden by clicking outside of the tooltip
+ * after switching hosts.
+ */
+
+const TEST_URL = URL_ROOT + "doc_markup_events-overflow.html";
+
+registerCleanupFunction(() => {
+ // Restore the default Toolbox host position after the test.
+ Services.prefs.clearUserPref("devtools.toolbox.host");
+});
+
+add_task(async function () {
+ info(
+ "Switch to 2 pane inspector to avoid sidebar width issues with opening events"
+ );
+ await pushPref("devtools.inspector.three-pane-enabled", false);
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+ await runTests(inspector);
+
+ await toolbox.switchHost("window");
+
+ // Switching hosts is not correctly waiting when DevTools run in content frame
+ // See Bug 1571421.
+ await wait(1000);
+
+ await runTests(inspector);
+
+ await toolbox.switchHost("bottom");
+
+ // Switching hosts is not correctly waiting when DevTools run in content frame
+ // See Bug 1571421.
+ await wait(1000);
+
+ await runTests(inspector);
+
+ await toolbox.destroy();
+});
+
+async function runTests(inspector) {
+ const markupContainer = await getContainerForSelector("#events", inspector);
+ const evHolder = markupContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-event]"
+ );
+ const tooltip = inspector.markup.eventDetailsTooltip;
+
+ info("Clicking to open event tooltip.");
+
+ let onInspectorUpdated = inspector.once("inspector-updated");
+ const onTooltipShown = tooltip.once("shown");
+ EventUtils.synthesizeMouseAtCenter(
+ evHolder,
+ {},
+ inspector.markup.doc.defaultView
+ );
+
+ await onTooltipShown;
+ // New node is selected when clicking on the events bubble, wait for inspector-updated.
+ await onInspectorUpdated;
+
+ ok(tooltip.isVisible(), "EventTooltip visible.");
+
+ onInspectorUpdated = inspector.once("inspector-updated");
+ const onTooltipHidden = tooltip.once("hidden");
+
+ info("Click on another tag to hide the event tooltip");
+ const script = await getContainerForSelector("script", inspector);
+ const tag = script.elt.querySelector(".tag");
+ EventUtils.synthesizeMouseAtCenter(tag, {}, inspector.markup.doc.defaultView);
+
+ await onTooltipHidden;
+ // New node is selected, wait for inspector-updated.
+ await onInspectorUpdated;
+
+ ok(!tooltip.isVisible(), "EventTooltip hidden.");
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_01.js b/devtools/client/inspector/markup/test/browser_markup_events_01.js
new file mode 100644
index 0000000000..0fbd47b8f5
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_01.js
@@ -0,0 +1,132 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for DOM
+// events.
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_01.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "load",
+ filename: TEST_URL,
+ attributes: ["Bubbling"],
+ handler: "function onload(event) {\n" + " init();\n" + "}",
+ },
+ ],
+ },
+ {
+ selector: "#container",
+ expected: [
+ {
+ type: "mouseover",
+ filename: TEST_URL + ":48:31",
+ attributes: ["Capturing"],
+ handler:
+ "function mouseoverHandler(event) {\n" +
+ ' if (event.target.id !== "container") {\n' +
+ ' const output = document.getElementById("output");\n' +
+ " output.textContent = event.target.textContent;\n" +
+ " }\n" +
+ "}",
+ },
+ ],
+ },
+ {
+ selector: "#multiple",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":55:27",
+ attributes: ["Bubbling"],
+ handler:
+ "function clickHandler(event) {\n" +
+ ' const output = document.getElementById("output");\n' +
+ ' output.textContent = "click";\n' +
+ "}",
+ },
+ {
+ type: "mouseup",
+ filename: TEST_URL + ":60:29",
+ attributes: ["Bubbling"],
+ handler:
+ "function mouseupHandler(event) {\n" +
+ ' const output = document.getElementById("output");\n' +
+ ' output.textContent = "mouseup";\n' +
+ "}",
+ },
+ ],
+ },
+ // #noevents tests check that dynamically added events are properly displayed
+ // in the markupview
+ {
+ selector: "#noevents",
+ expected: [],
+ },
+ {
+ selector: "#noevents",
+ async beforeTest(inspector) {
+ const nodeMutated = inspector.once("markupmutation");
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () =>
+ content.wrappedJSObject.addNoeventsClickHandler()
+ );
+ await nodeMutated;
+ },
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":76:35",
+ attributes: ["Bubbling"],
+ handler:
+ "function noeventsClickHandler(event) {\n" +
+ ' alert("noevents has an event listener");\n' +
+ "}",
+ },
+ ],
+ },
+ {
+ selector: "#noevents",
+ async beforeTest(inspector) {
+ const nodeMutated = inspector.once("markupmutation");
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () =>
+ content.wrappedJSObject.removeNoeventsClickHandler()
+ );
+ await nodeMutated;
+ },
+ expected: [],
+ },
+ {
+ selector: "#DOM0",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL,
+ attributes: ["Bubbling"],
+ handler: "function onclick(event) {\n" + " alert('DOM0')\n" + "}",
+ },
+ ],
+ },
+ {
+ selector: "#handleevent",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":71:29",
+ attributes: ["Bubbling"],
+ handler: "function(blah) {\n" + ' alert("handleEvent");\n' + "}",
+ },
+ ],
+ },
+];
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_02.js b/devtools/client/inspector/markup/test/browser_markup_events_02.js
new file mode 100644
index 0000000000..44840179d2
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_02.js
@@ -0,0 +1,123 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for DOM
+// events.
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_02.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+const TEST_DATA = [
+ {
+ selector: "#fatarrow",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":42:43",
+ attributes: ["Bubbling"],
+ handler: "() => {\n" + ' alert("Fat arrow without params!");\n' + "}",
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":46:43",
+ attributes: ["Bubbling"],
+ handler: "event => {\n" + ' alert("Fat arrow with 1 param!");\n' + "}",
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":50:43",
+ attributes: ["Bubbling"],
+ handler:
+ "(event, foo, bar) => {\n" +
+ ' alert("Fat arrow with 3 params!");\n' +
+ "}",
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":54:43",
+ attributes: ["Bubbling"],
+ handler: "b => b",
+ },
+ ],
+ },
+ {
+ selector: "#bound",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":65:32",
+ attributes: ["Bubbling"],
+ handler: "function(event) {\n" + ' alert("Bound event");\n' + "}",
+ },
+ ],
+ },
+ {
+ selector: "#boundhe",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":89:19",
+ attributes: ["Bubbling"],
+ handler: "function() {\n" + ' alert("boundHandleEvent");\n' + "}",
+ },
+ ],
+ },
+ {
+ selector: "#comment-inline",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":95:47",
+ attributes: ["Bubbling"],
+ handler:
+ "function functionProceededByInlineComment() {\n" +
+ ' alert("comment-inline");\n' +
+ "}",
+ },
+ ],
+ },
+ {
+ selector: "#comment-streaming",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":100:50",
+ attributes: ["Bubbling"],
+ handler:
+ "function functionProceededByStreamingComment() {\n" +
+ ' alert("comment-streaming");\n' +
+ "}",
+ },
+ ],
+ },
+ {
+ selector: "#anon-object-method",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":75:34",
+ attributes: ["Bubbling"],
+ handler: "function() {\n" + ' alert("obj.anonObjectMethod");\n' + "}",
+ },
+ ],
+ },
+ {
+ selector: "#object-method",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":79:34",
+ attributes: ["Bubbling"],
+ handler: "function kay() {\n" + ' alert("obj.objectMethod");\n' + "}",
+ },
+ ],
+ },
+];
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_03.js b/devtools/client/inspector/markup/test/browser_markup_events_03.js
new file mode 100644
index 0000000000..bebffec066
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_03.js
@@ -0,0 +1,88 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for DOM
+// events.
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_03.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+const TEST_DATA = [
+ {
+ selector: "#es6-method",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":69:17",
+ attributes: ["Bubbling"],
+ handler:
+ "es6Method(foo, bar) {\n" + ' alert("obj.es6Method");\n' + "}",
+ },
+ ],
+ },
+ {
+ selector: "#generator",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":89:25",
+ attributes: ["Bubbling"],
+ handler: "function* generator() {\n" + ' alert("generator");\n' + "}",
+ },
+ ],
+ },
+ {
+ selector: "#anon-generator",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":46:58",
+ attributes: ["Bubbling"],
+ handler: "function*() {\n" + ' alert("anonGenerator");\n' + "}",
+ },
+ ],
+ },
+ {
+ selector: "#named-function-expression",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":22:18",
+ attributes: ["Bubbling"],
+ handler:
+ "function foo() {\n" + ' alert("namedFunctionExpression");\n' + "}",
+ },
+ ],
+ },
+ {
+ selector: "#anon-function-expression",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":26:45",
+ attributes: ["Bubbling"],
+ handler:
+ "function() {\n" + ' alert("anonFunctionExpression");\n' + "}",
+ },
+ ],
+ },
+ {
+ selector: "#returned-function",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":31:27",
+ attributes: ["Bubbling"],
+ handler: "function bar() {\n" + ' alert("returnedFunction");\n' + "}",
+ },
+ ],
+ },
+];
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_04.js b/devtools/client/inspector/markup/test/browser_markup_events_04.js
new file mode 100644
index 0000000000..b7dd546c29
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_04.js
@@ -0,0 +1,124 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for DOM
+// events.
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_04.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":59:67",
+ attributes: ["Bubbling"],
+ handler:
+ "function(foo2, bar2) {\n" +
+ ' alert("documentElement event listener clicked");\n' +
+ "}",
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":55:51",
+ attributes: ["Bubbling"],
+ handler:
+ "function(foo, bar) {\n" +
+ ' alert("document event listener clicked");\n' +
+ "}",
+ },
+ {
+ type: "load",
+ filename: TEST_URL,
+ attributes: ["Bubbling"],
+ handler: "function onload(event) {\n" + " init();\n" + "}",
+ },
+ ],
+ },
+ {
+ selector: "#constructed-function",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":1:0",
+ attributes: ["Bubbling"],
+ handler: "function anonymous() {\n" + "\n" + "}",
+ },
+ ],
+ },
+ {
+ selector: "#constructed-function-with-body-string",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":1:0",
+ attributes: ["Bubbling"],
+ handler:
+ "function anonymous(a, b, c) {\n" +
+ ' alert("constructedFuncWithBodyString");\n' +
+ "}",
+ },
+ ],
+ },
+ {
+ selector: "#multiple-assignment",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":26:47",
+ attributes: ["Bubbling"],
+ handler:
+ "function multi() {\n" + ' alert("multipleAssignment");\n' + "}",
+ },
+ ],
+ },
+ {
+ selector: "#promise",
+ expected: [
+ {
+ type: "click",
+ filename: "[native code]",
+ attributes: ["Bubbling"],
+ handler: "function() {\n" + " [native code]\n" + "}",
+ },
+ ],
+ },
+ {
+ selector: "#math-pow",
+ expected: [
+ {
+ type: "click",
+ filename: "[native code]",
+ attributes: ["Bubbling"],
+ handler: "function pow(, ) {\n" + " [native code]\n" + "}",
+ },
+ ],
+ },
+ {
+ selector: "#handleEvent",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":81:29",
+ attributes: ["Bubbling"],
+ handler:
+ "function(event) {\n" +
+ " switch (event.type) {\n" +
+ ' case "click":\n' +
+ ' alert("handleEvent click");\n' +
+ " }\n" +
+ "}",
+ },
+ ],
+ },
+];
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_chrome_blocked.js b/devtools/client/inspector/markup/test/browser_markup_events_chrome_blocked.js
new file mode 100644
index 0000000000..395b89fd07
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_chrome_blocked.js
@@ -0,0 +1,46 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+"use strict";
+
+// Test that markup view chrome event bubbles are hidden when
+// devtools.chrome.enabled = false.
+
+const TEST_URL = URL_ROOT + "doc_markup_events_chrome_listeners.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+const TEST_DATA = [
+ {
+ selector: "div",
+ expected: [],
+ },
+];
+
+add_task(async function () {
+ waitForExplicitFinish();
+ await pushPref("devtools.chrome.enabled", false);
+
+ const { tab, inspector } = await openInspectorForURL(TEST_URL);
+ const browser = tab.linkedBrowser;
+
+ const badgeEventAdded = inspector.markup.once("badge-added-event");
+
+ info("Loading frame script");
+ await SpecialPowers.spawn(browser, [], () => {
+ const div = content.document.querySelector("div");
+ div.addEventListener("click", () => {
+ /* Do nothing */
+ });
+ });
+
+ // We need to check that the "badge-added-event" event is not triggered so we
+ // need to wait for 5 seconds here.
+ const result = await awaitWithTimeout(badgeEventAdded, 3000);
+ is(result, "timeout", "Ensure that no event badges were added");
+
+ for (const test of TEST_DATA) {
+ await checkEventsForNode(test, inspector);
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_chrome_not_blocked.js b/devtools/client/inspector/markup/test/browser_markup_events_chrome_not_blocked.js
new file mode 100644
index 0000000000..c04dd3c396
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_chrome_not_blocked.js
@@ -0,0 +1,53 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+("use strict");
+
+// Test that markup view chrome event bubbles are shown when
+// devtools.chrome.enabled = true.
+
+const TEST_URL = URL_ROOT + "doc_markup_events_chrome_listeners.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+const TEST_DATA = [
+ {
+ selector: "div",
+ expected: [
+ {
+ type: "click",
+ filename:
+ getRootDirectory(gTestPath) +
+ "browser_markup_events_chrome_not_blocked.js:45:34",
+ attributes: ["Bubbling"],
+ handler: `() => {
+ /* Do nothing */
+ }`,
+ },
+ ],
+ },
+];
+
+add_task(async function () {
+ waitForExplicitFinish();
+ await pushPref("devtools.chrome.enabled", true);
+
+ const { tab, inspector } = await openInspectorForURL(TEST_URL);
+ const browser = tab.linkedBrowser;
+
+ const eventBadgeAdded = inspector.markup.once("badge-added-event");
+ info("Loading frame script");
+
+ await SpecialPowers.spawn(browser, [], () => {
+ const div = content.document.querySelector("div");
+ div.addEventListener("click", () => {
+ /* Do nothing */
+ });
+ });
+ await eventBadgeAdded;
+
+ for (const test of TEST_DATA) {
+ await checkEventsForNode(test, inspector);
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_click_to_close.js b/devtools/client/inspector/markup/test/browser_markup_events_click_to_close.js
new file mode 100644
index 0000000000..ed410fb85b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_click_to_close.js
@@ -0,0 +1,102 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+"use strict";
+
+// Tests that click events that close the current event tooltip are still propagated to
+// the target underneath.
+
+const TEST_URL = `
+ <body>
+ <div id="d1" onclick="console.log(1)">test</div>
+ <!-- -->
+ <!-- adding some comments to make sure -->
+ <!-- the second event icon is not hidden by -->
+ <!-- the tooltip of the first event icon -->
+ <!-- -->
+ <div id="d2" onclick="console.log(2)">test</div>
+ </body>
+`;
+
+add_task(async function () {
+ // Make the toolbox tall enough to show the full markup without the need
+ // to manage scrolling event badges into view.
+ await pushPref("devtools.toolbox.footer.height", 400);
+
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8," + encodeURI(TEST_URL)
+ );
+ const { waitForHighlighterTypeHidden } = getHighlighterTestHelpers(inspector);
+
+ await inspector.markup.expandAll();
+
+ const container1 = await getContainerForSelector("#d1", inspector);
+ const evHolder1 = container1.elt.querySelector(
+ ".inspector-badge.interactive[data-event]"
+ );
+
+ const container2 = await getContainerForSelector("#d2", inspector);
+ const evHolder2 = container2.elt.querySelector(
+ ".inspector-badge.interactive[data-event]"
+ );
+
+ const tooltip = inspector.markup.eventDetailsTooltip;
+
+ info("Click the event icon for the first element");
+ let onShown = tooltip.once("shown");
+ EventUtils.synthesizeMouseAtCenter(evHolder1, {}, inspector.markup.win);
+ await onShown;
+ info("event tooltip for the first div is shown");
+
+ info("Click the event icon for the second element");
+ let onHidden = tooltip.once("hidden");
+ onShown = tooltip.once("shown");
+ EventUtils.synthesizeMouseAtCenter(evHolder2, {}, inspector.markup.win);
+
+ await onHidden;
+ info("previous tooltip hidden");
+
+ await onShown;
+ info("event tooltip for the second div is shown");
+
+ info("Check that clicking on evHolder2 again hides the tooltip");
+ onHidden = tooltip.once("hidden");
+ EventUtils.synthesizeMouseAtCenter(evHolder2, {}, inspector.markup.win);
+ await onHidden;
+
+ info("Check that the tooltip does not reappear immediately after");
+ await waitForTime(1000);
+ is(
+ tooltip.isVisible(),
+ false,
+ "The tooltip is still hidden after waiting for one second"
+ );
+
+ info("Open the tooltip on evHolder2 again");
+ onShown = tooltip.once("shown");
+ EventUtils.synthesizeMouseAtCenter(evHolder2, {}, inspector.markup.win);
+ await onShown;
+
+ info("Click on the computed view tab");
+ const onHighlighterHidden = waitForHighlighterTypeHidden(
+ inspector.highlighters.TYPES.BOXMODEL
+ );
+ const onTabComputedViewSelected = inspector.sidebar.once(
+ "computedview-selected"
+ );
+ const computedViewTab = inspector.panelDoc.querySelector("#computedview-tab");
+ EventUtils.synthesizeMouseAtCenter(
+ computedViewTab,
+ {},
+ inspector.panelDoc.defaultView
+ );
+
+ await onTabComputedViewSelected;
+ info("computed view was selected");
+
+ await onHighlighterHidden;
+ info(
+ "box model highlighter hidden after moving the mouse out of the markup view"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.0.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.0.js
new file mode 100644
index 0000000000..53a4805453
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.0.js
@@ -0,0 +1,224 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for jQuery
+// and jQuery Live events (jQuery version 1.0).
+
+const TEST_LIB = "lib_jquery_1.0.js";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB;
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "DOMContentLoaded",
+ filename: URL_ROOT_SSL + TEST_LIB + ":1117:16",
+ attributes: ["Bubbling"],
+ handler: `
+ function() {
+ // Make sure that the DOM is not already loaded
+ if (!jQuery.isReady) {
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If there are functions bound, to execute
+ if (jQuery.readyList) {
+ // Execute all of them
+ for (var i = 0; i < jQuery.readyList.length; i++)
+ jQuery.readyList[i].apply(document);
+
+ // Reset the list of functions
+ jQuery.readyList = null;
+ }
+ }
+ }`,
+ },
+ {
+ type: "load",
+ filename: TEST_URL + ":29:38",
+ attributes: ["Bubbling"],
+ handler: `
+ () => {
+ const handler1 = function liveDivDblClick() {
+ alert(1);
+ };
+ const handler2 = function liveDivDragStart() {
+ alert(2);
+ };
+ const handler3 = function liveDivDragLeave() {
+ alert(3);
+ };
+ const handler4 = function liveDivDragEnd() {
+ alert(4);
+ };
+ const handler5 = function liveDivDrop() {
+ alert(5);
+ };
+ const handler6 = function liveDivDragOver() {
+ alert(6);
+ };
+ const handler7 = function divClick1() {
+ alert(7);
+ };
+ const handler8 = function divClick2() {
+ alert(8);
+ };
+ const handler9 = function divKeyDown() {
+ alert(9);
+ };
+ const handler10 = function divDragOut() {
+ alert(10);
+ };
+
+ if ($("#livediv").live) {
+ $("#livediv").live("dblclick", handler1);
+ $("#livediv").live("dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate("#livediv", "dragleave", handler3);
+ $(document).delegate("#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on("drop", "#livediv", handler5);
+ $(document).on("dragover", "#livediv", handler6);
+ $(document).on("dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ }`,
+ },
+ {
+ type: "load",
+ filename: URL_ROOT_SSL + TEST_LIB + ":894:18",
+ attributes: ["Bubbling"],
+ handler: `
+ function(event) {
+ if (typeof jQuery == "undefined") return;
+
+ event = event || jQuery.event.fix(window.event);
+
+ // If no correct event was found, fail
+ if (!event) return;
+
+ var returnValue = true;
+
+ var c = this.events[event.type];
+
+ for (var j in c) {
+ if (c[j].apply(this, [event]) === false) {
+ event.preventDefault();
+ event.stopPropagation();
+ returnValue = false;
+ }
+ }
+
+ return returnValue;
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#testdiv",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":36:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick1() {
+ alert(7);
+ }`,
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":37:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick2() {
+ alert(8);
+ }`,
+ },
+ {
+ type: "click",
+ filename: URL_ROOT_SSL + TEST_LIB + ":894:18",
+ attributes: ["Bubbling"],
+ handler: `
+ function(event) {
+ if (typeof jQuery == "undefined") return;
+
+ event = event || jQuery.event.fix(window.event);
+
+ // If no correct event was found, fail
+ if (!event) return;
+
+ var returnValue = true;
+
+ var c = this.events[event.type];
+
+ for (var j in c) {
+ if (c[j].apply(this, [event]) === false) {
+ event.preventDefault();
+ event.stopPropagation();
+ returnValue = false;
+ }
+ }
+
+ return returnValue;
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: TEST_URL + ":38:44",
+ attributes: ["jQuery"],
+ handler: `
+ function divKeyDown() {
+ alert(9);
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: URL_ROOT_SSL + TEST_LIB + ":894:18",
+ attributes: ["Bubbling"],
+ handler: `
+ function(event) {
+ if (typeof jQuery == "undefined") return;
+
+ event = event || jQuery.event.fix(window.event);
+
+ // If no correct event was found, fail
+ if (!event) return;
+
+ var returnValue = true;
+
+ var c = this.events[event.type];
+
+ for (var j in c) {
+ if (c[j].apply(this, [event]) === false) {
+ event.preventDefault();
+ event.stopPropagation();
+ returnValue = false;
+ }
+ }
+
+ return returnValue;
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.1.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.1.js
new file mode 100644
index 0000000000..6da88966a1
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.1.js
@@ -0,0 +1,231 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for jQuery
+// and jQuery Live events (jQuery version 1.1).
+
+const TEST_LIB = "lib_jquery_1.1.js";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB;
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "load",
+ filename: TEST_URL + ":29:38",
+ attributes: ["Bubbling"],
+ handler: `
+ () => {
+ const handler1 = function liveDivDblClick() {
+ alert(1);
+ };
+ const handler2 = function liveDivDragStart() {
+ alert(2);
+ };
+ const handler3 = function liveDivDragLeave() {
+ alert(3);
+ };
+ const handler4 = function liveDivDragEnd() {
+ alert(4);
+ };
+ const handler5 = function liveDivDrop() {
+ alert(5);
+ };
+ const handler6 = function liveDivDragOver() {
+ alert(6);
+ };
+ const handler7 = function divClick1() {
+ alert(7);
+ };
+ const handler8 = function divClick2() {
+ alert(8);
+ };
+ const handler9 = function divKeyDown() {
+ alert(9);
+ };
+ const handler10 = function divDragOut() {
+ alert(10);
+ };
+
+ if ($("#livediv").live) {
+ $("#livediv").live("dblclick", handler1);
+ $("#livediv").live("dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate("#livediv", "dragleave", handler3);
+ $(document).delegate("#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on("drop", "#livediv", handler5);
+ $(document).on("dragover", "#livediv", handler6);
+ $(document).on("dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ }`,
+ },
+ {
+ type: "load",
+ filename: URL_ROOT_SSL + TEST_LIB + ":1224:17",
+ attributes: ["Bubbling"],
+ handler: `
+ function(event) {
+ if (typeof jQuery == "undefined") return false;
+
+ // Empty object is for triggered events with no data
+ event = jQuery.event.fix(event || window.event || {});
+
+ // returned undefined or false
+ var returnValue;
+
+ var c = this.events[event.type];
+
+ var args = [].slice.call(arguments, 1);
+ args.unshift(event);
+
+ for (var j in c) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ args[0].handler = c[j];
+ args[0].data = c[j].data;
+
+ if (c[j].apply(this, args) === false) {
+ event.preventDefault();
+ event.stopPropagation();
+ returnValue = false;
+ }
+ }
+
+ // Clean up added properties in IE to prevent memory leak
+ if (jQuery.browser.msie) event.target = event.preventDefault = event.stopPropagation = event.handler = event.data = null;
+
+ return returnValue;
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#testdiv",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":36:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick1() {
+ alert(7);
+ }`,
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":37:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick2() {
+ alert(8);
+ }`,
+ },
+ {
+ type: "click",
+ filename: URL_ROOT_SSL + TEST_LIB + ":1224:17",
+ attributes: ["Bubbling"],
+ handler: `
+ function(event) {
+ if (typeof jQuery == "undefined") return false;
+
+ // Empty object is for triggered events with no data
+ event = jQuery.event.fix(event || window.event || {});
+
+ // returned undefined or false
+ var returnValue;
+
+ var c = this.events[event.type];
+
+ var args = [].slice.call(arguments, 1);
+ args.unshift(event);
+
+ for (var j in c) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ args[0].handler = c[j];
+ args[0].data = c[j].data;
+
+ if (c[j].apply(this, args) === false) {
+ event.preventDefault();
+ event.stopPropagation();
+ returnValue = false;
+ }
+ }
+
+ // Clean up added properties in IE to prevent memory leak
+ if (jQuery.browser.msie) event.target = event.preventDefault = event.stopPropagation = event.handler = event.data = null;
+
+ return returnValue;
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: TEST_URL + ":38:44",
+ attributes: ["jQuery"],
+ handler: `
+ function divKeyDown() {
+ alert(9);
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: URL_ROOT_SSL + TEST_LIB + ":1224:17",
+ attributes: ["Bubbling"],
+ handler: `
+ function(event) {
+ if (typeof jQuery == "undefined") return false;
+
+ // Empty object is for triggered events with no data
+ event = jQuery.event.fix(event || window.event || {});
+
+ // returned undefined or false
+ var returnValue;
+
+ var c = this.events[event.type];
+
+ var args = [].slice.call(arguments, 1);
+ args.unshift(event);
+
+ for (var j in c) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ args[0].handler = c[j];
+ args[0].data = c[j].data;
+
+ if (c[j].apply(this, args) === false) {
+ event.preventDefault();
+ event.stopPropagation();
+ returnValue = false;
+ }
+ }
+
+ // Clean up added properties in IE to prevent memory leak
+ if (jQuery.browser.msie) event.target = event.preventDefault = event.stopPropagation = event.handler = event.data = null;
+
+ return returnValue;
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.11.1.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.11.1.js
new file mode 100644
index 0000000000..c8c273510d
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.11.1.js
@@ -0,0 +1,160 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for jQuery
+// and jQuery Live events (jQuery version 1.11.1).
+
+const TEST_LIB = "lib_jquery_1.11.1_min.js";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB;
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "load",
+ filename: TEST_URL + ":29:38",
+ attributes: ["Bubbling"],
+ handler: `
+ () => {
+ const handler1 = function liveDivDblClick() {
+ alert(1);
+ };
+ const handler2 = function liveDivDragStart() {
+ alert(2);
+ };
+ const handler3 = function liveDivDragLeave() {
+ alert(3);
+ };
+ const handler4 = function liveDivDragEnd() {
+ alert(4);
+ };
+ const handler5 = function liveDivDrop() {
+ alert(5);
+ };
+ const handler6 = function liveDivDragOver() {
+ alert(6);
+ };
+ const handler7 = function divClick1() {
+ alert(7);
+ };
+ const handler8 = function divClick2() {
+ alert(8);
+ };
+ const handler9 = function divKeyDown() {
+ alert(9);
+ };
+ const handler10 = function divDragOut() {
+ alert(10);
+ };
+
+ if ($("#livediv").live) {
+ $("#livediv").live("dblclick", handler1);
+ $("#livediv").live("dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate("#livediv", "dragleave", handler3);
+ $(document).delegate("#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on("drop", "#livediv", handler5);
+ $(document).on("dragover", "#livediv", handler6);
+ $(document).on("dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ }`,
+ },
+ ],
+ },
+
+ {
+ selector: "#testdiv",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":36:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick1() {
+ alert(7);
+ }`,
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":37:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick2() {
+ alert(8);
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: TEST_URL + ":38:44",
+ attributes: ["jQuery"],
+ handler: `
+ function divKeyDown() {
+ alert(9);
+ }`,
+ },
+ ],
+ },
+
+ {
+ selector: "#livediv",
+ expected: [
+ {
+ type: "dragend",
+ filename: TEST_URL + ":33:48",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragEnd() {
+ alert(4);
+ }`,
+ },
+ {
+ type: "dragleave",
+ filename: TEST_URL + ":32:50",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragLeave() {
+ alert(3);
+ }`,
+ },
+ {
+ type: "dragover",
+ filename: TEST_URL + ":35:49",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragOver() {
+ alert(6);
+ }`,
+ },
+ {
+ type: "drop",
+ filename: TEST_URL + ":34:45",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDrop() {
+ alert(5);
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.2.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.2.js
new file mode 100644
index 0000000000..8739f6f025
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.2.js
@@ -0,0 +1,141 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for jQuery
+// and jQuery Live events (jQuery version 1.2).
+
+const TEST_LIB = "lib_jquery_1.2_min.js";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB;
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "load",
+ filename: TEST_URL + ":29:38",
+ attributes: ["Bubbling"],
+ handler: `
+ () => {
+ const handler1 = function liveDivDblClick() {
+ alert(1);
+ };
+ const handler2 = function liveDivDragStart() {
+ alert(2);
+ };
+ const handler3 = function liveDivDragLeave() {
+ alert(3);
+ };
+ const handler4 = function liveDivDragEnd() {
+ alert(4);
+ };
+ const handler5 = function liveDivDrop() {
+ alert(5);
+ };
+ const handler6 = function liveDivDragOver() {
+ alert(6);
+ };
+ const handler7 = function divClick1() {
+ alert(7);
+ };
+ const handler8 = function divClick2() {
+ alert(8);
+ };
+ const handler9 = function divKeyDown() {
+ alert(9);
+ };
+ const handler10 = function divDragOut() {
+ alert(10);
+ };
+
+ if ($("#livediv").live) {
+ $("#livediv").live("dblclick", handler1);
+ $("#livediv").live("dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate("#livediv", "dragleave", handler3);
+ $(document).delegate("#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on("drop", "#livediv", handler5);
+ $(document).on("dragover", "#livediv", handler6);
+ $(document).on("dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#testdiv",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":36:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick1() {
+ alert(7);
+ }`,
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":37:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick2() {
+ alert(8);
+ }`,
+ },
+ {
+ type: "click",
+ filename: URL_ROOT_SSL + TEST_LIB + ":24:10040",
+ attributes: ["Bubbling"],
+ handler: `
+ function() {
+ var val;
+ if (typeof jQuery == "undefined" || jQuery.event.triggered) return val;
+ val = jQuery.event.handle.apply(element, arguments);
+ return val;
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: TEST_URL + ":38:44",
+ attributes: ["jQuery"],
+ handler: `
+ function divKeyDown() {
+ alert(9);
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: URL_ROOT_SSL + TEST_LIB + ":24:10040",
+ attributes: ["Bubbling"],
+ handler: `
+ function() {
+ var val;
+ if (typeof jQuery == "undefined" || jQuery.event.triggered) return val;
+ val = jQuery.event.handle.apply(element, arguments);
+ return val;
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.3.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.3.js
new file mode 100644
index 0000000000..79dc132878
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.3.js
@@ -0,0 +1,150 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for jQuery
+// and jQuery Live events (jQuery version 1.3).
+
+const TEST_LIB = "lib_jquery_1.3_min.js";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB;
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "DOMContentLoaded",
+ filename: URL_ROOT_SSL + TEST_LIB + ":19:18937",
+ attributes: ["Bubbling"],
+ handler: `
+ function() {
+ document.removeEventListener("DOMContentLoaded", arguments.callee, false);
+ n.ready()
+ }`,
+ },
+ {
+ type: "load",
+ filename: TEST_URL + ":29:38",
+ attributes: ["Bubbling"],
+ handler: `
+ () => {
+ const handler1 = function liveDivDblClick() {
+ alert(1);
+ };
+ const handler2 = function liveDivDragStart() {
+ alert(2);
+ };
+ const handler3 = function liveDivDragLeave() {
+ alert(3);
+ };
+ const handler4 = function liveDivDragEnd() {
+ alert(4);
+ };
+ const handler5 = function liveDivDrop() {
+ alert(5);
+ };
+ const handler6 = function liveDivDragOver() {
+ alert(6);
+ };
+ const handler7 = function divClick1() {
+ alert(7);
+ };
+ const handler8 = function divClick2() {
+ alert(8);
+ };
+ const handler9 = function divKeyDown() {
+ alert(9);
+ };
+ const handler10 = function divDragOut() {
+ alert(10);
+ };
+
+ if ($("#livediv").live) {
+ $("#livediv").live("dblclick", handler1);
+ $("#livediv").live("dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate("#livediv", "dragleave", handler3);
+ $(document).delegate("#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on("drop", "#livediv", handler5);
+ $(document).on("dragover", "#livediv", handler6);
+ $(document).on("dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#testdiv",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":36:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick1() {
+ alert(7);
+ }`,
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":37:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick2() {
+ alert(8);
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: TEST_URL + ":38:44",
+ attributes: ["jQuery"],
+ handler: `
+ function divKeyDown() {
+ alert(9);
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#livediv",
+ expected: [
+ {
+ type: "dblclick",
+ filename: TEST_URL + ":30:49",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function() {
+ return E.apply(this, arguments)
+ }`,
+ },
+ {
+ type: "dragstart",
+ filename: TEST_URL + ":31:50",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function() {
+ return E.apply(this, arguments)
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.4.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.4.js
new file mode 100644
index 0000000000..380b1770ff
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.4.js
@@ -0,0 +1,185 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for jQuery
+// and jQuery Live events (jQuery version 1.4).
+
+const TEST_LIB = "lib_jquery_1.4_min.js";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB;
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "DOMContentLoaded",
+ filename: URL_ROOT_SSL + TEST_LIB + ":32:355",
+ attributes: ["Bubbling"],
+ handler: `
+ function() {
+ s.removeEventListener(\"DOMContentLoaded\", M, false);
+ c.ready()
+ }`,
+ },
+ {
+ type: "load",
+ filename: TEST_URL + ":29:38",
+ attributes: ["Bubbling"],
+ handler: `
+ () => {
+ const handler1 = function liveDivDblClick() {
+ alert(1);
+ };
+ const handler2 = function liveDivDragStart() {
+ alert(2);
+ };
+ const handler3 = function liveDivDragLeave() {
+ alert(3);
+ };
+ const handler4 = function liveDivDragEnd() {
+ alert(4);
+ };
+ const handler5 = function liveDivDrop() {
+ alert(5);
+ };
+ const handler6 = function liveDivDragOver() {
+ alert(6);
+ };
+ const handler7 = function divClick1() {
+ alert(7);
+ };
+ const handler8 = function divClick2() {
+ alert(8);
+ };
+ const handler9 = function divKeyDown() {
+ alert(9);
+ };
+ const handler10 = function divDragOut() {
+ alert(10);
+ };
+
+ if ($("#livediv").live) {
+ $("#livediv").live("dblclick", handler1);
+ $("#livediv").live("dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate("#livediv", "dragleave", handler3);
+ $(document).delegate("#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on("drop", "#livediv", handler5);
+ $(document).on("dragover", "#livediv", handler6);
+ $(document).on("dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ }`,
+ },
+ {
+ type: "load",
+ filename: URL_ROOT_SSL + TEST_LIB + ":26:107",
+ attributes: ["Bubbling"],
+ handler: `
+ function() {
+ if (!c.isReady) {
+ if (!s.body) return setTimeout(c.ready, 13);
+ c.isReady = true;
+ if (Q) {
+ for (var a, b = 0; a = Q[b++];) a.call(s, c);
+ Q = null
+ }
+ c.fn.triggerHandler && c(s).triggerHandler("ready")
+ }
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#testdiv",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":36:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick1() {
+ alert(7);
+ }`,
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":37:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick2() {
+ alert(8);
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: TEST_URL + ":38:44",
+ attributes: ["jQuery"],
+ handler: `
+ function divKeyDown() {
+ alert(9);
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#livediv",
+ expected: [
+ {
+ type: "dblclick",
+ filename: TEST_URL + ":30:49",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function() {
+ return a.apply(d || this, arguments)
+ }`,
+ },
+ {
+ type: "dblclick",
+ filename: URL_ROOT_SSL + TEST_LIB + ":17:183",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function() {
+ return a.apply(d || this, arguments)
+ }`,
+ },
+ {
+ type: "dragstart",
+ filename: TEST_URL + ":31:50",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function() {
+ return a.apply(d || this, arguments)
+ }`,
+ },
+ {
+ type: "dragstart",
+ filename: URL_ROOT_SSL + TEST_LIB + ":17:183",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function() {
+ return a.apply(d || this, arguments)
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.6.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.6.js
new file mode 100644
index 0000000000..65ab16bb03
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.6.js
@@ -0,0 +1,351 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+requestLongerTimeout(2);
+
+// Test that markup view event bubbles show the correct event info for jQuery
+// and jQuery Live events (jQuery version 1.6).
+
+const TEST_LIB = "lib_jquery_1.6_min.js";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB;
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "DOMContentLoaded",
+ filename: URL_ROOT_SSL + TEST_LIB + ":16:14483",
+ attributes: ["Bubbling"],
+ handler: `
+ function() {
+ c.removeEventListener("DOMContentLoaded", z, !1), e.ready()
+ }`,
+ },
+ {
+ type: "load",
+ filename: TEST_URL + ":29:38",
+ attributes: ["Bubbling"],
+ handler: `
+ () => {
+ const handler1 = function liveDivDblClick() {
+ alert(1);
+ };
+ const handler2 = function liveDivDragStart() {
+ alert(2);
+ };
+ const handler3 = function liveDivDragLeave() {
+ alert(3);
+ };
+ const handler4 = function liveDivDragEnd() {
+ alert(4);
+ };
+ const handler5 = function liveDivDrop() {
+ alert(5);
+ };
+ const handler6 = function liveDivDragOver() {
+ alert(6);
+ };
+ const handler7 = function divClick1() {
+ alert(7);
+ };
+ const handler8 = function divClick2() {
+ alert(8);
+ };
+ const handler9 = function divKeyDown() {
+ alert(9);
+ };
+ const handler10 = function divDragOut() {
+ alert(10);
+ };
+
+ if ($("#livediv").live) {
+ $("#livediv").live("dblclick", handler1);
+ $("#livediv").live("dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate("#livediv", "dragleave", handler3);
+ $(document).delegate("#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on("drop", "#livediv", handler5);
+ $(document).on("dragover", "#livediv", handler6);
+ $(document).on("dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ }`,
+ },
+ {
+ type: "load",
+ filename: URL_ROOT_SSL + TEST_LIB + ":16:10001",
+ attributes: ["Bubbling"],
+ handler: `
+ function(a) {
+ if (a === !0 && !--e.readyWait || a !== !0 && !e.isReady) {
+ if (!c.body) return setTimeout(e.ready, 1);
+ e.isReady = !0;
+ if (a !== !0 && --e.readyWait > 0) return;
+ y.resolveWith(c, [e]), e.fn.trigger && e(c).trigger("ready").unbind("ready")
+ }
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#testdiv",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":36:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick1() {
+ alert(7);
+ }`,
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":37:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick2() {
+ alert(8);
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: TEST_URL + ":38:44",
+ attributes: ["jQuery"],
+ handler: `
+ function divKeyDown() {
+ alert(9);
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#livediv",
+ expected: [
+ {
+ type: "dblclick",
+ filename: TEST_URL + ":30:49",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDblClick() {
+ alert(1);
+ }`,
+ },
+ {
+ type: "dblclick",
+ filename: URL_ROOT_SSL + TEST_LIB + ":16:4732",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function M(a) {
+ var b, c, d, e, g, h, i, j, k, l, m, n, o, p = [],
+ q = [],
+ r = f._data(this, "events");
+ if (!(a.liveFired === this || !r || !r.live || a.target.disabled || a.button && a.type === "click")) {
+ a.namespace && (n = new RegExp("(^|\\\\.)" + a.namespace.split(".").join("\\\\.(?:.*\\\\.)?") + "(\\\\.|$)")), a.liveFired = this;
+ var s = r.live.slice(0);
+ for (i = 0; i < s.length; i++) g = s[i], g.origType.replace(x, "") === a.type ? q.push(g.selector) : s.splice(i--, 1);
+ e = f(a.target).closest(q, a.currentTarget);
+ for (j = 0, k = e.length; j < k; j++) {
+ m = e[j];
+ for (i = 0; i < s.length; i++) {
+ g = s[i];
+ if (m.selector === g.selector && (!n || n.test(g.namespace)) && !m.elem.disabled) {
+ h = m.elem, d = null;
+ if (g.preType === "mouseenter" || g.preType === "mouseleave") a.type = g.preType, d = f(a.relatedTarget).closest(g.selector)[0], d && f.contains(h, d) && (d = h);
+ (!d || d !== h) && p.push({
+ elem: h,
+ handleObj: g,
+ level: m.level
+ })
+ }
+ }
+ }
+ for (j = 0, k = p.length; j < k; j++) {
+ e = p[j];
+ if (c && e.level > c) break;
+ a.currentTarget = e.elem, a.data = e.handleObj.data, a.handleObj = e.handleObj, o = e.handleObj.origHandler.apply(e.elem, arguments);
+ if (o === !1 || a.isPropagationStopped()) {
+ c = e.level, o === !1 && (b = !1);
+ if (a.isImmediatePropagationStopped()) break
+ }
+ }
+ return b
+ }
+ }`,
+ },
+ {
+ type: "dragend",
+ filename: TEST_URL + ":33:48",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragEnd() {
+ alert(4);
+ }`,
+ },
+ {
+ type: "dragend",
+ filename: URL_ROOT_SSL + TEST_LIB + ":16:4732",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function M(a) {
+ var b, c, d, e, g, h, i, j, k, l, m, n, o, p = [],
+ q = [],
+ r = f._data(this, "events");
+ if (!(a.liveFired === this || !r || !r.live || a.target.disabled || a.button && a.type === "click")) {
+ a.namespace && (n = new RegExp("(^|\\\\.)" + a.namespace.split(".").join("\\\\.(?:.*\\\\.)?") + "(\\\\.|$)")), a.liveFired = this;
+ var s = r.live.slice(0);
+ for (i = 0; i < s.length; i++) g = s[i], g.origType.replace(x, "") === a.type ? q.push(g.selector) : s.splice(i--, 1);
+ e = f(a.target).closest(q, a.currentTarget);
+ for (j = 0, k = e.length; j < k; j++) {
+ m = e[j];
+ for (i = 0; i < s.length; i++) {
+ g = s[i];
+ if (m.selector === g.selector && (!n || n.test(g.namespace)) && !m.elem.disabled) {
+ h = m.elem, d = null;
+ if (g.preType === "mouseenter" || g.preType === "mouseleave") a.type = g.preType, d = f(a.relatedTarget).closest(g.selector)[0], d && f.contains(h, d) && (d = h);
+ (!d || d !== h) && p.push({
+ elem: h,
+ handleObj: g,
+ level: m.level
+ })
+ }
+ }
+ }
+ for (j = 0, k = p.length; j < k; j++) {
+ e = p[j];
+ if (c && e.level > c) break;
+ a.currentTarget = e.elem, a.data = e.handleObj.data, a.handleObj = e.handleObj, o = e.handleObj.origHandler.apply(e.elem, arguments);
+ if (o === !1 || a.isPropagationStopped()) {
+ c = e.level, o === !1 && (b = !1);
+ if (a.isImmediatePropagationStopped()) break
+ }
+ }
+ return b
+ }
+ }`,
+ },
+ {
+ type: "dragleave",
+ filename: TEST_URL + ":32:50",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragLeave() {
+ alert(3);
+ }`,
+ },
+ {
+ type: "dragleave",
+ filename: URL_ROOT_SSL + TEST_LIB + ":16:4732",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function M(a) {
+ var b, c, d, e, g, h, i, j, k, l, m, n, o, p = [],
+ q = [],
+ r = f._data(this, "events");
+ if (!(a.liveFired === this || !r || !r.live || a.target.disabled || a.button && a.type === "click")) {
+ a.namespace && (n = new RegExp("(^|\\\\.)" + a.namespace.split(".").join("\\\\.(?:.*\\\\.)?") + "(\\\\.|$)")), a.liveFired = this;
+ var s = r.live.slice(0);
+ for (i = 0; i < s.length; i++) g = s[i], g.origType.replace(x, "") === a.type ? q.push(g.selector) : s.splice(i--, 1);
+ e = f(a.target).closest(q, a.currentTarget);
+ for (j = 0, k = e.length; j < k; j++) {
+ m = e[j];
+ for (i = 0; i < s.length; i++) {
+ g = s[i];
+ if (m.selector === g.selector && (!n || n.test(g.namespace)) && !m.elem.disabled) {
+ h = m.elem, d = null;
+ if (g.preType === "mouseenter" || g.preType === "mouseleave") a.type = g.preType, d = f(a.relatedTarget).closest(g.selector)[0], d && f.contains(h, d) && (d = h);
+ (!d || d !== h) && p.push({
+ elem: h,
+ handleObj: g,
+ level: m.level
+ })
+ }
+ }
+ }
+ for (j = 0, k = p.length; j < k; j++) {
+ e = p[j];
+ if (c && e.level > c) break;
+ a.currentTarget = e.elem, a.data = e.handleObj.data, a.handleObj = e.handleObj, o = e.handleObj.origHandler.apply(e.elem, arguments);
+ if (o === !1 || a.isPropagationStopped()) {
+ c = e.level, o === !1 && (b = !1);
+ if (a.isImmediatePropagationStopped()) break
+ }
+ }
+ return b
+ }
+ }`,
+ },
+ {
+ type: "dragstart",
+ filename: TEST_URL + ":31:50",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragStart() {
+ alert(2);
+ }`,
+ },
+ {
+ type: "dragstart",
+ filename: URL_ROOT_SSL + TEST_LIB + ":16:4732",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function M(a) {
+ var b, c, d, e, g, h, i, j, k, l, m, n, o, p = [],
+ q = [],
+ r = f._data(this, "events");
+ if (!(a.liveFired === this || !r || !r.live || a.target.disabled || a.button && a.type === "click")) {
+ a.namespace && (n = new RegExp("(^|\\\\.)" + a.namespace.split(".").join("\\\\.(?:.*\\\\.)?") + "(\\\\.|$)")), a.liveFired = this;
+ var s = r.live.slice(0);
+ for (i = 0; i < s.length; i++) g = s[i], g.origType.replace(x, "") === a.type ? q.push(g.selector) : s.splice(i--, 1);
+ e = f(a.target).closest(q, a.currentTarget);
+ for (j = 0, k = e.length; j < k; j++) {
+ m = e[j];
+ for (i = 0; i < s.length; i++) {
+ g = s[i];
+ if (m.selector === g.selector && (!n || n.test(g.namespace)) && !m.elem.disabled) {
+ h = m.elem, d = null;
+ if (g.preType === "mouseenter" || g.preType === "mouseleave") a.type = g.preType, d = f(a.relatedTarget).closest(g.selector)[0], d && f.contains(h, d) && (d = h);
+ (!d || d !== h) && p.push({
+ elem: h,
+ handleObj: g,
+ level: m.level
+ })
+ }
+ }
+ }
+ for (j = 0, k = p.length; j < k; j++) {
+ e = p[j];
+ if (c && e.level > c) break;
+ a.currentTarget = e.elem, a.data = e.handleObj.data, a.handleObj = e.handleObj, o = e.handleObj.origHandler.apply(e.elem, arguments);
+ if (o === !1 || a.isPropagationStopped()) {
+ c = e.level, o === !1 && (b = !1);
+ if (a.isImmediatePropagationStopped()) break
+ }
+ }
+ return b
+ }
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.7.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.7.js
new file mode 100644
index 0000000000..e45fd692c5
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_1.7.js
@@ -0,0 +1,201 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+requestLongerTimeout(2);
+
+// Test that markup view event bubbles show the correct event info for jQuery
+// and jQuery Live events (jQuery version 1.7).
+
+const TEST_LIB = "lib_jquery_1.7_min.js";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB;
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "DOMContentLoaded",
+ filename: URL_ROOT_SSL + TEST_LIB + ":2:14177",
+ attributes: ["Bubbling"],
+ handler: `
+ function() {
+ c.removeEventListener("DOMContentLoaded", C, !1), e.ready()
+ }`,
+ },
+ {
+ type: "load",
+ filename: TEST_URL + ":29:38",
+ attributes: ["Bubbling"],
+ handler: `
+ () => {
+ const handler1 = function liveDivDblClick() {
+ alert(1);
+ };
+ const handler2 = function liveDivDragStart() {
+ alert(2);
+ };
+ const handler3 = function liveDivDragLeave() {
+ alert(3);
+ };
+ const handler4 = function liveDivDragEnd() {
+ alert(4);
+ };
+ const handler5 = function liveDivDrop() {
+ alert(5);
+ };
+ const handler6 = function liveDivDragOver() {
+ alert(6);
+ };
+ const handler7 = function divClick1() {
+ alert(7);
+ };
+ const handler8 = function divClick2() {
+ alert(8);
+ };
+ const handler9 = function divKeyDown() {
+ alert(9);
+ };
+ const handler10 = function divDragOut() {
+ alert(10);
+ };
+
+ if ($("#livediv").live) {
+ $("#livediv").live("dblclick", handler1);
+ $("#livediv").live("dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate("#livediv", "dragleave", handler3);
+ $(document).delegate("#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on("drop", "#livediv", handler5);
+ $(document).on("dragover", "#livediv", handler6);
+ $(document).on("dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ }`,
+ },
+ {
+ type: "load",
+ filename: URL_ROOT_SSL + TEST_LIB + ":2:9526",
+ attributes: ["Bubbling"],
+ handler: `
+ function(a) {
+ if (a === !0 && !--e.readyWait || a !== !0 && !e.isReady) {
+ if (!c.body) return setTimeout(e.ready, 1);
+ e.isReady = !0;
+ if (a !== !0 && --e.readyWait > 0) return;
+ B.fireWith(c, [e]), e.fn.trigger && e(c).trigger("ready").unbind("ready")
+ }
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#testdiv",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":36:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick1() {
+ alert(7);
+ }`,
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":37:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick2() {
+ alert(8);
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: TEST_URL + ":38:44",
+ attributes: ["jQuery"],
+ handler: `
+ function divKeyDown() {
+ alert(9);
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#livediv",
+ expected: [
+ {
+ type: "dblclick",
+ filename: TEST_URL + ":30:49",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDblClick() {
+ alert(1);
+ }`,
+ },
+ {
+ type: "dragend",
+ filename: TEST_URL + ":33:48",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragEnd() {
+ alert(4);
+ }`,
+ },
+ {
+ type: "dragleave",
+ filename: TEST_URL + ":32:50",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragLeave() {
+ alert(3);
+ }`,
+ },
+ {
+ type: "dragover",
+ filename: TEST_URL + ":35:49",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragOver() {
+ alert(6);
+ }`,
+ },
+ {
+ type: "dragstart",
+ filename: TEST_URL + ":31:50",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragStart() {
+ alert(2);
+ }`,
+ },
+ {
+ type: "drop",
+ filename: TEST_URL + ":34:45",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDrop() {
+ alert(5);
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js b/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js
new file mode 100644
index 0000000000..db038ee488
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_jquery_2.1.1.js
@@ -0,0 +1,160 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+requestLongerTimeout(2);
+
+// Test that markup view event bubbles show the correct event info for jQuery
+// and jQuery Live events (jQuery version 2.1.1).
+
+const TEST_LIB = "lib_jquery_2.1.1_min.js";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_jquery.html?" + TEST_LIB;
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "html",
+ expected: [
+ {
+ type: "load",
+ filename: TEST_URL + ":29:38",
+ attributes: ["Bubbling"],
+ handler: `
+ () => {
+ const handler1 = function liveDivDblClick() {
+ alert(1);
+ };
+ const handler2 = function liveDivDragStart() {
+ alert(2);
+ };
+ const handler3 = function liveDivDragLeave() {
+ alert(3);
+ };
+ const handler4 = function liveDivDragEnd() {
+ alert(4);
+ };
+ const handler5 = function liveDivDrop() {
+ alert(5);
+ };
+ const handler6 = function liveDivDragOver() {
+ alert(6);
+ };
+ const handler7 = function divClick1() {
+ alert(7);
+ };
+ const handler8 = function divClick2() {
+ alert(8);
+ };
+ const handler9 = function divKeyDown() {
+ alert(9);
+ };
+ const handler10 = function divDragOut() {
+ alert(10);
+ };
+
+ if ($("#livediv").live) {
+ $("#livediv").live("dblclick", handler1);
+ $("#livediv").live("dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate("#livediv", "dragleave", handler3);
+ $(document).delegate("#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on("drop", "#livediv", handler5);
+ $(document).on("dragover", "#livediv", handler6);
+ $(document).on("dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#testdiv",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":36:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick1() {
+ alert(7);
+ }`,
+ },
+ {
+ type: "click",
+ filename: TEST_URL + ":37:43",
+ attributes: ["jQuery"],
+ handler: `
+ function divClick2() {
+ alert(8);
+ }`,
+ },
+ {
+ type: "keydown",
+ filename: TEST_URL + ":38:44",
+ attributes: ["jQuery"],
+ handler: `
+ function divKeyDown() {
+ alert(9);
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#livediv",
+ expected: [
+ {
+ type: "dragend",
+ filename: TEST_URL + ":33:48",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragEnd() {
+ alert(4);
+ }`,
+ },
+ {
+ type: "dragleave",
+ filename: TEST_URL + ":32:50",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragLeave() {
+ alert(3);
+ }`,
+ },
+ {
+ type: "dragover",
+ filename: TEST_URL + ":35:49",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDragOver() {
+ alert(6);
+ }`,
+ },
+ {
+ type: "drop",
+ filename: TEST_URL + ":34:45",
+ attributes: ["jQuery", "Live"],
+ handler: `
+ function liveDivDrop() {
+ alert(5);
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_object_listener.js b/devtools/client/inspector/markup/test/browser_markup_events_object_listener.js
new file mode 100644
index 0000000000..d139a5d9c3
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_object_listener.js
@@ -0,0 +1,43 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+"use strict";
+
+// Test that markup view event bubbles show the correct event info for object
+// style event listeners and that no bubbles are shown for objects without any
+// handleEvent method.
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_object_listener.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+const TEST_DATA = [
+ // eslint-disable-line
+ {
+ selector: "#valid-object-listener",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":20:23",
+ attributes: ["Bubbling"],
+ handler: `() => {\n` + ` console.log("handleEvent");\n` + `}`,
+ },
+ ],
+ },
+ {
+ selector: "#valid-invalid-object-listeners",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_URL + ":27:23",
+ attributes: ["Bubbling"],
+ handler: `() => {\n` + ` console.log("handleEvent");\n` + `}`,
+ },
+ ],
+ },
+];
+
+add_task(async function () {
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1.js b/devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1.js
new file mode 100644
index 0000000000..a9eac7053b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1.js
@@ -0,0 +1,113 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+requestLongerTimeout(4);
+
+// Test that markup view event bubbles show the correct event info for React
+// events (React development version 15.4.1) without JSX.
+
+const TEST_LIB = URL_ROOT_SSL + "lib_react_dom_15.4.1.js";
+const TEST_EXTERNAL_LISTENERS = URL_ROOT_SSL + "react_external_listeners.js";
+const TEST_URL =
+ URL_ROOT_SSL + "doc_markup_events_react_development_15.4.1.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "#inline",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":17530:42",
+ attributes: ["Bubbling"],
+ handler: `function emptyFunction() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_URL + ":22:33",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#external",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":17530:42",
+ attributes: ["Bubbling"],
+ handler: `function emptyFunction() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalinline",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":17530:42",
+ attributes: ["Bubbling"],
+ handler: `function emptyFunction() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ {
+ type: "onMouseUp",
+ filename: TEST_URL + ":22:33",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalcapturing",
+ expected: [
+ {
+ type: "onClickCapture",
+ filename: TEST_EXTERNAL_LISTENERS + ":8:34",
+ attributes: ["React", "Capturing"],
+ handler: `
+ function externalCapturingFunction() {
+ alert("externalCapturingFunction");
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ info(
+ "Switch to 2 pane inspector to avoid sidebar width issues with opening events"
+ );
+ await pushPref("devtools.inspector.three-pane-enabled", false);
+ await pushPref("devtools.toolsidebar-width.inspector", 350);
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1_jsx.js b/devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1_jsx.js
new file mode 100644
index 0000000000..fee94fea98
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_react_development_15.4.1_jsx.js
@@ -0,0 +1,116 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+requestLongerTimeout(4);
+
+// Test that markup view event bubbles show the correct event info for React
+// events (React development version 15.4.1) using JSX.
+
+const TEST_LIB = URL_ROOT_SSL + "lib_react_dom_15.4.1.js";
+const TEST_LIB_BABEL = URL_ROOT_SSL + "lib_babel_6.21.0_min.js";
+const TEST_EXTERNAL_LISTENERS = URL_ROOT_SSL + "react_external_listeners.js";
+const TEST_URL =
+ URL_ROOT_SSL + "doc_markup_events_react_development_15.4.1_jsx.html";
+const TEST_INLINE_BABEL_ORIGINAL = URL_ROOT_SSL + "Inline%20Babel%20script:9";
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "#inlinejsx",
+ isSourceMapped: true,
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":17530:42",
+ attributes: ["Bubbling"],
+ handler: `function emptyFunction() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_INLINE_BABEL_ORIGINAL,
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function inlineFunction() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externaljsx",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":17530:42",
+ attributes: ["Bubbling"],
+ handler: `function emptyFunction() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalinlinejsx",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":17530:42",
+ attributes: ["Bubbling"],
+ handler: `function emptyFunction() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ {
+ type: "onMouseUp",
+ filename: TEST_LIB_BABEL + ":11:41",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function inlineFunction() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalcapturingjsx",
+ expected: [
+ {
+ type: "onClickCapture",
+ filename: TEST_EXTERNAL_LISTENERS + ":8:34",
+ attributes: ["React", "Capturing"],
+ handler: `
+ function externalCapturingFunction() {
+ alert("externalCapturingFunction");
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ info(
+ "Switch to 2 pane inspector to avoid sidebar width issues with opening events"
+ );
+ await pushPref("devtools.inspector.three-pane-enabled", false);
+ await pushPref("devtools.toolsidebar-width.inspector", 350);
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1.js b/devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1.js
new file mode 100644
index 0000000000..bbd0145bb3
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1.js
@@ -0,0 +1,113 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+requestLongerTimeout(4);
+
+// Test that markup view event bubbles show the correct event info for React
+// events (React production version 15.3.1) without JSX.
+
+const TEST_LIB = URL_ROOT_SSL + "lib_react_with_addons_15.3.1_min.js";
+const TEST_EXTERNAL_LISTENERS = URL_ROOT_SSL + "react_external_listeners.js";
+const TEST_URL =
+ URL_ROOT_SSL + "doc_markup_events_react_production_15.3.1.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "#inline",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":16:27180",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_URL + ":22:33",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#external",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":16:27180",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalinline",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":16:27180",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ {
+ type: "onMouseUp",
+ filename: TEST_URL + ":22:33",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalcapturing",
+ expected: [
+ {
+ type: "onClickCapture",
+ filename: TEST_EXTERNAL_LISTENERS + ":8:34",
+ attributes: ["React", "Capturing"],
+ handler: `
+ function externalCapturingFunction() {
+ alert("externalCapturingFunction");
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ info(
+ "Switch to 2 pane inspector to avoid sidebar width issues with opening events"
+ );
+ await pushPref("devtools.inspector.three-pane-enabled", false);
+ await pushPref("devtools.toolsidebar-width.inspector", 350);
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1_jsx.js b/devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1_jsx.js
new file mode 100644
index 0000000000..f2b405c617
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_react_production_15.3.1_jsx.js
@@ -0,0 +1,116 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+requestLongerTimeout(4);
+
+// Test that markup view event bubbles show the correct event info for React
+// events (React production version 15.3.1) using JSX.
+
+const TEST_LIB = URL_ROOT_SSL + "lib_react_with_addons_15.3.1_min.js";
+const TEST_LIB_BABEL = URL_ROOT_SSL + "lib_babel_6.21.0_min.js";
+const TEST_EXTERNAL_LISTENERS = URL_ROOT_SSL + "react_external_listeners.js";
+const TEST_URL =
+ URL_ROOT_SSL + "doc_markup_events_react_production_15.3.1_jsx.html";
+const TEST_INLINE_BABEL_ORIGINAL = URL_ROOT_SSL + "Inline%20Babel%20script:9";
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "#inlinejsx",
+ isSourceMapped: true,
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":16:27180",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_INLINE_BABEL_ORIGINAL,
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externaljsx",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":16:27180",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalinlinejsx",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":16:27180",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ {
+ type: "onMouseUp",
+ filename: TEST_LIB_BABEL + ":11:41",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalcapturingjsx",
+ expected: [
+ {
+ type: "onClickCapture",
+ filename: TEST_EXTERNAL_LISTENERS + ":8:34",
+ attributes: ["React", "Capturing"],
+ handler: `
+ function externalCapturingFunction() {
+ alert("externalCapturingFunction");
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ info(
+ "Switch to 2 pane inspector to avoid sidebar width issues with opening events"
+ );
+ await pushPref("devtools.inspector.three-pane-enabled", false);
+ await pushPref("devtools.toolsidebar-width.inspector", 350);
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0.js b/devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0.js
new file mode 100644
index 0000000000..3034330f14
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0.js
@@ -0,0 +1,133 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+requestLongerTimeout(4);
+
+// Test that markup view event bubbles show the correct event info for React
+// events (React production version 16.2.0) without JSX.
+
+const TEST_LIB = URL_ROOT_SSL + "lib_react_dom_16.2.0_min.js";
+const TEST_EXTERNAL_LISTENERS = URL_ROOT_SSL + "react_external_listeners.js";
+const TEST_URL =
+ URL_ROOT_SSL + "doc_markup_events_react_production_16.2.0.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "#inline",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":93:417",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_URL + ":21:22",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ inlineFunction() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#external",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":93:417",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalinline",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":93:417",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ {
+ type: "onMouseUp",
+ filename: TEST_URL + ":21:22",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ inlineFunction() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalcapturing",
+ expected: [
+ {
+ type: "onClickCapture",
+ filename: TEST_EXTERNAL_LISTENERS + ":8:34",
+ attributes: ["React", "Capturing"],
+ handler: `
+ function externalCapturingFunction() {
+ alert("externalCapturingFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#doublebind",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":93:417",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_URL + ":21:22",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ info(
+ "Switch to 2 pane inspector to avoid sidebar width issues with opening events"
+ );
+ await pushPref("devtools.inspector.three-pane-enabled", false);
+ await pushPref("devtools.toolsidebar-width.inspector", 350);
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0_jsx.js b/devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0_jsx.js
new file mode 100644
index 0000000000..4aedb216e2
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_react_production_16.2.0_jsx.js
@@ -0,0 +1,114 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+"use strict";
+
+requestLongerTimeout(4);
+
+// Test that markup view event bubbles show the correct event info for React
+// events (React production version 16.2.0) using JSX.
+
+const TEST_LIB = URL_ROOT_SSL + "lib_react_dom_16.2.0_min.js";
+const TEST_LIB_BABEL = URL_ROOT_SSL + "lib_babel_6.21.0_min.js";
+const TEST_EXTERNAL_LISTENERS = URL_ROOT_SSL + "react_external_listeners.js";
+const TEST_URL =
+ URL_ROOT_SSL + "doc_markup_events_react_production_16.2.0_jsx.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+/*eslint-disable */
+const TEST_DATA = [
+ {
+ selector: "#inlinejsx",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":93:417",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_LIB_BABEL + ":26:34",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function inlineFunction() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externaljsx",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":93:417",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalinlinejsx",
+ expected: [
+ {
+ type: "click",
+ filename: TEST_LIB + ":93:417",
+ attributes: ["Bubbling"],
+ handler: `function() {}`,
+ },
+ {
+ type: "onClick",
+ filename: TEST_EXTERNAL_LISTENERS + ":4:25",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function externalFunction() {
+ alert("externalFunction");
+ }`,
+ },
+ {
+ type: "onMouseUp",
+ filename: TEST_LIB_BABEL + ":26:34",
+ attributes: ["React", "Bubbling"],
+ handler: `
+ function inlineFunction() {
+ alert("inlineFunction");
+ }`,
+ },
+ ],
+ },
+ {
+ selector: "#externalcapturingjsx",
+ expected: [
+ {
+ type: "onClickCapture",
+ filename: TEST_EXTERNAL_LISTENERS + ":8:34",
+ attributes: ["React", "Capturing"],
+ handler: `
+ function externalCapturingFunction() {
+ alert("externalCapturingFunction");
+ }`,
+ },
+ ],
+ },
+];
+/* eslint-enable */
+
+add_task(async function () {
+ info(
+ "Switch to 2 pane inspector to avoid sidebar width issues with opening events"
+ );
+ await pushPref("devtools.inspector.three-pane-enabled", false);
+ await pushPref("devtools.toolsidebar-width.inspector", 350);
+ await runEventPopupTests(TEST_URL, TEST_DATA);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_source_map.js b/devtools/client/inspector/markup/test/browser_markup_events_source_map.js
new file mode 100644
index 0000000000..39fb3c0575
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_source_map.js
@@ -0,0 +1,54 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Check that source maps work in the event popup.
+
+const INITIAL_URL = URL_ROOT_SSL + "doc_markup_void_elements.html";
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events-source_map.html";
+
+/* import-globals-from helper_events_test_runner.js */
+loadHelperScript("helper_events_test_runner.js");
+
+const TEST_DATA = [
+ {
+ selector: "#clicky",
+ isSourceMapped: true,
+ expected: [
+ {
+ type: "click",
+ filename: "webpack:///events_original.js:7",
+ attributes: ["Bubbling"],
+ handler: `function clickme() {
+ console.log("clickme");
+}`,
+ },
+ ],
+ },
+];
+
+add_task(async function () {
+ // Load some other URL before opening the toolbox, then navigate to
+ // the test URL. This ensures that source map service will see the
+ // sources as they are loaded, avoiding any races.
+ const { toolbox, inspector } = await openInspectorForURL(INITIAL_URL);
+
+ // Ensure the source map service is operating. This looks a bit
+ // funny, but sourceMapURLService is a getter, and we don't need the
+ // result.
+ toolbox.sourceMapURLService;
+
+ await navigateTo(TEST_URL);
+
+ await inspector.markup.expandAll();
+
+ for (const test of TEST_DATA) {
+ await checkEventsForNode(test, inspector);
+ }
+
+ // Wait for promises to avoid leaks when running this as a single test.
+ // We need to do this because we have opened a bunch of popups and don't them
+ // to affect other test runs when they are GCd.
+ await promiseNextTick();
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_events_toggle.js b/devtools/client/inspector/markup/test/browser_markup_events_toggle.js
new file mode 100644
index 0000000000..5e1e437298
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_events_toggle.js
@@ -0,0 +1,295 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_events_test_runner.js */
+
+"use strict";
+
+// Test that event listeners can be disabled and re-enabled from the markup view event bubble.
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_events_toggle.html";
+
+loadHelperScript("helper_events_test_runner.js");
+
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+ const { resourceCommand } = toolbox.commands;
+ await inspector.markup.expandAll();
+ await selectNode("#target", inspector);
+
+ info(
+ "Click on the target element to make sure the event listeners are properly set"
+ );
+ // There's a "mouseup" event listener that is `console.info` (so we can check "native" events).
+ // In order to know if it was called, we listen for the next console.info resource.
+ let { onResource: onConsoleInfoMessage } =
+ await resourceCommand.waitForNextResource(
+ resourceCommand.TYPES.CONSOLE_MESSAGE,
+ {
+ ignoreExistingResources: true,
+ predicate(resource) {
+ return resource.message.level == "info";
+ },
+ }
+ );
+ await safeSynthesizeMouseEventAtCenterInContentPage("#target");
+
+ let data = await getTargetElementHandledEventData();
+ is(data.click, 1, `target handled one "click" event`);
+ is(data.mousedown, 1, `target handled one "mousedown" event`);
+ await onConsoleInfoMessage;
+ ok(true, `the "mouseup" event listener (console.info) was called`);
+
+ info("Check that the event tooltip has the expected content");
+ const container = await getContainerForSelector("#target", inspector);
+ const eventTooltipBadge = container.elt.querySelector(
+ ".inspector-badge.interactive[data-event]"
+ );
+ ok(eventTooltipBadge, "The event tooltip badge is displayed");
+
+ const tooltip = inspector.markup.eventDetailsTooltip;
+ let onTooltipShown = tooltip.once("shown");
+ eventTooltipBadge.click();
+ await onTooltipShown;
+ ok(true, "The tooltip is shown");
+
+ Assert.deepEqual(
+ getAsciiHeadersViz(tooltip),
+ ["click [x]", "mousedown [x]", "mouseup [x]"],
+ "The expected events are displayed, all enabled"
+ );
+ ok(
+ !eventTooltipBadge.classList.contains("has-disabled-events"),
+ "The event badge does not have the has-disabled-events class"
+ );
+
+ const [clickHeader, mousedownHeader, mouseupHeader] =
+ getHeadersInEventTooltip(tooltip);
+
+ info("Uncheck the mousedown event checkbox");
+ await toggleEventListenerCheckbox(tooltip, mousedownHeader);
+ Assert.deepEqual(
+ getAsciiHeadersViz(tooltip),
+ ["click [x]", "mousedown []", "mouseup [x]"],
+ "mousedown checkbox was unchecked"
+ );
+ ok(
+ eventTooltipBadge.classList.contains("has-disabled-events"),
+ "Unchecking an event applied the has-disabled-events class to the badge"
+ );
+ await safeSynthesizeMouseEventAtCenterInContentPage("#target");
+ data = await getTargetElementHandledEventData();
+ is(data.click, 2, `target handled another "click" event…`);
+ is(data.mousedown, 1, `… but not a mousedown one`);
+
+ info(
+ "Check that the event badge style is reset when re-enabling all disabled events"
+ );
+ await toggleEventListenerCheckbox(tooltip, mousedownHeader);
+ Assert.deepEqual(
+ getAsciiHeadersViz(tooltip),
+ ["click [x]", "mousedown [x]", "mouseup [x]"],
+ "mousedown checkbox is checked again"
+ );
+ ok(
+ !eventTooltipBadge.classList.contains("has-disabled-events"),
+ "The event badge does not have the has-disabled-events class after re-enabling disabled event"
+ );
+ info("Disable mousedown again for the rest of the test");
+ await toggleEventListenerCheckbox(tooltip, mousedownHeader);
+ Assert.deepEqual(
+ getAsciiHeadersViz(tooltip),
+ ["click [x]", "mousedown []", "mouseup [x]"],
+ "mousedown checkbox is unchecked again"
+ );
+
+ info("Uncheck the click event checkbox");
+ await toggleEventListenerCheckbox(tooltip, clickHeader);
+ Assert.deepEqual(
+ getAsciiHeadersViz(tooltip),
+ ["click []", "mousedown []", "mouseup [x]"],
+ "click checkbox was unchecked"
+ );
+ ok(
+ eventTooltipBadge.classList.contains("has-disabled-events"),
+ "event badge still has the has-disabled-events class"
+ );
+ await safeSynthesizeMouseEventAtCenterInContentPage("#target");
+ data = await getTargetElementHandledEventData();
+ is(data.click, 2, `click event listener was disabled`);
+ is(data.mousedown, 1, `and mousedown still is disabled as well`);
+
+ info("Uncheck the mouseup event checkbox");
+ await toggleEventListenerCheckbox(tooltip, mouseupHeader);
+ Assert.deepEqual(
+ getAsciiHeadersViz(tooltip),
+ ["click []", "mousedown []", "mouseup []"],
+ "mouseup checkbox was unchecked"
+ );
+
+ ({ onResource: onConsoleInfoMessage } =
+ await resourceCommand.waitForNextResource(
+ resourceCommand.TYPES.CONSOLE_MESSAGE,
+ {
+ ignoreExistingResources: true,
+ predicate(resource) {
+ return resource.message.level == "info";
+ },
+ }
+ ));
+ const onTimeout = wait(500).then(() => "TIMEOUT");
+ await safeSynthesizeMouseEventAtCenterInContentPage("#target");
+ const raceResult = await Promise.race([onConsoleInfoMessage, onTimeout]);
+ is(
+ raceResult,
+ "TIMEOUT",
+ "The mouseup event didn't trigger a console.info call, meaning the event listener was disabled"
+ );
+
+ info("Re-enable the mousedown event");
+ await toggleEventListenerCheckbox(tooltip, mousedownHeader);
+ Assert.deepEqual(
+ getAsciiHeadersViz(tooltip),
+ ["click []", "mousedown [x]", "mouseup []"],
+ "mousedown checkbox is checked again"
+ );
+ ok(
+ eventTooltipBadge.classList.contains("has-disabled-events"),
+ "event badge still has the has-disabled-events class"
+ );
+ await safeSynthesizeMouseEventAtCenterInContentPage("#target");
+ data = await getTargetElementHandledEventData();
+ is(data.click, 2, `no additional "click" event were handled`);
+ is(
+ data.mousedown,
+ 2,
+ `but we did get a new "mousedown", the event listener was re-enabled`
+ );
+
+ info("Hide the tooltip and show it again");
+ const tooltipHidden = tooltip.once("hidden");
+ tooltip.hide();
+ await tooltipHidden;
+
+ onTooltipShown = tooltip.once("shown");
+ eventTooltipBadge.click();
+ await onTooltipShown;
+ ok(true, "The tooltip is shown again");
+
+ Assert.deepEqual(
+ getAsciiHeadersViz(tooltip),
+ ["click []", "mousedown [x]", "mouseup []"],
+ "Only mousedown checkbox is checked"
+ );
+
+ info("Re-enable mouseup events");
+ await toggleEventListenerCheckbox(
+ tooltip,
+ getHeadersInEventTooltip(tooltip).at(-1)
+ );
+ Assert.deepEqual(
+ getAsciiHeadersViz(tooltip),
+ ["click []", "mousedown [x]", "mouseup [x]"],
+ "mouseup is checked again"
+ );
+
+ ({ onResource: onConsoleInfoMessage } =
+ await resourceCommand.waitForNextResource(
+ resourceCommand.TYPES.CONSOLE_MESSAGE,
+ {
+ ignoreExistingResources: true,
+ predicate(resource) {
+ return resource.message.level == "info";
+ },
+ }
+ ));
+ await safeSynthesizeMouseEventAtCenterInContentPage("#target");
+ await onConsoleInfoMessage;
+ ok(true, "The mouseup event was re-enabled");
+ data = await getTargetElementHandledEventData();
+ is(data.click, 2, `"click" is still disabled`);
+ is(
+ data.mousedown,
+ 3,
+ `we received a new "mousedown" event as part of the click`
+ );
+
+ info("Close DevTools to check that event listeners are re-enabled");
+ await closeToolbox();
+ await safeSynthesizeMouseEventAtCenterInContentPage("#target");
+ data = await getTargetElementHandledEventData();
+ is(
+ data.click,
+ 3,
+ `a new "click" event was handled after the devtools was closed`
+ );
+ is(
+ data.mousedown,
+ 4,
+ `a new "mousedown" event was handled after the devtools was closed`
+ );
+});
+
+function getHeadersInEventTooltip(tooltip) {
+ return Array.from(tooltip.panel.querySelectorAll(".event-header"));
+}
+
+/**
+ * Get an array of string representing a header in its state, e.g.
+ * [
+ * "click [x]",
+ * "mousedown []",
+ * ]
+ *
+ * represents an event tooltip with a click and a mousedown event, where the mousedown
+ * event has been disabled.
+ *
+ * @param {EventTooltip} tooltip
+ * @returns Array<String>
+ */
+function getAsciiHeadersViz(tooltip) {
+ return getHeadersInEventTooltip(tooltip).map(
+ el =>
+ `${el.querySelector(".event-tooltip-event-type").textContent} [${
+ getHeaderCheckbox(el).checked ? "x" : ""
+ }]`
+ );
+}
+
+function getHeaderCheckbox(headerEl) {
+ return headerEl.querySelector("input[type=checkbox]");
+}
+
+async function toggleEventListenerCheckbox(tooltip, headerEl) {
+ const onEventToggled = tooltip.eventTooltip.once(
+ "event-tooltip-listener-toggled"
+ );
+ const checkbox = getHeaderCheckbox(headerEl);
+ const previousValue = checkbox.checked;
+ EventUtils.synthesizeMouseAtCenter(
+ getHeaderCheckbox(headerEl),
+ {},
+ headerEl.ownerGlobal
+ );
+ await onEventToggled;
+ is(checkbox.checked, !previousValue, "The checkbox was toggled");
+ is(
+ headerEl.classList.contains("content-expanded"),
+ false,
+ "Clicking on the checkbox did not expand the header"
+ );
+}
+
+/**
+ * @returns Promise<Object> The object keys are event names (e.g. "click", "mousedown"), and
+ * the values are number representing the number of time the event was handled.
+ * Note that "mouseup" isn't handled here.
+ */
+function getTargetElementHandledEventData() {
+ return SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () {
+ // In doc_markup_events_toggle.html , we count the events handled by the target in
+ // a stringified object in dataset.handledEvents.
+ return JSON.parse(
+ content.document.getElementById("target").dataset.handledEvents
+ );
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_flex_display_badge.js b/devtools/client/inspector/markup/test/browser_markup_flex_display_badge.js
new file mode 100644
index 0000000000..a40f50dcee
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_flex_display_badge.js
@@ -0,0 +1,107 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that the flex display badge toggles on the flexbox highlighter.
+
+const TEST_URI = `
+ <style type="text/css">
+ #flex {
+ display: flex;
+ }
+ </style>
+ <div id="flex"></div>
+`;
+
+add_task(async function () {
+ await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
+ const { inspector } = await openLayoutView();
+ const { store } = inspector;
+ const HIGHLIGHTER_TYPE = inspector.highlighters.TYPES.FLEXBOX;
+ const {
+ getActiveHighlighter,
+ getNodeForActiveHighlighter,
+ waitForHighlighterTypeShown,
+ waitForHighlighterTypeHidden,
+ } = getHighlighterTestHelpers(inspector);
+
+ info("Check the flex display badge is shown and not active.");
+ await selectNode("#flex", inspector);
+
+ info("Wait until the flexbox store has been updated");
+ await waitUntilState(
+ store,
+ state =>
+ state.flexbox.flexContainer.nodeFront === inspector.selection.nodeFront
+ );
+
+ const flexContainer = await getContainerForSelector("#flex", inspector);
+ const flexDisplayBadge = flexContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ ok(
+ !flexDisplayBadge.classList.contains("active"),
+ "flex display badge is not active."
+ );
+ ok(
+ flexDisplayBadge.classList.contains("interactive"),
+ "flex display badge is interactive."
+ );
+
+ info("Check the initial state of the flex highlighter.");
+ ok(
+ !getActiveHighlighter(HIGHLIGHTER_TYPE),
+ "No flexbox highlighter exists in the highlighters overlay."
+ );
+ ok(
+ !getNodeForActiveHighlighter(HIGHLIGHTER_TYPE),
+ "No flexbox highlighter is shown."
+ );
+
+ info("Toggling ON the flexbox highlighter from the flex display badge.");
+ const onHighlighterShown = waitForHighlighterTypeShown(HIGHLIGHTER_TYPE);
+ let onCheckboxChange = waitUntilState(
+ store,
+ state => state.flexbox.highlighted
+ );
+ flexDisplayBadge.click();
+ await onHighlighterShown;
+ await onCheckboxChange;
+
+ info(
+ "Check the flexbox highlighter is created and flex display badge state."
+ );
+ ok(
+ getActiveHighlighter(HIGHLIGHTER_TYPE),
+ "Flexbox highlighter is created in the highlighters overlay."
+ );
+ ok(
+ getNodeForActiveHighlighter(HIGHLIGHTER_TYPE),
+ "Flexbox highlighter is shown."
+ );
+ ok(
+ flexDisplayBadge.classList.contains("active"),
+ "flex display badge is active."
+ );
+ ok(
+ flexDisplayBadge.classList.contains("interactive"),
+ "flex display badge is interactive."
+ );
+
+ info("Toggling OFF the flexbox highlighter from the flex display badge.");
+ const onHighlighterHidden = waitForHighlighterTypeHidden(HIGHLIGHTER_TYPE);
+ onCheckboxChange = waitUntilState(store, state => !state.flexbox.highlighted);
+ flexDisplayBadge.click();
+ await onHighlighterHidden;
+ await onCheckboxChange;
+
+ ok(
+ !flexDisplayBadge.classList.contains("active"),
+ "flex display badge is not active."
+ );
+ ok(
+ flexDisplayBadge.classList.contains("interactive"),
+ "flex display badge is interactive."
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_flex_display_badge_telemetry.js b/devtools/client/inspector/markup/test/browser_markup_flex_display_badge_telemetry.js
new file mode 100644
index 0000000000..e65173fcde
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_flex_display_badge_telemetry.js
@@ -0,0 +1,53 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the telemetry is correct when the flexbox highlighter is activated from
+// the markup view.
+
+const TEST_URI = `
+ <style type="text/css">
+ #flex {
+ display: flex;
+ }
+ </style>
+ <div id="flex"></div>
+`;
+
+add_task(async function () {
+ await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
+ startTelemetry();
+ const { inspector } = await openLayoutView();
+ const HIGHLIGHTER_TYPE = inspector.highlighters.TYPES.FLEXBOX;
+ const { waitForHighlighterTypeShown, waitForHighlighterTypeHidden } =
+ getHighlighterTestHelpers(inspector);
+
+ await selectNode("#flex", inspector);
+ const flexContainer = await getContainerForSelector("#flex", inspector);
+ const flexDisplayBadge = flexContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+
+ info("Toggling ON the flexbox highlighter from the flex display badge.");
+ const onHighlighterShown = waitForHighlighterTypeShown(HIGHLIGHTER_TYPE);
+ flexDisplayBadge.click();
+ await onHighlighterShown;
+
+ info("Toggling OFF the flexbox highlighter from the flex display badge.");
+ const onHighlighterHidden = waitForHighlighterTypeHidden(HIGHLIGHTER_TYPE);
+ flexDisplayBadge.click();
+ await onHighlighterHidden;
+
+ checkResults();
+});
+
+function checkResults() {
+ checkTelemetry("devtools.markup.flexboxhighlighter.opened", "", 1, "scalar");
+ checkTelemetry(
+ "DEVTOOLS_FLEXBOX_HIGHLIGHTER_TIME_ACTIVE_SECONDS",
+ "",
+ null,
+ "hasentries"
+ );
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_01.js b/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_01.js
new file mode 100644
index 0000000000..a68b972006
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_01.js
@@ -0,0 +1,91 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that the grid display badge toggles on the grid highlighter.
+
+const TEST_URI = `
+ <style type="text/css">
+ #grid {
+ display: grid;
+ }
+ </style>
+ <div id="grid"></div>
+`;
+
+add_task(async function () {
+ await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
+ const { inspector } = await openLayoutView();
+ const { highlighters, store } = inspector;
+ const HIGHLIGHTER_TYPE = inspector.highlighters.TYPES.GRID;
+ const { waitForHighlighterTypeShown, waitForHighlighterTypeHidden } =
+ getHighlighterTestHelpers(inspector);
+
+ info("Check the grid display badge is shown and not active.");
+ await selectNode("#grid", inspector);
+ const gridContainer = await getContainerForSelector("#grid", inspector);
+ const gridDisplayBadge = gridContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ ok(
+ !gridDisplayBadge.classList.contains("active"),
+ "grid display badge is not active."
+ );
+ ok(
+ gridDisplayBadge.classList.contains("interactive"),
+ "grid display badge is interactive."
+ );
+
+ info("Check the initial state of the grid highlighter.");
+ ok(
+ !highlighters.gridHighlighters.size,
+ "No CSS grid highlighter exists in the highlighters overlay."
+ );
+
+ info("Toggling ON the CSS grid highlighter from the grid display badge.");
+ const onHighlighterShown = waitForHighlighterTypeShown(HIGHLIGHTER_TYPE);
+ let onCheckboxChange = waitUntilState(
+ store,
+ state => state.grids.length === 1 && state.grids[0].highlighted
+ );
+ gridDisplayBadge.click();
+ await onHighlighterShown;
+ await onCheckboxChange;
+
+ info(
+ "Check that the CSS grid highlighter is created and the display badge state."
+ );
+ is(
+ highlighters.gridHighlighters.size,
+ 1,
+ "CSS grid highlighter is created in the highlighters overlay."
+ );
+ ok(
+ gridDisplayBadge.classList.contains("active"),
+ "grid display badge is active."
+ );
+ ok(
+ gridDisplayBadge.classList.contains("interactive"),
+ "grid display badge is interactive."
+ );
+
+ info("Toggling OFF the CSS grid highlighter from the grid display badge.");
+ const onHighlighterHidden = waitForHighlighterTypeHidden(HIGHLIGHTER_TYPE);
+ onCheckboxChange = waitUntilState(
+ store,
+ state => state.grids.length == 1 && !state.grids[0].highlighted
+ );
+ gridDisplayBadge.click();
+ await onHighlighterHidden;
+ await onCheckboxChange;
+
+ ok(
+ !gridDisplayBadge.classList.contains("active"),
+ "grid display badge is not active."
+ );
+ ok(
+ gridDisplayBadge.classList.contains("interactive"),
+ "grid display badge is interactive."
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_02.js b/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_02.js
new file mode 100644
index 0000000000..7c66688f4e
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_02.js
@@ -0,0 +1,256 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests toggling multiple grid highlighters in the markup view with the grid display
+// badges.
+
+const TEST_URI = `
+ <style type='text/css'>
+ .grid {
+ display: grid;
+ }
+ </style>
+ <div id="grid1" class="grid">
+ <div class="cell1">cell1</div>
+ <div class="cell2">cell2</div>
+ </div>
+ <div id="grid2" class="grid">
+ <div class="cell1">cell1</div>
+ <div class="cell2">cell2</div>
+ </div>
+ <div id="grid3" class="grid">
+ <div class="cell1">cell1</div>
+ <div class="cell2">cell2</div>
+ </div>
+`;
+
+add_task(async function () {
+ await pushPref("devtools.gridinspector.maxHighlighters", 2);
+ await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
+ const { inspector } = await openLayoutView();
+ const { highlighters } = inspector;
+ const HIGHLIGHTER_TYPE = inspector.highlighters.TYPES.GRID;
+ const { waitForHighlighterTypeShown, waitForHighlighterTypeHidden } =
+ getHighlighterTestHelpers(inspector);
+
+ const grid1 = await getContainerForSelector("#grid1", inspector);
+ const grid2 = await getContainerForSelector("#grid2", inspector);
+ const grid3 = await getContainerForSelector("#grid3", inspector);
+ const gridDisplayBadge1 = grid1.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ const gridDisplayBadge2 = grid2.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ const gridDisplayBadge3 = grid3.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+
+ info(
+ "Check the initial state of the grid display badges and grid highlighters"
+ );
+ ok(
+ !gridDisplayBadge1.classList.contains("active"),
+ "#grid1 display badge is not active."
+ );
+ ok(
+ !gridDisplayBadge2.classList.contains("active"),
+ "#grid2 display badge is not active."
+ );
+ ok(
+ !gridDisplayBadge3.classList.contains("active"),
+ "#grid3 display badge is not active."
+ );
+ ok(
+ gridDisplayBadge1.classList.contains("interactive"),
+ "#grid1 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge2.classList.contains("interactive"),
+ "#grid2 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge3.classList.contains("interactive"),
+ "#grid3 display badge is interactive"
+ );
+ ok(
+ !highlighters.gridHighlighters.size,
+ "No CSS grid highlighter exists in the highlighters overlay."
+ );
+
+ info("Toggling ON the CSS grid highlighter from the #grid1 display badge.");
+ let onHighlighterShown = waitForHighlighterTypeShown(HIGHLIGHTER_TYPE);
+ gridDisplayBadge1.click();
+ await onHighlighterShown;
+
+ ok(
+ gridDisplayBadge1.classList.contains("active"),
+ "#grid1 display badge is active."
+ );
+ ok(
+ !gridDisplayBadge2.classList.contains("active"),
+ "#grid2 display badge is not active."
+ );
+ ok(
+ !gridDisplayBadge3.classList.contains("active"),
+ "#grid3 display badge is not active."
+ );
+ ok(
+ gridDisplayBadge1.classList.contains("interactive"),
+ "#grid1 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge2.classList.contains("interactive"),
+ "#grid2 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge3.classList.contains("interactive"),
+ "#grid3 display badge is interactive"
+ );
+ is(
+ highlighters.gridHighlighters.size,
+ 1,
+ "Got expected number of grid highlighters shown."
+ );
+
+ info("Toggling ON the CSS grid highlighter from the #grid2 display badge.");
+ onHighlighterShown = waitForHighlighterTypeShown(HIGHLIGHTER_TYPE);
+ gridDisplayBadge2.click();
+ await onHighlighterShown;
+
+ ok(
+ gridDisplayBadge1.classList.contains("active"),
+ "#grid1 display badge is active."
+ );
+ ok(
+ gridDisplayBadge2.classList.contains("active"),
+ "#grid2 display badge is active."
+ );
+ ok(
+ !gridDisplayBadge3.classList.contains("active"),
+ "#grid3 display badge is not active."
+ );
+ ok(
+ gridDisplayBadge1.classList.contains("interactive"),
+ "#grid1 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge2.classList.contains("interactive"),
+ "#grid2 display badge is interactive"
+ );
+ ok(
+ !gridDisplayBadge3.classList.contains("interactive"),
+ "#grid3 display badge is not interactive"
+ );
+ is(
+ highlighters.gridHighlighters.size,
+ 2,
+ "Got expected number of grid highlighters shown."
+ );
+
+ info(
+ "Attempt to toggle ON the CSS grid highlighter from the #grid3 display badge."
+ );
+ gridDisplayBadge3.click();
+
+ ok(
+ gridDisplayBadge1.classList.contains("active"),
+ "#grid1 display badge is active."
+ );
+ ok(
+ gridDisplayBadge2.classList.contains("active"),
+ "#grid2 display badge is active."
+ );
+ ok(
+ !gridDisplayBadge3.classList.contains("active"),
+ "#grid3 display badge is not active."
+ );
+ ok(
+ gridDisplayBadge1.classList.contains("interactive"),
+ "#grid1 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge2.classList.contains("interactive"),
+ "#grid2 display badge is interactive"
+ );
+ ok(
+ !gridDisplayBadge3.classList.contains("interactive"),
+ "#grid3 display badge is not interactive"
+ );
+ is(
+ highlighters.gridHighlighters.size,
+ 2,
+ "Got expected number of grid highlighters shown."
+ );
+
+ info("Toggling OFF the CSS grid highlighter from the #grid2 display badge.");
+ let onHighlighterHidden = waitForHighlighterTypeHidden(HIGHLIGHTER_TYPE);
+ gridDisplayBadge2.click();
+ await onHighlighterHidden;
+
+ ok(
+ gridDisplayBadge1.classList.contains("active"),
+ "#grid1 display badge is active."
+ );
+ ok(
+ !gridDisplayBadge2.classList.contains("active"),
+ "#grid2 display badge is not active."
+ );
+ ok(
+ !gridDisplayBadge3.classList.contains("active"),
+ "#grid3 display badge is not active."
+ );
+ ok(
+ gridDisplayBadge1.classList.contains("interactive"),
+ "#grid1 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge2.classList.contains("interactive"),
+ "#grid2 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge3.classList.contains("interactive"),
+ "#grid3 display badge is interactive"
+ );
+ is(
+ highlighters.gridHighlighters.size,
+ 1,
+ "Got expected number of grid highlighters shown."
+ );
+
+ info("Toggling OFF the CSS grid highlighter from the #grid1 display badge.");
+ onHighlighterHidden = waitForHighlighterTypeHidden(HIGHLIGHTER_TYPE);
+ gridDisplayBadge1.click();
+ await onHighlighterHidden;
+
+ ok(
+ !gridDisplayBadge1.classList.contains("active"),
+ "#grid1 display badge is not active."
+ );
+ ok(
+ !gridDisplayBadge2.classList.contains("active"),
+ "#grid2 display badge is not active."
+ );
+ ok(
+ !gridDisplayBadge3.classList.contains("active"),
+ "#grid3 display badge is not active."
+ );
+ ok(
+ gridDisplayBadge1.classList.contains("interactive"),
+ "#grid1 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge2.classList.contains("interactive"),
+ "#grid2 display badge is interactive"
+ );
+ ok(
+ gridDisplayBadge3.classList.contains("interactive"),
+ "#grid3 display badge is interactive"
+ );
+ ok(
+ !highlighters.gridHighlighters.size,
+ "No CSS grid highlighter exists in the highlighters overlay."
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_03.js b/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_03.js
new file mode 100644
index 0000000000..6c4cb06b45
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_03.js
@@ -0,0 +1,82 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Check that toggling a flex highlighter does not change a grid highlighter badge.
+// Bug 1592604
+
+const TEST_URI = `
+ <style type='text/css'>
+ .grid {
+ display: grid;
+ }
+ .flex {
+ display: flex;
+ }
+ </style>
+ <div class="grid">
+ </div>
+ <div class="flex">
+ </div>
+`;
+
+add_task(async function () {
+ await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
+ const { inspector } = await openLayoutView();
+
+ const gridBadge = await enableHighlighterByBadge("grid", ".grid", inspector);
+ const flexBadge = await enableHighlighterByBadge("flex", ".flex", inspector);
+
+ info("Check that both display badges are active");
+ ok(flexBadge.classList.contains("active"), `flex display badge is active.`);
+ ok(gridBadge.classList.contains("active"), `grid display badge is active.`);
+});
+
+/**
+ * Enable the flex or grid highlighter by clicking on the corresponding badge
+ * next to a node in the markup view. Returns the badge element.
+ *
+ * @param {String} type
+ * Either "flex" or "grid"
+ * @param {String} selector
+ * Selector matching the flex or grid container element.
+ * @param {Inspector} inspector
+ * Instance of Inspector panel
+ * @return {Element} The DOM element of the display badge that shows next to the element
+ * mathched by the selector in the markup view.
+ */
+async function enableHighlighterByBadge(type, selector, inspector) {
+ const { waitForHighlighterTypeShown } = getHighlighterTestHelpers(inspector);
+
+ info(`Check the ${type} display badge is shown and not active.`);
+ const container = await getContainerForSelector(selector, inspector);
+ const badge = container.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ ok(!badge.classList.contains("active"), `${type} badge is not active.`);
+ ok(badge.classList.contains("interactive"), `${type} badge is interactive.`);
+
+ info(`Toggling ON the ${type} highlighter from the ${type} display badge.`);
+ let onHighlighterShown;
+ switch (type) {
+ case "grid":
+ onHighlighterShown = waitForHighlighterTypeShown(
+ inspector.highlighters.TYPES.GRID
+ );
+ break;
+ case "flex":
+ onHighlighterShown = waitForHighlighterTypeShown(
+ inspector.highlighters.TYPES.FLEXBOX
+ );
+ break;
+ }
+
+ badge.click();
+ await onHighlighterShown;
+
+ ok(badge.classList.contains("active"), `${type} badge is active.`);
+ ok(badge.classList.contains("interactive"), `${type} badge is interactive.`);
+
+ return badge;
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_telemetry.js b/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_telemetry.js
new file mode 100644
index 0000000000..8bb3cc1441
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_grid_display_badge_telemetry.js
@@ -0,0 +1,45 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the telemetry count is correct when the grid highlighter is activated from
+// the markup view.
+
+const TEST_URI = `
+ <style type="text/css">
+ #grid {
+ display: grid;
+ }
+ </style>
+ <div id="grid"></div>
+`;
+
+add_task(async function () {
+ await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
+ startTelemetry();
+ const { inspector } = await openLayoutView();
+ const { highlighters, store } = inspector;
+
+ await selectNode("#grid", inspector);
+ const gridContainer = await getContainerForSelector("#grid", inspector);
+ const gridDisplayBadge = gridContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+
+ info("Toggling ON the CSS grid highlighter from the grid display badge.");
+ const onHighlighterShown = highlighters.once("grid-highlighter-shown");
+ const onCheckboxChange = waitUntilState(
+ store,
+ state => state.grids.length === 1 && state.grids[0].highlighted
+ );
+ gridDisplayBadge.click();
+ await onHighlighterShown;
+ await onCheckboxChange;
+
+ checkResults();
+});
+
+function checkResults() {
+ checkTelemetry("devtools.markup.gridinspector.opened", "", 1, "scalar");
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_html_edit_01.js b/devtools/client/inspector/markup/test/browser_markup_html_edit_01.js
new file mode 100644
index 0000000000..5179902da6
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_01.js
@@ -0,0 +1,111 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_outerhtml_test_runner.js */
+"use strict";
+
+// Test outerHTML edition via the markup-view
+
+requestLongerTimeout(2);
+
+loadHelperScript("helper_outerhtml_test_runner.js");
+
+const TEST_DATA = [
+ {
+ selector: "#one",
+ oldHTML: '<div id="one">First <em>Div</em></div>',
+ newHTML: '<div id="one">First Div</div>',
+ async validate() {
+ const text = await getContentPageElementProperty("#one", "textContent");
+ is(text, "First Div", "New div has expected text content");
+ const num = await getNumberOfMatchingElementsInContentPage("#one em");
+ is(num, 0, "No em remaining");
+ },
+ },
+ {
+ selector: "#removedChildren",
+ oldHTML:
+ '<div id="removedChildren">removedChild ' +
+ "<i>Italic <b>Bold <u>Underline</u></b></i> Normal</div>",
+ newHTML: '<div id="removedChildren">removedChild</div>',
+ },
+ {
+ selector: "#addedChildren",
+ oldHTML: '<div id="addedChildren">addedChildren</div>',
+ newHTML:
+ '<div id="addedChildren">addedChildren ' +
+ "<i>Italic <b>Bold <u>Underline</u></b></i> Normal</div>",
+ },
+ {
+ selector: "#addedAttribute",
+ oldHTML: '<div id="addedAttribute">addedAttribute</div>',
+ newHTML:
+ '<div id="addedAttribute" class="important" disabled checked>' +
+ "addedAttribute</div>",
+ async validate({ pageNodeFront, selectedNodeFront }) {
+ is(pageNodeFront, selectedNodeFront, "Original element is selected");
+ const html = await getContentPageElementProperty(
+ "#addedAttribute",
+ "outerHTML"
+ );
+ is(
+ html,
+ '<div id="addedAttribute" class="important" disabled="" ' +
+ 'checked="">addedAttribute</div>',
+ "Attributes have been added"
+ );
+ },
+ },
+ {
+ selector: "#changedTag",
+ oldHTML: '<div id="changedTag">changedTag</div>',
+ newHTML: '<p id="changedTag" class="important">changedTag</p>',
+ },
+ {
+ selector: "#siblings",
+ oldHTML: '<div id="siblings">siblings</div>',
+ newHTML:
+ '<div id="siblings-before-sibling">before sibling</div>' +
+ '<div id="siblings">siblings (updated)</div>' +
+ '<div id="siblings-after-sibling">after sibling</div>',
+ async validate({ selectedNodeFront, inspector }) {
+ const beforeSiblingFront = await getNodeFront(
+ "#siblings-before-sibling",
+ inspector
+ );
+ is(beforeSiblingFront, selectedNodeFront, "Sibling has been selected");
+
+ const text = await getContentPageElementProperty(
+ "#siblings",
+ "textContent"
+ );
+ is(text, "siblings (updated)", "New div has expected text content");
+
+ const beforeText = await getContentPageElementProperty(
+ "#siblings-before-sibling",
+ "textContent"
+ );
+ is(beforeText, "before sibling", "Sibling has been inserted");
+
+ const afterText = await getContentPageElementProperty(
+ "#siblings-after-sibling",
+ "textContent"
+ );
+ is(afterText, "after sibling", "Sibling has been inserted");
+ },
+ },
+];
+
+const TEST_URL =
+ "data:text/html," +
+ "<!DOCTYPE html>" +
+ "<head><meta charset='utf-8' /></head>" +
+ "<body>" +
+ TEST_DATA.map(outer => outer.oldHTML).join("\n") +
+ "</body>" +
+ "</html>";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ inspector.markup._frame.focus();
+ await runEditOuterHTMLTests(TEST_DATA, inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_html_edit_02.js b/devtools/client/inspector/markup/test/browser_markup_html_edit_02.js
new file mode 100644
index 0000000000..832ff21921
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_02.js
@@ -0,0 +1,157 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_outerhtml_test_runner.js */
+"use strict";
+
+// Test outerHTML edition via the markup-view
+
+loadHelperScript("helper_outerhtml_test_runner.js");
+requestLongerTimeout(2);
+
+const TEST_DATA = [
+ {
+ selector: "#badMarkup1",
+ oldHTML: '<div id="badMarkup1">badMarkup1</div>',
+ newHTML: '<div id="badMarkup1">badMarkup1</div> hanging</div>',
+ async validate({ pageNodeFront, selectedNodeFront }) {
+ is(pageNodeFront, selectedNodeFront, "Original element is selected");
+
+ const [textNodeName, textNodeData] = await SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [],
+ () => {
+ const node =
+ content.document.querySelector("#badMarkup1").nextSibling;
+ return [node.nodeName, node.data];
+ }
+ );
+ is(textNodeName, "#text", "Sibling is a text element");
+ is(textNodeData, " hanging", "New text node has expected text content");
+ },
+ },
+ {
+ selector: "#badMarkup2",
+ oldHTML: '<div id="badMarkup2">badMarkup2</div>',
+ newHTML:
+ '<div id="badMarkup2">badMarkup2</div> hanging<div></div>' +
+ "</div></div></body>",
+ async validate({ pageNodeFront, selectedNodeFront }) {
+ is(pageNodeFront, selectedNodeFront, "Original element is selected");
+
+ const [textNodeName, textNodeData] = await SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [],
+ () => {
+ const node =
+ content.document.querySelector("#badMarkup2").nextSibling;
+ return [node.nodeName, node.data];
+ }
+ );
+ is(textNodeName, "#text", "Sibling is a text element");
+ is(textNodeData, " hanging", "New text node has expected text content");
+ },
+ },
+ {
+ selector: "#badMarkup3",
+ oldHTML: '<div id="badMarkup3">badMarkup3</div>',
+ newHTML:
+ '<div id="badMarkup3">badMarkup3 <em>Emphasized <strong> ' +
+ "and strong</div>",
+ async validate({ pageNodeFront, selectedNodeFront }) {
+ is(pageNodeFront, selectedNodeFront, "Original element is selected");
+
+ const emText = await getContentPageElementProperty(
+ "#badMarkup3 em",
+ "textContent"
+ );
+ const strongText = await getContentPageElementProperty(
+ "#badMarkup3 strong",
+ "textContent"
+ );
+ is(emText, "Emphasized and strong", "<em> was auto created");
+ is(strongText, " and strong", "<strong> was auto created");
+ },
+ },
+ {
+ selector: "#badMarkup4",
+ oldHTML: '<div id="badMarkup4">badMarkup4</div>',
+ newHTML: '<div id="badMarkup4">badMarkup4</p>',
+ async validate({ pageNodeFront, selectedNodeFront }) {
+ is(pageNodeFront, selectedNodeFront, "Original element is selected");
+
+ const divText = await getContentPageElementProperty(
+ "#badMarkup4",
+ "textContent"
+ );
+ const divTag = await getContentPageElementProperty(
+ "#badMarkup4",
+ "tagName"
+ );
+
+ const pText = await getContentPageElementProperty(
+ "#badMarkup4 p",
+ "textContent"
+ );
+ const pTag = await getContentPageElementProperty(
+ "#badMarkup4 p",
+ "tagName"
+ );
+
+ is(divText, "badMarkup4", "textContent is correct");
+ is(divTag, "DIV", "did not change to <p> tag");
+ is(pText, "", "The <p> tag has no children");
+ is(pTag, "P", "Created an empty <p> tag");
+ },
+ },
+ {
+ selector: "#badMarkup5",
+ oldHTML: '<p id="badMarkup5">badMarkup5</p>',
+ newHTML: '<p id="badMarkup5">badMarkup5 <div>with a nested div</div></p>',
+ async validate({ pageNodeFront, selectedNodeFront }) {
+ is(pageNodeFront, selectedNodeFront, "Original element is selected");
+
+ const num = await getNumberOfMatchingElementsInContentPage(
+ "#badMarkup5 div"
+ );
+
+ const pText = await getContentPageElementProperty(
+ "#badMarkup5",
+ "textContent"
+ );
+ const pTag = await getContentPageElementProperty(
+ "#badMarkup5",
+ "tagName"
+ );
+
+ const divText = await getContentPageElementProperty(
+ "#badMarkup5 ~ div",
+ "textContent"
+ );
+ const divTag = await getContentPageElementProperty(
+ "#badMarkup5 ~ div",
+ "tagName"
+ );
+
+ is(num, 0, "The invalid markup got created as a sibling");
+ is(pText, "badMarkup5 ", "The p tag does not take in the div content");
+ is(pTag, "P", "Did not change to a <div> tag");
+ is(divText, "with a nested div", "textContent is correct");
+ is(divTag, "DIV", "Did not change to <p> tag");
+ },
+ },
+];
+
+const TEST_URL =
+ "data:text/html," +
+ "<!DOCTYPE html>" +
+ "<head><meta charset='utf-8' /></head>" +
+ "<body>" +
+ TEST_DATA.map(outer => outer.oldHTML).join("\n") +
+ "</body>" +
+ "</html>";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ inspector.markup._frame.focus();
+ await runEditOuterHTMLTests(TEST_DATA, inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_html_edit_03.js b/devtools/client/inspector/markup/test/browser_markup_html_edit_03.js
new file mode 100644
index 0000000000..af5dc091f3
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_03.js
@@ -0,0 +1,305 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that outerHTML editing keybindings work as expected and that *special*
+// elements like <html>, <body> and <head> can be edited correctly.
+
+const TEST_URL =
+ "data:text/html," +
+ "<!DOCTYPE html>" +
+ "<head><meta charset='utf-8' /></head>" +
+ "<body>" +
+ '<div id="keyboard"></div>' +
+ "</body>" +
+ "</html>";
+const SELECTOR = "#keyboard";
+const OLD_HTML = '<div id="keyboard"></div>';
+const NEW_HTML = '<div id="keyboard">Edited</div>';
+
+requestLongerTimeout(2);
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ inspector.markup._frame.focus();
+
+ info("Check that pressing escape cancels edits");
+ await testEscapeCancels(inspector);
+
+ info("Check that pressing F2 commits edits");
+ await testF2Commits(inspector);
+
+ info("Check that editing the <body> element works like other nodes");
+ await testBody(inspector);
+
+ info("Check that editing the <head> element works like other nodes");
+ await testHead(inspector);
+
+ info("Check that editing the <html> element works like other nodes");
+ await testDocumentElement(inspector);
+
+ info("Check (again) that editing the <html> element works like other nodes");
+ await testDocumentElement2(inspector);
+});
+
+async function testEscapeCancels(inspector) {
+ await selectNode(SELECTOR, inspector);
+
+ const onHtmlEditorCreated = once(inspector.markup, "begin-editing");
+ EventUtils.sendKey("F2", inspector.markup._frame.contentWindow);
+ await onHtmlEditorCreated;
+ ok(inspector.markup.htmlEditor._visible, "HTML Editor is visible");
+
+ is(
+ await getContentPageElementProperty(SELECTOR, "outerHTML"),
+ OLD_HTML,
+ "The node is starting with old HTML."
+ );
+
+ inspector.markup.htmlEditor.editor.setText(NEW_HTML);
+
+ const onEditorHiddem = once(inspector.markup.htmlEditor, "popuphidden");
+ EventUtils.sendKey("ESCAPE", inspector.markup.htmlEditor.doc.defaultView);
+ await onEditorHiddem;
+ ok(!inspector.markup.htmlEditor._visible, "HTML Editor is not visible");
+
+ is(
+ await getContentPageElementProperty(SELECTOR, "outerHTML"),
+ OLD_HTML,
+ "Escape cancels edits"
+ );
+}
+
+async function testF2Commits(inspector) {
+ const onEditorShown = once(inspector.markup.htmlEditor, "popupshown");
+ inspector.markup._frame.contentDocument.documentElement.focus();
+ EventUtils.sendKey("F2", inspector.markup._frame.contentWindow);
+ await onEditorShown;
+ ok(inspector.markup.htmlEditor._visible, "HTML Editor is visible");
+
+ is(
+ await getContentPageElementProperty(SELECTOR, "outerHTML"),
+ OLD_HTML,
+ "The node is starting with old HTML."
+ );
+
+ const onMutations = inspector.once("markupmutation");
+ inspector.markup.htmlEditor.editor.setText(NEW_HTML);
+ EventUtils.sendKey("F2", inspector.markup._frame.contentWindow);
+ await onMutations;
+
+ ok(!inspector.markup.htmlEditor._visible, "HTML Editor is not visible");
+
+ is(
+ await getContentPageElementProperty(SELECTOR, "outerHTML"),
+ NEW_HTML,
+ "F2 commits edits - the node has new HTML."
+ );
+}
+
+async function testBody(inspector) {
+ const currentBodyHTML = await getContentPageElementProperty(
+ "body",
+ "outerHTML"
+ );
+ const bodyHTML = '<body id="updated"><p></p></body>';
+ const bodyFront = await getNodeFront("body", inspector);
+
+ const onUpdated = inspector.once("inspector-updated");
+ const onReselected = inspector.markup.once("reselectedonremoved");
+ await inspector.markup.updateNodeOuterHTML(
+ bodyFront,
+ bodyHTML,
+ currentBodyHTML
+ );
+ await onReselected;
+ await onUpdated;
+
+ const newBodyHTML = await getContentPageElementProperty("body", "outerHTML");
+ is(newBodyHTML, bodyHTML, "<body> HTML has been updated");
+
+ const headsNum = await getNumberOfMatchingElementsInContentPage("head");
+ is(headsNum, 1, "no extra <head>s have been added");
+}
+
+async function testHead(inspector) {
+ await selectNode("head", inspector);
+
+ const currentHeadHTML = await getContentPageElementProperty(
+ "head",
+ "outerHTML"
+ );
+ const headHTML =
+ '<head id="updated"><title>New Title</title>' +
+ '<script>window.foo="bar";</script></head>';
+ const headFront = await getNodeFront("head", inspector);
+
+ const onUpdated = inspector.once("inspector-updated");
+ const onReselected = inspector.markup.once("reselectedonremoved");
+ await inspector.markup.updateNodeOuterHTML(
+ headFront,
+ headHTML,
+ currentHeadHTML
+ );
+ await onReselected;
+ await onUpdated;
+
+ is(await getDocumentTitle(), "New Title", "New title has been added");
+ is(await getWindowFoo(), undefined, "Script has not been executed");
+ is(
+ await getContentPageElementProperty("head", "outerHTML"),
+ headHTML,
+ "<head> HTML has been updated"
+ );
+ is(
+ await getNumberOfMatchingElementsInContentPage("body"),
+ 1,
+ "no extra <body>s have been added"
+ );
+}
+
+async function testDocumentElement(inspector) {
+ const currentDocElementOuterHMTL = await getDocumentOuterHTML();
+ const docElementHTML =
+ '<html id="updated" foo="bar"><head>' +
+ "<title>Updated from document element</title>" +
+ '<script>window.foo="bar";</script></head><body>' +
+ "<p>Hello</p></body></html>";
+ const docElementFront = await inspector.markup.walker.documentElement();
+
+ const onReselected = inspector.markup.once("reselectedonremoved");
+ await inspector.markup.updateNodeOuterHTML(
+ docElementFront,
+ docElementHTML,
+ currentDocElementOuterHMTL
+ );
+ await onReselected;
+
+ is(
+ await getDocumentTitle(),
+ "Updated from document element",
+ "New title has been added"
+ );
+ is(await getWindowFoo(), undefined, "Script has not been executed");
+ is(
+ await getContentPageElementAttribute("html", "id"),
+ "updated",
+ "<html> ID has been updated"
+ );
+ is(
+ await getContentPageElementAttribute("html", "class"),
+ null,
+ "<html> class has been updated"
+ );
+ is(
+ await getContentPageElementAttribute("html", "foo"),
+ "bar",
+ "<html> attribute has been updated"
+ );
+ is(
+ await getContentPageElementProperty("html", "outerHTML"),
+ docElementHTML,
+ "<html> HTML has been updated"
+ );
+ is(
+ await getNumberOfMatchingElementsInContentPage("head"),
+ 1,
+ "no extra <head>s have been added"
+ );
+ is(
+ await getNumberOfMatchingElementsInContentPage("body"),
+ 1,
+ "no extra <body>s have been added"
+ );
+ is(
+ await getContentPageElementProperty("body", "textContent"),
+ "Hello",
+ "document.body.textContent has been updated"
+ );
+}
+
+async function testDocumentElement2(inspector) {
+ const currentDocElementOuterHMTL = await getDocumentOuterHTML();
+ const docElementHTML =
+ '<html id="somethingelse" class="updated"><head>' +
+ "<title>Updated again from document element</title>" +
+ '<script>window.foo="bar";</script></head><body>' +
+ "<p>Hello again</p></body></html>";
+ const docElementFront = await inspector.markup.walker.documentElement();
+
+ const onReselected = inspector.markup.once("reselectedonremoved");
+ inspector.markup.updateNodeOuterHTML(
+ docElementFront,
+ docElementHTML,
+ currentDocElementOuterHMTL
+ );
+ await onReselected;
+
+ is(
+ await getDocumentTitle(),
+ "Updated again from document element",
+ "New title has been added"
+ );
+ is(await getWindowFoo(), undefined, "Script has not been executed");
+ is(
+ await getContentPageElementAttribute("html", "id"),
+ "somethingelse",
+ "<html> ID has been updated"
+ );
+ is(
+ await getContentPageElementAttribute("html", "class"),
+ "updated",
+ "<html> class has been updated"
+ );
+ is(
+ await getContentPageElementAttribute("html", "foo"),
+ null,
+ "<html> attribute has been removed"
+ );
+ is(
+ await getContentPageElementProperty("html", "outerHTML"),
+ docElementHTML,
+ "<html> HTML has been updated"
+ );
+ is(
+ await getNumberOfMatchingElementsInContentPage("head"),
+ 1,
+ "no extra <head>s have been added"
+ );
+ is(
+ await getNumberOfMatchingElementsInContentPage("body"),
+ 1,
+ "no extra <body>s have been added"
+ );
+ is(
+ await getContentPageElementProperty("body", "textContent"),
+ "Hello again",
+ "document.body.textContent has been updated"
+ );
+}
+
+function getDocumentTitle() {
+ return SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [],
+ () => content.document.title
+ );
+}
+
+function getDocumentOuterHTML() {
+ return SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [],
+ () => content.document.documentElement.outerHTML
+ );
+}
+
+function getWindowFoo() {
+ return SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [],
+ () => content.wrappedJSObject.foo
+ );
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_html_edit_04.js b/devtools/client/inspector/markup/test/browser_markup_html_edit_04.js
new file mode 100644
index 0000000000..be56b47368
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_04.js
@@ -0,0 +1,101 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that outerHTML editing keybindings work as expected and that the <svg>
+// root element can be edited correctly.
+
+const TEST_URL =
+ "data:image/svg+xml," +
+ '<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">' +
+ '<circle cx="50" cy="50" r="50"/>' +
+ "</svg>";
+
+requestLongerTimeout(2);
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ inspector.markup._frame.focus();
+
+ info("Check that editing the <svg> element works like other nodes");
+ await testDocumentElement(inspector);
+
+ info("Check (again) that editing the <svg> element works like other nodes");
+ await testDocumentElement2(inspector);
+});
+
+async function testDocumentElement(inspector) {
+ const currentDocElementOuterHTML = await SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [],
+ () => content.document.documentElement.outerHTML
+ );
+ const docElementSVG =
+ '<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">' +
+ '<rect x="10" y="10" width="180" height="180"/>' +
+ "</svg>";
+ const docElementFront = await inspector.markup.walker.documentElement();
+
+ const onReselected = inspector.markup.once("reselectedonremoved");
+ await inspector.markup.updateNodeOuterHTML(
+ docElementFront,
+ docElementSVG,
+ currentDocElementOuterHTML
+ );
+ await onReselected;
+
+ is(
+ await getContentPageElementAttribute("svg", "width"),
+ "200",
+ "<svg> width has been updated"
+ );
+ is(
+ await getContentPageElementAttribute("svg", "height"),
+ "200",
+ "<svg> height has been updated"
+ );
+ is(
+ await getContentPageElementProperty("svg", "outerHTML"),
+ docElementSVG,
+ "<svg> markup has been updated"
+ );
+}
+
+async function testDocumentElement2(inspector) {
+ const currentDocElementOuterHTML = await SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [],
+ () => content.document.documentElement.outerHTML
+ );
+ const docElementSVG =
+ '<svg width="300" height="300" xmlns="http://www.w3.org/2000/svg">' +
+ '<ellipse cx="150" cy="150" rx="150" ry="100"/>' +
+ "</svg>";
+ const docElementFront = await inspector.markup.walker.documentElement();
+
+ const onReselected = inspector.markup.once("reselectedonremoved");
+ inspector.markup.updateNodeOuterHTML(
+ docElementFront,
+ docElementSVG,
+ currentDocElementOuterHTML
+ );
+ await onReselected;
+
+ is(
+ await getContentPageElementAttribute("svg", "width"),
+ "300",
+ "<svg> width has been updated"
+ );
+ is(
+ await getContentPageElementAttribute("svg", "height"),
+ "300",
+ "<svg> height has been updated"
+ );
+ is(
+ await getContentPageElementProperty("svg", "outerHTML"),
+ docElementSVG,
+ "<svg> markup has been updated"
+ );
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_html_edit_undo-redo.js b/devtools/client/inspector/markup/test/browser_markup_html_edit_undo-redo.js
new file mode 100644
index 0000000000..6f76d524d8
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_html_edit_undo-redo.js
@@ -0,0 +1,88 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the undo/redo stack is correctly cleared when opening the HTML editor on a
+// new node. Bug 1327674.
+
+const DIV1_HTML = '<div id="d1">content1</div>';
+const DIV2_HTML = '<div id="d2">content2</div>';
+const DIV2_HTML_UPDATED = '<div id="d2">content2_updated</div>';
+
+const TEST_URL =
+ "data:text/html," +
+ "<!DOCTYPE html>" +
+ "<head><meta charset='utf-8' /></head>" +
+ "<body>" +
+ DIV1_HTML +
+ DIV2_HTML +
+ "</body>" +
+ "</html>";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ inspector.markup._frame.focus();
+
+ await selectNode("#d1", inspector);
+
+ info("Open the HTML editor on node #d1");
+ let onHtmlEditorCreated = once(inspector.markup, "begin-editing");
+ EventUtils.sendKey("F2", inspector.markup._frame.contentWindow);
+ await onHtmlEditorCreated;
+
+ ok(inspector.markup.htmlEditor._visible, "HTML Editor is visible");
+ is(
+ inspector.markup.htmlEditor.editor.getText(),
+ DIV1_HTML,
+ "The editor content for d1 is correct."
+ );
+
+ info("Hide the HTML editor for #d1");
+ let onEditorHidden = once(inspector.markup.htmlEditor, "popuphidden");
+ EventUtils.sendKey("ESCAPE", inspector.markup.htmlEditor.doc.defaultView);
+ await onEditorHidden;
+ ok(!inspector.markup.htmlEditor._visible, "HTML Editor is not visible");
+
+ await selectNode("#d2", inspector);
+
+ info("Open the HTML editor on node #d2");
+ onHtmlEditorCreated = once(inspector.markup, "begin-editing");
+ EventUtils.sendKey("F2", inspector.markup._frame.contentWindow);
+ await onHtmlEditorCreated;
+
+ ok(inspector.markup.htmlEditor._visible, "HTML Editor is visible");
+ is(
+ inspector.markup.htmlEditor.editor.getText(),
+ DIV2_HTML,
+ "The editor content for d2 is correct."
+ );
+
+ inspector.markup.htmlEditor.editor.setText(DIV2_HTML_UPDATED);
+ is(
+ inspector.markup.htmlEditor.editor.getText(),
+ DIV2_HTML_UPDATED,
+ "The editor content for d2 is updated."
+ );
+
+ inspector.markup.htmlEditor.editor.undo();
+ is(
+ inspector.markup.htmlEditor.editor.getText(),
+ DIV2_HTML,
+ "The editor content for d2 is reverted."
+ );
+
+ inspector.markup.htmlEditor.editor.undo();
+ is(
+ inspector.markup.htmlEditor.editor.getText(),
+ DIV2_HTML,
+ "The editor content for d2 has not been set to content1."
+ );
+
+ info("Hide the HTML editor for #d2");
+ onEditorHidden = once(inspector.markup.htmlEditor, "popuphidden");
+ EventUtils.sendKey("ESCAPE", inspector.markup.htmlEditor.doc.defaultView);
+ await onEditorHidden;
+ ok(!inspector.markup.htmlEditor._visible, "HTML Editor is not visible");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_iframe_blocked_by_csp.js b/devtools/client/inspector/markup/test/browser_markup_iframe_blocked_by_csp.js
new file mode 100644
index 0000000000..559919f2ef
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_iframe_blocked_by_csp.js
@@ -0,0 +1,53 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+"use strict";
+
+// Test that iframe blocked because of CSP doesn't cause the browser to freeze.
+
+const IFRAME_TEST_URI = `https://example.com/document-builder.sjs?html=${encodeURIComponent(`
+ <h1>Test expanding CSP-blocked iframe</h1>
+ <iframe src="https://example.org/document-builder.sjs?html=HelloIframe"></iframe>
+`)}&headers=content-security-policy:default-src 'self'`;
+const FRAME_TEST_URI = `https://example.com/document-builder.sjs?html=${encodeURIComponent(`
+ <frameset>
+ <frame src="https://example.org/document-builder.sjs?html=HelloFrame"></frame>
+ </frameset>
+`)}&headers=content-security-policy:default-src 'self'`;
+
+const BYPASS_WALKERFRONT_CHILDREN_IFRAME_GUARD_PREF =
+ "devtools.testing.bypass-walker-children-iframe-guard";
+
+add_task(async function () {
+ await pushPref(BYPASS_WALKERFRONT_CHILDREN_IFRAME_GUARD_PREF, true);
+ const { inspector } = await openInspectorForURL(IFRAME_TEST_URI);
+ await testElementBlockedByCSP("iframe", inspector);
+
+ // Don't wait for the load event as it doesn't happen because the frame is blocked.
+ await navigateTo(FRAME_TEST_URI, { waitForLoad: false });
+ await testElementBlockedByCSP("frame", inspector);
+});
+
+async function testElementBlockedByCSP(selector, inspector) {
+ await inspector.markup.expandAll();
+ info(`Check that markup node for "${selector}" can't be expanded`);
+ let container = await getContainerForSelector(selector, inspector);
+
+ is(
+ container.expander.style.visibility,
+ "hidden",
+ "Expand icon is hidden, even without the safe guard in WalkerFront#children"
+ );
+
+ info("Reload the page and do same assertion with the guard");
+ Services.prefs.clearUserPref(BYPASS_WALKERFRONT_CHILDREN_IFRAME_GUARD_PREF);
+ await reloadBrowser();
+
+ await inspector.markup.expandAll();
+ container = await getContainerForSelector(selector, inspector);
+ is(
+ container.expander.style.visibility,
+ "hidden",
+ "Expand icon is still hidden"
+ );
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_image_tooltip.js b/devtools/client/inspector/markup/test/browser_markup_image_tooltip.js
new file mode 100644
index 0000000000..f4a45c5079
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_image_tooltip.js
@@ -0,0 +1,63 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+
+// Test that image preview tooltips are shown on img and canvas tags in the
+// markup-view and that the tooltip actually contains an image and shows the
+// right dimension label
+
+const TEST_NODES = [
+ { selector: "img.local", size: "192" + " \u00D7 " + "192" },
+ { selector: "img.data", size: "64" + " \u00D7 " + "64" },
+ { selector: "img.remote", size: "22" + " \u00D7 " + "23" },
+ { selector: ".canvas", size: "600" + " \u00D7 " + "600" },
+];
+
+add_task(async function () {
+ await addTab(URL_ROOT + "doc_markup_image_and_canvas_2.html");
+ const { inspector } = await openInspector();
+
+ info("Selecting the first <img> tag");
+ await selectNode("img", inspector);
+
+ for (const testNode of TEST_NODES) {
+ const target = await getImageTooltipTarget(testNode, inspector);
+ await assertTooltipShownOnHover(
+ inspector.markup.imagePreviewTooltip,
+ target
+ );
+ checkImageTooltip(testNode, inspector);
+ await assertTooltipHiddenOnMouseOut(
+ inspector.markup.imagePreviewTooltip,
+ target
+ );
+ }
+});
+
+async function getImageTooltipTarget({ selector }, inspector) {
+ const nodeFront = await getNodeFront(selector, inspector);
+ const isImg = nodeFront.tagName.toLowerCase() === "img";
+
+ const container = getContainerForNodeFront(nodeFront, inspector);
+
+ let target = container.editor.tag;
+ if (isImg) {
+ target = container.editor.getAttributeElement("src").querySelector(".link");
+ }
+ return target;
+}
+
+function checkImageTooltip({ selector, size }, { markup }) {
+ const panel = markup.imagePreviewTooltip.panel;
+ const images = panel.getElementsByTagName("img");
+ is(images.length, 1, "Tooltip for [" + selector + "] contains an image");
+
+ const label = panel.querySelector(".devtools-tooltip-caption");
+ is(
+ label.textContent,
+ size,
+ "Tooltip label for [" + selector + "] displays the right image size"
+ );
+
+ markup.imagePreviewTooltip.hide();
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js b/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js
new file mode 100644
index 0000000000..3a2cc358a7
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_image_tooltip_mutations.js
@@ -0,0 +1,95 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that image preview tooltip shows updated content when the image src
+// changes.
+
+// prettier-ignore
+const INITIAL_SRC = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADI5JREFUeNrsWwuQFNUVPf1m5z87szv7HWSWj8CigBFMEFZKiQsB1PgJwUAZg1HBpIQsKmokEhNjWUnFVPnDWBT+KolJYbRMoqUVq0yCClpqiX8sCchPWFwVlt2db7+X93pez7zu6Vn2NxsVWh8987p7pu+9555z7+tZjTGGY3kjOMa34w447oBjfKsY7i/UNM3Y8eFSAkD50Plgw03K5P9gvGv7U5ieeR3PszeREiPNX3/0DL4hjslzhm8THh+OITfXk3dhiv4GDtGPVzCaeJmPLYzuu5qJuWfuw2QTlcN1X9pwQU7LhdZ/ZAseD45cOh9hHvDkc/yAF/DNhdb5Mrr3PvBMaAYW8fMSIi2G497IMEK/YutGtAYr6+ej+nxu/NN8Ks3N7AR6HgcLz0Eg1Ljg1UcxZzi5qewIkMYLRweTr2Kzp+nmyXAd5pS3XQDd+N/4h4zgu9FI7brlXf90nMEnuwQxlvv+hosE3TuexmWeysmT4W+WxkMaLzf9Y8ATgjcUn7T9H1gqrpFq8eV1gMn6t16NhngjfoX6q4DUP032Rd4LJgpSLwJ1yzFqBG69eRkah0MVyo0Acfe+yy9AG4nMiYCkeM53KKFXncBLAXqEm+wCqZwaueq7WCmuLTcKSJmj737ol2hurA9eq9VdyiO8yWa3NNyog+SB5CZodSsQq/dfu34tJpYbBaTMzvVddDZu16q5smXf4G8zEvqm4cyaAmJPuTJk3oJWdS4WzcVtfMZbThSQckb/pYfRGgo3zNOqZnEHbJPGK4abaDCQIIsT8V/qTaBqHkLh6LzXH8XZQhbLhYKyyCC/WeHYcNdmvOgfe8skzbWL270/T3wf7tSx/lGCbTu8xlzzmCSWLc5iwmgikcCHi3Mga0Ry913vBFvQwg90l6M4ImWKfsWOp7DSWxmfpPlCFuPFfsNfKrCnPYpQKIRgqBK7D0SxYaNHwkEiJMtl0ReDp3Lc5D3PGoTo/sKngCl7a5chFqvBatKwjBd7WwqIlzB/78NcoUcp5VSgGxm+7b8eqQRGnHMO634epO4S1EZww09/iFg5UmGoESDuznP1xVhTUX1WWHPzjpd25wyH0hRxI3LGM75nxmuNEEUVpAN0XgxmPoKralakbQnWlIMQyVBD/w+3orkq4lvualjKyWwzt4MaxqspQHVhPOWG64bxYuhZXSFGWhipbSDVragOu5Y9eAsmDDUKyBA703vemVhHoueD6e9wAzJK1WfmN0Umk5GGM4kEMZcuIECqgjm0nldAqmbjwtm4VxZH5AvlADP6mx9Eqy9Q0+KqW8Ch+47FaMMYmnNGfY1iPMshoC6qFxme4wQ+0p+ARE6H3+9veWEDWgUhDhUKyFARn4jM5BNxT0XsMg7bfymGK1ov3wtjDfhL4w0HVGUVBEjDaaE+QNdrcNWch1PG4W6xrjBUXECGivg++Cva3JUT4iQUz3V2RsSVaKLwOuDT89A3HdBQoxhNC+fnVm74ual2EG893P6G+PuP4SfiO4cCBWQooL9qCWKNXPbcI37Aa/lnlZxXRt4RFONGwSDCPAHqOuqjWct1QiEMw5mChM5X4K47FyNqcd3aK9AwFH0CGYLoe1ctxk2eWi57rg5JfGp9rzC6ggCdFlAgHBDw5Yxlcg6G8SyHCjMlsgmDD9zhSeHlF+JnAgWDTQUy2NxfdwOao1UVV3pi3+bE97YSbWpLAbn6zefHNQkp1PMpIBwwvslKgIYTKM2nEpNzrGcH3FXTEal0L38kJ4uDQgEZbO4vnI173LXf5NHZaiUxtaCxyZuo/rK6LpUg54yg3zTWRAArvDcRIPZ6BqzrQ1REpmL+DNw32OKIDCb3X1qPVn8wNNMT4w2bvs+q4bAZrqBh2skaL3yyhhIIZ4i6oHkUK0RckcB8GigEyRIH4A6Mgc8fatl0/+BkkQxC9gIT4ljna1rIZW9rEdNbjJcNjsnoYj7LHWCUwpITzEgzRQKZ3XAFHbTzA3hrz8TEUUZxFBhoKpABQt/97p+w0hMZG68I8R6FtlsJT3FELndZntjM+VMnylKYq8GJI3UZaRMpquGSGFVOEfv0YZBMNzz+uvjbfzS6xQERIhlI9FcvQWNdFVb7x1zCb+QNK8vb9NsiifmI5hBgVoOCBC1sb0ab5RomqENxLO3eA1/0NDRU47q2RQNbRCUDIb7lF2CNL3ZGxEV4n08TVvZWYG4pZyV0zUdS45tyCBByOHWiyvZmxFXDCyRo1ge5+Sy0TA+8lWMiP/6O0S32exGV9Jf4fr8azdUR3zL/CZz4MtvzdX5uOYs6NDOmpkuj5Huh+7qUQSYl0ThHzw0YQzcGo6bhzEqoYq5rN3yRiYiG3Vfe2Ybm/qKA9NNZ3nNm4F7/yDkg9AN+U1mHiBcXP8zuDN76jj8hg1QyiWQigalj02BJPhK8I0zxijAjhp5zhlpLUDvS+BCy2HMAvvB4XDgL9/SXC0g/ou/5+6/xLX8w0uJrOIkXfPvyhY0F6gr7M8H0KWFYikcqAXakB+xwD9CdREBLoau7Gz3cAdSIdLFxFtJTCqRChSjnutvhDcREtzjz2Tswtz+yeNRFUeXZXtWux7C1fuoVcbd3J//ipDX3uZZDLGrwweS+UBLL5TDliVBnF8P7H+XI8aRRGsIBJg/Zlslt1+W+D1JWoSyi+kD9jfhs78t7mhZhSl+fLfY1Bdyv3I8V/qpY3B1McgN7ZFT5/vNO0I5DPLLdPBIJA8qc4h2I0QplYfDpJwHT+aj0246r5S8rToG8OjCle8wk4OLvvYGa+Ovr84uo2qBSwJS9G5egoZFLTfiEqWDtbwGfHgKOdPHcS+ai7XDzMPW/FJRLGGcxnBbK4YJC2K+h+T6Bdu5CqHqCWERd3bawb7JI+iJ735+LNaHaprBLLHBm08U3XxShEsdt+f3eTh3v7aC95Dct4RCWL5OZWh/oXBZThxAIxyOXLzBk8aiEWJID8rK3CpPOmeHaGpvCS+7EHv5FujVHUSJPLXvIFeHcNc+9xrB2gws9KZdxuLFax/WLM5gzzSm/lTXF/OdAcapyvjxPqxqHjr2v4ckX2bS2dRBrc5lSdpKjEJ9/9tdwX2WMd53ZQ2IVo3RES+UwVSpCPvYepNx4gmTGDUKIMQ4eduPnD7mx9xOn/KZKOlFbStjONxHTtR+BYAPmnoZ1Zp8wkBRwP/EL3u0F/C2hGl7vpz7vW37T3vP7if8wroKuoh8ribknX9BK5rcF+mo1qKaKyRPJTgTDjbzY8szcuLb3bpH00u35T47j7prRpwDJTxzyG0dHgxPp5bPG8VdkpfPbUg3SgoOo2mwVukb98D5EqpswZTTulCggTk4gpYhv0++wIhCJxr0+Hq1sondis0SE2oxQe3qWXwWyO4DSQg9gJ8Iiw1VFcGqXxet0N9xE4ygIxv/9W6wo9WyROEX/R+eiobYSq2vHTOR631Eiv2lRfh9dvxkumkXh92Qsx8XrAJ+7YGbWuhxOi/U+31NQmzyqNYG8N/3wfo6CRtRHcN01FzkvojohwLu0VVvDa56IS/xcj2b7nN+O+m0jqpE1wMPXZxAN9iCVThtDvH7gmiRGRpU8Lspv1Uhq4wIVdQoyuGSLNYPKUCS8+CzNURbzMmjK3i8u0U793lmuV0ef9nWQ5MGC/DiUqEUSaCtXna9RJEspZS1lrXINK/pcq+SpT50t98QKMq1FRmDfx3vxty102k0PM4ssEnvuz5+G26Ij4yDpz6z9fV8bkyIkqBFkhej0Ib+ZQ34XJK9AfozaiimqIoX3Jp3tiISrcfYpuN2+iFph/02P36PNC9fVcCnp6H9jYouKyfaWufz5Tp9tVxcUniw7IohZv4dZz81/ns67z3AYPrc2n0+Ix2q8k0PWjgBy88XaibnfK9A+5LdDY2Ivhy36fbT8Zv3Lb1U1qLqUxorXEEXIs0mjjrtxoTZWtdvigNs2sgPiujTv6DIZLld6b/V5742JZV3fUsUVFy5gdsNtKWFzUCEVbNepD1MkSMVbsb6SZm7jI3/zODtQKgUMsOw8wDZ63t5xcV1TnaEAxoc6wrqY+Fj+N4DsqOnhOIdicrQSm1MPYCPlIqHn5bbHg8/bj2D3QfZnCX3mpAICDZV8jH5kpbZqTD0W+DxaA74CWzLN2nd14OlL72J38Lf7+TjC7dadZFDoZJQPrtaIKL/G0L6ktptPZVJ8fMqHYPZOKYPMyQGadIJfDvdXwAFiZOTvDBPydf5vk4rWA+RfdhBlaF/yDDBRoMu9pfnSjv/p7DG+HXfAcQcc49v/BBgAcFAO4DmB2GQAAAAASUVORK5CYII=";
+
+const UPDATED_SRC = URL_ROOT + "doc_markup_tooltip.png";
+
+const INITIAL_SRC_SIZE = "64" + " \u00D7 " + "64";
+const UPDATED_SRC_SIZE = "22" + " \u00D7 " + "23";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(
+ "data:text/html,<p>markup view tooltip test</p><img>"
+ );
+
+ info("Retrieving NodeFront for the <img> element.");
+ const img = await getNodeFront("img", inspector);
+
+ info("Selecting the <img> element");
+ await selectNode(img, inspector);
+
+ info("Adding src attribute to the image.");
+ await updateImageSrc(img, INITIAL_SRC, inspector);
+
+ const container = getContainerForNodeFront(img, inspector);
+ ok(container, "Found markup container for the image.");
+
+ let target = container.editor
+ .getAttributeElement("src")
+ .querySelector(".link");
+ ok(target, "Found the src attribute in the markup view.");
+
+ info("Showing tooltip on the src link.");
+ await assertTooltipShownOnHover(inspector.markup.imagePreviewTooltip, target);
+
+ checkImageTooltip(INITIAL_SRC_SIZE, inspector);
+
+ await assertTooltipHiddenOnMouseOut(
+ inspector.markup.imagePreviewTooltip,
+ target
+ );
+
+ info("Updating the image src.");
+ await updateImageSrc(img, UPDATED_SRC, inspector);
+
+ target = container.editor.getAttributeElement("src").querySelector(".link");
+ ok(target, "Found the src attribute in the markup view after mutation.");
+
+ info("Showing tooltip on the src link.");
+ await assertTooltipShownOnHover(inspector.markup.imagePreviewTooltip, target);
+
+ info("Checking that the new image was shown.");
+ checkImageTooltip(UPDATED_SRC_SIZE, inspector);
+
+ await assertTooltipHiddenOnMouseOut(
+ inspector.markup.imagePreviewTooltip,
+ target
+ );
+});
+
+/**
+ * Updates the src attribute of the image. Return a Promise.
+ */
+function updateImageSrc(img, newSrc, inspector) {
+ const onMutated = inspector.once("markupmutation");
+ const onModified = img.modifyAttributes([
+ {
+ attributeName: "src",
+ newValue: newSrc,
+ },
+ ]);
+
+ return Promise.all([onMutated, onModified]);
+}
+
+/**
+ * Checks that the markup view tooltip contains an image element with the given
+ * size.
+ */
+function checkImageTooltip(size, { markup }) {
+ const panel = markup.imagePreviewTooltip.panel;
+ const images = panel.getElementsByTagName("img");
+ is(images.length, 1, "Tooltip contains an image");
+
+ const label = panel.querySelector(".devtools-tooltip-caption");
+ is(label.textContent, size, "Tooltip label displays the right image size");
+
+ markup.imagePreviewTooltip.hide();
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_01.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_01.js
new file mode 100644
index 0000000000..9488670d3c
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_01.js
@@ -0,0 +1,48 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+requestLongerTimeout(2);
+
+// Tests tabbing through attributes on a node
+
+const TEST_URL = "data:text/html;charset=utf8,<div id='test' a b c d e></div>";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Focusing the tag editor of the test element");
+ const { editor } = await focusNode("div", inspector);
+ editor.tag.focus();
+
+ info("Pressing tab and expecting to focus the ID attribute, always first");
+ EventUtils.sendKey("tab", inspector.panelWin);
+ checkFocusedAttribute("id");
+
+ info("Hit enter to turn the attribute to edit mode");
+ EventUtils.sendKey("return", inspector.panelWin);
+ checkFocusedAttribute("id", true);
+
+ // Check the order of the other attributes in the DOM to the check they appear
+ // correctly in the markup-view
+ const attributes = (await getAttributesFromEditor("div", inspector)).slice(1);
+
+ info("Tabbing forward through attributes in edit mode");
+ for (const attribute of attributes) {
+ collapseSelectionAndTab(inspector);
+ checkFocusedAttribute(attribute, true);
+ }
+
+ info("Tabbing backward through attributes in edit mode");
+
+ // Just reverse the attributes other than id and remove the first one since
+ // it's already focused now.
+ const reverseAttributes = attributes.reverse();
+ reverseAttributes.shift();
+
+ for (const attribute of reverseAttributes) {
+ collapseSelectionAndShiftTab(inspector);
+ checkFocusedAttribute(attribute, true);
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_02.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_02.js
new file mode 100644
index 0000000000..8b82a83aee
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_02.js
@@ -0,0 +1,31 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that pressing ESC when a node in the markup-view is focused toggles
+// the split-console (see bug 988278)
+
+const TEST_URL = "data:text/html;charset=utf8,<div></div>";
+
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+
+ info("Focusing the tag editor of the test element");
+ const { editor } = await getContainerForSelector("div", inspector);
+ editor.tag.focus();
+
+ info("Pressing ESC and wait for the split-console to open");
+ let onSplitConsole = toolbox.once("split-console");
+ const onConsoleReady = toolbox.once("webconsole-ready");
+ EventUtils.synthesizeKey("VK_ESCAPE", {}, inspector.panelWin);
+ await onSplitConsole;
+ await onConsoleReady;
+ ok(toolbox.splitConsole, "The split console is shown.");
+
+ info("Pressing ESC again and wait for the split-console to close");
+ onSplitConsole = toolbox.once("split-console");
+ EventUtils.synthesizeKey("VK_ESCAPE", {}, inspector.panelWin);
+ await onSplitConsole;
+ ok(!toolbox.splitConsole, "The split console is hidden.");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_03.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_03.js
new file mode 100644
index 0000000000..db918defd6
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_03.js
@@ -0,0 +1,64 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that selecting a node with the mouse (by clicking on the line) focuses
+// the first focusable element in the corresponding MarkupContainer so that the
+// keyboard can be used immediately.
+
+const TEST_URL = `data:text/html;charset=utf8,
+ <div class='test-class'></div>Text node`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { walker } = inspector;
+
+ info("Select the test node to have the 2 test containers visible");
+ await selectNode("div", inspector);
+
+ const divFront = await walker.querySelector(walker.rootNode, "div");
+ const textFront = await walker.nextSibling(divFront);
+
+ info("Click on the MarkupContainer element for the text node");
+ await clickContainer(textFront, inspector);
+ is(
+ inspector.markup.doc.activeElement,
+ getContainerForNodeFront(textFront, inspector).editor.textNode.valuePreRef
+ .current,
+ "The currently focused element is the node's text content"
+ );
+
+ info("Click on the MarkupContainer element for the <div> node");
+ await clickContainer(divFront, inspector);
+ is(
+ inspector.markup.doc.activeElement,
+ getContainerForNodeFront(divFront, inspector).editor.tag,
+ "The currently focused element is the div's tagname"
+ );
+
+ info("Click on the test-class attribute, to make sure it gets focused");
+ const editor = getContainerForNodeFront(divFront, inspector).editor;
+ const attributeEditor = editor.attrElements
+ .get("class")
+ .querySelector(".editable");
+
+ const onFocus = once(attributeEditor, "focus");
+ EventUtils.synthesizeMouseAtCenter(
+ attributeEditor,
+ { type: "mousedown" },
+ inspector.markup.doc.defaultView
+ );
+ EventUtils.synthesizeMouseAtCenter(
+ attributeEditor,
+ { type: "mouseup" },
+ inspector.markup.doc.defaultView
+ );
+ await onFocus;
+
+ is(
+ inspector.markup.doc.activeElement,
+ attributeEditor,
+ "The currently focused element is the div's class attribute"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_04.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_04.js
new file mode 100644
index 0000000000..078fc571a8
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_04.js
@@ -0,0 +1,71 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+requestLongerTimeout(2);
+
+// Tests that selecting a node using the browser context menu (inspect element)
+// or the element picker focuses that node so that the keyboard can be used
+// immediately.
+
+const TEST_URL = "data:text/html;charset=utf8,<div>test element</div>";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Select the test node with the browser ctx menu");
+ await clickOnInspectMenuItem("div");
+ assertNodeSelected(inspector, "div");
+
+ info(
+ "Press arrowUp to focus <body> " +
+ "(which works if the node was focused properly)"
+ );
+ await selectPreviousNodeWithArrowUp(inspector);
+ assertNodeSelected(inspector, "body");
+
+ info("Select the test node with the element picker");
+ await selectWithElementPicker(inspector);
+ assertNodeSelected(inspector, "div");
+
+ info(
+ "Press arrowUp to focus <body> " +
+ "(which works if the node was focused properly)"
+ );
+ await selectPreviousNodeWithArrowUp(inspector);
+ assertNodeSelected(inspector, "body");
+});
+
+function assertNodeSelected(inspector, tagName) {
+ is(
+ inspector.selection.nodeFront.tagName.toLowerCase(),
+ tagName,
+ `The <${tagName}> node is selected`
+ );
+}
+
+function selectPreviousNodeWithArrowUp(inspector) {
+ const { waitForHighlighterTypeShown } = getHighlighterTestHelpers(inspector);
+ const onNodeHighlighted = waitForHighlighterTypeShown(
+ inspector.highlighters.TYPES.BOXMODEL
+ );
+ const onUpdated = inspector.once("inspector-updated");
+ EventUtils.synthesizeKey("KEY_ArrowUp");
+ return Promise.all([onUpdated, onNodeHighlighted]);
+}
+
+async function selectWithElementPicker(inspector) {
+ await startPicker(inspector.toolbox);
+
+ await safeSynthesizeMouseEventAtCenterInContentPage(
+ "div",
+ {
+ type: "mousemove",
+ },
+ gBrowser.selectedBrowser
+ );
+
+ BrowserTestUtils.synthesizeKey("KEY_Enter", {}, gBrowser.selectedBrowser);
+ await inspector.once("inspector-updated");
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_delete_attributes.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_delete_attributes.js
new file mode 100644
index 0000000000..ffa5e9d86c
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_delete_attributes.js
@@ -0,0 +1,73 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that attributes can be deleted from the markup-view with the delete key
+// when they are focused.
+
+const HTML = '<div id="id" class="class" data-id="id"></div>';
+const TEST_URL = "data:text/html;charset=utf-8," + encodeURIComponent(HTML);
+
+// List of all the test cases. Each item is an object with the following props:
+// - selector: the css selector of the node that should be selected
+// - attribute: the name of the attribute that should be focused. Do not
+// specify an attribute that would make it impossible to find the node using
+// selector.
+// Note that after each test case, undo is called.
+const TEST_DATA = [
+ {
+ selector: "#id",
+ attribute: "class",
+ },
+ {
+ selector: "#id",
+ attribute: "data-id",
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { walker } = inspector;
+
+ for (const { selector, attribute } of TEST_DATA) {
+ info("Get the container for node " + selector);
+ const { editor } = await getContainerForSelector(selector, inspector);
+
+ info("Focus attribute " + attribute);
+ const attr = editor.attrElements.get(attribute).querySelector(".editable");
+ attr.focus();
+
+ info("Delete the attribute by pressing delete");
+ const mutated = inspector.once("markupmutation");
+ EventUtils.sendKey("delete", inspector.panelWin);
+ await mutated;
+
+ info("Check that the node is still here");
+ let node = await walker.querySelector(walker.rootNode, selector);
+ ok(node, "The node hasn't been deleted");
+
+ info("Check that the attribute has been deleted");
+ node = await walker.querySelector(
+ walker.rootNode,
+ selector + "[" + attribute + "]"
+ );
+ ok(!node, "The attribute does not exist anymore in the DOM");
+ ok(
+ !editor.attrElements.get(attribute),
+ "The attribute has been removed from the container"
+ );
+
+ info("Undo the change");
+ await undoChange(inspector);
+ node = await walker.querySelector(
+ walker.rootNode,
+ selector + "[" + attribute + "]"
+ );
+ ok(node, "The attribute is back in the DOM");
+ ok(
+ editor.attrElements.get(attribute),
+ "The attribute is back on the container"
+ );
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_keybindings_scrolltonode.js b/devtools/client/inspector/markup/test/browser_markup_keybindings_scrolltonode.js
new file mode 100644
index 0000000000..faf8bc575c
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_keybindings_scrolltonode.js
@@ -0,0 +1,100 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test the keyboard shortcut "S" used to scroll to the selected node.
+
+const HTML = `<div style="width: 300px; height: 3000px; position:relative;">
+ <div id="scroll-top"
+ style="height: 50px; top: 0; position:absolute;">
+ TOP</div>
+ <div id="scroll-bottom"
+ style="height: 50px; bottom: 0; position:absolute;">
+ BOTTOM</div>
+ </div>`;
+const TEST_URL = "data:text/html;charset=utf-8," + encodeURIComponent(HTML);
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Make sure the markup frame has the focus");
+ inspector.markup._frame.focus();
+
+ info("Before test starts, #scroll-top is visible, #scroll-bottom is hidden");
+ await checkElementIsInViewport("#scroll-top", true);
+ await checkElementIsInViewport("#scroll-bottom", false);
+
+ info("Select the #scroll-bottom node");
+ await selectNode("#scroll-bottom", inspector);
+ info("Press S to scroll to the bottom node");
+ let waitForScroll = BrowserTestUtils.waitForContentEvent(
+ gBrowser.selectedBrowser,
+ "scroll"
+ );
+ await EventUtils.synthesizeKey("S", {}, inspector.panelWin);
+ await waitForScroll;
+ ok(true, "Scroll event received");
+
+ info("#scroll-top should be scrolled out, #scroll-bottom should be visible");
+ await checkElementIsInViewport("#scroll-top", false);
+ await checkElementIsInViewport("#scroll-bottom", true);
+
+ info("Select the #scroll-top node");
+ await selectNode("#scroll-top", inspector);
+ info("Press S to scroll to the top node");
+ waitForScroll = BrowserTestUtils.waitForContentEvent(
+ gBrowser.selectedBrowser,
+ "scroll"
+ );
+ await EventUtils.synthesizeKey("S", {}, inspector.panelWin);
+ await waitForScroll;
+ ok(true, "Scroll event received");
+
+ info("#scroll-top should be visible, #scroll-bottom should be scrolled out");
+ await checkElementIsInViewport("#scroll-top", true);
+ await checkElementIsInViewport("#scroll-bottom", false);
+
+ info("Select #scroll-bottom node");
+ await selectNode("#scroll-bottom", inspector);
+ info("Press shift + S, nothing should happen due to the modifier");
+ await EventUtils.synthesizeKey("S", { shiftKey: true }, inspector.panelWin);
+
+ info("Same state, #scroll-top is visible, #scroll-bottom is scrolled out");
+ await checkElementIsInViewport("#scroll-top", true);
+ await checkElementIsInViewport("#scroll-bottom", false);
+});
+
+/**
+ * Verify that the element matching the provided selector is either in or out
+ * of the viewport, depending on the provided "expected" argument.
+ * Returns a promise that will resolve when the test has been performed.
+ *
+ * @param {String} selector
+ * css selector for the element to test
+ * @param {Boolean} expected
+ * true if the element is expected to be in the viewport, false otherwise
+ * @return {Promise} promise
+ */
+async function checkElementIsInViewport(selector, expected) {
+ const isInViewport = await SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [selector],
+ _selector => {
+ const node = content.document.querySelector(_selector);
+ const rect = node.getBoundingClientRect();
+ return (
+ rect.bottom >= 0 &&
+ rect.right >= 0 &&
+ rect.top <= content.innerHeight &&
+ rect.left <= content.innerWidth
+ );
+ }
+ );
+
+ is(
+ isInViewport,
+ expected,
+ selector + " in the viewport: expected to be " + expected
+ );
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_links_01.js b/devtools/client/inspector/markup/test/browser_markup_links_01.js
new file mode 100644
index 0000000000..dbb1402074
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_links_01.js
@@ -0,0 +1,178 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that links are shown in attributes when the values (or part of the
+// values) are URIs or pointers to IDs.
+
+const TEST_URL = URL_ROOT + "doc_markup_links.html";
+
+const TEST_DATA = [
+ {
+ selector: "link",
+ attributes: [
+ {
+ attributeName: "href",
+ links: [{ type: "cssresource", value: "style.css" }],
+ },
+ ],
+ },
+ {
+ selector: "link[rel=icon]",
+ attributes: [
+ {
+ attributeName: "href",
+ links: [
+ {
+ type: "uri",
+ value: "/media/img/firefox/favicon-196.223e1bcaf067.png",
+ },
+ ],
+ },
+ ],
+ },
+ {
+ selector: "form",
+ attributes: [
+ {
+ attributeName: "action",
+ links: [{ type: "uri", value: "/post_message" }],
+ },
+ ],
+ },
+ {
+ selector: "label[for=name]",
+ attributes: [
+ {
+ attributeName: "for",
+ links: [{ type: "idref", value: "name" }],
+ },
+ ],
+ },
+ {
+ selector: "label[for=message]",
+ attributes: [
+ {
+ attributeName: "for",
+ links: [{ type: "idref", value: "message" }],
+ },
+ ],
+ },
+ {
+ selector: "output",
+ attributes: [
+ {
+ attributeName: "form",
+ links: [{ type: "idref", value: "message-form" }],
+ },
+ {
+ attributeName: "for",
+ links: [
+ { type: "idref", value: "name" },
+ { type: "idref", value: "message" },
+ { type: "idref", value: "invalid" },
+ ],
+ },
+ ],
+ },
+ {
+ selector: "a",
+ attributes: [
+ {
+ attributeName: "href",
+ links: [{ type: "uri", value: "/go/somewhere/else" }],
+ },
+ {
+ attributeName: "ping",
+ links: [
+ { type: "uri", value: "/analytics?page=pageA" },
+ { type: "uri", value: "/analytics?user=test" },
+ ],
+ },
+ ],
+ },
+ {
+ selector: "li[contextmenu=menu1]",
+ attributes: [
+ {
+ attributeName: "contextmenu",
+ links: [{ type: "idref", value: "menu1" }],
+ },
+ ],
+ },
+ {
+ selector: "li[contextmenu=menu2]",
+ attributes: [
+ {
+ attributeName: "contextmenu",
+ links: [{ type: "idref", value: "menu2" }],
+ },
+ ],
+ },
+ {
+ selector: "li[contextmenu=menu3]",
+ attributes: [
+ {
+ attributeName: "contextmenu",
+ links: [{ type: "idref", value: "menu3" }],
+ },
+ ],
+ },
+ {
+ selector: "video",
+ attributes: [
+ {
+ attributeName: "poster",
+ links: [{ type: "uri", value: "doc_markup_tooltip.png" }],
+ },
+ {
+ attributeName: "src",
+ links: [{ type: "uri", value: "code-rush.mp4" }],
+ },
+ ],
+ },
+ {
+ selector: "script",
+ attributes: [
+ {
+ attributeName: "src",
+ links: [{ type: "jsresource", value: "lib_jquery_1.0.js" }],
+ },
+ ],
+ },
+];
+
+requestLongerTimeout(2);
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ for (const { selector, attributes } of TEST_DATA) {
+ info("Testing attributes on node " + selector);
+ await selectNode(selector, inspector);
+ const { editor } = await getContainerForSelector(selector, inspector);
+
+ for (const { attributeName, links } of attributes) {
+ info("Testing attribute " + attributeName);
+ const linkEls = editor.attrElements
+ .get(attributeName)
+ .querySelectorAll(".link");
+
+ is(linkEls.length, links.length, "The right number of links were found");
+
+ for (let i = 0; i < links.length; i++) {
+ is(
+ linkEls[i].dataset.type,
+ links[i].type,
+ `Link ${i} has the right type`
+ );
+ is(
+ linkEls[i].textContent,
+ links[i].value,
+ `Link ${i} has the right value`
+ );
+ }
+ }
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_links_02.js b/devtools/client/inspector/markup/test/browser_markup_links_02.js
new file mode 100644
index 0000000000..88de585c5e
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_links_02.js
@@ -0,0 +1,40 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that attributes are linkified correctly when attributes are updated
+// and created.
+
+const TEST_URL = URL_ROOT + "doc_markup_links.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Adding a contextmenu attribute to the body node");
+ await addNewAttributes("body", 'contextmenu="menu1"', inspector);
+
+ info("Checking for links in the new attribute");
+ let { editor } = await getContainerForSelector("body", inspector);
+ let linkEls = editor.attrElements
+ .get("contextmenu")
+ .querySelectorAll(".link");
+ is(linkEls.length, 1, "There is one link in the contextmenu attribute");
+ is(linkEls[0].dataset.type, "idref", "The link has the right type");
+ is(linkEls[0].textContent, "menu1", "The link has the right value");
+
+ info("Editing the contextmenu attribute on the body node");
+ const nodeMutated = inspector.once("markupmutation");
+ const attr = editor.attrElements
+ .get("contextmenu")
+ .querySelector(".editable");
+ setEditableFieldValue(attr, 'contextmenu="menu2"', inspector);
+ await nodeMutated;
+
+ info("Checking for links in the updated attribute");
+ ({ editor } = await getContainerForSelector("body", inspector));
+ linkEls = editor.attrElements.get("contextmenu").querySelectorAll(".link");
+ is(linkEls.length, 1, "There is one link in the contextmenu attribute");
+ is(linkEls[0].dataset.type, "idref", "The link has the right type");
+ is(linkEls[0].textContent, "menu2", "The link has the right value");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_links_03.js b/devtools/client/inspector/markup/test/browser_markup_links_03.js
new file mode 100644
index 0000000000..8817c7c818
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_links_03.js
@@ -0,0 +1,39 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that links appear correctly in attributes created in content.
+
+const TEST_URL = URL_ROOT + "doc_markup_links.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Adding a contextmenu attribute to the body node via the content");
+ let onMutated = inspector.once("markupmutation");
+ await setContentPageElementAttribute("body", "contextmenu", "menu1");
+ await onMutated;
+
+ info("Checking for links in the new attribute");
+ let { editor } = await getContainerForSelector("body", inspector);
+ let linkEls = editor.attrElements
+ .get("contextmenu")
+ .querySelectorAll(".link");
+ is(linkEls.length, 1, "There is one link in the contextmenu attribute");
+ is(linkEls[0].dataset.type, "idref", "The link has the right type");
+ is(linkEls[0].textContent, "menu1", "The link has the right value");
+
+ info("Editing the contextmenu attribute on the body node");
+ onMutated = inspector.once("markupmutation");
+
+ await setContentPageElementAttribute("body", "contextmenu", "menu2");
+ await onMutated;
+
+ info("Checking for links in the updated attribute");
+ ({ editor } = await getContainerForSelector("body", inspector));
+ linkEls = editor.attrElements.get("contextmenu").querySelectorAll(".link");
+ is(linkEls.length, 1, "There is one link in the contextmenu attribute");
+ is(linkEls[0].dataset.type, "idref", "The link has the right type");
+ is(linkEls[0].textContent, "menu2", "The link has the right value");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_links_04.js b/devtools/client/inspector/markup/test/browser_markup_links_04.js
new file mode 100644
index 0000000000..fe77b4e870
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_links_04.js
@@ -0,0 +1,150 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that the contextual menu shows the right items when clicking on a link
+// in an attribute. Run the action to copy the link and check the clipboard.
+
+const TEST_URL = URL_ROOT + "doc_markup_links.html";
+
+const TOOLBOX_L10N = new LocalizationHelper(
+ "devtools/client/locales/toolbox.properties"
+);
+
+// The test case array contains objects with the following properties:
+// - selector: css selector for the node to select in the inspector
+// - attributeName: name of the attribute to test
+// - popupNodeSelector: css selector for the element inside the attribute
+// element to use as the contextual menu anchor
+// - isLinkFollowItemVisible: is the follow-link item expected to be displayed
+// - isLinkCopyItemVisible: is the copy-link item expected to be displayed
+// - linkFollowItemLabel: the expected label of the follow-link item
+// - linkCopyItemLabel: the expected label of the copy-link item
+const TEST_DATA = [
+ {
+ selector: "link",
+ attributeName: "href",
+ popupNodeSelector: ".link",
+ isLinkFollowItemVisible: true,
+ isLinkCopyItemVisible: true,
+ linkFollowItemLabel: TOOLBOX_L10N.getStr(
+ "toolbox.viewCssSourceInStyleEditor.label"
+ ),
+ linkCopyItemLabel: INSPECTOR_L10N.getStr(
+ "inspector.menu.copyUrlToClipboard.label"
+ ),
+ },
+ {
+ selector: "link[rel=icon]",
+ attributeName: "href",
+ popupNodeSelector: ".link",
+ isLinkFollowItemVisible: true,
+ isLinkCopyItemVisible: true,
+ linkFollowItemLabel: INSPECTOR_L10N.getStr(
+ "inspector.menu.openUrlInNewTab.label"
+ ),
+ linkCopyItemLabel: INSPECTOR_L10N.getStr(
+ "inspector.menu.copyUrlToClipboard.label"
+ ),
+ },
+ {
+ selector: "link",
+ attributeName: "rel",
+ popupNodeSelector: ".attr-value",
+ isLinkFollowItemVisible: false,
+ isLinkCopyItemVisible: false,
+ },
+ {
+ selector: "output",
+ attributeName: "for",
+ popupNodeSelector: ".link",
+ isLinkFollowItemVisible: true,
+ isLinkCopyItemVisible: false,
+ linkFollowItemLabel: INSPECTOR_L10N.getFormatStr(
+ "inspector.menu.selectElement.label",
+ "name"
+ ),
+ },
+ {
+ selector: "script",
+ attributeName: "src",
+ popupNodeSelector: ".link",
+ isLinkFollowItemVisible: true,
+ isLinkCopyItemVisible: true,
+ linkFollowItemLabel: TOOLBOX_L10N.getStr(
+ "toolbox.viewJsSourceInDebugger.label"
+ ),
+ linkCopyItemLabel: INSPECTOR_L10N.getStr(
+ "inspector.menu.copyUrlToClipboard.label"
+ ),
+ },
+ {
+ selector: "p[for]",
+ attributeName: "for",
+ popupNodeSelector: ".attr-value",
+ isLinkFollowItemVisible: false,
+ isLinkCopyItemVisible: false,
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ for (const test of TEST_DATA) {
+ info("Selecting test node " + test.selector);
+ await selectNode(test.selector, inspector);
+ const nodeFront = inspector.selection.nodeFront;
+
+ info("Finding the popupNode to anchor the context-menu to");
+ const { editor } = await getContainerForSelector(test.selector, inspector);
+ const popupNode = editor.attrElements
+ .get(test.attributeName)
+ .querySelector(test.popupNodeSelector);
+ ok(popupNode, "Found the popupNode in attribute " + test.attributeName);
+
+ info("Simulating a context click on the popupNode");
+ const allMenuItems = openContextMenuAndGetAllItems(inspector, {
+ target: popupNode,
+ });
+
+ const linkFollow = allMenuItems.find(i => i.id === "node-menu-link-follow");
+ const linkCopy = allMenuItems.find(i => i.id === "node-menu-link-copy");
+
+ is(
+ linkFollow.visible,
+ test.isLinkFollowItemVisible,
+ "The follow-link item display is correct"
+ );
+ is(
+ linkCopy.visible,
+ test.isLinkCopyItemVisible,
+ "The copy-link item display is correct"
+ );
+
+ if (test.isLinkFollowItemVisible) {
+ is(
+ linkFollow.label,
+ test.linkFollowItemLabel,
+ "the follow-link label is correct"
+ );
+ }
+ if (test.isLinkCopyItemVisible) {
+ is(
+ linkCopy.label,
+ test.linkCopyItemLabel,
+ "the copy-link label is correct"
+ );
+
+ info("Get link from node attribute");
+ const link = await nodeFront.getAttribute(test.attributeName);
+ info("Resolve link to absolue URL");
+ const expected = await inspector.inspectorFront.resolveRelativeURL(
+ link,
+ nodeFront
+ );
+ info("Check the clipboard to see if the correct URL was copied");
+ await waitForClipboardPromise(() => linkCopy.click(), expected);
+ }
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_links_05.js b/devtools/client/inspector/markup/test/browser_markup_links_05.js
new file mode 100644
index 0000000000..62d3a7d8f6
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_links_05.js
@@ -0,0 +1,74 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that the contextual menu items shown when clicking on links in
+// attributes actually do the right things.
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_links.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Select a node with a URI attribute");
+ await selectNode("video", inspector);
+
+ info("Set the popupNode to the node that contains the uri");
+ let { editor } = await getContainerForSelector("video", inspector);
+ openContextMenuAndGetAllItems(inspector, {
+ target: editor.attrElements.get("poster").querySelector(".link"),
+ });
+
+ info("Follow the link and wait for the new tab to open");
+ const onTabOpened = once(gBrowser.tabContainer, "TabOpen");
+ inspector.markup.contextMenu._onFollowLink();
+ const { target: tab } = await onTabOpened;
+ await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
+
+ ok(true, "A new tab opened");
+ is(
+ tab.linkedBrowser.currentURI.spec,
+ URL_ROOT_SSL + "doc_markup_tooltip.png",
+ "The URL for the new tab is correct"
+ );
+ gBrowser.removeTab(tab);
+
+ info("Select a node with a IDREF attribute");
+ await selectNode("label", inspector);
+
+ info("Set the popupNode to the node that contains the ref");
+ ({ editor } = await getContainerForSelector("label", inspector));
+ openContextMenuAndGetAllItems(inspector, {
+ target: editor.attrElements.get("for").querySelector(".link"),
+ });
+
+ info("Follow the link and wait for the new node to be selected");
+ const onSelection = inspector.selection.once("new-node-front");
+ inspector.markup.contextMenu._onFollowLink();
+ await onSelection;
+
+ ok(true, "A new node was selected");
+ is(inspector.selection.nodeFront.id, "name", "The right node was selected");
+
+ info("Select a node with an invalid IDREF attribute");
+ await selectNode("output", inspector);
+
+ info("Set the popupNode to the node that contains the ref");
+ ({ editor } = await getContainerForSelector("output", inspector));
+ openContextMenuAndGetAllItems(inspector, {
+ target: editor.attrElements.get("for").querySelectorAll(".link")[2],
+ });
+
+ info("Try to follow the link and check that no new node were selected");
+ const onFailed = inspector.markup.once("idref-attribute-link-failed");
+ inspector.markup.contextMenu._onFollowLink();
+ await onFailed;
+
+ ok(true, "The node selection failed");
+ is(
+ inspector.selection.nodeFront.tagName.toLowerCase(),
+ "output",
+ "The <output> node is still selected"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_links_06.js b/devtools/client/inspector/markup/test/browser_markup_links_06.js
new file mode 100644
index 0000000000..9e546760d2
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_links_06.js
@@ -0,0 +1,60 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that the contextual menu items shown when clicking on linked attributes
+// for <script> and <link> tags actually open the right tools.
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_links.html";
+
+Services.scriptloader.loadSubScript(
+ "chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/shared-head.js",
+ this
+);
+
+add_task(async function () {
+ const { toolbox, inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Select a node with a cssresource attribute");
+ await selectNode("link", inspector);
+
+ info("Set the popupNode to the node that contains the uri");
+ let { editor } = await getContainerForSelector("link", inspector);
+ openContextMenuAndGetAllItems(inspector, {
+ target: editor.attrElements.get("href").querySelector(".link"),
+ });
+
+ info("Follow the link and wait for the style-editor to open");
+ const onStyleEditorReady = toolbox.once("styleeditor-ready");
+ inspector.markup.contextMenu._onFollowLink();
+ await onStyleEditorReady;
+
+ // No real need to test that the editor opened on the right file here as this
+ // is already tested in /framework/test/browser_toolbox_view_source_*
+ ok(true, "The style-editor was open");
+
+ info("Switch back to the inspector");
+ await toolbox.selectTool("inspector");
+
+ info("Select a node with a jsresource attribute");
+ await selectNode("script", inspector);
+
+ info("Set the popupNode to the node that contains the uri");
+ ({ editor } = await getContainerForSelector("script", inspector));
+ openContextMenuAndGetAllItems(inspector, {
+ target: editor.attrElements.get("src").querySelector(".link"),
+ });
+
+ info("Follow the link and wait for the debugger to open");
+ inspector.markup.contextMenu._onFollowLink();
+
+ // Wait for the debugger to have fully processed the opened source
+ await toolbox.getPanelWhenReady("jsdebugger");
+ const dbg = createDebuggerContext(toolbox);
+ await waitForSelectedSource(dbg, URL_ROOT_SSL + "lib_jquery_1.0.js");
+
+ // No real need to test that the debugger opened on the right file here as
+ // this is already tested in /framework/test/browser_toolbox_view_source_*
+ ok(true, "The debugger was open");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_links_07.js b/devtools/client/inspector/markup/test/browser_markup_links_07.js
new file mode 100644
index 0000000000..add47449b9
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_links_07.js
@@ -0,0 +1,134 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that a middle-click or meta/ctrl-click on links in attributes actually
+// do follows the link.
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_links.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Select a node with a URI attribute");
+ await selectNode("video", inspector);
+
+ info("Find the link element from the markup-view");
+ let { editor } = await getContainerForSelector("video", inspector);
+ let linkEl = editor.attrElements.get("poster").querySelector(".link");
+
+ info("Follow the link with middle-click and wait for the new tab to open");
+ await followLinkWaitForTab(
+ linkEl,
+ false,
+ URL_ROOT_SSL + "doc_markup_tooltip.png"
+ );
+
+ info("Follow the link with meta/ctrl-click and wait for the new tab to open");
+ await followLinkWaitForTab(
+ linkEl,
+ true,
+ URL_ROOT_SSL + "doc_markup_tooltip.png"
+ );
+
+ info("Select a node with a IDREF attribute");
+ await selectNode("label", inspector);
+
+ info("Find the link element from the markup-view that contains the ref");
+ ({ editor } = await getContainerForSelector("label", inspector));
+ linkEl = editor.attrElements.get("for").querySelector(".link");
+
+ info("Follow link with middle-click, wait for new node to be selected.");
+ await followLinkWaitForNewNode(linkEl, false, inspector);
+
+ // We have to re-select the label as the link switched the currently selected
+ // node.
+ await selectNode("label", inspector);
+
+ info("Follow link with ctrl/meta-click, wait for new node to be selected.");
+ await followLinkWaitForNewNode(linkEl, true, inspector);
+
+ info("Select a node with an invalid IDREF attribute");
+ await selectNode("output", inspector);
+
+ info("Find the link element from the markup-view that contains the ref");
+ ({ editor } = await getContainerForSelector("output", inspector));
+ linkEl = editor.attrElements.get("for").querySelectorAll(".link")[2];
+
+ info("Try to follow link wiith middle-click, check no new node selected");
+ await followLinkNoNewNode(linkEl, false, inspector);
+
+ info("Try to follow link wiith meta/ctrl-click, check no new node selected");
+ await followLinkNoNewNode(linkEl, true, inspector);
+});
+
+function performMouseDown(linkEl, metactrl) {
+ const evt = linkEl.ownerDocument.createEvent("MouseEvents");
+
+ let button = -1;
+
+ if (metactrl) {
+ info("Performing Meta/Ctrl+Left Click");
+ button = 0;
+ } else {
+ info("Performing Middle Click");
+ button = 1;
+ }
+
+ evt.initMouseEvent(
+ "mousedown",
+ true,
+ true,
+ linkEl.ownerDocument.defaultView,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ metactrl,
+ false,
+ false,
+ metactrl,
+ button,
+ null
+ );
+
+ linkEl.dispatchEvent(evt);
+}
+
+async function followLinkWaitForTab(linkEl, isMetaClick, expectedTabURI) {
+ const onTabOpened = once(gBrowser.tabContainer, "TabOpen");
+ performMouseDown(linkEl, isMetaClick);
+ const { target } = await onTabOpened;
+ await BrowserTestUtils.browserLoaded(target.linkedBrowser);
+ ok(true, "A new tab opened");
+ is(
+ target.linkedBrowser.currentURI.spec,
+ expectedTabURI,
+ "The URL for the new tab is correct"
+ );
+ gBrowser.removeTab(target);
+}
+
+async function followLinkWaitForNewNode(linkEl, isMetaClick, inspector) {
+ const onSelection = inspector.selection.once("new-node-front");
+ performMouseDown(linkEl, isMetaClick);
+ await onSelection;
+
+ ok(true, "A new node was selected");
+ is(inspector.selection.nodeFront.id, "name", "The right node was selected");
+}
+
+async function followLinkNoNewNode(linkEl, isMetaClick, inspector) {
+ const onFailed = inspector.markup.once("idref-attribute-link-failed");
+ performMouseDown(linkEl, isMetaClick);
+ await onFailed;
+
+ ok(true, "The node selection failed");
+ is(
+ inspector.selection.nodeFront.tagName.toLowerCase(),
+ "output",
+ "The <output> node is still selected"
+ );
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_load_01.js b/devtools/client/inspector/markup/test/browser_markup_load_01.js
new file mode 100644
index 0000000000..1669cf5101
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_load_01.js
@@ -0,0 +1,74 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* eslint-disable mozilla/no-arbitrary-setTimeout */
+
+"use strict";
+
+// Tests that selecting an element with the 'Inspect Element' context
+// menu during a page reload doesn't cause the markup view to become empty.
+// See https://bugzilla.mozilla.org/show_bug.cgi?id=1036324
+
+const server = createTestHTTPServer();
+
+// Register a slow image handler so we can simulate a long time between
+// a reload and the load event firing.
+server.registerContentType("gif", "image/gif");
+server.registerPathHandler("/slow.gif", function (metadata, response) {
+ info("Image has been requested");
+ response.processAsync();
+ setTimeout(() => {
+ info("Image is responding");
+ response.finish();
+ }, 500);
+});
+
+// Test page load events.
+const TEST_URL =
+ "data:text/html," +
+ "<!DOCTYPE html>" +
+ "<head><meta charset='utf-8' /></head>" +
+ "<body>" +
+ "<p>Slow script</p>" +
+ "<img src='http://localhost:" +
+ server.identity.primaryPort +
+ "/slow.gif' />" +
+ "</body>" +
+ "</html>";
+
+add_task(async function () {
+ const { inspector, tab } = await openInspectorForURL(TEST_URL);
+
+ const domContentLoaded = waitForLinkedBrowserEvent(tab, "DOMContentLoaded");
+ const pageLoaded = waitForLinkedBrowserEvent(tab, "load");
+
+ ok(inspector.markup, "There is a markup view");
+
+ // Select an element while the tab is in the middle of a slow reload.
+ // Do not await here because we interact with the page during navigation.
+ const onToolboxNavigated = navigateTo(TEST_URL);
+
+ info("Wait for DOMContentLoaded");
+ await domContentLoaded;
+
+ info("Inspect element via context menu");
+ const markupLoaded = inspector.once("markuploaded");
+ await clickOnInspectMenuItem("img");
+
+ info("Wait for load");
+ await pageLoaded;
+
+ info("Wait for toolbox navigation");
+ await onToolboxNavigated;
+
+ info("Wait for markup-loaded after element inspection");
+ await markupLoaded;
+ info("Wait for multiple children updates after element inspection");
+ await waitForMultipleChildrenUpdates(inspector);
+
+ ok(inspector.markup, "There is a markup view");
+ is(inspector.markup._elt.children.length, 1, "The markup view is rendering");
+});
+
+function waitForLinkedBrowserEvent(tab, event) {
+ return BrowserTestUtils.waitForContentEvent(tab.linkedBrowser, event, true);
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_mutation_01.js b/devtools/client/inspector/markup/test/browser_markup_mutation_01.js
new file mode 100644
index 0000000000..030a4c4d1b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_mutation_01.js
@@ -0,0 +1,419 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that various mutations to the dom update the markup view correctly.
+
+const TEST_URL = URL_ROOT + "doc_markup_mutation.html";
+
+// Mutation tests. Each entry in the array has the following properties:
+// - desc: for logging only
+// - numMutations: how many mutations are expected to come happen due to the
+// test case. Defaults to 1 if not set.
+// - test: a function supposed to mutate the DOM
+// - check: a function supposed to test that the mutation was handled
+const TEST_DATA = [
+ {
+ desc: "Adding an attribute",
+ async test() {
+ await setContentPageElementAttribute("#node1", "newattr", "newattrval");
+ },
+ async check(inspector) {
+ const { editor } = await getContainerForSelector("#node1", inspector);
+ ok(
+ [...editor.attrList.querySelectorAll(".attreditor")].some(attr => {
+ return (
+ attr.textContent.trim() === 'newattr="newattrval"' &&
+ attr.dataset.value === "newattrval" &&
+ attr.dataset.attr === "newattr"
+ );
+ }),
+ "newattr attribute found"
+ );
+ },
+ },
+ {
+ desc: "Removing an attribute",
+ async test() {
+ await removeContentPageElementAttribute("#node1", "newattr");
+ },
+ async check(inspector) {
+ const { editor } = await getContainerForSelector("#node1", inspector);
+ ok(
+ ![...editor.attrList.querySelectorAll(".attreditor")].some(attr => {
+ return attr.textContent.trim() === 'newattr="newattrval"';
+ }),
+ "newattr attribute removed"
+ );
+ },
+ },
+ {
+ desc: "Re-adding an attribute",
+ async test() {
+ await setContentPageElementAttribute("#node1", "newattr", "newattrval");
+ },
+ async check(inspector) {
+ const { editor } = await getContainerForSelector("#node1", inspector);
+ ok(
+ [...editor.attrList.querySelectorAll(".attreditor")].some(attr => {
+ return (
+ attr.textContent.trim() === 'newattr="newattrval"' &&
+ attr.dataset.value === "newattrval" &&
+ attr.dataset.attr === "newattr"
+ );
+ }),
+ "newattr attribute found"
+ );
+ },
+ },
+ {
+ desc: "Changing an attribute",
+ async test() {
+ await setContentPageElementAttribute(
+ "#node1",
+ "newattr",
+ "newattrchanged"
+ );
+ },
+ async check(inspector) {
+ const { editor } = await getContainerForSelector("#node1", inspector);
+ ok(
+ [...editor.attrList.querySelectorAll(".attreditor")].some(attr => {
+ return (
+ attr.textContent.trim() === 'newattr="newattrchanged"' &&
+ attr.dataset.value === "newattrchanged" &&
+ attr.dataset.attr === "newattr"
+ );
+ }),
+ "newattr attribute found"
+ );
+ },
+ },
+ {
+ desc: "Adding another attribute does not rerender unchanged attributes",
+ async test(inspector) {
+ const { editor } = await getContainerForSelector("#node1", inspector);
+
+ // This test checks the impact on the markup-view nodes after setting attributes on
+ // content nodes.
+ info("Expect attribute-container for 'new-attr' from the previous test");
+ const attributeContainer = editor.attrList.querySelector(
+ "[data-attr=newattr]"
+ );
+ ok(attributeContainer, "attribute-container for 'newattr' found");
+
+ info("Set a flag on the attribute-container to check after the mutation");
+ attributeContainer.beforeMutationFlag = true;
+
+ info(
+ "Add the attribute 'otherattr' on the content node to trigger the mutation"
+ );
+ await setContentPageElementAttribute("#node1", "otherattr", "othervalue");
+ },
+ async check(inspector) {
+ const { editor } = await getContainerForSelector("#node1", inspector);
+
+ info(
+ "Check the attribute-container for the new attribute mutation was created"
+ );
+ const otherAttrContainer = editor.attrList.querySelector(
+ "[data-attr=otherattr]"
+ );
+ ok(otherAttrContainer, "attribute-container for 'otherattr' found");
+
+ info(
+ "Check the attribute-container for 'new-attr' is the same node as earlier."
+ );
+ const newAttrContainer = editor.attrList.querySelector(
+ "[data-attr=newattr]"
+ );
+ ok(newAttrContainer, "attribute-container for 'newattr' found");
+ ok(
+ newAttrContainer.beforeMutationFlag,
+ "attribute-container same as earlier"
+ );
+ },
+ },
+ {
+ desc: "Adding ::after element",
+ numMutations: 2,
+ async test() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const node1 = content.document.querySelector("#node1");
+ node1.classList.add("pseudo");
+ });
+ },
+ async check(inspector) {
+ const { children } = await getContainerForSelector("#node1", inspector);
+ is(
+ children.childNodes.length,
+ 2,
+ "Node1 now has 2 children (text child and ::after"
+ );
+ },
+ },
+ {
+ desc: "Removing ::after element",
+ numMutations: 2,
+ async test() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const node1 = content.document.querySelector("#node1");
+ node1.classList.remove("pseudo");
+ });
+ },
+ async check(inspector) {
+ const container = await getContainerForSelector("#node1", inspector);
+ ok(container.inlineTextChild, "Has single text child.");
+ },
+ },
+ {
+ desc: "Updating the text-content",
+ async test() {
+ await setContentPageElementProperty("#node1", "textContent", "newtext");
+ },
+ async check(inspector) {
+ const container = await getContainerForSelector("#node1", inspector);
+ ok(container.inlineTextChild, "Has single text child.");
+ ok(!container.canExpand, "Can't expand container with inlineTextChild.");
+ ok(!container.inlineTextChild.canExpand, "Can't expand inlineTextChild.");
+ is(
+ container.editor.elt.querySelector(".text").textContent.trim(),
+ "newtext",
+ "Single text child editor updated."
+ );
+ },
+ },
+ {
+ desc: "Adding a second text child",
+ async test() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const node1 = content.document.querySelector("#node1");
+ const newText = node1.ownerDocument.createTextNode("more");
+ node1.appendChild(newText);
+ });
+ },
+ async check(inspector) {
+ const container = await getContainerForSelector("#node1", inspector);
+ ok(!container.inlineTextChild, "Does not have single text child.");
+ ok(container.canExpand, "Can expand container with child nodes.");
+ ok(
+ container.editor.elt.querySelector(".text") == null,
+ "Single text child editor removed."
+ );
+ },
+ },
+ {
+ desc: "Go from 2 to 1 text child",
+ async test() {
+ await setContentPageElementProperty("#node1", "textContent", "newtext");
+ },
+ async check(inspector) {
+ const container = await getContainerForSelector("#node1", inspector);
+ ok(container.inlineTextChild, "Has single text child.");
+ ok(!container.canExpand, "Can't expand container with inlineTextChild.");
+ ok(!container.inlineTextChild.canExpand, "Can't expand inlineTextChild.");
+ is(
+ container.editor.elt.querySelector(".text").textContent.trim(),
+ "newtext",
+ "Single text child editor updated."
+ );
+ },
+ },
+ {
+ desc: "Removing an only text child",
+ async test() {
+ await setContentPageElementProperty("#node1", "innerHTML", "");
+ },
+ async check(inspector) {
+ const container = await getContainerForSelector("#node1", inspector);
+ ok(!container.inlineTextChild, "Does not have single text child.");
+ ok(!container.canExpand, "Can't expand empty container.");
+ ok(
+ container.editor.elt.querySelector(".text") == null,
+ "Single text child editor removed."
+ );
+ },
+ },
+ {
+ desc: "Go from 0 to 1 text child",
+ async test() {
+ await setContentPageElementProperty("#node1", "textContent", "newtext");
+ },
+ async check(inspector) {
+ const container = await getContainerForSelector("#node1", inspector);
+ ok(container.inlineTextChild, "Has single text child.");
+ ok(!container.canExpand, "Can't expand container with inlineTextChild.");
+ ok(!container.inlineTextChild.canExpand, "Can't expand inlineTextChild.");
+ is(
+ container.editor.elt.querySelector(".text").textContent.trim(),
+ "newtext",
+ "Single text child editor updated."
+ );
+ },
+ },
+
+ {
+ desc: "Updating the innerHTML",
+ async test() {
+ await setContentPageElementProperty(
+ "#node2",
+ "innerHTML",
+ "<div><span>foo</span></div>"
+ );
+ },
+ async check(inspector) {
+ const container = await getContainerForSelector("#node2", inspector);
+
+ const openTags = container.children.querySelectorAll(".open .tag");
+ is(openTags.length, 2, "There are 2 tags in node2");
+ is(openTags[0].textContent.trim(), "div", "The first tag is a div");
+ is(openTags[1].textContent.trim(), "span", "The second tag is a span");
+
+ is(
+ container.children.querySelector(".text").textContent.trim(),
+ "foo",
+ "The span's textcontent is correct"
+ );
+ },
+ },
+ {
+ desc: "Removing child nodes",
+ async test() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const node4 = content.document.querySelector("#node4");
+ while (node4.firstChild) {
+ node4.firstChild.remove();
+ }
+ });
+ },
+ async check(inspector) {
+ const { children } = await getContainerForSelector("#node4", inspector);
+ is(children.innerHTML, "", "Children have been removed");
+ },
+ },
+ {
+ desc: "Appending a child to a different parent",
+ async test() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const node17 = content.document.querySelector("#node17");
+ const node2 = content.document.querySelector("#node2");
+ node2.appendChild(node17);
+ });
+ },
+ async check(inspector) {
+ const { children } = await getContainerForSelector("#node16", inspector);
+ is(
+ children.innerHTML,
+ "",
+ "Node17 has been removed from its node16 parent"
+ );
+
+ const container = await getContainerForSelector("#node2", inspector);
+ const openTags = container.children.querySelectorAll(".open .tag");
+ is(openTags.length, 3, "There are now 3 tags in node2");
+ is(openTags[2].textContent.trim(), "p", "The third tag is node17");
+ },
+ },
+ {
+ desc: "Swapping a parent and child element, putting them in the same tree",
+ // body
+ // node1
+ // node18
+ // node19
+ // node20
+ // node21
+ // will become:
+ // body
+ // node1
+ // node20
+ // node21
+ // node18
+ // node19
+ async test() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const node18 = content.document.querySelector("#node18");
+ const node20 = content.document.querySelector("#node20");
+ const node1 = content.document.querySelector("#node1");
+ node1.appendChild(node20);
+ node20.appendChild(node18);
+ });
+ },
+ async check(inspector) {
+ await inspector.markup.expandAll();
+
+ const { children } = await getContainerForSelector("#node1", inspector);
+ is(
+ children.childNodes.length,
+ 2,
+ "Node1 now has 2 children (textnode and node20)"
+ );
+
+ const node20 = children.childNodes[1];
+ const node20Children = node20.container.children;
+ is(
+ node20Children.childNodes.length,
+ 2,
+ "Node20 has 2 children (21 and 18)"
+ );
+
+ const node21 = node20Children.childNodes[0];
+ is(
+ node21.container.editor.elt.querySelector(".text").textContent.trim(),
+ "line21",
+ "Node21 has a single text child"
+ );
+
+ const node18 = node20Children.childNodes[1];
+ is(
+ node18
+ .querySelector(".open .attreditor .attr-value")
+ .textContent.trim(),
+ "node18",
+ "Node20's second child is indeed node18"
+ );
+ },
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Expanding all markup-view nodes");
+ await inspector.markup.expandAll();
+
+ for (let { desc, test, check, numMutations } of TEST_DATA) {
+ info("Starting test: " + desc);
+
+ numMutations = numMutations || 1;
+
+ info("Executing the test markup mutation");
+
+ // If a test expects more than one mutation it may come through in a single
+ // event or possibly in multiples.
+ let seenMutations = 0;
+ const promise = new Promise(resolve => {
+ inspector.on("markupmutation", function onmutation(mutations) {
+ seenMutations += mutations.length;
+ info(
+ "Receieved " +
+ seenMutations +
+ " mutations, expecting at least " +
+ numMutations
+ );
+ if (seenMutations >= numMutations) {
+ inspector.off("markupmutation", onmutation);
+ resolve();
+ }
+ });
+ });
+ await test(inspector);
+ await promise;
+
+ info("Expanding all markup-view nodes to make sure new nodes are imported");
+ await inspector.markup.expandAll();
+
+ info("Checking the markup-view content");
+ await check(inspector);
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_mutation_02.js b/devtools/client/inspector/markup/test/browser_markup_mutation_02.js
new file mode 100644
index 0000000000..8e7d3de4f4
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_mutation_02.js
@@ -0,0 +1,191 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that markup-containers in the markup-view do flash when their
+// corresponding DOM nodes mutate
+
+// Have to use the same timer functions used by the inspector.
+// eslint-disable-next-line mozilla/no-redeclare-with-import-autofix
+const { clearTimeout } = ChromeUtils.importESModule(
+ "resource://gre/modules/Timer.sys.mjs"
+);
+
+const TEST_URL = URL_ROOT + "doc_markup_flashing.html";
+
+// The test data contains a list of mutations to test.
+// Each item is an object:
+// - desc: a description of the test step, for better logging
+// - mutate: a generator function that should make changes to the content DOM
+// - attribute: if set, the test will expect the corresponding attribute to
+// flash instead of the whole node
+// - flashedNode: [optional] the css selector of the node that is expected to
+// flash in the markup-view as a result of the mutation.
+// If missing, the rootNode (".list") will be expected to flash
+const TEST_DATA = [
+ {
+ desc: "Adding a new node should flash the new node",
+ async mutate() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const newLi = content.document.createElement("LI");
+ newLi.textContent = "new list item";
+ content.document.querySelector(".list").appendChild(newLi);
+ });
+ },
+ flashedNode: ".list li:nth-child(3)",
+ },
+ {
+ desc: "Removing a node should flash its parent",
+ async mutate() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const root = content.document.querySelector(".list");
+ root.removeChild(root.lastElementChild);
+ });
+ },
+ },
+ {
+ desc: "Re-appending an existing node should only flash this node",
+ async mutate() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const root = content.document.querySelector(".list");
+ root.appendChild(root.firstElementChild);
+ });
+ },
+ flashedNode: ".list .item:last-child",
+ },
+ {
+ desc: "Adding an attribute should flash the attribute",
+ attribute: "test-name",
+ async mutate() {
+ await setContentPageElementAttribute(
+ ".list",
+ "test-name",
+ "value-" + Date.now()
+ );
+ },
+ },
+ {
+ desc:
+ "Adding an attribute with css reserved characters should flash the " +
+ "attribute",
+ attribute: "one:two",
+ async mutate() {
+ await setContentPageElementAttribute(
+ ".list",
+ "one:two",
+ "value-" + Date.now()
+ );
+ },
+ },
+ {
+ desc: "Editing an attribute should flash the attribute",
+ attribute: "class",
+ async mutate() {
+ await setContentPageElementAttribute(
+ ".list",
+ "class",
+ "list value-" + Date.now()
+ );
+ },
+ },
+ {
+ desc: "Multiple changes to an attribute should flash the attribute",
+ attribute: "class",
+ async mutate() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const root = content.document.querySelector(".list");
+ root.removeAttribute("class");
+ root.setAttribute("class", "list value-" + Date.now());
+ root.setAttribute("class", "list value-" + Date.now());
+ root.removeAttribute("class");
+ root.setAttribute("class", "list value-" + Date.now());
+ root.setAttribute("class", "list value-" + Date.now());
+ });
+ },
+ },
+ {
+ desc: "Removing an attribute should flash the node",
+ async mutate() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => {
+ const root = content.document.querySelector(".list");
+ root.removeAttribute("class");
+ });
+ },
+ },
+];
+
+add_task(async function () {
+ await pushPref("privacy.reduceTimerPrecision", false);
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ // Make sure mutated nodes flash for a very long time so we can more easily
+ // assert they do
+ inspector.markup.CONTAINER_FLASHING_DURATION = 1000 * 60 * 60;
+
+ info("Getting the <ul.list> root node to test mutations on");
+ const rootNodeFront = await getNodeFront(".list", inspector);
+
+ info("Selecting the last element of the root node before starting");
+ await selectNode(".list .item:nth-child(2)", inspector);
+
+ for (const { mutate, flashedNode, desc, attribute } of TEST_DATA) {
+ info("Starting test: " + desc);
+
+ info("Mutating the DOM and listening for markupmutation event");
+ const onMutation = inspector.once("markupmutation");
+ await mutate();
+ const mutations = await onMutation;
+
+ info("Wait for the breadcrumbs widget to update if it needs to");
+ if (inspector.breadcrumbs._hasInterestingMutations(mutations)) {
+ await inspector.once("breadcrumbs-updated");
+ }
+
+ info("Asserting that the correct markup-container is flashing");
+ let flashingNodeFront = rootNodeFront;
+ if (flashedNode) {
+ flashingNodeFront = await getNodeFront(flashedNode, inspector);
+ }
+
+ if (attribute) {
+ await assertAttributeFlashing(flashingNodeFront, attribute, inspector);
+ } else {
+ await assertNodeFlashing(flashingNodeFront, inspector);
+ }
+ }
+});
+
+function assertNodeFlashing(nodeFront, inspector) {
+ const container = getContainerForNodeFront(nodeFront, inspector);
+ ok(container, "Markup container for node found");
+ ok(
+ container.tagState.classList.contains("theme-bg-contrast"),
+ "Markup container for node is flashing"
+ );
+
+ // Clear the mutation flashing timeout now that we checked the node was
+ // flashing.
+ clearTimeout(container._flashMutationTimer);
+ container._flashMutationTimer = null;
+ container.tagState.classList.remove("theme-bg-contrast");
+}
+
+function assertAttributeFlashing(nodeFront, attribute, inspector) {
+ const container = getContainerForNodeFront(nodeFront, inspector);
+ ok(container, "Markup container for node found");
+ ok(
+ container.editor.attrElements.get(attribute),
+ "Attribute exists on editor"
+ );
+
+ const attributeElement = container.editor.getAttributeElement(attribute);
+
+ ok(
+ attributeElement.classList.contains("theme-bg-contrast"),
+ "Element for " + attribute + " attribute is flashing"
+ );
+
+ attributeElement.classList.remove("theme-bg-contrast");
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_navigation.js b/devtools/client/inspector/markup/test/browser_markup_navigation.js
new file mode 100644
index 0000000000..f6a408f10c
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_navigation.js
@@ -0,0 +1,128 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the markup-view nodes can be navigated to with the keyboard
+
+const TEST_URL = URL_ROOT + "doc_markup_navigation.html";
+const TEST_DATA = [
+ ["KEY_PageUp", "*doctype*"],
+ ["KEY_ArrowDown", "html"],
+ ["KEY_ArrowDown", "head"],
+ ["KEY_ArrowDown", "body"],
+ ["KEY_ArrowDown", "node0"],
+ ["KEY_ArrowRight", "node0"],
+ ["KEY_ArrowDown", "node1"],
+ ["KEY_ArrowDown", "node2"],
+ ["KEY_ArrowDown", "node3"],
+ ["KEY_ArrowDown", "*comment*"],
+ ["KEY_ArrowDown", "node4"],
+ ["KEY_ArrowRight", "node4"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node5"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node6"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "*comment*"],
+ ["KEY_ArrowDown", "node7"],
+ ["KEY_ArrowRight", "node7"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node8"],
+ ["KEY_ArrowLeft", "node7"],
+ ["KEY_ArrowLeft", "node7"],
+ ["KEY_ArrowRight", "node7"],
+ ["KEY_ArrowRight", "*text*"],
+ ["KEY_ArrowDown", "node8"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node9"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node10"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node11"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node12"],
+ ["KEY_ArrowRight", "node12"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node13"],
+ ["KEY_ArrowDown", "node14"],
+ ["KEY_ArrowDown", "node15"],
+ ["KEY_ArrowDown", "node15"],
+ ["KEY_ArrowDown", "node15"],
+ ["KEY_ArrowUp", "node14"],
+ ["KEY_ArrowUp", "node13"],
+ ["KEY_ArrowUp", "*text*"],
+ ["KEY_ArrowUp", "node12"],
+ ["KEY_ArrowLeft", "node12"],
+ ["KEY_ArrowDown", "node14"],
+ ["KEY_Home", "*doctype*"],
+ ["KEY_PageDown", "*text*"],
+ ["KEY_ArrowDown", "node5"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node6"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "*comment*"],
+ ["KEY_ArrowDown", "node7"],
+ ["KEY_ArrowLeft", "node7"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node9"],
+ ["KEY_ArrowDown", "*text*"],
+ ["KEY_ArrowDown", "node10"],
+ ["KEY_PageUp", "*text*"],
+ ["KEY_PageUp", "*doctype*"],
+ ["KEY_ArrowDown", "html"],
+ ["KEY_ArrowLeft", "html"],
+ ["KEY_ArrowDown", "head"],
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Making sure the markup-view frame is focused");
+ inspector.markup._frame.focus();
+
+ info("Starting to iterate through the test data");
+ for (const [key, className] of TEST_DATA) {
+ info("Testing step: " + key + " to navigate to " + className);
+ EventUtils.synthesizeKey(key);
+
+ info("Making sure markup-view children get updated");
+ await waitForChildrenUpdated(inspector);
+
+ info("Checking the right node is selected");
+ checkSelectedNode(key, className, inspector);
+ }
+
+ // In theory, we should wait for the inspector-updated event at each iteration
+ // of the previous loop where we expect the current node to change (because
+ // changing the current node ends up refreshing the rule-view, breadcrumbs,
+ // ...), but this would make this test a *lot* slower. Instead, having a final
+ // catch-all event works too.
+ await inspector.once("inspector-updated");
+});
+
+function checkSelectedNode(key, className, inspector) {
+ const node = inspector.selection.nodeFront;
+
+ if (className == "*comment*") {
+ is(
+ node.nodeType,
+ Node.COMMENT_NODE,
+ "Found a comment after pressing " + key
+ );
+ } else if (className == "*text*") {
+ is(node.nodeType, Node.TEXT_NODE, "Found text after pressing " + key);
+ } else if (className == "*doctype*") {
+ is(
+ node.nodeType,
+ Node.DOCUMENT_TYPE_NODE,
+ "Found the doctype after pressing " + key
+ );
+ } else {
+ is(
+ node.className,
+ className,
+ "Found node: " + className + " after pressing " + key
+ );
+ }
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_node_names.js b/devtools/client/inspector/markup/test/browser_markup_node_names.js
new file mode 100644
index 0000000000..745a5c382a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_node_names.js
@@ -0,0 +1,34 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test element node name in the markupview
+const TEST_URL = URL_ROOT + "doc_markup_html_mixed_case.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ // Get and open the svg element to show its children
+ const svgNodeFront = await getNodeFront("svg", inspector);
+ await inspector.markup.expandNode(svgNodeFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ const clipPathContainer = await getContainerForSelector(
+ "clipPath",
+ inspector
+ );
+ info("Checking the clipPath element");
+ ok(
+ clipPathContainer.editor.tag.textContent === "clipPath",
+ "clipPath node name is not lowercased"
+ );
+
+ const divContainer = await getContainerForSelector("div", inspector);
+
+ info("Checking the div element");
+ ok(
+ divContainer.editor.tag.textContent === "div",
+ "div node name is lowercased"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_node_names_namespaced.js b/devtools/client/inspector/markup/test/browser_markup_node_names_namespaced.js
new file mode 100644
index 0000000000..9b05277c00
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_node_names_namespaced.js
@@ -0,0 +1,52 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test namespaced element node names in the markupview.
+
+const XHTML = `
+ <!DOCTYPE html>
+ <html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <body>
+ <svg:svg width="100" height="100">
+ <svg:clipPath id="clip">
+ <svg:rect id="rectangle" x="0" y="0" width="10" height="5"></svg:rect>
+ </svg:clipPath>
+ <svg:circle cx="0" cy="0" r="5"></svg:circle>
+ </svg:svg>
+ </body>
+ </html>
+`;
+
+const TEST_URI = "data:application/xhtml+xml;charset=utf-8," + encodeURI(XHTML);
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URI);
+
+ // Get and open the svg element to show its children.
+ const svgNodeFront = await getNodeFront("svg", inspector);
+ await inspector.markup.expandNode(svgNodeFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ const clipPathContainer = await getContainerForSelector(
+ "clipPath",
+ inspector
+ );
+ info("Checking the clipPath element");
+ ok(
+ clipPathContainer.editor.tag.textContent === "svg:clipPath",
+ "svg:clipPath node is correctly displayed"
+ );
+
+ const circlePathContainer = await getContainerForSelector(
+ "circle",
+ inspector
+ );
+ info("Checking the circle element");
+ ok(
+ circlePathContainer.editor.tag.textContent === "svg:circle",
+ "svg:circle node is correctly displayed"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_node_not_displayed_01.js b/devtools/client/inspector/markup/test/browser_markup_node_not_displayed_01.js
new file mode 100644
index 0000000000..bf01f1544a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_node_not_displayed_01.js
@@ -0,0 +1,37 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that nodes that are not displayed appear differently in the markup-view
+// when these nodes are imported in the view.
+
+// Note that nodes inside a display:none parent are obviously not displayed too
+// but the markup-view uses css inheritance to mark those as hidden instead of
+// having to visit each and every child of a hidden node. So there's no sense
+// testing children nodes.
+
+const TEST_URL = URL_ROOT + "doc_markup_not_displayed.html";
+const TEST_DATA = [
+ { selector: "#normal-div", isDisplayed: true },
+ { selector: "head", isDisplayed: false },
+ { selector: "#display-none", isDisplayed: false },
+ { selector: "#hidden-true", isDisplayed: false },
+ { selector: "#visibility-hidden", isDisplayed: true },
+ { selector: "#hidden-via-hide-shortcut", isDisplayed: false },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ for (const { selector, isDisplayed } of TEST_DATA) {
+ info("Getting node " + selector);
+ const nodeFront = await getNodeFront(selector, inspector);
+ const container = getContainerForNodeFront(nodeFront, inspector);
+ is(
+ !container.elt.classList.contains("not-displayed"),
+ isDisplayed,
+ `The container for ${selector} is marked as displayed ${isDisplayed}`
+ );
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_node_not_displayed_02.js b/devtools/client/inspector/markup/test/browser_markup_node_not_displayed_02.js
new file mode 100644
index 0000000000..19d57072f5
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_node_not_displayed_02.js
@@ -0,0 +1,147 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that nodes are marked as displayed and not-displayed dynamically, when
+// their display changes
+
+const TEST_URL = URL_ROOT + "doc_markup_not_displayed.html";
+const TEST_DATA = [
+ {
+ desc: "Hiding a node by creating a new stylesheet",
+ selector: "#normal-div",
+ before: true,
+ changeStyle: () => {
+ const div = content.document.createElement("div");
+ div.id = "new-style";
+ div.innerHTML = "<style>#normal-div {display:none;}</style>";
+ content.document.body.appendChild(div);
+ },
+ after: false,
+ },
+ {
+ desc: "Showing a node by deleting an existing stylesheet",
+ selector: "#normal-div",
+ before: false,
+ changeStyle: () => content.document.getElementById("new-style").remove(),
+ after: true,
+ },
+ {
+ desc: "Hiding a node by changing its style property",
+ selector: "#display-none",
+ before: false,
+ changeStyle: () => {
+ const node = content.document.querySelector("#display-none");
+ node.style.display = "block";
+ },
+ after: true,
+ },
+ {
+ desc: "Showing a node by removing its hidden attribute",
+ selector: "#hidden-true",
+ before: false,
+ changeStyle: () =>
+ content.document.querySelector("#hidden-true").removeAttribute("hidden"),
+ after: true,
+ },
+ {
+ desc: "Hiding a node by adding a hidden attribute",
+ selector: "#hidden-true",
+ before: true,
+ changeStyle: () =>
+ content.document
+ .querySelector("#hidden-true")
+ .setAttribute("hidden", true),
+ after: false,
+ },
+ {
+ desc: "Showing a node by changin a stylesheet's rule",
+ selector: "#hidden-via-stylesheet",
+ before: false,
+ changeStyle: () => {
+ content.document.styleSheets[0].cssRules[0].style.setProperty(
+ "display",
+ "inline"
+ );
+ },
+ after: true,
+ },
+ {
+ desc: "Hiding a node by adding a new rule to a stylesheet",
+ selector: "#hidden-via-stylesheet",
+ before: true,
+ changeStyle: () => {
+ content.document.styleSheets[0].insertRule(
+ "#hidden-via-stylesheet {display: none;}",
+ 1
+ );
+ },
+ after: false,
+ },
+ {
+ desc: "Hiding a node by adding a class that matches an existing rule",
+ selector: "#normal-div",
+ before: true,
+ changeStyle: () => {
+ content.document.styleSheets[0].insertRule(
+ ".a-new-class {display: none;}",
+ 2
+ );
+ content.document
+ .querySelector("#normal-div")
+ .classList.add("a-new-class");
+ },
+ after: false,
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ for (const data of TEST_DATA) {
+ info("Running test case: " + data.desc);
+ await runTestData(inspector, data);
+ }
+});
+
+async function runTestData(
+ inspector,
+ { selector, before, changeStyle, after }
+) {
+ info("Getting the " + selector + " test node");
+ const nodeFront = await getNodeFront(selector, inspector);
+ const container = getContainerForNodeFront(nodeFront, inspector);
+ is(
+ !container.elt.classList.contains("not-displayed"),
+ before,
+ "The container is marked as " + (before ? "shown" : "hidden")
+ );
+
+ info("Listening for the display-change event");
+ const onDisplayChanged = new Promise(resolve => {
+ inspector.markup.walker.once("display-change", resolve);
+ });
+
+ info("Making style changes");
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], changeStyle);
+ const nodes = await onDisplayChanged;
+
+ info("Verifying that the list of changed nodes include our container");
+
+ ok(nodes.length, "The display-change event was received with a nodes");
+ let foundContainer = false;
+ for (const node of nodes) {
+ if (getContainerForNodeFront(node, inspector) === container) {
+ foundContainer = true;
+ break;
+ }
+ }
+ ok(foundContainer, "Container is part of the list of changed nodes");
+
+ is(
+ !container.elt.classList.contains("not-displayed"),
+ after,
+ "The container is marked as " + (after ? "shown" : "hidden")
+ );
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_overflow_badge.js b/devtools/client/inspector/markup/test/browser_markup_overflow_badge.js
new file mode 100644
index 0000000000..6770929594
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_overflow_badge.js
@@ -0,0 +1,101 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+// Tests that the overflow badge is shown to overflow causing elements and is updated
+// dynamically.
+
+const TEST_URI = `
+ <style type="text/css">
+ .parent {
+ width: 200px;
+ height: 200px;
+ overflow: scroll;
+ }
+ .fixed {
+ width: 50px;
+ height: 50px;
+ }
+ .shift {
+ margin-left: 300px;
+ }
+ </style>
+ <div id="top" class="parent">
+ <div id="child1" class="fixed shift">
+ <div id="child2" class="fixed"></div>
+ </div>
+ <div id="child3" class="shift">
+ <div id="child4" class="fixed"></div>
+ </div>
+ </div>
+`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)
+ );
+
+ await expandChildContainers(inspector);
+
+ const child1 = await getContainerForSelector("#child1", inspector);
+ const child2 = await getContainerForSelector("#child2", inspector);
+ const child3 = await getContainerForSelector("#child3", inspector);
+ const child4 = await getContainerForSelector("#child4", inspector);
+
+ info(
+ "Checking if overflow badges appear correctly right after the markup-view is loaded"
+ );
+
+ checkBadges([child1, child4], [child2, child3]);
+
+ info("Changing the elements to check whether the badge updates correctly");
+
+ await toggleClass(inspector);
+
+ checkBadges([child2, child3], [child1, child4]);
+
+ info(
+ "Once again, changing the elements to check whether the badge updates correctly"
+ );
+
+ await toggleClass(inspector);
+
+ checkBadges([child1, child4], [child2, child3]);
+});
+
+async function expandChildContainers(inspector) {
+ const container = await getContainerForSelector("#top", inspector);
+
+ await expandContainer(inspector, container);
+ for (const child of container.getChildContainers()) {
+ await expandContainer(inspector, child);
+ }
+}
+
+async function toggleClass(inspector) {
+ const onStateChanged = inspector.walker.once("overflow-change");
+
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function () {
+ content.document.querySelector("#child1").classList.toggle("fixed");
+ content.document.querySelector("#child3").classList.toggle("fixed");
+ });
+
+ await onStateChanged;
+}
+
+function checkBadges(elemsWithBadges, elemsWithNoBadges) {
+ const hasBadge = elem =>
+ elem.elt.querySelector(
+ `#${elem.elt.children[0].id} > span.editor > .inspector-badge.overflow-badge`
+ );
+
+ for (const elem of elemsWithBadges) {
+ ok(hasBadge(elem), `Overflow badge exists in ${elem.node.id}`);
+ }
+
+ for (const elem of elemsWithNoBadges) {
+ ok(!hasBadge(elem), `Overflow badge does not exist in ${elem.node.id}`);
+ }
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_pagesize_01.js b/devtools/client/inspector/markup/test/browser_markup_pagesize_01.js
new file mode 100644
index 0000000000..1700c9a433
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_pagesize_01.js
@@ -0,0 +1,91 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that the markup view loads only as many nodes as specified by the
+// devtools.markup.pagesize preference.
+
+Services.prefs.setIntPref("devtools.markup.pagesize", 5);
+
+const TEST_URL = URL_ROOT + "doc_markup_pagesize_01.html";
+const TEST_DATA = [
+ {
+ desc: "Select the last item",
+ selector: "#z",
+ expected: "*more*vwxyz",
+ },
+ {
+ desc: "Select the first item",
+ selector: "#a",
+ expected: "abcde*more*",
+ },
+ {
+ desc: "Select the last item",
+ selector: "#z",
+ expected: "*more*vwxyz",
+ },
+ {
+ desc: "Select an already-visible item",
+ selector: "#v",
+ // Because "v" was already visible, we shouldn't have loaded
+ // a different page.
+ expected: "*more*vwxyz",
+ },
+ {
+ desc: "Verify childrenDirty reloads the page",
+ selector: "#w",
+ forceReload: true,
+ // But now that we don't already have a loaded page, selecting
+ // w should center around w.
+ expected: "*more*uvwxy*more*",
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Start iterating through the test data");
+ for (const step of TEST_DATA) {
+ info("Start test: " + step.desc);
+
+ if (step.forceReload) {
+ await forceReload(inspector);
+ }
+ info("Selecting the node that corresponds to " + step.selector);
+ await selectNode(step.selector, inspector);
+
+ info("Checking that the right nodes are shwon");
+ await assertChildren(step.expected, inspector);
+ }
+
+ info("Checking that clicking the more button loads everything");
+ await clickShowMoreNodes(inspector);
+ await inspector.markup._waitForChildren();
+ await assertChildren("abcdefghijklmnopqrstuvwxyz", inspector);
+});
+
+async function assertChildren(expected, inspector) {
+ const container = await getContainerForSelector("body", inspector);
+ let found = "";
+ for (const child of container.children.children) {
+ if (child.classList.contains("more-nodes")) {
+ found += "*more*";
+ } else {
+ found += child.container.node.getAttribute("id");
+ }
+ }
+ is(found, expected, "Got the expected children.");
+}
+
+async function forceReload(inspector) {
+ const container = await getContainerForSelector("body", inspector);
+ container.childrenDirty = true;
+}
+
+async function clickShowMoreNodes(inspector) {
+ const container = await getContainerForSelector("body", inspector);
+ const button = container.elt.querySelector("button");
+ const win = button.ownerDocument.defaultView;
+ EventUtils.sendMouseEvent({ type: "click" }, button, win);
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_pagesize_02.js b/devtools/client/inspector/markup/test/browser_markup_pagesize_02.js
new file mode 100644
index 0000000000..21e1a1221b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_pagesize_02.js
@@ -0,0 +1,48 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that the markup view loads only as many nodes as specified
+// by the devtools.markup.pagesize preference and that pressing the "show all
+// nodes" actually shows the nodes
+
+const TEST_URL = URL_ROOT + "doc_markup_pagesize_02.html";
+
+// Make sure nodes are hidden when there are more than 5 in a row
+Services.prefs.setIntPref("devtools.markup.pagesize", 5);
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Selecting the UL node");
+ await clickContainer("ul", inspector);
+ info("Reloading the page with the UL node selected will expand its children");
+ await reloadBrowser();
+ await inspector.markup._waitForChildren();
+
+ info("Click on the 'show all nodes' button in the UL's list of children");
+ await showAllNodes(inspector);
+
+ await assertAllNodesAreVisible(inspector);
+});
+
+async function showAllNodes(inspector) {
+ const container = await getContainerForSelector("ul", inspector);
+ const button = container.elt.querySelector("button");
+ ok(button, "All nodes button is here");
+ const win = button.ownerDocument.defaultView;
+
+ EventUtils.sendMouseEvent({ type: "click" }, button, win);
+ await inspector.markup._waitForChildren();
+}
+
+async function assertAllNodesAreVisible(inspector) {
+ const container = await getContainerForSelector("ul", inspector);
+ ok(
+ !container.elt.querySelector("button"),
+ "All nodes button isn't here anymore"
+ );
+ const numItems = await getNumberOfMatchingElementsInContentPage("ul > *");
+ is(container.children.childNodes.length, numItems);
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_pseudo_on_reload.js b/devtools/client/inspector/markup/test/browser_markup_pseudo_on_reload.js
new file mode 100644
index 0000000000..e91e1b192a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_pseudo_on_reload.js
@@ -0,0 +1,44 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that reloading the page when an element with sibling pseudo elements is selected
+// does not result in missing elements in the markup-view after reload.
+// Non-regression test for bug 1506792.
+
+const TEST_URL = URL_ROOT + "doc_markup_pseudo.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await selectNode("div", inspector);
+
+ info("Check that the markup-view shows the expected nodes before reload");
+ await checkMarkupView(inspector);
+
+ await reloadBrowser();
+
+ info("Check that the markup-view shows the expected nodes after reload");
+ await checkMarkupView(inspector);
+});
+
+async function checkMarkupView(inspector) {
+ const articleContainer = await getContainerForSelector("article", inspector);
+ ok(articleContainer, "The parent <article> element was found");
+
+ const childrenContainers = articleContainer.getChildContainers();
+ const beforeNode = childrenContainers[0].node;
+ const divNode = childrenContainers[1].node;
+ const afterNode = childrenContainers[2].node;
+
+ ok(
+ beforeNode.isBeforePseudoElement,
+ "The first child is the ::before pseudo element"
+ );
+ is(divNode.displayName, "div", "The second child is the <div> element");
+ ok(
+ afterNode.isAfterPseudoElement,
+ "The last child is the ::after pseudo element"
+ );
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_remove_xul_attributes.js b/devtools/client/inspector/markup/test/browser_markup_remove_xul_attributes.js
new file mode 100644
index 0000000000..89ac844149
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_remove_xul_attributes.js
@@ -0,0 +1,36 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test confirms that XUL attributes don't show up as empty
+// attributes after being deleted
+
+const TEST_URL = URL_ROOT_SSL + "doc_markup_xul.xhtml";
+
+add_task(async function () {
+ await SpecialPowers.pushPermissions([
+ { type: "allowXULXBL", allow: true, context: URL_ROOT_SSL },
+ ]);
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ const panelFront = await getNodeFront("#test", inspector);
+ ok(
+ panelFront.hasAttribute("id"),
+ "panelFront has id attribute in the beginning"
+ );
+
+ info("Removing panel's id attribute");
+ const onMutation = inspector.once("markupmutation");
+ await removeContentPageElementAttribute("#test", "id");
+
+ info("Waiting for markupmutation");
+ await onMutation;
+
+ is(
+ panelFront.hasAttribute("id"),
+ false,
+ "panelFront doesn't have id attribute anymore"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_screenshot_node.js b/devtools/client/inspector/markup/test/browser_markup_screenshot_node.js
new file mode 100644
index 0000000000..270d00cd85
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_screenshot_node.js
@@ -0,0 +1,25 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const TEST_URL = `data:text/html;charset=utf8,
+ <div id="blue-node" style="width:30px;height:30px;background:rgb(0, 0, 255)"></div>`;
+
+// Test that the "Screenshot Node" feature works with a regular node in the main document.
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(encodeURI(TEST_URL));
+
+ info("Select the blue node");
+ await selectNode("#blue-node", inspector);
+
+ info("Take a screenshot of the blue node and verify it looks as expected");
+ const blueScreenshot = await takeNodeScreenshot(inspector);
+ await assertSingleColorScreenshotImage(blueScreenshot, 30, 30, {
+ r: 0,
+ g: 0,
+ b: 255,
+ });
+
+ await toolbox.destroy();
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_screenshot_node_about_page.js b/devtools/client/inspector/markup/test/browser_markup_screenshot_node_about_page.js
new file mode 100644
index 0000000000..4d8f4ff6a6
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_screenshot_node_about_page.js
@@ -0,0 +1,46 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const TEST_URL = `about:preferences`;
+
+// Test that the "Screenshot Node" feature works in about:preferences (See Bug 1691349).
+
+function hexToCSS(hex) {
+ if (!hex) {
+ return null;
+ }
+ const rgba = InspectorUtils.colorToRGBA(hex);
+ info(`rgba: '${JSON.stringify(rgba)}'`);
+ // Drop off the 'a' component since the color will be opaque
+ return `rgb(${rgba.r}, ${rgba.g}, ${rgba.b})`;
+}
+
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+
+ info("Select the main content node");
+ await selectNode(".main-content", inspector);
+
+ let inContentPageBackgroundColor = await getComputedStyleProperty(
+ ":root",
+ null,
+ "--in-content-page-background"
+ );
+ inContentPageBackgroundColor = inContentPageBackgroundColor.trim();
+
+ info("Take a screenshot of the element and verify it looks as expected");
+ const image = await takeNodeScreenshot(inspector);
+ // We only check that we have the right background color, since it would be difficult
+ // to assert the look of any other area in the page.
+ await checkImageColorAt({
+ image,
+ x: 0,
+ y: 0,
+ expectedColor: hexToCSS(inContentPageBackgroundColor),
+ label: "The screenshot was taken",
+ });
+
+ await toolbox.destroy();
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_screenshot_node_iframe.js b/devtools/client/inspector/markup/test/browser_markup_screenshot_node_iframe.js
new file mode 100644
index 0000000000..3b75ff10e3
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_screenshot_node_iframe.js
@@ -0,0 +1,46 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const exampleOrgDocument = `https://example.org/document-builder.sjs`;
+const exampleComDocument = `https://example.com/document-builder.sjs`;
+
+const TEST_URL = `${exampleOrgDocument}?html=
+ <iframe
+ src="${exampleOrgDocument}?html=<div style='width:30px;height:30px;background:rgb(255,0,0)'></div>"
+ id="same-origin"></iframe>
+ <iframe
+ src="${exampleComDocument}?html=<div style='width:25px;height:10px;background:rgb(0,255,0)'></div>"
+ id="remote"></iframe>`;
+
+// Test that the "Screenshot Node" feature works with a node inside an iframe.
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(encodeURI(TEST_URL));
+
+ info("Select the red node");
+ await selectNodeInFrames(["#same-origin", "div"], inspector);
+
+ info(
+ "Take a screenshot of the red div in the same origin iframe node and verify it looks as expected"
+ );
+ const redScreenshot = await takeNodeScreenshot(inspector);
+ await assertSingleColorScreenshotImage(redScreenshot, 30, 30, {
+ r: 255,
+ g: 0,
+ b: 0,
+ });
+
+ info("Select the green node");
+ await selectNodeInFrames(["#remote", "div"], inspector);
+ info(
+ "Take a screenshot of the green div in the remote iframe node and verify it looks as expected"
+ );
+ const greenScreenshot = await takeNodeScreenshot(inspector);
+ await assertSingleColorScreenshotImage(greenScreenshot, 25, 10, {
+ r: 0,
+ g: 255,
+ b: 0,
+ });
+ await toolbox.destroy();
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_screenshot_node_shadowdom.js b/devtools/client/inspector/markup/test/browser_markup_screenshot_node_shadowdom.js
new file mode 100644
index 0000000000..2f1382a6a3
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_screenshot_node_shadowdom.js
@@ -0,0 +1,41 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const TEST_URL = `data:text/html;charset=utf8,
+ <test-component></test-component>
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML =
+ '<div style="width:30px;height:30px;background:rgb(0, 128, 0)"></div>';
+ }
+ });
+ </script>`;
+
+// Test that the "Screenshot Node" feature works with a node inside a shadow root.
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(encodeURI(TEST_URL));
+
+ info("Select the green node");
+ const greenNode = await getNodeFrontInShadowDom(
+ "div",
+ "test-component",
+ inspector
+ );
+ await selectNode(greenNode, inspector);
+
+ info("Take a screenshot of the green node and verify it looks as expected");
+ const greenScreenshot = await takeNodeScreenshot(inspector);
+ await assertSingleColorScreenshotImage(greenScreenshot, 30, 30, {
+ r: 0,
+ g: 128,
+ b: 0,
+ });
+
+ await toolbox.destroy();
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_screenshot_node_warning.js b/devtools/client/inspector/markup/test/browser_markup_screenshot_node_warning.js
new file mode 100644
index 0000000000..2ae713455a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_screenshot_node_warning.js
@@ -0,0 +1,38 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const TEST_URL = `data:text/html;charset=utf8,
+ <div id="blue-node" style="width:30px;height:11000px;background:rgb(0, 0, 255)"></div>`;
+
+// Test taking a screenshot of a tall node displays a warning message in the notification box.
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(encodeURI(TEST_URL));
+
+ info("Select the blue node");
+ await selectNode("#blue-node", inspector);
+
+ info("Take a screenshot of the blue node and verify it looks as expected");
+ const blueScreenshot = await takeNodeScreenshot(inspector);
+ await assertSingleColorScreenshotImage(blueScreenshot, 30, 10000, {
+ r: 0,
+ g: 0,
+ b: 255,
+ });
+
+ info(
+ "Check that a warning message was displayed to indicate the screenshot was truncated"
+ );
+ const notificationBox = await waitFor(() =>
+ toolbox.doc.querySelector(".notificationbox")
+ );
+
+ const message = notificationBox.querySelector(".notification").textContent;
+ ok(
+ message.startsWith("The image was cut off"),
+ `The warning message is rendered as expected (${message})`
+ );
+
+ await toolbox.destroy();
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_scrollable_badge.js b/devtools/client/inspector/markup/test/browser_markup_scrollable_badge.js
new file mode 100644
index 0000000000..2f6a414249
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_scrollable_badge.js
@@ -0,0 +1,67 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that the scrollable badge is shown next to scrollable elements, and is updated
+// dynamically when necessary.
+
+const TEST_URI = `
+ <style type="text/css">
+ #wrapper {
+ width: 300px;
+ height: 300px;
+ overflow: scroll;
+ }
+ #wrapper.no-scroll {
+ overflow: hidden;
+ }
+ #content {
+ height: 1000px;
+ }
+ </style>
+ <div id="wrapper">
+ <div id="content"></div>
+ </div>
+`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)
+ );
+
+ let badge = await getBadgeEl(inspector);
+ ok(badge, "The scrollable badge exists on the test node");
+
+ info("Make the test node non-scrollable");
+ let onStateChanged = inspector.walker.once("scrollable-change");
+ await toggleScrollableClass();
+ await onStateChanged;
+
+ badge = await getBadgeEl(inspector);
+ ok(!badge, "The scrollable badge doesn't exist anymore");
+
+ info("Make the test node scrollable again");
+ onStateChanged = inspector.walker.once("scrollable-change");
+ await toggleScrollableClass();
+ await onStateChanged;
+
+ badge = await getBadgeEl(inspector);
+ ok(badge, "The scrollable badge exists again");
+});
+
+async function getBadgeEl(inspector) {
+ const wrapperMarkupContainer = await getContainerForSelector(
+ "#wrapper",
+ inspector
+ );
+ return wrapperMarkupContainer.elt.querySelector(
+ ".inspector-badge.scrollable-badge"
+ );
+}
+
+async function toggleScrollableClass() {
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function () {
+ content.document.querySelector("#wrapper").classList.toggle("no-scroll");
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_scrollable_badge_click.js b/devtools/client/inspector/markup/test/browser_markup_scrollable_badge_click.js
new file mode 100644
index 0000000000..3699cd97be
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_scrollable_badge_click.js
@@ -0,0 +1,155 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+// Tests that the correct elements show up and get highlighted in the markup view when the
+// scrollable badge is clicked.
+
+const TEST_URI = `
+ <style type="text/css">
+ .parent {
+ width: 200px;
+ height: 200px;
+ overflow: scroll;
+ }
+ .fixed {
+ width: 50px;
+ height: 50px;
+ }
+ .shift {
+ margin-left: 300px;
+ }
+ .has-before::before {
+ content: "-";
+ }
+ </style>
+ <div id="top" class="parent">
+ <div id="child1" class="fixed shift">
+ <div id="child2" class="fixed"></div>
+ </div>
+ <div id="child3" class="shift has-before">
+ <div id="child4" class="fixed"></div>
+ </div>
+ </div>
+`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(
+ "data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI)
+ );
+
+ const container = await getContainerForSelector("#top", inspector);
+
+ info(
+ "Clicking on the scrollable badge so that the overflow causing elements show up in the markup view."
+ );
+ container.editor._scrollableBadge.click();
+
+ await waitForContainers(["#child1", "#child3", "#child4"], inspector);
+
+ await checkOverflowHighlight(
+ ["#child1", "#child4"],
+ ["#child2", "#child3"],
+ inspector
+ );
+
+ ok(
+ container.editor._scrollableBadge.classList.contains("active"),
+ "Scrollable badge is active"
+ );
+
+ checkTelemetry("devtools.markup.scrollable.badge.clicked", "", 1, "scalar");
+
+ info(
+ "Changing CSS so elements update their overflow highlights accordingly."
+ );
+ await toggleClass(inspector);
+
+ // By default, #child2 will not be visible in the markup view,
+ // so expand its parent to make it visible.
+ const child1 = await getContainerForSelector("#child1", inspector);
+ await expandContainer(inspector, child1);
+
+ await checkOverflowHighlight(
+ ["#child2", "#child3"],
+ ["#child1", "#child4"],
+ inspector
+ );
+
+ info(
+ "Clicking on the scrollable badge again so that all the overflow highlight gets removed."
+ );
+ container.editor._scrollableBadge.click();
+
+ await checkOverflowHighlight(
+ [],
+ ["#child1", "#child2", "#child3", "#child4"],
+ inspector
+ );
+
+ ok(
+ !container.editor._scrollableBadge.classList.contains("active"),
+ "Scrollable badge is not active"
+ );
+
+ checkTelemetry("devtools.markup.scrollable.badge.clicked", "", 2, "scalar");
+
+ info("Double-click on the scrollable badge");
+ EventUtils.sendMouseEvent(
+ { type: "dblclick" },
+ container.editor._scrollableBadge
+ );
+ ok(
+ container.expanded,
+ "Double clicking on the badge did not collapse the container"
+ );
+});
+
+async function getContainerForSelector(selector, inspector) {
+ const nodeFront = await getNodeFront(selector, inspector);
+ return getContainerForNodeFront(nodeFront, inspector);
+}
+
+async function waitForContainers(selectors, inspector) {
+ for (const selector of selectors) {
+ info(`Wait for markup container of ${selector}`);
+ await asyncWaitUntil(() => getContainerForSelector(selector, inspector));
+ }
+}
+
+async function elementHasHighlight(selector, inspector) {
+ const container = await getContainerForSelector(selector, inspector);
+ return container?.tagState.classList.contains("overflow-causing-highlighted");
+}
+
+async function checkOverflowHighlight(
+ selectorWithHighlight,
+ selectorWithNoHighlight,
+ inspector
+) {
+ for (const selector of selectorWithHighlight) {
+ ok(
+ await elementHasHighlight(selector, inspector),
+ `${selector} contains overflow highlight`
+ );
+ }
+ for (const selector of selectorWithNoHighlight) {
+ ok(
+ !(await elementHasHighlight(selector, inspector)),
+ `${selector} does not contain overflow highlight`
+ );
+ }
+}
+
+async function toggleClass(inspector) {
+ const onStateChanged = inspector.walker.once("overflow-change");
+
+ await SpecialPowers.spawn(gBrowser.selectedBrowser, [], async function () {
+ content.document.querySelector("#child1").classList.toggle("fixed");
+ content.document.querySelector("#child3").classList.toggle("fixed");
+ });
+
+ await onStateChanged;
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_search_01.js b/devtools/client/inspector/markup/test/browser_markup_search_01.js
new file mode 100644
index 0000000000..6288bcb942
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_search_01.js
@@ -0,0 +1,56 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that searching for nodes using the selector-search input expands and
+// selects the right nodes in the markup-view, even when those nodes are deeply
+// nested (and therefore not attached yet when the markup-view is initialized).
+
+const TEST_URL = URL_ROOT + "doc_markup_search.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ let container = await getContainerForSelector("em", inspector, true);
+ ok(!container, "The <em> tag isn't present yet in the markup-view");
+
+ // Searching for the innermost element first makes sure that the inspector
+ // back-end is able to attach the resulting node to the tree it knows at the
+ // moment. When the inspector is started, the <body> is the default selected
+ // node, and only the parents up to the ROOT are known, and its direct
+ // children.
+ info("searching for the innermost child: <em>");
+ await searchFor("em", inspector);
+
+ container = await getContainerForSelector("em", inspector);
+ ok(container, "The <em> tag is now imported in the markup-view");
+
+ let nodeFront = await getNodeFront("em", inspector);
+ is(
+ inspector.selection.nodeFront,
+ nodeFront,
+ "The <em> tag is the currently selected node"
+ );
+
+ info("searching for other nodes too");
+ for (const node of ["span", "li", "ul"]) {
+ await searchFor(node, inspector);
+
+ nodeFront = await getNodeFront(node, inspector);
+ is(
+ inspector.selection.nodeFront,
+ nodeFront,
+ "The <" + node + "> tag is the currently selected node"
+ );
+ }
+});
+
+async function searchFor(selector, inspector) {
+ const onNewNodeFront = inspector.selection.once("new-node-front");
+
+ searchUsingSelectorSearch(selector, inspector);
+
+ await onNewNodeFront;
+ await inspector.once("inspector-updated");
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom.js
new file mode 100644
index 0000000000..1b701f872e
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom.js
@@ -0,0 +1,290 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+requestLongerTimeout(2);
+
+// Test a few static pages using webcomponents and check that they are displayed as
+// expected in the markup view.
+
+const TEST_DATA = [
+ {
+ // Test that expanding a shadow host shows a shadow root node and direct children.
+ // Test that expanding a shadow root shows the shadow dom.
+ // Test that slotted elements are visible in the shadow dom.
+ title: "generic shadow dom test",
+ url: `data:text/html;charset=utf-8,
+ <test-component>
+ <div slot="slot1">slotted-1<div>inner</div></div>
+ <div slot="slot2">slotted-2<div>inner</div></div>
+ <div class="no-slot-class">no-slot-text<div>inner</div></div>
+ </test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = \`
+ <slot name="slot1"></slot>
+ <slot name="slot2"></slot>
+ <slot></slot>
+ \`;
+ }
+ });
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root
+ name="slot1"
+ div!slotted
+ name="slot2"
+ div!slotted
+ slot
+ div!slotted
+ slot="slot1"
+ slotted-1
+ inner
+ slot="slot2"
+ slotted-2
+ inner
+ class="no-slot-class"
+ no-slot-text
+ inner`,
+ },
+ {
+ // Test that components without any direct children still display a shadow root node,
+ // if a shadow root is attached to the host.
+ title: "shadow root without direct children",
+ url: `data:text/html;charset=utf-8,
+ <test-component></test-component>
+ <script>
+ "use strict";
+ customElements.define("test-component", class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = "<slot><div>fallback-content</div></slot>";
+ }
+ });
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root
+ slot
+ fallback-content`,
+ },
+ {
+ // Test that markup view is correctly displayed for non-trivial shadow DOM nesting.
+ title: "nested components",
+ url: `data:text/html;charset=utf-8,
+ <test-component >
+ <div slot="slot1">slot1-1</div>
+ <third-component slot="slot2"></third-component>
+ </test-component>
+
+ <script>
+ (function() {
+ 'use strict';
+
+ function defineComponent(name, html) {
+ customElements.define(name, class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = html;
+ }
+ });
+ }
+
+ defineComponent('test-component', \`
+ <div id="test-container">
+ <slot name="slot1"></slot>
+ <slot name="slot2"></slot>
+ <other-component><div slot="other1">other1-content</div></other-component>
+ </div>\`);
+ defineComponent('other-component',
+ '<div id="other-container"><slot id="other1" name="other1"></slot></div>');
+ defineComponent('third-component', '<div>Third component</div>');
+ })();
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root
+ test-container
+ slot
+ div!slotted
+ slot
+ third-component!slotted
+ other-component
+ #shadow-root
+ div
+ slot
+ div!slotted
+ div
+ div
+ third-component
+ #shadow-root
+ div`,
+ },
+ {
+ // Test that ::before and ::after pseudo elements are correctly displayed in host
+ // components and in slot elements.
+ title: "pseudo elements",
+ url: `data:text/html;charset=utf-8,
+ <style>
+ test-component::before { content: "before-host" }
+ test-component::after { content: "after-host" }
+ </style>
+
+ <test-component>
+ <div class="light-dom"></div>
+ </test-component>
+
+ <script>
+ "use strict";
+ customElements.define("test-component", class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = \`
+ <style>
+ slot { display: block } /* avoid whitespace nodes */
+ slot::before { content: "before-slot" }
+ slot::after { content: "after-slot" }
+ </style>
+ <slot>default content</slot>
+ \`;
+ }
+ });
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root
+ style
+ slot { display: block }
+ slot
+ ::before
+ div!slotted
+ default content
+ ::after
+ ::before
+ class="light-dom"
+ ::after`,
+ },
+ {
+ // Test empty web components are still displayed correctly.
+ title: "empty components",
+ url: `data:text/html;charset=utf-8,
+ <test-component></test-component>
+
+ <script>
+ "use strict";
+ customElements.define("test-component", class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = "";
+ }
+ });
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root`,
+ },
+ {
+ // Test shadow hosts show their shadow root even if they contain just a short text.
+ title: "shadow host with inline-text-child",
+ url: `data:text/html;charset=utf-8,
+ <test-component>
+ <inner-component>short-text-outside</inner-component>
+ </test-component>
+
+ <script>
+ "use strict";
+
+ customElements.define("test-component", class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = "<div><slot></slot></div>";
+ }
+ });
+
+ customElements.define("inner-component", class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = "short-text-inside";
+ }
+ });
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root
+ div
+ slot
+ inner-component!slotted
+ inner-component
+ #shadow-root
+ short-text-inside
+ short-text-outside`,
+ },
+ {
+ // Test for Bug 1537877, crash with nested custom elements without slot.
+ title: "nested components without slot",
+ url: `data:text/html;charset=utf-8,
+ <test-component>
+ <inner-component slot="non-existing-slot"></inner-component>
+ </test-component>
+
+ <script>
+ "use strict";
+
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = '<div>test-component-content</div>'
+ }
+ });
+
+ customElements.define('inner-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = 'inner-component-content'
+ }
+ });
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root
+ div
+ inner-component
+ #shadow-root
+ inner-component-content`,
+ },
+];
+
+for (const { url, tree, title } of TEST_DATA) {
+ // Test each configuration in both open and closed modes
+ add_task(async function () {
+ info(`Testing: [${title}] in OPEN mode`);
+ const { inspector, tab } = await openInspectorForURL(
+ url.replace(/#MODE#/g, "open")
+ );
+ await assertMarkupViewAsTree(tree, "test-component", inspector);
+ await removeTab(tab);
+ });
+ add_task(async function () {
+ info(`Testing: [${title}] in CLOSED mode`);
+ const { inspector, tab } = await openInspectorForURL(
+ url.replace(/#MODE#/g, "closed")
+ );
+ await assertMarkupViewAsTree(tree, "test-component", inspector);
+ await removeTab(tab);
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_clickreveal.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_clickreveal.js
new file mode 100644
index 0000000000..778420dba3
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_clickreveal.js
@@ -0,0 +1,108 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the corresponding non-slotted node container gets selected when clicking on
+// the reveal link for a slotted node.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <test-component>
+ <div slot="slot1" id="el1">slot1-1</div>
+ <div slot="slot1" id="el2">slot1-2</div>
+ </test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot name="slot1"></slot>';
+ }
+ });
+ </script>`;
+
+// Test reveal link with mouse navigation
+add_task(async function () {
+ const checkWithMouse = checkRevealLink.bind(null, clickOnRevealLink);
+ await testRevealLink(checkWithMouse, checkWithMouse);
+});
+
+// Test reveal link with keyboard navigation (Enter and Spacebar keys)
+add_task(async function () {
+ const checkWithEnter = checkRevealLink.bind(
+ null,
+ keydownOnRevealLink.bind(null, "KEY_Enter")
+ );
+ const checkWithSpacebar = checkRevealLink.bind(
+ null,
+ keydownOnRevealLink.bind(null, " ")
+ );
+
+ await testRevealLink(checkWithEnter, checkWithSpacebar);
+});
+
+async function testRevealLink(revealFnFirst, revealFnSecond) {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+
+ info("Find and expand the test-component shadow DOM host.");
+ const hostFront = await getNodeFront("test-component", inspector);
+ const hostContainer = markup.getContainer(hostFront);
+ await expandContainer(inspector, hostContainer);
+
+ info("Expand the shadow root");
+ const shadowRootContainer = hostContainer.getChildContainers()[0];
+ await expandContainer(inspector, shadowRootContainer);
+
+ info("Expand the slot");
+ const slotContainer = shadowRootContainer.getChildContainers()[0];
+ await expandContainer(inspector, slotContainer);
+
+ const slotChildContainers = slotContainer.getChildContainers();
+ is(slotChildContainers.length, 2, "Expecting 2 slotted children");
+
+ await revealFnFirst(inspector, slotChildContainers[0].node);
+ is(inspector.selection.nodeFront.id, "el1", "The right node was selected");
+ is(hostContainer.getChildContainers()[1].node, inspector.selection.nodeFront);
+
+ await revealFnSecond(inspector, slotChildContainers[1].node);
+ is(inspector.selection.nodeFront.id, "el2", "The right node was selected");
+ is(hostContainer.getChildContainers()[2].node, inspector.selection.nodeFront);
+}
+
+async function checkRevealLink(actionFn, inspector, node) {
+ const slottedContainer = inspector.markup.getContainer(node, true);
+ info("Select the slotted container for the element");
+ await selectNode(node, inspector, "no-reason", true);
+ ok(inspector.selection.isSlotted(), "The selection is the slotted version");
+ ok(
+ inspector.markup.getSelectedContainer().isSlotted(),
+ "The selected container is slotted"
+ );
+
+ const link = slottedContainer.elt.querySelector(".reveal-link");
+ is(
+ link.getAttribute("role"),
+ "link",
+ "Reveal link has the role=link attribute"
+ );
+
+ info("Click on the reveal link and wait for the new node to be selected");
+ await actionFn(inspector, slottedContainer);
+ const selectedFront = inspector.selection.nodeFront;
+ is(selectedFront, node, "The same node front is still selected");
+ ok(
+ !inspector.selection.isSlotted(),
+ "The selection is not the slotted version"
+ );
+ // wait until the selected container isn't the one we had before.
+ await waitFor(
+ () => inspector.markup.getSelectedContainer() !== slottedContainer
+ );
+ ok(
+ !inspector.markup.getSelectedContainer().isSlotted(),
+ "The selected container is not slotted"
+ );
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_clickreveal_scroll.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_clickreveal_scroll.js
new file mode 100644
index 0000000000..7e3714420b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_clickreveal_scroll.js
@@ -0,0 +1,88 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that clicking on "reveal" always scrolls the view to show the real container, even
+// if the node is already selected.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <test-component>
+ <div slot="slot1" id="el1">slot1 content</div>
+ </test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = \`
+ <slot name="slot1"></slot>
+ <div></div><div></div><div></div><div></div><div></div><div></div>
+ <div></div><div></div><div></div><div></div><div></div><div></div>
+ <div></div><div></div><div></div><div></div><div></div><div></div>
+ <div></div><div></div><div></div><div></div><div></div><div></div>
+ <!-- adding some nodes to make sure the slotted container and the real container
+ require scrolling -->
+ \`;
+ }
+ });
+ </script>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+
+ info("Find and expand the test-component shadow DOM host.");
+ const hostFront = await getNodeFront("test-component", inspector);
+ const hostContainer = markup.getContainer(hostFront);
+ await expandContainer(inspector, hostContainer);
+
+ info("Expand the shadow root");
+ const shadowRootContainer = hostContainer.getChildContainers()[0];
+ await expandContainer(inspector, shadowRootContainer);
+
+ info("Expand the slot");
+ const slotContainer = shadowRootContainer.getChildContainers()[0];
+ await expandContainer(inspector, slotContainer);
+
+ const slotChildContainers = slotContainer.getChildContainers();
+ is(slotChildContainers.length, 1, "Expecting 1 slotted child");
+
+ const slottedContainer = slotChildContainers[0];
+ const realContainer = inspector.markup.getContainer(slottedContainer.node);
+ const slottedElement = slottedContainer.elt;
+ const realElement = realContainer.elt;
+
+ info("Click on the reveal link");
+ await clickOnRevealLink(inspector, slottedContainer);
+ // "new-node-front" will also trigger the scroll, so make sure we are testing after
+ // the scroll was performed.
+ await waitUntil(() => isScrolledOut(slottedElement));
+ is(isScrolledOut(slottedElement), true, "slotted element is scrolled out");
+ await waitUntil(() => !isScrolledOut(realElement));
+ is(isScrolledOut(realElement), false, "real element is not scrolled out");
+
+ info("Scroll back to see the slotted element");
+ slottedElement.scrollIntoView();
+ is(
+ isScrolledOut(slottedElement),
+ false,
+ "slotted element is not scrolled out"
+ );
+ is(isScrolledOut(realElement), true, "real element is scrolled out");
+
+ info("Click on the reveal link again");
+ await clickOnRevealLink(inspector, slottedContainer);
+ await waitUntil(() => isScrolledOut(slottedElement));
+ is(isScrolledOut(slottedElement), true, "slotted element is scrolled out");
+ await waitUntil(() => !isScrolledOut(realElement));
+ is(isScrolledOut(realElement), false, "real element is not scrolled out");
+});
+
+function isScrolledOut(element) {
+ const win = element.ownerGlobal;
+ const rect = element.getBoundingClientRect();
+ return rect.top < 0 || rect.top + rect.height > win.innerHeight;
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_copy_paths.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_copy_paths.js
new file mode 100644
index 0000000000..81af9ea3f0
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_copy_paths.js
@@ -0,0 +1,80 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that using copyCssPath, copyXPath and copyUniqueSelector with an element under a
+// shadow root returns values relevant to the selected element, and relative to the shadow
+// root.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <test-component></test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = \`
+ <div id="el1">
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>\`;
+ }
+ });
+ </script>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+
+ info("Find and expand the test-component shadow DOM host.");
+ const hostFront = await getNodeFront("test-component", inspector);
+ const hostContainer = markup.getContainer(hostFront);
+ await expandContainer(inspector, hostContainer);
+
+ info("Expand the shadow root");
+ const shadowRootContainer = hostContainer.getChildContainers()[0];
+ await expandContainer(inspector, shadowRootContainer);
+
+ info("Select the div under the shadow root");
+ const divContainer = shadowRootContainer.getChildContainers()[0];
+ await selectNode(divContainer.node, inspector);
+
+ info("Check the copied values for the various copy*Path helpers");
+ await waitForClipboardPromise(
+ () => inspector.markup.contextMenu._copyXPath(),
+ '//*[@id="el1"]'
+ );
+ await waitForClipboardPromise(
+ () => inspector.markup.contextMenu._copyCssPath(),
+ "div#el1"
+ );
+ await waitForClipboardPromise(
+ () => inspector.markup.contextMenu._copyUniqueSelector(),
+ "#el1"
+ );
+
+ info("Expand the div");
+ await expandContainer(inspector, divContainer);
+
+ info("Select the third span");
+ const spanContainer = divContainer.getChildContainers()[2];
+ await selectNode(spanContainer.node, inspector);
+
+ info("Check the copied values for the various copy*Path helpers");
+ await waitForClipboardPromise(
+ () => inspector.markup.contextMenu._copyXPath(),
+ "/div/span[3]"
+ );
+ await waitForClipboardPromise(
+ () => inspector.markup.contextMenu._copyCssPath(),
+ "div#el1 span"
+ );
+ await waitForClipboardPromise(
+ () => inspector.markup.contextMenu._copyUniqueSelector(),
+ "#el1 > span:nth-child(3)"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_delete.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_delete.js
new file mode 100644
index 0000000000..f5b707bb6a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_delete.js
@@ -0,0 +1,105 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that slot elements are correctly updated when slotted elements are being removed
+// from the DOM.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <test-component>
+ <div slot="slot1" id="el1">slot1-1</div>
+ <div slot="slot1" id="el2">slot1-2</div>
+ </test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot name="slot1"><div>default</div></slot>';
+ }
+ });
+ </script>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ // <test-component> is a shadow host.
+ info("Find and expand the test-component shadow DOM host.");
+ const hostFront = await getNodeFront("test-component", inspector);
+ await inspector.markup.expandNode(hostFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ info(
+ "Test that expanding a shadow host shows shadow root and direct host children."
+ );
+ const { markup } = inspector;
+ const hostContainer = markup.getContainer(hostFront);
+ const childContainers = hostContainer.getChildContainers();
+
+ is(
+ childContainers.length,
+ 3,
+ "Expecting 3 children: shadowroot, 2 host children"
+ );
+ assertContainerHasText(childContainers[0], "#shadow-root");
+ assertContainerHasText(childContainers[1], "div");
+ assertContainerHasText(childContainers[2], "div");
+
+ info("Expand the shadow root");
+ const shadowRootContainer = childContainers[0];
+ await expandContainer(inspector, shadowRootContainer);
+
+ const shadowChildContainers = shadowRootContainer.getChildContainers();
+ is(shadowChildContainers.length, 1, "Expecting 1 child slot");
+ assertContainerHasText(shadowChildContainers[0], "slot");
+
+ info("Expand the slot");
+ const slotContainer = shadowChildContainers[0];
+ await expandContainer(inspector, slotContainer);
+
+ let slotChildContainers = slotContainer.getChildContainers();
+ is(
+ slotChildContainers.length,
+ 3,
+ "Expecting 3 children (2 slotted, fallback)"
+ );
+ assertContainerSlotted(slotChildContainers[0]);
+ assertContainerSlotted(slotChildContainers[1]);
+ assertContainerHasText(slotChildContainers[2], "div");
+
+ await deleteNode(inspector, "#el1");
+ slotChildContainers = slotContainer.getChildContainers();
+ is(
+ slotChildContainers.length,
+ 2,
+ "Expecting 2 children (1 slotted, fallback)"
+ );
+ assertContainerSlotted(slotChildContainers[0]);
+ assertContainerHasText(slotChildContainers[1], "div");
+
+ await deleteNode(inspector, "#el2");
+ slotChildContainers = slotContainer.getChildContainers();
+ // After deleting the last host direct child we expect the slot to show the default
+ // content <div>default</div>
+ is(slotChildContainers.length, 1, "Expecting 1 child");
+ ok(
+ !slotChildContainers[0].isSlotted(),
+ "Container is a not slotted container"
+ );
+});
+
+async function deleteNode(inspector, selector) {
+ info("Select node " + selector + " and make sure it is focused");
+ await selectNode(selector, inspector);
+ await clickContainer(selector, inspector);
+
+ info("Delete the node");
+ const mutated = inspector.once("markupmutation");
+ const updated = inspector.once("inspector-updated");
+ EventUtils.sendKey("delete", inspector.panelWin);
+ await mutated;
+ await updated;
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_dynamic.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_dynamic.js
new file mode 100644
index 0000000000..597623ebf4
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_dynamic.js
@@ -0,0 +1,155 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the inspector is correctly updated when shadow roots are attached to
+// components after displaying them in the markup view.
+
+const TEST_URL =
+ `data:text/html;charset=utf-8,` +
+ encodeURIComponent(`
+ <div id="root">
+ <test-component>
+ <div slot="slot1" id="el1">slot1-1</div>
+ <div slot="slot1" id="el2">slot1-2</div>
+ </test-component>
+ <inline-component>inline text</inline-component>
+ </div>
+
+ <script>
+ 'use strict';
+ window.attachTestComponent = function () {
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = \`<div id="slot1-container">
+ <slot name="slot1"></slot>
+ </div>
+ <other-component>
+ <div slot="slot2">slot2-1</div>
+ </other-component>\`;
+ }
+ });
+ }
+
+ window.attachOtherComponent = function () {
+ customElements.define('other-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = \`<div id="slot2-container">
+ <slot name="slot2"></slot>
+ <div>some-other-node</div>
+ </div>\`;
+ }
+ });
+ }
+
+ window.attachInlineComponent = function () {
+ customElements.define('inline-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = \`<div id="inline-component-content">
+ <div>some-inline-content</div>
+ </div>\`;
+ }
+ });
+ }
+ </script>`);
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ const tree = `
+ div
+ test-component
+ slot1-1
+ slot1-2
+ inline text`;
+ await assertMarkupViewAsTree(tree, "#root", inspector);
+
+ info("Attach a shadow root to test-component");
+ let mutated = waitForMutation(inspector, "shadowRootAttached");
+ SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () {
+ content.wrappedJSObject.attachTestComponent();
+ });
+ await mutated;
+
+ const treeAfterTestAttach = `
+ div
+ test-component
+ #shadow-root
+ slot1-container
+ slot
+ div!slotted
+ div!slotted
+ other-component
+ slot2-1
+ slot1-1
+ slot1-2
+ inline text`;
+ await assertMarkupViewAsTree(treeAfterTestAttach, "#root", inspector);
+
+ info("Attach a shadow root to other-component, nested in test-component");
+ mutated = waitForMutation(inspector, "shadowRootAttached");
+ SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () {
+ content.wrappedJSObject.attachOtherComponent();
+ });
+ await mutated;
+
+ const treeAfterOtherAttach = `
+ div
+ test-component
+ #shadow-root
+ slot1-container
+ slot
+ div!slotted
+ div!slotted
+ other-component
+ #shadow-root
+ slot2-container
+ slot
+ div!slotted
+ some-other-node
+ slot2-1
+ slot1-1
+ slot1-2
+ inline text`;
+ await assertMarkupViewAsTree(treeAfterOtherAttach, "#root", inspector);
+
+ info(
+ "Attach a shadow root to inline-component, check the inline text child."
+ );
+ mutated = waitForMutation(inspector, "shadowRootAttached");
+ SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () {
+ content.wrappedJSObject.attachInlineComponent();
+ });
+ await mutated;
+
+ const treeAfterInlineAttach = `
+ div
+ test-component
+ #shadow-root
+ slot1-container
+ slot
+ div!slotted
+ div!slotted
+ other-component
+ #shadow-root
+ slot2-container
+ slot
+ div!slotted
+ some-other-node
+ slot2-1
+ slot1-1
+ slot1-2
+ inline-component
+ #shadow-root
+ inline-component-content
+ some-inline-content
+ inline text`;
+ await assertMarkupViewAsTree(treeAfterInlineAttach, "#root", inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_hover.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_hover.js
new file mode 100644
index 0000000000..c386e26d6d
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_hover.js
@@ -0,0 +1,78 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Bug 1465873
+// Tests that hovering nodes in the content page with the element picked and finally
+// picking one does not break the markup view. The markup and sequence used here is a bit
+// eccentric but the issue from Bug 1465873 is tricky to reproduce.
+
+const TEST_URL =
+ `data:text/html;charset=utf-8,` +
+ encodeURIComponent(`
+ <test-component id="component1" background>
+ <div slot="slot1" data-index="1">slot1-1</div>
+ </test-component>
+ <script>
+ (function() {
+ 'use strict';
+
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super(); // always call super() first in the ctor.
+
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = \`
+ <div id="wrapper" style="padding-top: 20px;">
+ a<span class="pick-target">pick-target</span>
+ <div id="slot1-container">
+ <slot id="slot1" name="slot1"></slot>
+ </div>
+ </div>
+ \`;
+ }
+ });
+ })();
+ </script>`);
+
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+
+ info("Waiting for element picker to become active.");
+ await startPicker(toolbox);
+
+ info("Move mouse over the padding of the test-component");
+ await hoverElement(inspector, "test-component", 10, 10);
+
+ info("Move mouse over the pick-target");
+ // Note we can't reach pick-target with a selector because this element lives in the
+ // shadow-dom of test-component. We aim for PADDING + 5 pixels
+ await hoverElement(inspector, "test-component", 10, 25);
+
+ info("Click and pick the pick-target");
+ await pickElement(inspector, "test-component", 10, 25);
+
+ info(
+ "Check that the markup view has the expected content after using the picker"
+ );
+ const tree = `
+ test-component
+ #shadow-root
+ wrapper
+ a
+ pick-target
+ slot1-container
+ slot1
+ div!slotted
+ div`;
+ await assertMarkupViewAsTree(tree, "test-component", inspector);
+
+ const hostFront = await getNodeFront("test-component", inspector);
+ const hostContainer = inspector.markup.getContainer(hostFront);
+ const moreNodesLink = hostContainer.elt.querySelector(".more-nodes");
+ ok(
+ !moreNodesLink,
+ "There is no 'more nodes' button displayed in the host container"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_marker_and_before_pseudos.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_marker_and_before_pseudos.js
new file mode 100644
index 0000000000..4462671354
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_marker_and_before_pseudos.js
@@ -0,0 +1,117 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+requestLongerTimeout(1);
+
+// Test a few static pages using webcomponents with ::marker and ::before
+// pseudos and check that they are displayed as expected in the markup view.
+
+const TEST_DATA = [
+ {
+ // Test that ::before on an empty shadow host is displayed when the host
+ // has a ::marker.
+ title: "::before after ::marker, empty node",
+ url: `data:text/html;charset=utf-8,
+ <style>
+ test-component { display: list-item; }
+ test-component::before { content: "before-host" }
+ </style>
+
+ <test-component></test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ }
+ });
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root
+ ::marker
+ ::before`,
+ },
+ {
+ // Test ::before on a shadow host with content is displayed when the host
+ // has a ::marker.
+ title: "::before after ::marker, non-empty node",
+ url: `data:text/html;charset=utf-8,
+ <style>
+ test-component { display: list-item }
+ test-component::before { content: "before-host" }
+ </style>
+
+ <test-component>
+ <div class="light-dom"></div>
+ </test-component>
+
+ <script>
+ "use strict";
+ customElements.define("test-component", class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ shadowRoot.innerHTML = "<slot>default content</slot>";
+ }
+ });
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root
+ slot
+ div!slotted
+ default content
+ ::marker
+ ::before
+ class="light-dom"`,
+ },
+ {
+ // Test just ::marker on a shadow host
+ title: "just ::marker, no ::before",
+ url: `data:text/html;charset=utf-8,
+ <style>
+ test-component { display: list-item }
+ </style>
+
+ <test-component></test-component>
+
+ <script>
+ "use strict";
+ customElements.define("test-component", class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "#MODE#"});
+ }
+ });
+ </script>`,
+ tree: `
+ test-component
+ #shadow-root
+ ::marker`,
+ },
+];
+
+for (const { url, tree, title } of TEST_DATA) {
+ // Test each configuration in both open and closed modes
+ add_task(async function () {
+ info(`Testing: [${title}] in OPEN mode`);
+ const { inspector, tab } = await openInspectorForURL(
+ url.replace(/#MODE#/g, "open")
+ );
+ await assertMarkupViewAsTree(tree, "test-component", inspector);
+ await removeTab(tab);
+ });
+ add_task(async function () {
+ info(`Testing: [${title}] in CLOSED mode`);
+ const { inspector, tab } = await openInspectorForURL(
+ url.replace(/#MODE#/g, "closed")
+ );
+ await assertMarkupViewAsTree(tree, "test-component", inspector);
+ await removeTab(tab);
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_maxchildren.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_maxchildren.js
new file mode 100644
index 0000000000..5b0f359cee
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_maxchildren.js
@@ -0,0 +1,122 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the markup view properly displays the "more nodes" button both for host
+// elements and for slot elements.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+<test-component>
+ <div>node 1</div><div>node 2</div><div>node 3</div>
+ <div>node 4</div><div>node 5</div><div>node 6</div>
+</test-component>
+
+<script>
+ "use strict";
+ customElements.define("test-component", class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "open"});
+ shadowRoot.innerHTML = "<slot>some default content</slot>";
+ }
+ connectedCallback() {}
+ disconnectedCallback() {}
+ });
+</script>`;
+
+const MAX_CHILDREN = 5;
+
+add_task(async function () {
+ await pushPref("devtools.markup.pagesize", MAX_CHILDREN);
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ // <test-component> is a shadow host.
+ info("Find and expand the test-component shadow DOM host.");
+ const hostFront = await getNodeFront("test-component", inspector);
+ await inspector.markup.expandNode(hostFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ info(
+ "Test that expanding a shadow host shows shadow root and direct host children."
+ );
+ const { markup } = inspector;
+ const hostContainer = markup.getContainer(hostFront);
+ let childContainers = hostContainer.getChildContainers();
+
+ is(
+ childContainers.length,
+ MAX_CHILDREN,
+ "Expecting 5 children: shadowroot, 4 host children"
+ );
+ assertContainerHasText(childContainers[0], "#shadow-root");
+ for (let i = 1; i < 5; i++) {
+ assertContainerHasText(childContainers[i], "div");
+ assertContainerHasText(childContainers[i], "node " + i);
+ }
+
+ info("Click on the more nodes button under the host element");
+ let moreNodesLink = hostContainer.elt.querySelector(".more-nodes");
+ ok(
+ !!moreNodesLink,
+ "A 'more nodes' button is displayed in the host container"
+ );
+ moreNodesLink.querySelector("button").click();
+ await inspector.markup._waitForChildren();
+
+ childContainers = hostContainer.getChildContainers();
+ is(childContainers.length, 7, "Expecting one additional host child");
+ assertContainerHasText(childContainers[6], "div");
+ assertContainerHasText(childContainers[6], "node 6");
+
+ info("Expand the shadow root");
+ const shadowRootContainer = childContainers[0];
+ const shadowRootFront = shadowRootContainer.node;
+ await inspector.markup.expandNode(shadowRootFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ const shadowChildContainers = shadowRootContainer.getChildContainers();
+ is(shadowChildContainers.length, 1, "Expecting 1 slot child");
+ assertContainerHasText(shadowChildContainers[0], "slot");
+
+ info("Expand the slot");
+ const slotContainer = shadowChildContainers[0];
+ const slotFront = slotContainer.node;
+ await inspector.markup.expandNode(slotFront);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ let slotChildContainers = slotContainer.getChildContainers();
+ is(slotChildContainers.length, MAX_CHILDREN, "Expecting 5 slotted children");
+ for (const slotChildContainer of slotChildContainers) {
+ assertContainerHasText(slotChildContainer, "div");
+ ok(
+ slotChildContainer.elt.querySelector(".reveal-link"),
+ "Slotted container has a reveal link element"
+ );
+ }
+
+ info("Click on the more nodes button under the slot element");
+ moreNodesLink = slotContainer.elt.querySelector(".more-nodes");
+ ok(
+ !!moreNodesLink,
+ "A 'more nodes' button is displayed in the host container"
+ );
+ EventUtils.sendMouseEvent(
+ { type: "click" },
+ moreNodesLink.querySelector("button")
+ );
+ await inspector.markup._waitForChildren();
+
+ slotChildContainers = slotContainer.getChildContainers();
+ is(
+ slotChildContainers.length,
+ 7,
+ "Expecting one additional slotted element and fallback"
+ );
+ assertContainerHasText(slotChildContainers[5], "div");
+ ok(
+ slotChildContainers[5].elt.querySelector(".reveal-link"),
+ "Slotted container has a reveal link element"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_mutations_shadow.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_mutations_shadow.js
new file mode 100644
index 0000000000..5e8a967c27
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_mutations_shadow.js
@@ -0,0 +1,85 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the markup view is correctly updated when elements under a shadow root are
+// deleted or updated.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <test-component>
+ <div slot="slot1" id="el1">slot1-1</div>
+ <div slot="slot1" id="el2">slot1-2</div>
+ </test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = \`<div id="slot1-container">
+ <slot name="slot1"></slot>
+ </div>
+ <div id="another-div"></div>\`;
+ }
+ });
+ </script>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ const tree = `
+ test-component
+ #shadow-root
+ slot1-container
+ slot
+ div!slotted
+ div!slotted
+ another-div
+ div
+ div`;
+ await assertMarkupViewAsTree(tree, "test-component", inspector);
+
+ info("Delete a shadow dom element and check the updated markup view");
+ let mutated = waitForMutation(inspector, "childList");
+ SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () {
+ const shadowRoot =
+ content.document.querySelector("test-component").shadowRoot;
+ const slotContainer = shadowRoot.getElementById("slot1-container");
+ slotContainer.remove();
+ });
+ await mutated;
+
+ const treeAfterDelete = `
+ test-component
+ #shadow-root
+ another-div
+ div
+ div`;
+ await assertMarkupViewAsTree(treeAfterDelete, "test-component", inspector);
+
+ mutated = inspector.once("markupmutation");
+ SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () {
+ const shadowRoot =
+ content.document.querySelector("test-component").shadowRoot;
+ const shadowDiv = shadowRoot.getElementById("another-div");
+ shadowDiv.setAttribute("random-attribute", "1");
+ });
+ await mutated;
+
+ info(
+ "Add an attribute on a shadow dom element and check the updated markup view"
+ );
+ const treeAfterAttrChange = `
+ test-component
+ #shadow-root
+ random-attribute
+ div
+ div`;
+ await assertMarkupViewAsTree(
+ treeAfterAttrChange,
+ "test-component",
+ inspector
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_navigation.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_navigation.js
new file mode 100644
index 0000000000..ece16815ad
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_navigation.js
@@ -0,0 +1,97 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the markup-view navigation works correctly with shadow dom slotted nodes.
+// Each slotted nodes has two containers representing the same node front in the markup
+// view, we need to make sure that navigating to the slotted version selects the slotted
+// container, and navigating to the non-slotted element selects the non-slotted container.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <test-component class="test-component">
+ <div slot="slot1" class="slotted1"><div class="slot1-child">slot1-1</div></div>
+ <div slot="slot1" class="slotted2">slot1-2</div>
+ </test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot class="slot1" name="slot1"></slot>';
+ }
+ });
+ </script>`;
+
+const TEST_DATA = [
+ ["KEY_PageUp", "html"],
+ ["KEY_ArrowDown", "head"],
+ ["KEY_ArrowDown", "body"],
+ ["KEY_ArrowDown", "test-component"],
+ ["KEY_ArrowRight", "test-component"],
+ ["KEY_ArrowDown", "shadow-root"],
+ ["KEY_ArrowRight", "shadow-root"],
+ ["KEY_ArrowDown", "slot1"],
+ ["KEY_ArrowRight", "slot1"],
+ ["KEY_ArrowDown", "div", "slotted1"],
+ ["KEY_ArrowDown", "div", "slotted2"],
+ ["KEY_ArrowDown", "slotted1"],
+ ["KEY_ArrowRight", "slotted1"],
+ ["KEY_ArrowDown", "slot1-child"],
+ ["KEY_ArrowDown", "slotted2"],
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Making sure the markup-view frame is focused");
+ inspector.markup._frame.focus();
+
+ info("Starting to iterate through the test data");
+ for (const [key, expected, slottedClassName] of TEST_DATA) {
+ info("Testing step: " + key + " to navigate to " + expected);
+ EventUtils.synthesizeKey(key);
+
+ info("Making sure markup-view children get updated");
+ await waitForChildrenUpdated(inspector);
+
+ info("Checking the right node is selected");
+ checkSelectedNode(key, expected, slottedClassName, inspector);
+ }
+
+ // Same as in browser_markup_navigation.js, use a single catch-call event listener.
+ await inspector.once("inspector-updated");
+});
+
+function checkSelectedNode(key, expected, slottedClassName, inspector) {
+ const selectedContainer = inspector.markup.getSelectedContainer();
+ const slotted = !!slottedClassName;
+
+ is(
+ selectedContainer.isSlotted(),
+ slotted,
+ `Selected container is ${slotted ? "slotted" : "not slotted"} as expected`
+ );
+ is(
+ inspector.selection.isSlotted(),
+ slotted,
+ `Inspector selection is also ${slotted ? "slotted" : "not slotted"}`
+ );
+ ok(
+ selectedContainer.elt.textContent.includes(expected),
+ "Found expected content: " +
+ expected +
+ " in container after pressing " +
+ key
+ );
+
+ if (slotted) {
+ is(
+ selectedContainer.node.className,
+ slottedClassName,
+ "Slotted has the expected classname " + slottedClassName
+ );
+ }
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_nested_pick_inspect.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_nested_pick_inspect.js
new file mode 100644
index 0000000000..ee7fde1584
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_nested_pick_inspect.js
@@ -0,0 +1,132 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the markup view is correctly expanded when inspecting an element nested
+// in several shadow roots:
+// - when using the context-menu "Inspect element"
+// - when using the element picker
+
+const TEST_URL =
+ `data:text/html;charset=utf-8,` +
+ encodeURIComponent(`
+ <test-outer></test-outer>
+ <script>
+ (function() {
+ 'use strict';
+
+ function defineComponent(name, html) {
+ customElements.define(name, class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = html;
+ }
+ });
+ }
+
+ defineComponent('test-outer', \`
+ <test-inner>
+ <test-image></test-image>
+ </test-inner>\`);
+
+ defineComponent('test-inner', \`
+ <div>
+ <div>
+ <div>
+ <slot></slot>
+ </div>
+ </div>
+ </div>\`);
+
+ defineComponent('test-image',
+ \`<div style="display:block; height: 200px; width: 100%; background:red"></div>\`);
+ })();
+ </script>`);
+
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+
+ info("Waiting for element picker to become active");
+ await startPicker(toolbox);
+ info("Click and pick the pick-target");
+ await pickElement(inspector, "test-outer", 10, 10);
+ info("Check that the markup view is displayed as expected");
+ await assertMarkupView(inspector);
+
+ info("Close DevTools before testing Inspect Element");
+ await toolbox.destroy();
+
+ info("Click on Inspect Element for our test-image <div>");
+ // Note: we click on test-outer, because we can't find the <div> using a simple
+ // querySelector. However the click is simulated in the middle of the <test-outer>
+ // component, and will always hit the test <div> which takes all the space.
+ const newInspector = await clickOnInspectMenuItem("test-outer");
+ info("Check again that the markup view is displayed as expected");
+ await assertMarkupView(newInspector);
+});
+
+async function assertMarkupView(inspector) {
+ const outerFront = await getNodeFront("test-outer", inspector);
+ const outerContainer = inspector.markup.getContainer(outerFront);
+ assertContainer(outerContainer, {
+ expanded: true,
+ text: "test-outer",
+ children: 1,
+ });
+
+ const outerShadowContainer = outerContainer.getChildContainers()[0];
+ assertContainer(outerShadowContainer, {
+ expanded: true,
+ text: "#shadow-root",
+ children: 1,
+ });
+
+ const innerContainer = outerShadowContainer.getChildContainers()[0];
+ assertContainer(innerContainer, {
+ expanded: true,
+ text: "test-inner",
+ children: 2,
+ });
+
+ const innerShadowContainer = innerContainer.getChildContainers()[0];
+ const imageContainer = innerContainer.getChildContainers()[1];
+ assertContainer(innerShadowContainer, {
+ expanded: false,
+ text: "#shadow-root",
+ });
+ assertContainer(imageContainer, {
+ expanded: true,
+ text: "test-image",
+ children: 1,
+ });
+
+ const imageShadowContainer = imageContainer.getChildContainers()[0];
+ assertContainer(imageShadowContainer, {
+ expanded: true,
+ text: "#shadow-root",
+ children: 1,
+ });
+
+ const redDivContainer = imageShadowContainer.getChildContainers()[0];
+ assertContainer(redDivContainer, { expanded: false, text: "div" });
+ is(redDivContainer.selected, true, "Div element is selected as expected");
+}
+
+/**
+ * Check if the provided markup container is expanded, has the expected text and the
+ * expected number of children.
+ */
+function assertContainer(container, { expanded, text, children }) {
+ is(container.expanded, expanded, "Container is expanded");
+ assertContainerHasText(container, text);
+ if (expanded) {
+ const childContainers = container.getChildContainers();
+ is(
+ childContainers.length,
+ children,
+ "Container has expected number of children"
+ );
+ }
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_noslot.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_noslot.js
new file mode 100644
index 0000000000..4c4a9c2e90
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_noslot.js
@@ -0,0 +1,107 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the markup view is correctly displayed when a component has children but no
+// slots are available under the shadow root.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <style>
+ .has-before::before { content: "before-content" }
+ </style>
+
+ <div class="root">
+ <no-slot-component>
+ <div class="not-nested">light</div>
+ <div class="nested">
+ <div class="has-before"></div>
+ <div>dummy for Bug 1441863</div>
+ </div>
+ </no-slot-component>
+ <slot-component>
+ <div class="not-nested">light</div>
+ <div class="nested">
+ <div class="has-before"></div>
+ </div>
+ </slot-component>
+ </div>
+
+ <script>
+ 'use strict';
+ customElements.define('no-slot-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<div class="no-slot-div"></div>';
+ }
+ });
+ customElements.define('slot-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot></slot>';
+ }
+ });
+ </script>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ // We expect that host children are correctly displayed when no slots are defined.
+ const beforeTree = `
+ class="root"
+ no-slot-component
+ #shadow-root
+ no-slot-div
+ class="not-nested"
+ class="nested"
+ class="has-before"
+ dummy for Bug 1441863
+ slot-component
+ #shadow-root
+ slot
+ div!slotted
+ div!slotted
+ class="not-nested"
+ class="nested"
+ class="has-before"
+ ::before`;
+ await assertMarkupViewAsTree(beforeTree, ".root", inspector);
+
+ info(
+ "Move the non-slotted element with class has-before and check the pseudo appears"
+ );
+ const mutated = waitForNMutations(inspector, "childList", 3);
+ SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () {
+ const root = content.document.querySelector(".root");
+ const hasBeforeEl = content.document.querySelector(
+ "no-slot-component .has-before"
+ );
+ root.appendChild(hasBeforeEl);
+ });
+ await mutated;
+
+ // As the non-slotted has-before is moved into the tree, the before pseudo is expected
+ // to appear.
+ const afterTree = `
+ class="root"
+ no-slot-component
+ #shadow-root
+ no-slot-div
+ class="not-nested"
+ class="nested"
+ dummy for Bug 1441863
+ slot-component
+ #shadow-root
+ slot
+ div!slotted
+ div!slotted
+ class="not-nested"
+ class="nested"
+ class="has-before"
+ ::before
+ class="has-before"
+ ::before`;
+ await assertMarkupViewAsTree(afterTree, ".root", inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger.js
new file mode 100644
index 0000000000..2b7e670eb0
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger.js
@@ -0,0 +1,133 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that markup view displays a "custom" badge for custom elements.
+// Test that the context menu also has a menu item to show the custom element definition.
+// Test that clicking on any of those opens the debugger.
+// Test that the markup view is correctly updated to show those items if the custom
+// element definition happens after opening the inspector.
+
+Services.scriptloader.loadSubScript(
+ "chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/shared-head.js",
+ this
+);
+
+const TEST_URL =
+ `data:text/html;charset=utf-8,` +
+ encodeURIComponent(`
+<test-component></test-component>
+<other-component>some-content</other-component>
+
+<script>
+ "use strict";
+ window.attachTestComponent = function() {
+ customElements.define("test-component", class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: "open"});
+ shadowRoot.innerHTML = "<slot>some default content</slot>";
+ }
+ connectedCallback() {}
+ disconnectedCallback() {}
+ });
+ }
+
+ window.defineOtherComponent = function() {
+ customElements.define('other-component', class extends HTMLParagraphElement {
+ constructor() {
+ super();
+ }
+ }, { extends: 'p' });
+ }
+</script>`);
+
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+
+ // Test with an element to which we attach a shadow.
+ await runTest(inspector, toolbox, "test-component", "attachTestComponent");
+
+ // Test with an element to which we only add a custom element definition.
+ await runTest(inspector, toolbox, "other-component", "defineOtherComponent");
+});
+
+async function runTest(inspector, toolbox, selector, contentMethod) {
+ // Test element is a regular element (no shadow root or custom element definition).
+ info(`Select <${selector}>.`);
+ await selectNode(selector, inspector);
+ const testFront = await getNodeFront(selector, inspector);
+ const testContainer = inspector.markup.getContainer(testFront);
+ let customBadge = testContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-custom]"
+ );
+
+ // Verify that the "custom" badge and menu item are hidden.
+ ok(!customBadge, "[custom] badge is hidden");
+ let menuItem = getMenuItem("node-menu-jumptodefinition", inspector);
+ ok(
+ !menuItem,
+ selector + ": The menu item was not found in the contextual menu"
+ );
+
+ info(
+ "Call the content method that should attach a custom element definition"
+ );
+ const mutated = waitForMutation(inspector, "customElementDefined");
+ SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [{ contentMethod }],
+ function (args) {
+ content.wrappedJSObject[args.contentMethod]();
+ }
+ );
+ await mutated;
+
+ // Test element should now have a custom element definition.
+
+ // Check that the badge opens the debugger.
+ customBadge = testContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-custom]"
+ );
+ ok(customBadge, "[custom] badge is visible");
+
+ info("Click on the `custom` badge and verify that the debugger opens.");
+ let onDebuggerReady = toolbox.getPanelWhenReady("jsdebugger");
+ customBadge.click();
+ await onDebuggerReady;
+
+ const debuggerContext = createDebuggerContext(toolbox);
+ await waitUntilDebuggerReady(debuggerContext);
+
+ info("Switch to the inspector");
+ await toolbox.selectTool("inspector");
+
+ // Check that the menu item also opens the debugger.
+ menuItem = getMenuItem("node-menu-jumptodefinition", inspector);
+ ok(menuItem, selector + ": The menu item was found in the contextual menu");
+ ok(!menuItem.disabled, selector + ": The menu item is not disabled");
+
+ info("Click on `Jump to Definition` and verify that the debugger opens.");
+ onDebuggerReady = toolbox.getPanelWhenReady("jsdebugger");
+ menuItem.click();
+ await onDebuggerReady;
+
+ await waitUntilDebuggerReady(debuggerContext);
+
+ info("Switch to the inspector");
+ await toolbox.selectTool("inspector");
+}
+
+function getMenuItem(id, inspector) {
+ const allMenuItems = openContextMenuAndGetAllItems(inspector);
+ return allMenuItems.find(i => i.id === "node-menu-jumptodefinition");
+}
+
+async function waitUntilDebuggerReady(debuggerContext) {
+ info("Wait until source is loaded in the debugger");
+
+ // We have to wait until the debugger has fully loaded the source otherwise
+ // we will get unhandled promise rejections.
+ await waitForLoadedSource(debuggerContext, TEST_URL);
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger_pretty_printed.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger_pretty_printed.js
new file mode 100644
index 0000000000..30d1f0748b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_open_debugger_pretty_printed.js
@@ -0,0 +1,53 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that clicking on the "custom" badge opens the debugger to the pretty-printed
+// custom element definition.
+
+Services.scriptloader.loadSubScript(
+ "chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/shared-head.js",
+ this
+);
+
+const TEST_URL =
+ URL_ROOT + "doc_markup_shadowdom_open_debugger_pretty_printed.html";
+
+add_task(async function () {
+ info("Open inspector.");
+ await clearDebuggerPreferences();
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+
+ await selectNode("test-component", inspector);
+ const testFront = await getNodeFront("test-component", inspector);
+
+ const testContainer = inspector.markup.getContainer(testFront);
+ const customBadge = testContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-custom]"
+ );
+
+ info("Click custom badge.");
+ customBadge.click();
+
+ await toolbox.getPanelWhenReady("jsdebugger");
+ const dbg = createDebuggerContext(toolbox);
+
+ await waitForSelectedSource(dbg, "shadowdom_open_debugger.min.js");
+ await waitForSelectedLocation(dbg, 1);
+
+ info("Pretty-print source.");
+ clickElement(dbg, "prettyPrintButton");
+ await waitForSelectedSource(dbg, "shadowdom_open_debugger.min.js:formatted");
+ info("Switch back to the original source.");
+ await selectSource(dbg, "shadowdom_open_debugger.min.js");
+
+ info("Return to inspector.");
+ await toolbox.selectTool("inspector");
+
+ info("Click custom badge again.");
+ customBadge.click();
+
+ await waitForSelectedSource(dbg, "shadowdom_open_debugger.min.js:formatted");
+ await waitForSelectedLocation(dbg, 5);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_shadowroot_mode.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_shadowroot_mode.js
new file mode 100644
index 0000000000..fb98b7cb35
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_shadowroot_mode.js
@@ -0,0 +1,52 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the shadow root mode is displayed properly
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <closed-component></closed-component>
+ <open-component></open-component>
+
+ <script>
+ 'use strict';
+
+ customElements.define("closed-component", class extends HTMLElement {
+ constructor() {
+ super();
+ this.attachShadow({mode: "closed"});
+ }
+ });
+
+ customElements.define("open-component", class extends HTMLElement {
+ constructor() {
+ super();
+ this.attachShadow({ mode: "open" });
+ }
+ });
+ </script>
+`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+
+ info("Find and expand the closed-component shadow DOM host.");
+ const closedHostFront = await getNodeFront("closed-component", inspector);
+ const closedHostContainer = markup.getContainer(closedHostFront);
+ await expandContainer(inspector, closedHostContainer);
+
+ info("Check the shadow root mode");
+ const closedShadowRootContainer = closedHostContainer.getChildContainers()[0];
+ assertContainerHasText(closedShadowRootContainer, "#shadow-root (closed)");
+
+ info("Find and expand the open-component shadow DOM host.");
+ const openHostFront = await getNodeFront("open-component", inspector);
+ const openHostContainer = markup.getContainer(openHostFront);
+ await expandContainer(inspector, openHostContainer);
+
+ info("Check the shadow root mode");
+ const openShadowRootContainer = openHostContainer.getChildContainers()[0];
+ assertContainerHasText(openShadowRootContainer, "#shadow-root (open)");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_show_nodes_button.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_show_nodes_button.js
new file mode 100644
index 0000000000..54685bc470
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_show_nodes_button.js
@@ -0,0 +1,51 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the "Show all 'N' nodes" button displays the proper value
+
+const NODE_COUNT = 101;
+const TEST_URL = `data:text/html;charset=utf-8,
+ <test-component>
+ </test-component>
+
+ <script>
+ 'use strict';
+ for (let i = 0; i < ${NODE_COUNT}; i++) {
+ const div = document.createElement("div");
+ div.innerHTML = i;
+ document.querySelector('test-component').appendChild(div);
+ }
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot></slot>';
+ }
+ });
+ </script>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+
+ info("Find and expand the component shadow DOM host.");
+ const hostFront = await getNodeFront("test-component", inspector);
+ const hostContainer = markup.getContainer(hostFront);
+ await expandContainer(inspector, hostContainer);
+ const shadowRootContainer = hostContainer.getChildContainers()[0];
+ await expandContainer(inspector, shadowRootContainer);
+
+ info("Expand the slot");
+ const slotContainer = shadowRootContainer.getChildContainers()[0];
+ await expandContainer(inspector, slotContainer);
+
+ info("Find the 'Show all nodes' button");
+ const button = slotContainer.elt.querySelector("button");
+ console.log(button);
+ ok(
+ button.innerText.includes(NODE_COUNT),
+ "'Show all nodes' button contains correct node count"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_slotted_keyboard_focus.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_slotted_keyboard_focus.js
new file mode 100644
index 0000000000..86ee603f56
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_slotted_keyboard_focus.js
@@ -0,0 +1,71 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that cycling focus with keyboard (via TAB key) in slotted nodes works.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <test-component>
+ <div slot="slot1" id="el1">slot1-1</div>
+ </test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot name="slot1"></slot>';
+ }
+ });
+ </script>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+ const win = inspector.markup.doc.defaultView;
+
+ info("Find and expand the test-component shadow DOM host.");
+ const hostFront = await getNodeFront("test-component", inspector);
+ const hostContainer = markup.getContainer(hostFront);
+ await expandContainer(inspector, hostContainer);
+
+ info("Expand the shadow root");
+ const shadowRootContainer = hostContainer.getChildContainers()[0];
+ await expandContainer(inspector, shadowRootContainer);
+
+ info("Expand the slot");
+ const slotContainer = shadowRootContainer.getChildContainers()[0];
+ await expandContainer(inspector, slotContainer);
+
+ info("Select the slotted container for the element");
+ const node = slotContainer.getChildContainers()[0].node;
+ const container = inspector.markup.getContainer(node, true);
+ await selectNode(node, inspector, "no-reason", true);
+
+ const root = inspector.markup.getContainer(inspector.markup._rootNode);
+ root.elt.focus();
+ const tagSpan = container.elt.querySelector(".tag");
+ const revealLink = container.elt.querySelector(".reveal-link");
+
+ info("Hit Enter to focus on the first element");
+ let tagFocused = once(tagSpan, "focus");
+ EventUtils.synthesizeAndWaitKey("KEY_Enter", {}, win);
+ await tagFocused;
+
+ info("Hit Tab to focus on the next element");
+ const linkFocused = once(revealLink, "focus");
+ EventUtils.synthesizeKey("KEY_Tab", {}, win);
+ await linkFocused;
+
+ info("Hit Tab again to cycle focus to the first element");
+ tagFocused = once(tagSpan, "focus");
+ EventUtils.synthesizeKey("KEY_Tab", {}, win);
+ await tagFocused;
+
+ ok(
+ inspector.markup.doc.activeElement === tagSpan,
+ "Focus has gone back to first element"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_slotupdate.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_slotupdate.js
new file mode 100644
index 0000000000..c8f6d029cb
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_slotupdate.js
@@ -0,0 +1,68 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that slotted elements are correctly updated when the slot attribute is modified
+// on already slotted elements.
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <test-component>
+ <div slot="slot1">slot1-1</div>
+ <div slot="slot1">slot1-2</div>
+ <div slot="slot2" id="to-update">slot2-1</div>
+ <div slot="slot2">slot2-2</div>
+ </test-component>
+
+ <script>
+ 'use strict';
+ customElements.define('test-component', class extends HTMLElement {
+ constructor() {
+ super();
+ let shadowRoot = this.attachShadow({mode: 'open'});
+ shadowRoot.innerHTML = '<slot name="slot1"></slot><slot name="slot2"></slot>';
+ }
+ });
+ </script>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ const tree = `
+ test-component
+ #shadow-root
+ name="slot1"
+ div!slotted
+ div!slotted
+ name="slot2"
+ div!slotted
+ div!slotted
+ slot1-1
+ slot1-2
+ slot2-1
+ slot2-2`;
+ await assertMarkupViewAsTree(tree, "test-component", inspector);
+
+ info("Listening for the markupmutation event");
+ const mutated = inspector.once("markupmutation");
+ SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () {
+ content.document.getElementById("to-update").setAttribute("slot", "slot1");
+ });
+ await mutated;
+
+ // After mutation we expect slot1 to have one more slotted node, and slot2 one less.
+ const mutatedTree = `
+ test-component
+ #shadow-root
+ name="slot1"
+ div!slotted
+ div!slotted
+ div!slotted
+ name="slot2"
+ div!slotted
+ slot1-1
+ slot1-2
+ slot2-1
+ slot2-2`;
+ await assertMarkupViewAsTree(mutatedTree, "test-component", inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets.js
new file mode 100644
index 0000000000..d4acaf1380
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets.js
@@ -0,0 +1,104 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <video id="with-children" controls>
+ <div>some content</div>
+ </video>
+ <video id="no-children" controls></video>`;
+
+add_task(async function () {
+ info("Test a <video> element with no children, showAllAnonymousContent=true");
+ const { inspector, markup } = await setup({ showAllAnonymousContent: true });
+
+ info("Find the #no-children element.");
+ const hostFront = await getNodeFront("#no-children", inspector);
+ const hostContainer = markup.getContainer(hostFront);
+ ok(
+ hostContainer.canExpand,
+ "<video controls/> has children in the markup view"
+ );
+
+ info("Expand the <video> element");
+ await expandContainer(inspector, hostContainer);
+ is(hostContainer.getChildContainers().length, 3, "video has 3 children");
+
+ const shadowRootContainer = hostContainer.getChildContainers()[0];
+ assertContainerHasText(shadowRootContainer, "#shadow-root");
+});
+
+add_task(async function () {
+ info("Test a <video> element with children, showAllAnonymousContent=true");
+ const { inspector, markup } = await setup({ showAllAnonymousContent: true });
+
+ info("Find the #with-children element.");
+ const hostFront = await getNodeFront("#with-children", inspector);
+ const hostContainer = markup.getContainer(hostFront);
+ ok(
+ hostContainer.canExpand,
+ "<video controls/> has children in the markup view"
+ );
+
+ info("Expand the <video> element");
+ await expandContainer(inspector, hostContainer);
+ is(hostContainer.getChildContainers().length, 4, "video has 4 children");
+
+ const shadowRootContainer = hostContainer.getChildContainers()[0];
+ assertContainerHasText(shadowRootContainer, "#shadow-root");
+
+ const divContainer = hostContainer.getChildContainers()[1];
+ assertContainerHasText(divContainer, "some content");
+});
+
+add_task(async function () {
+ info(
+ "Test a <video> element with no children, showAllAnonymousContent=false"
+ );
+ const { inspector, markup } = await setup({
+ showAllAnonymousContent: false,
+ });
+
+ info("Find the #no-children element.");
+ const hostFront = await getNodeFront("#no-children", inspector);
+ const hostContainer = markup.getContainer(hostFront);
+ ok(!hostContainer.getChildContainers(), "video has no children");
+ ok(
+ !hostContainer.canExpand,
+ "<video controls/> shows no children in the markup view"
+ );
+});
+
+add_task(async function () {
+ info("Test a <video> element with children, showAllAnonymousContent=false");
+ const { inspector, markup } = await setup({
+ showAllAnonymousContent: false,
+ });
+
+ info("Find the #with-children element.");
+ const hostFront = await getNodeFront("#with-children", inspector);
+ const hostContainer = markup.getContainer(hostFront);
+ ok(
+ hostContainer.canExpand,
+ "<video controls/> has children in the markup view"
+ );
+
+ info("Expand the <video> element");
+ await expandContainer(inspector, hostContainer);
+ is(hostContainer.getChildContainers().length, 1, "video has 1 child");
+
+ const divContainer = hostContainer.getChildContainers()[0];
+ assertContainerHasText(divContainer, "some content");
+});
+
+async function setup({ showAllAnonymousContent }) {
+ await pushPref(
+ "devtools.inspector.showAllAnonymousContent",
+ showAllAnonymousContent
+ );
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+ return { inspector, markup };
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets_with_nac.js b/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets_with_nac.js
new file mode 100644
index 0000000000..a49618e0df
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_shadowdom_ua_widgets_with_nac.js
@@ -0,0 +1,70 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const TEST_URL =
+ `data:text/html;charset=utf-8,` +
+ encodeURIComponent(`
+ <video id="video-with-subtitles" style="border: 4px solid red">
+ <track label="en" kind="subtitles" srclang="en" src="data:text/vtt,WEBVTT" default>
+ </video>`);
+
+const TEST_ID = "#video-with-subtitles";
+
+// Test that Inspector can show Native Anonymous Content (nac) in user agent widgets, as
+// siblings of the ua widget closed shadow-root.
+add_task(async function testMarkupView() {
+ info(
+ "Test a <video> element with subtitles, expect to see native anonymous content"
+ );
+ const { inspector } = await setup();
+
+ // We should only see the shadow root, the <track> and two NAC elements <img> and <div>.
+ const tree = `
+ video
+ #shadow-root!ignore-children
+ track
+ img
+ class="caption-box"`;
+ await assertMarkupViewAsTree(tree, TEST_ID, inspector);
+});
+
+add_task(async function testElementPicker() {
+ const { inspector, markup, toolbox } = await setup();
+
+ info("Waiting for element picker to become active.");
+ await startPicker(toolbox);
+
+ info("Move mouse over the video element and pick");
+ await hoverElement(inspector, TEST_ID, 50, 50);
+ await pickElement(inspector, TEST_ID, 50, 50);
+
+ info(
+ "Check that the markup view has the expected content after using the picker"
+ );
+ const tree = `
+ body
+ video
+ #shadow-root!ignore-children
+ track
+ img
+ class="caption-box"`;
+ // We are checking body here, because initially the picker bug fixed here was replacing
+ // all the children of the body.
+ await assertMarkupViewAsTree(tree, "body", inspector);
+
+ const moreNodesLink = markup.doc.querySelector(".more-nodes");
+ ok(
+ !moreNodesLink,
+ "There is no 'more nodes' button displayed in the markup view"
+ );
+});
+
+async function setup() {
+ await pushPref("devtools.inspector.showAllAnonymousContent", true);
+
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+ return { inspector, markup, toolbox };
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_subgrid_display_badge.js b/devtools/client/inspector/markup/test/browser_markup_subgrid_display_badge.js
new file mode 100644
index 0000000000..0118e5ae33
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_subgrid_display_badge.js
@@ -0,0 +1,78 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const TEST_URL = URL_ROOT + "doc_markup_subgrid.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { highlighters, store } = inspector;
+
+ info("Check the subgrid display badge is shown and not active.");
+ await selectNode("main", inspector);
+ const eltContainer = await getContainerForSelector("main", inspector);
+ const subgridDisplayBadge = eltContainer.elt.querySelector(
+ ".inspector-badge.interactive[data-display]"
+ );
+ ok(
+ !subgridDisplayBadge.classList.contains("active"),
+ "subgrid display badge is not active."
+ );
+ ok(
+ subgridDisplayBadge.classList.contains("interactive"),
+ "subgrid display badge is interactive."
+ );
+
+ info("Check the initial state of the grid highlighter.");
+ ok(
+ !highlighters.gridHighlighters.size,
+ "No CSS grid highlighter exists in the highlighters overlay."
+ );
+
+ info("Toggling ON the CSS grid highlighter from the subgrid display badge.");
+ const onHighlighterShown = highlighters.once("grid-highlighter-shown");
+ let onCheckboxChange = waitUntilState(
+ store,
+ state => state.grids.length === 2 && state.grids[1].highlighted
+ );
+ subgridDisplayBadge.click();
+ await onHighlighterShown;
+ await onCheckboxChange;
+
+ info(
+ "Check that the CSS grid highlighter is created and the display badge state."
+ );
+ is(
+ highlighters.gridHighlighters.size,
+ 1,
+ "CSS grid highlighter is created in the highlighters overlay."
+ );
+ ok(
+ subgridDisplayBadge.classList.contains("active"),
+ "subgrid display badge is active."
+ );
+ ok(
+ subgridDisplayBadge.classList.contains("interactive"),
+ "subgrid display badge is interactive."
+ );
+
+ info("Toggling OFF the CSS grid highlighter from the subgrid display badge.");
+ const onHighlighterHidden = highlighters.once("grid-highlighter-hidden");
+ onCheckboxChange = waitUntilState(
+ store,
+ state => state.grids.length == 2 && !state.grids[1].highlighted
+ );
+ subgridDisplayBadge.click();
+ await onHighlighterHidden;
+ await onCheckboxChange;
+
+ ok(
+ !subgridDisplayBadge.classList.contains("active"),
+ "subgrid display badge is not active."
+ );
+ ok(
+ subgridDisplayBadge.classList.contains("interactive"),
+ "subgrid display badge is interactive."
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_delete_whitespace_node.js b/devtools/client/inspector/markup/test/browser_markup_tag_delete_whitespace_node.js
new file mode 100644
index 0000000000..620440cda7
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_delete_whitespace_node.js
@@ -0,0 +1,79 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// After deleting a node, whitespace siblings that had an impact on the layout might no
+// longer have any impact. This tests that the markup view is correctly rendered after
+// deleting a node that triggers such a change.
+
+const HTML = `<div>
+ <p id="container">
+ <span id="before-whitespace">1</span> <span id="after-whitespace">2</span>
+ </p>
+ </div>`;
+
+const TEST_URL = "data:text/html;charset=utf-8," + encodeURIComponent(HTML);
+
+add_task(async function deleteNodeAfterWhitespace() {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info(
+ "Test deleting a node that will modify the whitespace nodes rendered in the " +
+ "markup view."
+ );
+
+ await selectAndFocusNode("#after-whitespace", inspector);
+ await deleteCurrentSelection(inspector);
+
+ // TODO: There is still an issue with selection here. When the span is deleted, the
+ // selection goes to text-node. But since the text-node gets removed from the markup
+ // view after losing its impact on the layout, the selection remains on a node which
+ // is no longer part of the markup view (but still a valid node in the content DOM).
+ const parentNodeFront = await inspector.selection.nodeFront.parentNode();
+ const nodeFront = await getNodeFront("#container", inspector);
+ is(parentNodeFront, nodeFront, "Selection is as expected after deletion");
+
+ info("Check that the node was really removed");
+ let node = await getNodeFront("#after-whitespace", inspector);
+ ok(!node, "The node can't be found in the page anymore");
+
+ info("Undo the deletion to restore the original markup");
+ await undoChange(inspector);
+ node = await getNodeFront("#after-whitespace", inspector);
+ ok(node, "The node is back");
+
+ info(
+ "Test deleting the node before the whitespace and performing an undo preserves " +
+ "the node order"
+ );
+
+ await selectAndFocusNode("#before-whitespace", inspector);
+ await deleteCurrentSelection(inspector);
+
+ info("Undo the deletion to restore the original markup");
+ await undoChange(inspector);
+ node = await getNodeFront("#before-whitespace", inspector);
+ ok(node, "The node is back");
+
+ const nextSibling = await getNodeFront("#before-whitespace + *", inspector);
+ const afterWhitespace = await getNodeFront("#after-whitespace", inspector);
+ is(
+ nextSibling,
+ afterWhitespace,
+ "Order has been preserved after restoring the node"
+ );
+});
+
+async function selectAndFocusNode(selector, inspector) {
+ info(`Select node ${selector} and make sure it is focused`);
+ await selectNode(selector, inspector);
+ await clickContainer(selector, inspector);
+}
+
+async function deleteCurrentSelection(inspector) {
+ info("Delete the node with the delete key");
+ const mutated = inspector.once("markupmutation");
+ EventUtils.sendKey("delete", inspector.panelWin);
+ await Promise.all([mutated, inspector.once("inspector-updated")]);
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_01.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_01.js
new file mode 100644
index 0000000000..7de9f90a5b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_01.js
@@ -0,0 +1,73 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_attributes_test_runner.js */
+"use strict";
+
+// Test editing various markup-containers' attribute fields
+
+loadHelperScript("helper_attributes_test_runner.js");
+
+const TEST_URL = URL_ROOT + "doc_markup_edit.html";
+var TEST_DATA = [
+ {
+ desc: "Change an attribute",
+ node: "#node1",
+ originalAttributes: {
+ id: "node1",
+ class: "node1",
+ },
+ name: "class",
+ value: 'class="changednode1"',
+ expectedAttributes: {
+ id: "node1",
+ class: "changednode1",
+ },
+ },
+ {
+ desc:
+ 'Try changing an attribute to a quote (") - this should result ' +
+ "in it being set to an empty string",
+ node: "#node22",
+ originalAttributes: {
+ id: "node22",
+ class: "unchanged",
+ },
+ name: "class",
+ value: 'class="""',
+ expectedAttributes: {
+ id: "node22",
+ class: "",
+ },
+ },
+ {
+ desc: "Remove an attribute",
+ node: "#node4",
+ originalAttributes: {
+ id: "node4",
+ class: "node4",
+ },
+ name: "class",
+ value: "",
+ expectedAttributes: {
+ id: "node4",
+ },
+ },
+ {
+ desc: "Try add attributes by adding to an existing attribute's entry",
+ node: "#node24",
+ originalAttributes: {
+ id: "node24",
+ },
+ name: "id",
+ value: 'id="node24" class="""',
+ expectedAttributes: {
+ id: "node24",
+ class: "",
+ },
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ await runEditAttributesTests(TEST_DATA, inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_02.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_02.js
new file mode 100644
index 0000000000..f86617fdf0
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_02.js
@@ -0,0 +1,46 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that an existing attribute can be modified
+
+const TEST_URL = `data:text/html,
+ <div id='test-div'>Test modifying my ID attribute</div>`;
+
+add_task(async function () {
+ info("Opening the inspector on the test page");
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Selecting the test node");
+ await focusNode("#test-div", inspector);
+
+ info("Verify attributes, only ID should be there for now");
+ await assertAttributes("#test-div", {
+ id: "test-div",
+ });
+
+ info("Focus the ID attribute and change its content");
+ const { editor } = await getContainerForSelector("#test-div", inspector);
+ const attr = editor.attrElements.get("id").querySelector(".editable");
+ const mutated = inspector.once("markupmutation");
+ setEditableFieldValue(
+ attr,
+ attr.textContent + ' class="newclass" style="color:green"',
+ inspector
+ );
+ await mutated;
+
+ info("Verify attributes, should have ID, class and style");
+ await assertAttributes("#test-div", {
+ id: "test-div",
+ class: "newclass",
+ style: "color:green",
+ });
+
+ info("Trying to undo the change");
+ await undoChange(inspector);
+ await assertAttributes("#test-div", {
+ id: "test-div",
+ });
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_03.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_03.js
new file mode 100644
index 0000000000..097daf4c3f
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_03.js
@@ -0,0 +1,68 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that a node's tagname can be edited in the markup-view
+
+const TEST_URL = `data:text/html;charset=utf-8,
+ <div id='retag-me'><div id='retag-me-2'></div></div>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await inspector.markup.expandAll();
+
+ info("Selecting the test node");
+ await focusNode("#retag-me", inspector);
+
+ info("Getting the markup-container for the test node");
+ let container = await getContainerForSelector("#retag-me", inspector);
+ ok(container.expanded, "The container is expanded");
+
+ is(
+ (await getContentPageElementProperty("#retag-me", "tagName")).toLowerCase(),
+ "div",
+ "We've got #retag-me element, it's a DIV"
+ );
+ is(
+ await getContentPageElementProperty("#retag-me", "childElementCount"),
+ 1,
+ "#retag-me has one child"
+ );
+
+ is(
+ await getContentPageElementProperty("#retag-me > *", "id"),
+ "retag-me-2",
+ "#retag-me's only child is #retag-me-2"
+ );
+
+ info("Changing #retag-me's tagname in the markup-view");
+ const mutated = inspector.once("markupmutation");
+ const tagEditor = container.editor.tag;
+ setEditableFieldValue(tagEditor, "p", inspector);
+ await mutated;
+
+ info("Checking that the markup-container exists and is correct");
+ container = await getContainerForSelector("#retag-me", inspector);
+ ok(container.expanded, "The container is still expanded");
+ ok(container.selected, "The container is still selected");
+
+ info("Checking that the tagname change was done");
+
+ is(
+ (await getContentPageElementProperty("#retag-me", "tagName")).toLowerCase(),
+ "p",
+ "The #retag-me element is now a P"
+ );
+ is(
+ await getContentPageElementProperty("#retag-me", "childElementCount"),
+ 1,
+ "#retag-me still has one child"
+ );
+ is(
+ await getContentPageElementProperty("#retag-me > *", "id"),
+ "retag-me-2",
+ "#retag-me's only child is #retag-me-2"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_04-backspace.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_04-backspace.js
new file mode 100644
index 0000000000..7a5684ba9d
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_04-backspace.js
@@ -0,0 +1,64 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that a node can be deleted from the markup-view with the backspace key.
+// Also checks that after deletion the correct element is highlighted.
+// The previous sibling is preferred, but the parent is a fallback.
+
+const HTML = `<style type="text/css">
+ #pseudo::before { content: 'before'; }
+ #pseudo::after { content: 'after'; }
+ </style>
+ <div id="parent">
+ <div id="first"></div>
+ <div id="second"></div>
+ <div id="third"></div>
+ </div>
+ <div id="only-child">
+ <div id="fourth"></div>
+ </div>
+ <div id="pseudo">
+ <div id="fifth"></div>
+ </div>`;
+const TEST_URL = "data:text/html;charset=utf-8," + encodeURIComponent(HTML);
+
+// List of all the test cases. Each item is an object with the following props:
+// - selector: the css selector of the node that should be selected
+// - focusedSelector: the css selector of the node we expect to be selected as
+// a result of the deletion
+// - pseudo: (optional) if the focused node is actually supposed to be a pseudo element
+// of the specified selector.
+// Note that after each test case, undo is called.
+const TEST_DATA = [
+ {
+ selector: "#first",
+ focusedSelector: "#second",
+ },
+ {
+ selector: "#second",
+ focusedSelector: "#first",
+ },
+ {
+ selector: "#third",
+ focusedSelector: "#second",
+ },
+ {
+ selector: "#fourth",
+ focusedSelector: "#only-child",
+ },
+ {
+ selector: "#fifth",
+ focusedSelector: "#pseudo",
+ pseudo: "before",
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ for (const data of TEST_DATA) {
+ await checkDeleteAndSelection(inspector, "back_space", data);
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_04-delete.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_04-delete.js
new file mode 100644
index 0000000000..67504e319f
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_04-delete.js
@@ -0,0 +1,64 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that a node can be deleted from the markup-view with the delete key.
+// Also checks that after deletion the correct element is highlighted.
+// The next sibling is preferred, but the parent is a fallback.
+
+const HTML = `<style type="text/css">
+ #pseudo::before { content: 'before'; }
+ #pseudo::after { content: 'after'; }
+ </style>
+ <div id="parent">
+ <div id="first"></div>
+ <div id="second"></div>
+ <div id="third"></div>
+ </div>
+ <div id="only-child">
+ <div id="fourth"></div>
+ </div>
+ <div id="pseudo">
+ <div id="fifth"></div>
+ </div>`;
+const TEST_URL = "data:text/html;charset=utf-8," + encodeURIComponent(HTML);
+
+// List of all the test cases. Each item is an object with the following props:
+// - selector: the css selector of the node that should be selected
+// - focusedSelector: the css selector of the node we expect to be selected as
+// a result of the deletion
+// - pseudo: (optional) if the focused node is actually supposed to be a pseudo element
+// of the specified selector.
+// Note that after each test case, undo is called.
+const TEST_DATA = [
+ {
+ selector: "#first",
+ focusedSelector: "#second",
+ },
+ {
+ selector: "#second",
+ focusedSelector: "#third",
+ },
+ {
+ selector: "#third",
+ focusedSelector: "#second",
+ },
+ {
+ selector: "#fourth",
+ focusedSelector: "#only-child",
+ },
+ {
+ selector: "#fifth",
+ focusedSelector: "#pseudo",
+ pseudo: "after",
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ for (const data of TEST_DATA) {
+ await checkDeleteAndSelection(inspector, "delete", data);
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_05.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_05.js
new file mode 100644
index 0000000000..37a2d2b4c3
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_05.js
@@ -0,0 +1,85 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_attributes_test_runner.js */
+"use strict";
+
+// Tests that adding various types of attributes to nodes in the markup-view
+// works as expected. Also checks that the changes are properly undoable and
+// redoable. For each step in the test, we:
+// - Create a new DIV
+// - Make the change, check that the change was made as we expect
+// - Undo the change, check that the node is back in its original state
+// - Redo the change, check that the node change was made again correctly.
+
+loadHelperScript("helper_attributes_test_runner.js");
+
+var TEST_URL = "data:text/html,<div>markup-view attributes addition test</div>";
+var TEST_DATA = [
+ {
+ desc: 'Add an attribute value without closing "',
+ text: 'style="display: block;',
+ expectedAttributes: {
+ style: "display: block;",
+ },
+ },
+ {
+ desc: "Add an attribute value without closing '",
+ text: "style='display: inline;",
+ expectedAttributes: {
+ style: "display: inline;",
+ },
+ },
+ {
+ desc: "Add an attribute wrapped with with double quotes double quote in it",
+ text: 'style="display: "inline',
+ expectedAttributes: {
+ style: "display: ",
+ inline: "",
+ },
+ },
+ {
+ desc: "Add an attribute wrapped with single quotes with single quote in it",
+ text: "style='display: 'inline",
+ expectedAttributes: {
+ style: "display: ",
+ inline: "",
+ },
+ },
+ {
+ desc: "Add an attribute with no value",
+ text: "disabled",
+ expectedAttributes: {
+ disabled: "",
+ },
+ },
+ {
+ desc: "Add multiple attributes with no value",
+ text: "disabled autofocus",
+ expectedAttributes: {
+ disabled: "",
+ autofocus: "",
+ },
+ },
+ {
+ desc: "Add multiple attributes with no value, and some with value",
+ text: "disabled name='name' data-test='test' autofocus",
+ expectedAttributes: {
+ disabled: "",
+ autofocus: "",
+ name: "name",
+ "data-test": "test",
+ },
+ },
+ {
+ desc: "Add attribute with xmlns",
+ text: "xmlns:edi='http://ecommerce.example.org/schema'",
+ expectedAttributes: {
+ "xmlns:edi": "http://ecommerce.example.org/schema",
+ },
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ await runAddAttributesTests(TEST_DATA, "div", inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_06.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_06.js
new file mode 100644
index 0000000000..55a329905a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_06.js
@@ -0,0 +1,95 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_attributes_test_runner.js */
+"use strict";
+
+// Tests that adding various types of attributes to nodes in the markup-view
+// works as expected. Also checks that the changes are properly undoable and
+// redoable. For each step in the test, we:
+// - Create a new DIV
+// - Make the change, check that the change was made as we expect
+// - Undo the change, check that the node is back in its original state
+// - Redo the change, check that the node change was made again correctly.
+
+loadHelperScript("helper_attributes_test_runner.js");
+
+var TEST_URL = "data:text/html,<div>markup-view attributes addition test</div>";
+var TEST_DATA = [
+ {
+ desc: "Mixed single and double quotes",
+ text: "name=\"hi\" maxlength='not a number'",
+ expectedAttributes: {
+ maxlength: "not a number",
+ name: "hi",
+ },
+ },
+ {
+ desc: "Invalid attribute name",
+ text: "x='y' <why-would-you-do-this>=\"???\"",
+ expectedAttributes: {
+ x: "y",
+ },
+ },
+ {
+ desc: "Double quote wrapped in single quotes",
+ text: "x='h\"i'",
+ expectedAttributes: {
+ x: 'h"i',
+ },
+ },
+ {
+ desc: "Single quote wrapped in double quotes",
+ text: 'x="h\'i"',
+ expectedAttributes: {
+ x: "h'i",
+ },
+ },
+ {
+ desc: "No quote wrapping",
+ text: "a=b x=y data-test=Some spaced data",
+ expectedAttributes: {
+ a: "b",
+ x: "y",
+ "data-test": "Some",
+ spaced: "",
+ data: "",
+ },
+ },
+ {
+ desc: "Duplicate Attributes",
+ text: "a=b a='c' a=\"d\"",
+ expectedAttributes: {
+ a: "b",
+ },
+ },
+ {
+ desc: "Inline styles",
+ text: "style=\"font-family: 'Lucida Grande', sans-serif; font-size: 75%;\"",
+ expectedAttributes: {
+ style: "font-family: 'Lucida Grande', sans-serif; font-size: 75%;",
+ },
+ },
+ {
+ desc: "Object attribute names",
+ text: 'toString="true" hasOwnProperty="false"',
+ expectedAttributes: {
+ tostring: "true",
+ hasownproperty: "false",
+ },
+ },
+ {
+ desc: "Add event handlers",
+ text:
+ "onclick=\"javascript: throw new Error('wont fire');\" " +
+ "onload=\"alert('here');\"",
+ expectedAttributes: {
+ onclick: "javascript: throw new Error('wont fire');",
+ onload: "alert('here');",
+ },
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ await runAddAttributesTests(TEST_DATA, "div", inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_07.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_07.js
new file mode 100644
index 0000000000..38f7361725
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_07.js
@@ -0,0 +1,152 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+/* import-globals-from helper_attributes_test_runner.js */
+"use strict";
+
+// One more test testing various add-attributes configurations
+// Some of the test data below asserts that long attributes get collapsed
+
+loadHelperScript("helper_attributes_test_runner.js");
+
+/*eslint-disable */
+const LONG_ATTRIBUTE =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+const LONG_ATTRIBUTE_COLLAPSED =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEF\u2026UVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+const DATA_URL_INLINE_STYLE =
+ 'color: red; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC");';
+const DATA_URL_INLINE_STYLE_COLLAPSED =
+ 'color: red; background: url("data:image/png;base64,iVBORw0KG\u2026NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC");';
+const DATA_URL_ATTRIBUTE =
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC";
+const DATA_URL_ATTRIBUTE_COLLAPSED =
+ "data:image/png;base64,iVBORw0K\u20269/AFGGFyjOXZtQAAAAAElFTkSuQmCC";
+/* eslint-enable */
+
+var TEST_URL = "data:text/html,<div>markup-view attributes addition test</div>";
+var TEST_DATA = [
+ {
+ desc: "Add an attribute value containing < > &uuml; \" & '",
+ text: "src=\"somefile.html?param1=<a>&param2=&uuml;&param3='&quot;'\"",
+ expectedAttributes: {
+ src: "somefile.html?param1=<a>&param2=\xfc&param3='\"'",
+ },
+ },
+ {
+ desc: "Add an attribute by clicking the empty space after a node",
+ text: 'class="newclass" style="color:green"',
+ expectedAttributes: {
+ class: "newclass",
+ style: "color:green",
+ },
+ },
+ {
+ desc:
+ 'Try add an attribute containing a quote (") attribute by ' +
+ "clicking the empty space after a node - this should result " +
+ "in it being set to an empty string",
+ text: 'class="newclass" style="""',
+ expectedAttributes: {
+ class: "newclass",
+ style: "",
+ },
+ },
+ {
+ desc:
+ "Try to add long data URL to make sure it is collapsed in attribute " +
+ "editor.",
+ text: `style='${DATA_URL_INLINE_STYLE}'`,
+ expectedAttributes: {
+ style: DATA_URL_INLINE_STYLE,
+ },
+ validate: (container, inspector) => {
+ const editor = container.editor;
+ const visibleAttrText = editor.attrElements
+ .get("style")
+ .querySelector(".attr-value").textContent;
+ is(visibleAttrText, DATA_URL_INLINE_STYLE_COLLAPSED);
+ },
+ },
+ {
+ desc:
+ "Try to add long attribute to make sure it is collapsed in attribute " +
+ "editor.",
+ text: `data-long="${LONG_ATTRIBUTE}"`,
+ expectedAttributes: {
+ "data-long": LONG_ATTRIBUTE,
+ },
+ validate: (container, inspector) => {
+ const editor = container.editor;
+ const visibleAttrText = editor.attrElements
+ .get("data-long")
+ .querySelector(".attr-value").textContent;
+ is(visibleAttrText, LONG_ATTRIBUTE_COLLAPSED);
+ },
+ },
+ {
+ desc:
+ "Try to add long data URL to make sure it is collapsed in attribute " +
+ "editor.",
+ text: `src="${DATA_URL_ATTRIBUTE}"`,
+ expectedAttributes: {
+ src: DATA_URL_ATTRIBUTE,
+ },
+ validate: (container, inspector) => {
+ const editor = container.editor;
+ const visibleAttrText = editor.attrElements
+ .get("src")
+ .querySelector(".attr-value").textContent;
+ is(visibleAttrText, DATA_URL_ATTRIBUTE_COLLAPSED);
+ },
+ },
+ {
+ desc:
+ "Try to add long attribute with collapseAttributes == false" +
+ "to make sure it isn't collapsed in attribute editor.",
+ text: `data-long="${LONG_ATTRIBUTE}"`,
+ expectedAttributes: {
+ "data-long": LONG_ATTRIBUTE,
+ },
+ setUp(inspector) {
+ Services.prefs.setBoolPref("devtools.markup.collapseAttributes", false);
+ },
+ validate: (container, inspector) => {
+ const editor = container.editor;
+ const visibleAttrText = editor.attrElements
+ .get("data-long")
+ .querySelector(".attr-value").textContent;
+ is(visibleAttrText, LONG_ATTRIBUTE);
+ },
+ tearDown(inspector) {
+ Services.prefs.clearUserPref("devtools.markup.collapseAttributes");
+ },
+ },
+ {
+ desc: "Try to collapse attributes with collapseAttributeLength == 5",
+ text: `data-long="${LONG_ATTRIBUTE}"`,
+ expectedAttributes: {
+ "data-long": LONG_ATTRIBUTE,
+ },
+ setUp(inspector) {
+ Services.prefs.setIntPref("devtools.markup.collapseAttributeLength", 2);
+ },
+ validate: (container, inspector) => {
+ const firstChar = LONG_ATTRIBUTE[0];
+ const lastChar = LONG_ATTRIBUTE[LONG_ATTRIBUTE.length - 1];
+ const collapsed = firstChar + "\u2026" + lastChar;
+ const editor = container.editor;
+ const visibleAttrText = editor.attrElements
+ .get("data-long")
+ .querySelector(".attr-value").textContent;
+ is(visibleAttrText, collapsed);
+ },
+ tearDown(inspector) {
+ Services.prefs.clearUserPref("devtools.markup.collapseAttributeLength");
+ },
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ await runAddAttributesTests(TEST_DATA, "div", inspector);
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_08.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_08.js
new file mode 100644
index 0000000000..9a6fef1db9
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_08.js
@@ -0,0 +1,140 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test editing various markup-containers' attribute fields, in particular
+// attributes with long values and quotes
+
+const TEST_URL = URL_ROOT + "doc_markup_edit.html";
+/*eslint-disable */
+const LONG_ATTRIBUTE =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+const LONG_ATTRIBUTE_COLLAPSED =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEF\u2026UVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+/* eslint-enable */
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await inspector.markup.expandAll();
+ await testCollapsedLongAttribute(inspector);
+ await testModifyInlineStyleWithQuotes(inspector);
+ await testEditingAttributeWithMixedQuotes(inspector);
+});
+
+async function testCollapsedLongAttribute(inspector) {
+ info("Try to modify the collapsed long attribute, making sure it expands.");
+
+ info("Adding test attributes to the node");
+ let onMutation = inspector.once("markupmutation");
+ await setContentPageElementAttribute("#node24", "class", "");
+ await onMutation;
+
+ onMutation = inspector.once("markupmutation");
+ await setContentPageElementAttribute("#node24", "data-long", LONG_ATTRIBUTE);
+ await onMutation;
+
+ await assertAttributes("#node24", {
+ id: "node24",
+ class: "",
+ "data-long": LONG_ATTRIBUTE,
+ });
+
+ const { editor } = await focusNode("#node24", inspector);
+ const attr = editor.attrElements.get("data-long").querySelector(".editable");
+
+ // Check to make sure it has expanded after focus
+ attr.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+ const input = inplaceEditor(attr).input;
+ is(input.value, `data-long="${LONG_ATTRIBUTE}"`);
+ EventUtils.sendKey("escape", inspector.panelWin);
+
+ setEditableFieldValue(attr, input.value + ' data-short="ABC"', inspector);
+ await inspector.once("markupmutation");
+
+ const visibleAttrText = editor.attrElements
+ .get("data-long")
+ .querySelector(".attr-value").textContent;
+ is(visibleAttrText, LONG_ATTRIBUTE_COLLAPSED);
+
+ await assertAttributes("#node24", {
+ id: "node24",
+ class: "",
+ "data-long": LONG_ATTRIBUTE,
+ "data-short": "ABC",
+ });
+}
+
+async function testModifyInlineStyleWithQuotes(inspector) {
+ info('Modify inline style containing "');
+
+ await assertAttributes("#node26", {
+ id: "node26",
+ style:
+ 'background-image: url("moz-page-thumb://thumbnail?url=http%3A%2F%2Fwww.mozilla.org%2F");',
+ });
+
+ const onMutated = inspector.once("markupmutation");
+ const { editor } = await focusNode("#node26", inspector);
+ const attr = editor.attrElements.get("style").querySelector(".editable");
+
+ attr.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+
+ const input = inplaceEditor(attr).input;
+ let value = input.value;
+
+ is(
+ value,
+ "style='background-image: url(\"moz-page-thumb://thumbnail?url=http%3A%2F%2Fwww.mozilla.org%2F\");'",
+ "Value contains actual double quotes"
+ );
+
+ value = value.replace(/mozilla\.org/, "mozilla.com");
+ input.value = value;
+
+ EventUtils.sendKey("return", inspector.panelWin);
+
+ await onMutated;
+
+ await assertAttributes("#node26", {
+ id: "node26",
+ style:
+ 'background-image: url("moz-page-thumb://thumbnail?url=http%3A%2F%2Fwww.mozilla.com%2F");',
+ });
+}
+
+async function testEditingAttributeWithMixedQuotes(inspector) {
+ info("Modify class containing \" and '");
+
+ await assertAttributes("#node27", {
+ id: "node27",
+ class: "Double \" and single '",
+ });
+
+ const onMutated = inspector.once("markupmutation");
+ const { editor } = await focusNode("#node27", inspector);
+ const attr = editor.attrElements.get("class").querySelector(".editable");
+
+ attr.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+
+ const input = inplaceEditor(attr).input;
+ let value = input.value;
+
+ is(value, 'class="Double &quot; and single \'"', "Value contains &quot;");
+
+ value = value.replace(/Double/, "&quot;").replace(/single/, "'");
+ input.value = value;
+
+ EventUtils.sendKey("return", inspector.panelWin);
+
+ await onMutated;
+
+ await assertAttributes("#node27", {
+ id: "node27",
+ class: "\" \" and ' '",
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_09.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_09.js
new file mode 100644
index 0000000000..56a7007a4d
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_09.js
@@ -0,0 +1,74 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that editing a mixed-case attribute preserves the case
+
+const TEST_URL = URL_ROOT + "doc_markup_svg_attributes.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await inspector.markup.expandAll();
+ await selectNode("svg", inspector);
+
+ await testWellformedMixedCase(inspector);
+ await testMalformedMixedCase(inspector);
+});
+
+async function testWellformedMixedCase(inspector) {
+ info(
+ "Modifying a mixed-case attribute, " +
+ "expecting the attribute's case to be preserved"
+ );
+
+ info("Listening to markup mutations");
+ const onMutated = inspector.once("markupmutation");
+
+ info("Focusing the viewBox attribute editor");
+ const { editor } = await focusNode("svg", inspector);
+ const attr = editor.attrElements.get("viewBox").querySelector(".editable");
+ attr.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+
+ info("Editing the attribute value and waiting for the mutation event");
+ const input = inplaceEditor(attr).input;
+ input.value = 'viewBox="0 0 1 1"';
+ EventUtils.sendKey("return", inspector.panelWin);
+ await onMutated;
+
+ await assertAttributes("svg", {
+ viewBox: "0 0 1 1",
+ width: "200",
+ height: "200",
+ });
+}
+
+async function testMalformedMixedCase(inspector) {
+ info(
+ "Modifying a malformed, mixed-case attribute, " +
+ "expecting the attribute's case to be preserved"
+ );
+
+ info("Listening to markup mutations");
+ const onMutated = inspector.once("markupmutation");
+
+ info("Focusing the viewBox attribute editor");
+ const { editor } = await focusNode("svg", inspector);
+ const attr = editor.attrElements.get("viewBox").querySelector(".editable");
+ attr.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+
+ info("Editing the attribute value and waiting for the mutation event");
+ const input = inplaceEditor(attr).input;
+ input.value = 'viewBox="<>"';
+ EventUtils.sendKey("return", inspector.panelWin);
+ await onMutated;
+
+ await assertAttributes("svg", {
+ viewBox: "<>",
+ width: "200",
+ height: "200",
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_10.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_10.js
new file mode 100644
index 0000000000..720a6f3062
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_10.js
@@ -0,0 +1,39 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that invalid tagname updates are handled correctly
+
+const TEST_URL = "data:text/html;charset=utf-8,<div></div>";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ await inspector.markup.expandAll();
+
+ info("Updating the DIV tagname to an invalid value");
+ const container = await focusNode("div", inspector);
+ const onCancelReselect = inspector.markup.once("canceledreselectonremoved");
+ const tagEditor = container.editor.tag;
+ setEditableFieldValue(tagEditor, "<<<", inspector);
+ await onCancelReselect;
+ ok(true, "The markup-view emitted the canceledreselectonremoved event");
+ is(
+ inspector.selection.nodeFront,
+ container.node,
+ "The test DIV is still selected"
+ );
+
+ info("Updating the DIV tagname to a valid value this time");
+ const onReselect = inspector.markup.once("reselectedonremoved");
+ setEditableFieldValue(tagEditor, "span", inspector);
+ await onReselect;
+ ok(true, "The markup-view emitted the reselectedonremoved event");
+
+ const spanFront = await getNodeFront("span", inspector);
+ is(
+ inspector.selection.nodeFront,
+ spanFront,
+ "The selected node is now the SPAN"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_11.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_11.js
new file mode 100644
index 0000000000..7e30ffe056
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_11.js
@@ -0,0 +1,37 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Bug 1090874 - Tests that a node is not recreated when it's tagname editor
+// is blurred and no changes were done.
+
+const TEST_URL = "data:text/html;charset=utf-8,<div></div>";
+
+add_task(async function () {
+ let isEditTagNameCalled = false;
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ // Overriding the editTagName walkerActor method here to check that it isn't
+ // called when blurring the tagname field.
+ inspector.walker.editTagName = function () {
+ isEditTagNameCalled = true;
+ };
+
+ const container = await focusNode("div", inspector);
+ const tagEditor = container.editor.tag;
+
+ info("Blurring the tagname field");
+ tagEditor.blur();
+ is(isEditTagNameCalled, false, "The editTagName method wasn't called");
+
+ info("Updating the tagname to uppercase");
+ await focusNode("div", inspector);
+ setEditableFieldValue(tagEditor, "DIV", inspector);
+ is(isEditTagNameCalled, false, "The editTagName method wasn't called");
+
+ info("Updating the tagname to a different value");
+ setEditableFieldValue(tagEditor, "SPAN", inspector);
+ is(isEditTagNameCalled, true, "The editTagName method was called");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_12.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_12.js
new file mode 100644
index 0000000000..64f9e9d57a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_12.js
@@ -0,0 +1,103 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that focus position is correct when tabbing through and editing
+// attributes.
+
+const TEST_URL =
+ "data:text/html;charset=utf8," +
+ "<div id='attr' a='1' b='2' c='3'></div>" +
+ "<div id='delattr' tobeinvalid='1' last='2'></div>";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await testAttributeEditing(inspector);
+ await testAttributeDeletion(inspector);
+});
+
+async function testAttributeEditing(inspector) {
+ info("Testing focus position after attribute editing");
+
+ info("Setting the first non-id attribute in edit mode");
+ // focuses id
+ await activateFirstAttribute("#attr", inspector);
+ // focuses the first attr after id
+ collapseSelectionAndTab(inspector);
+
+ const attrs = await getAttributesFromEditor("#attr", inspector);
+
+ info(
+ "Editing this attribute, keeping the same name, " +
+ "and tabbing to the next"
+ );
+ await editAttributeAndTab(attrs[1] + '="99"', inspector);
+ checkFocusedAttribute(attrs[2], true);
+
+ info(
+ "Editing the new focused attribute, keeping the name, " +
+ "and tabbing to the previous"
+ );
+ await editAttributeAndTab(attrs[2] + '="99"', inspector, true);
+ checkFocusedAttribute(attrs[1], true);
+
+ info("Editing attribute name, changes attribute order");
+ await editAttributeAndTab("d='4'", inspector);
+ checkFocusedAttribute("id", true);
+
+ // Escape of the currently focused field for the next test
+ EventUtils.sendKey("escape", inspector.panelWin);
+}
+
+async function testAttributeDeletion(inspector) {
+ info("Testing focus position after attribute deletion");
+
+ info("Setting the first non-id attribute in edit mode");
+ // focuses id
+ await activateFirstAttribute("#delattr", inspector);
+ // focuses the first attr after id
+ collapseSelectionAndTab(inspector);
+
+ const attrs = await getAttributesFromEditor("#delattr", inspector);
+
+ info("Entering an invalid attribute to delete the attribute");
+ await editAttributeAndTab('"', inspector);
+ checkFocusedAttribute(attrs[2], true);
+
+ info("Deleting the last attribute");
+ await editAttributeAndTab(" ", inspector);
+
+ // Check we're on the newattr element
+ const focusedAttr = Services.focus.focusedElement;
+ ok(
+ focusedAttr.classList.contains("styleinspector-propertyeditor"),
+ "in newattr"
+ );
+ is(focusedAttr.tagName, "textarea", "newattr is active");
+}
+
+async function editAttributeAndTab(newValue, inspector, goPrevious) {
+ const onEditMutation = inspector.markup.once("refocusedonedit");
+ inspector.markup.doc.activeElement.value = newValue;
+ if (goPrevious) {
+ EventUtils.synthesizeKey("VK_TAB", { shiftKey: true }, inspector.panelWin);
+ } else {
+ EventUtils.sendKey("tab", inspector.panelWin);
+ }
+ await onEditMutation;
+}
+
+/**
+ * Given a markup container, focus and turn in edit mode its first attribute
+ * field.
+ */
+async function activateFirstAttribute(container, inspector) {
+ const { editor } = await focusNode(container, inspector);
+ editor.tag.focus();
+
+ // Go to "id" attribute and trigger edit mode.
+ EventUtils.sendKey("tab", inspector.panelWin);
+ EventUtils.sendKey("return", inspector.panelWin);
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_13-other.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_13-other.js
new file mode 100644
index 0000000000..50c657eb5f
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_13-other.js
@@ -0,0 +1,39 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Tests that doesn't fit into any specific category.
+
+const TEST_URL = `data:text/html;charset=utf8,
+ <div a b id='order' c class></div>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await testOriginalAttributesOrder(inspector);
+ await testOrderAfterAttributeChange(inspector);
+});
+
+async function testOriginalAttributesOrder(inspector) {
+ info("Testing order of attributes on initial node render");
+
+ const attributes = await getAttributesFromEditor("#order", inspector);
+ ok(isEqual(attributes, ["id", "class", "a", "b", "c"]), "ordered correctly");
+}
+
+async function testOrderAfterAttributeChange(inspector) {
+ info("Testing order of attributes after attribute is change by setAttribute");
+
+ await setContentPageElementAttribute("#order", "a", "changed");
+
+ const attributes = await getAttributesFromEditor("#order", inspector);
+ ok(
+ isEqual(attributes, ["id", "class", "a", "b", "c"]),
+ "order isn't changed"
+ );
+}
+
+function isEqual(a, b) {
+ return a.toString() === b.toString();
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_avoid_refocus.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_avoid_refocus.js
new file mode 100644
index 0000000000..ae6bd4c0ca
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_avoid_refocus.js
@@ -0,0 +1,51 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Bug 1327683 - Tests that an editable attribute is not refocused
+// when the focus has been moved to an other element than the editor.
+
+const TEST_URL = 'data:text/html,<body class="abcd"></body>';
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await selectNode(".abcd", inspector);
+ await clickContainer(".abcd", inspector);
+
+ const container = await focusNode(".abcd", inspector);
+ ok(container && container.editor, "The markup-container was found");
+
+ info("Listening for the markupmutation event");
+ const nodeMutated = inspector.once("markupmutation");
+ const attr = container.editor.attrElements
+ .get("class")
+ .querySelector(".editable");
+
+ attr.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+ const input = inplaceEditor(attr).input;
+ ok(input, "Found editable field for class attribute");
+
+ input.value = 'class="wxyz"';
+
+ const onFocus = once(inspector.searchBox, "focus");
+ EventUtils.synthesizeMouseAtCenter(
+ inspector.searchBox,
+ {},
+ inspector.panelWin
+ );
+
+ info("Wait for the focus event on search box");
+ await onFocus;
+
+ info("Wait for the markup-mutation event");
+ await nodeMutated;
+
+ is(
+ inspector.panelDoc.activeElement,
+ inspector.searchBox,
+ "The currently focused element is the search box"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_tag_edit_long-classname.js b/devtools/client/inspector/markup/test/browser_markup_tag_edit_long-classname.js
new file mode 100644
index 0000000000..f30bc23de4
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_tag_edit_long-classname.js
@@ -0,0 +1,51 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that editing long classnames shows the whole class attribute without scrollbars.
+
+const classname =
+ "this-long-class-attribute-should-be-displayed " +
+ "without-overflow-when-switching-to-edit-mode " +
+ "AAAAAAAAAAAA-BBBBBBBBBBBBB-CCCCCCCCCCCCC-DDDDDDDDDDDDDD-EEEEEEEEEEEEE";
+const TEST_URL = `data:text/html;charset=utf8, <div class="${classname}"></div>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ await selectNode("div", inspector);
+ await clickContainer("div", inspector);
+
+ const container = await focusNode("div", inspector);
+ ok(container && container.editor, "The markup-container was found");
+
+ info("Listening for the markupmutation event");
+ const nodeMutated = inspector.once("markupmutation");
+ const attr = container.editor.attrElements
+ .get("class")
+ .querySelector(".editable");
+
+ attr.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+ const input = inplaceEditor(attr).input;
+ ok(input, "Found editable field for class attribute");
+
+ is(
+ input.scrollHeight,
+ input.clientHeight,
+ "input should not have vertical scrollbars"
+ );
+ is(
+ input.scrollWidth,
+ input.clientWidth,
+ "input should not have horizontal scrollbars"
+ );
+ input.value = 'class="other value"';
+
+ info("Commit the new class value");
+ EventUtils.sendKey("return", inspector.panelWin);
+
+ info("Wait for the markup-mutation event");
+ await nodeMutated;
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_template.js b/devtools/client/inspector/markup/test/browser_markup_template.js
new file mode 100644
index 0000000000..8516d59346
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_template.js
@@ -0,0 +1,55 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test the markup view displaying the content of a <template> tag.
+
+add_task(async function () {
+ const TEST_URL =
+ `data:text/html;charset=utf-8,` +
+ encodeURIComponent(`
+ <div id="root">
+ <template>
+ <p>template content</p>
+ </template>
+
+ <div id="template-container" style="border: 1px solid black"></div>
+ </div>
+ <script>
+ "use strict";
+
+ const template = document.querySelector("template");
+ const clone = document.importNode(template.content, true);
+ document.querySelector("#template-container").appendChild(clone);
+ </script>`);
+
+ const EXPECTED_TREE = `
+ root
+ template
+ #document-fragment
+ p
+ template-container
+ p`;
+
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+
+ await assertMarkupViewAsTree(EXPECTED_TREE, "#root", inspector);
+
+ info("Select the p element under the template .");
+ const templateFront = await getNodeFront("template", inspector);
+ const templateContainer = markup.getContainer(templateFront);
+ const documentFragmentContainer = templateContainer.getChildContainers()[0];
+ const pContainer = documentFragmentContainer.getChildContainers()[0];
+
+ await selectNode(pContainer.node, inspector, "no-reason", false);
+
+ const ruleView = inspector.getPanel("ruleview").view;
+ // We only display the style attribute.
+ is(
+ ruleView.element.querySelectorAll(".ruleview-rule").length,
+ 1,
+ "No rules are displayed for this p element"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_textcontent_display.js b/devtools/client/inspector/markup/test/browser_markup_textcontent_display.js
new file mode 100644
index 0000000000..c250e02892
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_textcontent_display.js
@@ -0,0 +1,123 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test the rendering of text nodes in the markup view.
+
+const LONG_VALUE =
+ "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do " +
+ "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.";
+const SCHEMA = "data:text/html;charset=UTF-8,";
+const TEST_URL = `${SCHEMA}<!DOCTYPE html>
+ <html>
+ <body>
+ <div id="shorttext">Short text</div>
+ <div id="longtext">${LONG_VALUE}</div>
+ <div id="shortcomment"><!--Short comment--></div>
+ <div id="longcomment"><!--${LONG_VALUE}--></div>
+ <div id="shorttext-and-node">Short text<span>Other element</span></div>
+ <div id="longtext-and-node">${LONG_VALUE}<span>Other element</span></div>
+ </body>
+ </html>`;
+
+const TEST_DATA = [
+ {
+ desc: "Test node containing a short text, short text nodes can be inlined.",
+ selector: "#shorttext",
+ inline: true,
+ value: "Short text",
+ },
+ {
+ desc: "Test node containing a long text, long text nodes are not inlined.",
+ selector: "#longtext",
+ inline: false,
+ value: LONG_VALUE,
+ },
+ {
+ desc: "Test node containing a short comment, comments are not inlined.",
+ selector: "#shortcomment",
+ inline: false,
+ value: "Short comment",
+ },
+ {
+ desc: "Test node containing a long comment, comments are not inlined.",
+ selector: "#longcomment",
+ inline: false,
+ value: LONG_VALUE,
+ },
+ {
+ desc: "Test node containing a short text and a span.",
+ selector: "#shorttext-and-node",
+ inline: false,
+ value: "Short text",
+ },
+ {
+ desc: "Test node containing a long text and a span.",
+ selector: "#longtext-and-node",
+ inline: false,
+ value: LONG_VALUE,
+ },
+];
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ for (const data of TEST_DATA) {
+ await checkNode(inspector, data);
+ }
+});
+
+async function checkNode(inspector, { desc, selector, inline, value }) {
+ info(desc);
+
+ const container = await getContainerForSelector(selector, inspector);
+ const nodeValue = await getFirstChildNodeValue(selector);
+ is(nodeValue, value, "The test node's text content is correct");
+
+ is(
+ !!container.inlineTextChild,
+ inline,
+ "Container inlineTextChild is as expected"
+ );
+ is(
+ !container.canExpand,
+ inline,
+ "Container canExpand property is as expected"
+ );
+
+ let textContainer;
+ if (inline) {
+ textContainer = container.elt.querySelector("pre");
+ ok(
+ !!textContainer,
+ "Text container is already rendered for inline text elements"
+ );
+ ok(
+ textContainer.parentNode.previousSibling.previousSibling.classList.contains(
+ "open"
+ ),
+ "Text container is after the open tag"
+ );
+ ok(
+ textContainer.parentNode.nextSibling.classList.contains("close"),
+ "Text container is before the close tag"
+ );
+ } else {
+ textContainer = container.elt.querySelector("pre");
+ ok(
+ !textContainer,
+ "Text container is not rendered for collapsed text nodes"
+ );
+ await inspector.markup.expandNode(container.node);
+ await waitForMultipleChildrenUpdates(inspector);
+
+ textContainer = container.elt.querySelector("pre");
+ ok(
+ !!textContainer,
+ "Text container is rendered after expanding the container"
+ );
+ }
+
+ is(textContainer.textContent, value, "The complete text node is rendered.");
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_textcontent_edit_01.js b/devtools/client/inspector/markup/test/browser_markup_textcontent_edit_01.js
new file mode 100644
index 0000000000..82b6bb7b98
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_textcontent_edit_01.js
@@ -0,0 +1,110 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test editing a node's text content
+
+const TEST_URL = URL_ROOT + "doc_markup_edit.html";
+const {
+ DEFAULT_VALUE_SUMMARY_LENGTH,
+} = require("resource://devtools/server/actors/inspector/walker.js");
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Expanding all nodes");
+ await inspector.markup.expandAll();
+ await waitForMultipleChildrenUpdates(inspector);
+
+ await editContainer(inspector, {
+ selector: ".node6",
+ newValue: "New text",
+ oldValue: "line6",
+ });
+
+ await editContainer(inspector, {
+ selector: "#node17",
+ newValue:
+ "LOREM IPSUM DOLOR SIT AMET, CONSECTETUR ADIPISCING ELIT. " +
+ "DONEC POSUERE PLACERAT MAGNA ET IMPERDIET.",
+ oldValue:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " +
+ "Donec posuere placerat magna et imperdiet.",
+ });
+
+ await editContainer(inspector, {
+ selector: "#node17",
+ newValue: "New value",
+ oldValue:
+ "LOREM IPSUM DOLOR SIT AMET, CONSECTETUR ADIPISCING ELIT. " +
+ "DONEC POSUERE PLACERAT MAGNA ET IMPERDIET.",
+ });
+
+ await editContainer(inspector, {
+ selector: "#node17",
+ newValue:
+ "LOREM IPSUM DOLOR SIT AMET, CONSECTETUR ADIPISCING ELIT. " +
+ "DONEC POSUERE PLACERAT MAGNA ET IMPERDIET.",
+ oldValue: "New value",
+ });
+});
+
+async function editContainer(inspector, { selector, newValue, oldValue }) {
+ let nodeValue = await getFirstChildNodeValue(selector);
+ is(nodeValue, oldValue, "The test node's text content is correct");
+
+ info("Changing the text content");
+ const onMutated = inspector.once("markupmutation");
+ const container = await focusNode(selector, inspector);
+
+ const isOldValueInline = oldValue.length <= DEFAULT_VALUE_SUMMARY_LENGTH;
+ is(
+ !!container.inlineTextChild,
+ isOldValueInline,
+ "inlineTextChild is as expected"
+ );
+ is(
+ !container.canExpand,
+ isOldValueInline,
+ "canExpand property is as expected"
+ );
+
+ const field = container.elt.querySelector("pre");
+ is(
+ field.textContent,
+ oldValue,
+ "The text node has the correct original value after selecting"
+ );
+ setEditableFieldValue(field, newValue, inspector);
+
+ info("Listening to the markupmutation event");
+ await onMutated;
+
+ nodeValue = await getFirstChildNodeValue(selector);
+ is(nodeValue, newValue, "The test node's text content has changed");
+
+ const isNewValueInline = newValue.length <= DEFAULT_VALUE_SUMMARY_LENGTH;
+ is(
+ !!container.inlineTextChild,
+ isNewValueInline,
+ "inlineTextChild is as expected"
+ );
+ is(
+ !container.canExpand,
+ isNewValueInline,
+ "canExpand property is as expected"
+ );
+
+ if (isOldValueInline != isNewValueInline) {
+ is(
+ container.expanded,
+ !isNewValueInline,
+ "Container was automatically expanded/collapsed"
+ );
+ }
+
+ info("Selecting the <body> to reset the selection");
+ const bodyContainer = await getContainerForSelector("body", inspector);
+ inspector.markup.markNodeAsSelected(bodyContainer.node);
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_textcontent_edit_02.js b/devtools/client/inspector/markup/test/browser_markup_textcontent_edit_02.js
new file mode 100644
index 0000000000..e099186e36
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_textcontent_edit_02.js
@@ -0,0 +1,121 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that using UP/DOWN next to a number when editing a text node does not
+// increment or decrement but simply navigates inside the editable field.
+
+const TEST_URL = URL_ROOT + "doc_markup_edit.html";
+const SELECTOR = ".node6";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Expanding all nodes");
+ await inspector.markup.expandAll();
+ await waitForMultipleChildrenUpdates(inspector);
+
+ let nodeValue = await getFirstChildNodeValue(SELECTOR);
+ let expectedValue = "line6";
+ is(nodeValue, expectedValue, "The test node's text content is correct");
+
+ info("Open editable field for .node6");
+ const container = await focusNode(SELECTOR, inspector);
+ const field = container.elt.querySelector("pre");
+ field.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+ const editor = inplaceEditor(field);
+
+ info("Initially, all the input content should be selected");
+ checkSelectionPositions(editor, 0, expectedValue.length);
+
+ info("Navigate using 'RIGHT': move the caret to the end");
+ await sendKey("VK_RIGHT", {}, editor, inspector.panelWin);
+ is(editor.input.value, expectedValue, "Value should not have changed");
+ checkSelectionPositions(editor, expectedValue.length, expectedValue.length);
+
+ info("Navigate using 'DOWN': no effect, already at the end");
+ await sendKey("VK_DOWN", {}, editor, inspector.panelWin);
+ is(editor.input.value, expectedValue, "Value should not have changed");
+ checkSelectionPositions(editor, expectedValue.length, expectedValue.length);
+
+ info("Navigate using 'UP': move to the start");
+ await sendKey("VK_UP", {}, editor, inspector.panelWin);
+ is(editor.input.value, expectedValue, "Value should not have changed");
+ checkSelectionPositions(editor, 0, 0);
+
+ info("Navigate using 'DOWN': move to the end");
+ await sendKey("VK_DOWN", {}, editor, inspector.panelWin);
+ is(editor.input.value, expectedValue, "Value should not have changed");
+ checkSelectionPositions(editor, expectedValue.length, expectedValue.length);
+
+ info("Type 'b' in the editable field");
+ await sendKey("b", {}, editor, inspector.panelWin);
+ expectedValue += "b";
+ is(editor.input.value, expectedValue, "Value should be updated");
+
+ info("Type 'a' in the editable field");
+ await sendKey("a", {}, editor, inspector.panelWin);
+ expectedValue += "a";
+ is(editor.input.value, expectedValue, "Value should be updated");
+
+ info("Create a new line using shift+RETURN");
+ await sendKey("VK_RETURN", { shiftKey: true }, editor, inspector.panelWin);
+ expectedValue += "\n";
+ is(editor.input.value, expectedValue, "Value should have a new line");
+ checkSelectionPositions(editor, expectedValue.length, expectedValue.length);
+
+ info("Type '1' in the editable field");
+ await sendKey("1", {}, editor, inspector.panelWin);
+ expectedValue += "1";
+ is(editor.input.value, expectedValue, "Value should be updated");
+ checkSelectionPositions(editor, expectedValue.length, expectedValue.length);
+
+ info("Navigate using 'UP': move back to the first line");
+ await sendKey("VK_UP", {}, editor, inspector.panelWin);
+ is(editor.input.value, expectedValue, "Value should not have changed");
+ info("Caret should be back on the first line");
+ checkSelectionPositions(editor, 1, 1);
+
+ info("Commit the new value with RETURN, wait for the markupmutation event");
+ const onMutated = inspector.once("markupmutation");
+ await sendKey("VK_RETURN", {}, editor, inspector.panelWin);
+ await onMutated;
+
+ nodeValue = await getFirstChildNodeValue(SELECTOR);
+ is(nodeValue, expectedValue, "The test node's text content is correct");
+});
+
+/**
+ * Check that the editor selection is at the expected positions.
+ */
+function checkSelectionPositions(editor, expectedStart, expectedEnd) {
+ is(
+ editor.input.selectionStart,
+ expectedStart,
+ "Selection should start at " + expectedStart
+ );
+ is(
+ editor.input.selectionEnd,
+ expectedEnd,
+ "Selection should end at " + expectedEnd
+ );
+}
+
+/**
+ * Send a key and expect to receive a keypress event on the editor's input.
+ */
+function sendKey(key, options, editor, win) {
+ return new Promise(resolve => {
+ info("Adding event listener for down|left|right|back_space|return keys");
+ editor.input.addEventListener("keypress", function onKeypress() {
+ if (editor.input) {
+ editor.input.removeEventListener("keypress", onKeypress);
+ }
+ executeSoon(resolve);
+ });
+
+ EventUtils.synthesizeKey(key, options, win);
+ });
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_toggle_01.js b/devtools/client/inspector/markup/test/browser_markup_toggle_01.js
new file mode 100644
index 0000000000..93e7dbdd50
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_toggle_01.js
@@ -0,0 +1,59 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test toggling (expand/collapse) elements by clicking on twisties
+
+const TEST_URL = URL_ROOT + "doc_markup_toggle.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Getting the container for the html element");
+ let container = await getContainerForSelector("html", inspector);
+ ok(container.mustExpand, "HTML element mustExpand");
+ ok(container.canExpand, "HTML element canExpand");
+ is(container.expander.style.visibility, "hidden", "HTML twisty is hidden");
+
+ info("Getting the container for the UL parent element");
+ container = await getContainerForSelector("ul", inspector);
+ ok(!container.mustExpand, "UL element !mustExpand");
+ ok(container.canExpand, "UL element canExpand");
+ is(container.expander.style.visibility, "visible", "HTML twisty is visible");
+ ok(!container.selected, "UL container is not selected");
+
+ info("Clicking on the UL parent expander, and waiting for children");
+ await toggleContainerByClick(inspector, container);
+ ok(!container.selected, "UL container is still not selected after expand");
+
+ info("Checking that child LI elements have been created");
+ let numLi = await getNumberOfMatchingElementsInContentPage("li");
+ for (let i = 0; i < numLi; i++) {
+ const liContainer = await getContainerForSelector(
+ `li:nth-child(${i + 1})`,
+ inspector
+ );
+ ok(liContainer, "A container for the child LI element was created");
+ }
+ ok(container.expanded, "Parent UL container is expanded");
+
+ info("Clicking again on the UL expander");
+ await toggleContainerByClick(inspector, container);
+ ok(!container.selected, "UL container is still not selected after collapse");
+
+ info("Checking that child LI elements have been hidden");
+ numLi = await getNumberOfMatchingElementsInContentPage("li");
+ for (let i = 0; i < numLi; i++) {
+ const liContainer = await getContainerForSelector(
+ `li:nth-child(${i + 1})`,
+ inspector
+ );
+ is(
+ liContainer.elt.getClientRects().length,
+ 0,
+ "The container for the child LI element was hidden"
+ );
+ }
+ ok(!container.expanded, "Parent UL container is collapsed");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_toggle_02.js b/devtools/client/inspector/markup/test/browser_markup_toggle_02.js
new file mode 100644
index 0000000000..95c7d9d28d
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_toggle_02.js
@@ -0,0 +1,61 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test toggling (expand/collapse) elements by dbl-clicking on tag lines
+
+const TEST_URL = URL_ROOT + "doc_markup_toggle.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Getting the container for the UL parent element");
+ const container = await getContainerForSelector("ul", inspector);
+
+ info("Dbl-clicking on the UL parent expander, and waiting for children");
+ const onChildren = waitForChildrenUpdated(inspector);
+ const onUpdated = inspector.once("inspector-updated");
+ EventUtils.synthesizeMouseAtCenter(
+ container.tagLine,
+ { clickCount: 2 },
+ inspector.markup.doc.defaultView
+ );
+ await onChildren;
+ await onUpdated;
+
+ info("Checking that child LI elements have been created");
+ let numLi = await getNumberOfMatchingElementsInContentPage("li");
+ for (let i = 0; i < numLi; i++) {
+ const liContainer = await getContainerForSelector(
+ "li:nth-child(" + (i + 1) + ")",
+ inspector
+ );
+ ok(liContainer, "A container for the child LI element was created");
+ }
+ ok(container.expanded, "Parent UL container is expanded");
+
+ info("Dbl-clicking again on the UL expander");
+ // No need to wait, this is a local, synchronous operation where nodes are
+ // only hidden from the view, not destroyed
+ EventUtils.synthesizeMouseAtCenter(
+ container.tagLine,
+ { clickCount: 2 },
+ inspector.markup.doc.defaultView
+ );
+
+ info("Checking that child LI elements have been hidden");
+ numLi = await getNumberOfMatchingElementsInContentPage("li");
+ for (let i = 0; i < numLi; i++) {
+ const liContainer = await getContainerForSelector(
+ "li:nth-child(" + (i + 1) + ")",
+ inspector
+ );
+ is(
+ liContainer.elt.getClientRects().length,
+ 0,
+ "The container for the child LI element was hidden"
+ );
+ }
+ ok(!container.expanded, "Parent UL container is collapsed");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_toggle_03.js b/devtools/client/inspector/markup/test/browser_markup_toggle_03.js
new file mode 100644
index 0000000000..fe7eef4a8f
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_toggle_03.js
@@ -0,0 +1,51 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test toggling (expand/collapse) elements by alt-clicking on twisties, which
+// should expand/collapse all the descendants
+
+const TEST_URL = URL_ROOT + "doc_markup_toggle.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Getting the container for the UL parent element");
+ const container = await getContainerForSelector("ul", inspector);
+
+ info("Alt-clicking on collapsed expander should expand all children");
+ await toggleContainerByClick(inspector, container, { altKey: true });
+
+ info("Checking that all nodes exist and are expanded");
+ let nodeFronts = await getNodeFronts(inspector);
+ for (const nodeFront of nodeFronts) {
+ const nodeContainer = getContainerForNodeFront(nodeFront, inspector);
+ ok(nodeContainer, "Container for node " + nodeFront.tagName + " exists");
+ ok(
+ nodeContainer.expanded,
+ "Container for node " + nodeFront.tagName + " is expanded"
+ );
+ }
+
+ info("Alt-clicking on expanded expander should collapse all children");
+ await toggleContainerByClick(inspector, container, { altKey: true });
+
+ info("Checking that all nodes are collapsed");
+ nodeFronts = await getNodeFronts(inspector);
+ for (const nodeFront of nodeFronts) {
+ const nodeContainer = getContainerForNodeFront(nodeFront, inspector);
+ ok(
+ !nodeContainer.expanded,
+ "Container for node " + nodeFront.tagName + " is collapsed"
+ );
+ }
+});
+
+async function getNodeFronts(inspector) {
+ const nodeList = await inspector.walker.querySelectorAll(
+ inspector.walker.rootNode,
+ "ul, li, span, em"
+ );
+ return nodeList.items();
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_toggle_04.js b/devtools/client/inspector/markup/test/browser_markup_toggle_04.js
new file mode 100644
index 0000000000..9dceb9745e
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_toggle_04.js
@@ -0,0 +1,40 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test expanding elements by clicking on expand badge.
+
+const TEST_URL = URL_ROOT + "doc_markup_toggle.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Getting the container for the UL parent element");
+ const container = await getContainerForSelector("ul", inspector);
+ ok(!container.mustExpand, "UL element !mustExpand");
+ ok(container.canExpand, "UL element canExpand");
+
+ info("Clicking on the UL parent expand badge, and waiting for children");
+ const onChildren = waitForChildrenUpdated(inspector);
+ const onUpdated = inspector.once("inspector-updated");
+
+ EventUtils.synthesizeMouseAtCenter(
+ container.editor.expandBadge,
+ {},
+ inspector.markup.doc.defaultView
+ );
+ await onChildren;
+ await onUpdated;
+
+ info("Checking that child LI elements have been created");
+ const numLi = await getNumberOfMatchingElementsInContentPage("li");
+ for (let i = 0; i < numLi; i++) {
+ const liContainer = await getContainerForSelector(
+ `li:nth-child(${i + 1})`,
+ inspector
+ );
+ ok(liContainer, "A container for the child LI element was created");
+ }
+ ok(container.expanded, "Parent UL container is expanded");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_toggle_closing_tag_line.js b/devtools/client/inspector/markup/test/browser_markup_toggle_closing_tag_line.js
new file mode 100644
index 0000000000..914b4b6b5e
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_toggle_closing_tag_line.js
@@ -0,0 +1,54 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that a closing tag line is displayed when expanding an element container.
+// Also check that no closing tag line is displayed for readonly containers (document,
+// roots...).
+
+const TEST_URL = `data:text/html;charset=utf8,
+<div class="outer-div"><span>test</span></div>
+<iframe src="data:text/html;charset=utf8,<div>test</div>"></iframe>`;
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+
+ info("Getting the container for .outer-div parent element");
+ let container = await getContainerForSelector(".outer-div", inspector);
+ await toggleContainerByClick(inspector, container);
+
+ let closeTagLine = container.closeTagLine;
+ ok(
+ closeTagLine && closeTagLine.textContent.includes("div"),
+ "DIV has a close tag-line with the correct content"
+ );
+
+ info("Expand the iframe element");
+ container = await getContainerForSelector("iframe", inspector);
+ await toggleContainerByClick(inspector, container);
+ ok(container.expanded, "iframe is expanded");
+ closeTagLine = container.closeTagLine;
+ ok(
+ closeTagLine && closeTagLine.textContent.includes("iframe"),
+ "IFRAME has a close tag-line with the correct content"
+ );
+
+ info("Retrieve the nodefront for the #document root inside the iframe");
+ const iframe = await getNodeFront("iframe", inspector);
+ const { nodes } = await inspector.walker.children(iframe);
+ const documentFront = nodes[0];
+ ok(
+ documentFront.displayName === "#document",
+ "First child of IFRAME is #document"
+ );
+
+ info("Expand the iframe's #document node element");
+ container = getContainerForNodeFront(documentFront, inspector);
+ await toggleContainerByClick(inspector, container);
+ ok(container.expanded, "#document is expanded");
+ ok(
+ !container.closeTagLine,
+ "readonly (#document) node has no close tag-line"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js b/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
new file mode 100644
index 0000000000..e495580d66
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_update-on-navigtion.js
@@ -0,0 +1,57 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+"use strict";
+
+// Test that markup view handles page navigation correctly.
+
+const URL_1 = URL_ROOT_SSL + "doc_markup_update-on-navigtion_1.html";
+const URL_2 = URL_ROOT_SSL + "doc_markup_update-on-navigtion_2.html";
+
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(URL_1);
+
+ assertMarkupViewIsLoaded();
+ await selectNode("#one", inspector);
+
+ const { resourceCommand } = toolbox.commands;
+ const { onResource: willNavigate } =
+ await resourceCommand.waitForNextResource(
+ resourceCommand.TYPES.DOCUMENT_EVENT,
+ {
+ ignoreExistingResources: true,
+ predicate(resource) {
+ return resource.name == "will-navigate";
+ },
+ }
+ );
+
+ // We should not await on navigateTo here, because the test will assert the
+ // various phases of the inspector during the navigation.
+ const onNavigated = navigateTo(URL_2);
+
+ info("Waiting for will-navigate");
+ await willNavigate;
+
+ info("Navigation to page 2 has started, the inspector should be empty");
+ assertMarkupViewIsEmpty();
+
+ info("Waiting for new-root");
+ await inspector.once("new-root");
+
+ info("Navigation to page 2 was done, the inspector should be back up");
+ assertMarkupViewIsLoaded();
+
+ await onNavigated;
+ await selectNode("#two", inspector);
+
+ function assertMarkupViewIsLoaded() {
+ const markupViewBox = inspector.panelDoc.getElementById("markup-box");
+ is(markupViewBox.childNodes.length, 1, "The markup-view is loaded");
+ }
+
+ function assertMarkupViewIsEmpty() {
+ const markupViewFrame =
+ inspector._markupFrame.contentDocument.getElementById("root");
+ is(markupViewFrame.childNodes.length, 0, "The markup-view is unloaded");
+ }
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_view-original-source.js b/devtools/client/inspector/markup/test/browser_markup_view-original-source.js
new file mode 100644
index 0000000000..db106563bc
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_view-original-source.js
@@ -0,0 +1,55 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const TEST_URI = URL_ROOT + "doc_markup_view-original-source.html";
+
+// Test that event handler links go to the right debugger source when the
+// event handler is source mapped.
+add_task(async function () {
+ const { inspector, tab, toolbox } = await openInspectorForURL(TEST_URI);
+
+ const nodeFront = await getNodeFront("#foo", inspector);
+ const container = getContainerForNodeFront(nodeFront, inspector);
+
+ const evHolder = container.elt.querySelector(
+ ".inspector-badge.interactive[data-event]"
+ );
+
+ evHolder.scrollIntoView();
+ EventUtils.synthesizeMouseAtCenter(
+ evHolder,
+ {},
+ inspector.markup.doc.defaultView
+ );
+
+ const tooltip = inspector.markup.eventDetailsTooltip;
+ await tooltip.once("shown");
+ await tooltip.once("event-tooltip-source-map-ready");
+
+ const debuggerIcon = tooltip.panel.querySelector(
+ ".event-tooltip-debugger-icon"
+ );
+ EventUtils.synthesizeMouse(debuggerIcon, 2, 2, {}, debuggerIcon.ownerGlobal);
+
+ await gDevTools.showToolboxForTab(tab, { toolId: "jsdebugger" });
+ const dbg = toolbox.getPanel("jsdebugger");
+
+ let source;
+ await BrowserTestUtils.waitForCondition(
+ () => {
+ source = dbg._selectors.getSelectedSource(dbg._getState());
+ return !!source;
+ },
+ "loaded source",
+ 100,
+ 20
+ );
+
+ is(
+ source.url,
+ "webpack:///events_original.js",
+ "expected original source to be loaded"
+ );
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_view-source.js b/devtools/client/inspector/markup/test/browser_markup_view-source.js
new file mode 100644
index 0000000000..9a3507d535
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_view-source.js
@@ -0,0 +1,126 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+Services.scriptloader.loadSubScript(
+ "chrome://mochitests/content/browser/devtools/client/debugger/test/mochitest/shared-head.js",
+ this
+);
+
+const DOCUMENT_SRC = `
+<body>
+<button id="btn-eval">Eval</button>
+<button id="btn-dom0" onclick="console.info('bloup')">DOM0</button>
+<script>
+var script = \`
+ function foo() {
+ console.log('handler');
+ }
+\`;
+eval(script);
+
+var button = document.getElementById("btn-eval");
+button.addEventListener("click", foo, false);
+</script>
+</body>`;
+
+const TEST_URI = "data:text/html;charset=utf-8," + DOCUMENT_SRC;
+
+add_task(async function () {
+ const { inspector, toolbox } = await openInspectorForURL(TEST_URI);
+
+ info(
+ "Test that event handler links go to the right debugger source when it came from an eval()"
+ );
+ const evaledSource = await clickOnJumpToDebuggerIconForNode(
+ inspector,
+ toolbox,
+ "#btn-eval"
+ );
+ is(evaledSource.url, null, "no expected url for eval source");
+
+ info("Add a breakpoint in opened source");
+ const debuggerContext = createDebuggerContext(toolbox);
+ await addBreakpoint(
+ debuggerContext,
+ debuggerContext.selectors.getSelectedSource(),
+ 1
+ );
+ await safeSynthesizeMouseEventAtCenterInContentPage("#btn-eval");
+
+ await waitForPaused(debuggerContext);
+ ok(true, "The debugger paused on the evaled source breakpoint");
+ await resume(debuggerContext);
+
+ info(
+ "Test that event handler links go to the right debugger source when it's a dom0 event listener."
+ );
+ await toolbox.selectTool("inspector");
+ const dom0Source = await clickOnJumpToDebuggerIconForNode(
+ inspector,
+ toolbox,
+ "#btn-dom0"
+ );
+ is(dom0Source.url, null, "no expected url for dom0 event listener source");
+ await addBreakpoint(
+ debuggerContext,
+ debuggerContext.selectors.getSelectedSource(),
+ 1
+ );
+ await safeSynthesizeMouseEventAtCenterInContentPage("#btn-dom0");
+ await waitForPaused(debuggerContext);
+ ok(true, "The debugger paused on the dom0 source breakpoint");
+ await resume(debuggerContext);
+});
+
+async function clickOnJumpToDebuggerIconForNode(
+ inspector,
+ toolbox,
+ nodeSelector
+) {
+ const nodeFront = await getNodeFront(nodeSelector, inspector);
+ const container = getContainerForNodeFront(nodeFront, inspector);
+
+ const evHolder = container.elt.querySelector(
+ ".inspector-badge.interactive[data-event]"
+ );
+ evHolder.scrollIntoView();
+ info(`Display event tooltip for node "${nodeSelector}"`);
+ evHolder.click();
+
+ const tooltip = inspector.markup.eventDetailsTooltip;
+ await tooltip.once("shown");
+
+ info(`Tooltip displayed, click on the "jump to debugger" icon`);
+ const debuggerIcon = tooltip.panel.querySelector(
+ ".event-tooltip-debugger-icon"
+ );
+
+ if (!debuggerIcon) {
+ ok(
+ false,
+ `There is no jump to debugger icon in event tooltip for node "${nodeSelector}"`
+ );
+ return null;
+ }
+
+ const onDebuggerSelected = toolbox.once(`jsdebugger-selected`);
+ EventUtils.synthesizeMouse(debuggerIcon, 2, 2, {}, debuggerIcon.ownerGlobal);
+
+ const dbg = await onDebuggerSelected;
+ ok(true, "The debugger was opened");
+
+ let source;
+ info("Wait for source to be opened");
+ await BrowserTestUtils.waitForCondition(
+ () => {
+ source = dbg._selectors.getSelectedSource(dbg._getState());
+ return !!source;
+ },
+ "loaded source",
+ 100,
+ 20
+ );
+ return source;
+}
diff --git a/devtools/client/inspector/markup/test/browser_markup_void_elements_html.js b/devtools/client/inspector/markup/test/browser_markup_void_elements_html.js
new file mode 100644
index 0000000000..18a6321eae
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_void_elements_html.js
@@ -0,0 +1,51 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test void element display in the markupview.
+const TEST_URL = URL_ROOT + "doc_markup_void_elements.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { win } = inspector.markup;
+
+ info("check non-void element closing tag is displayed");
+ const { editor } = await getContainerForSelector("h1", inspector);
+ ok(
+ !editor.elt.classList.contains("void-element"),
+ "h1 element does not have void-element class"
+ );
+ ok(
+ !editor.elt.querySelector(".close").style.display !== "none",
+ "h1 element tag is not hidden"
+ );
+
+ info("check void element closing tag is hidden in HTML document");
+ let container = await getContainerForSelector("img", inspector);
+ ok(
+ container.editor.elt.classList.contains("void-element"),
+ "img element has the expected class"
+ );
+ let closeElement = container.editor.elt.querySelector(".close");
+ let computedStyle = win.getComputedStyle(closeElement);
+ ok(computedStyle.display === "none", "img closing tag is hidden");
+
+ info("check void element with pseudo element");
+ const hrNodeFront = await getNodeFront("hr.before", inspector);
+ container = getContainerForNodeFront(hrNodeFront, inspector);
+ ok(
+ container.editor.elt.classList.contains("void-element"),
+ "hr element has the expected class"
+ );
+ closeElement = container.editor.elt.querySelector(".close");
+ computedStyle = win.getComputedStyle(closeElement);
+ ok(computedStyle.display === "none", "hr closing tag is hidden");
+
+ info("check expanded void element closing tag is not hidden");
+ await inspector.markup.expandNode(hrNodeFront);
+ await waitForMultipleChildrenUpdates(inspector);
+ ok(container.expanded, "hr container is expanded");
+ computedStyle = win.getComputedStyle(closeElement);
+ ok(computedStyle.display === "none", "hr closing tag is not hidden anymore");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_void_elements_xhtml.js b/devtools/client/inspector/markup/test/browser_markup_void_elements_xhtml.js
new file mode 100644
index 0000000000..a48e2b7dbb
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_void_elements_xhtml.js
@@ -0,0 +1,33 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test void element display in the markupview.
+const TEST_URL = URL_ROOT + "doc_markup_void_elements.xhtml";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { win } = inspector.markup;
+
+ info("check non-void element closing tag is displayed");
+ const { editor } = await getContainerForSelector("h1", inspector);
+ ok(
+ !editor.elt.classList.contains("void-element"),
+ "h1 element does not have void-element class"
+ );
+ ok(
+ !editor.elt.querySelector(".close").style.display !== "none",
+ "h1 element tag is not hidden"
+ );
+
+ info("check void element closing tag is not hidden in XHTML document");
+ const container = await getContainerForSelector("br", inspector);
+ ok(
+ !container.editor.elt.classList.contains("void-element"),
+ "br element does not have void-element class"
+ );
+ const closeElement = container.editor.elt.querySelector(".close");
+ const computedStyle = win.getComputedStyle(closeElement);
+ ok(computedStyle.display !== "none", "br closing tag is not hidden");
+});
diff --git a/devtools/client/inspector/markup/test/browser_markup_whitespace.js b/devtools/client/inspector/markup/test/browser_markup_whitespace.js
new file mode 100644
index 0000000000..7eddd3b974
--- /dev/null
+++ b/devtools/client/inspector/markup/test/browser_markup_whitespace.js
@@ -0,0 +1,106 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that whitespace text nodes do show up in the markup-view when needed.
+
+const TEST_URL = URL_ROOT + "doc_markup_whitespace.html";
+
+add_task(async function () {
+ const { inspector } = await openInspectorForURL(TEST_URL);
+ const { markup } = inspector;
+
+ await markup.expandAll();
+
+ info("Verify the number of child nodes and child elements in body");
+
+ // Body has 5 element children, but there are 6 text nodes in there too, they come from
+ // the HTML file formatting (spaces and carriage returns).
+ is(
+ await getElementChildNodesCount("body"),
+ 11,
+ "The body node has 11 child nodes (includes text nodes)"
+ );
+ is(
+ await getContentPageElementProperty("body", "childElementCount"),
+ 5,
+ "The body node has 5 child elements (only element nodes)"
+ );
+
+ // In body, there are only block-level elements, so whitespace text nodes do not have
+ // layout, so they should be skipped in the markup-view.
+ info("Check that the body's whitespace text node children aren't shown");
+ const bodyContainer = markup.getContainer(inspector.selection.nodeFront);
+ let childContainers = bodyContainer.getChildContainers();
+ is(
+ childContainers.length,
+ 5,
+ "Only the element nodes are shown in the markup view"
+ );
+
+ // div#inline has 3 element children, but there are 4 text nodes in there too, like in
+ // body, they come from spaces and carriage returns in the HTML file.
+ info("Verify the number of child nodes and child elements in div#inline");
+ is(
+ await getElementChildNodesCount("#inline"),
+ 7,
+ "The div#inline node has 7 child nodes (includes text nodes)"
+ );
+ is(
+ await getContentPageElementProperty("#inline", "childElementCount"),
+ 3,
+ "The div#inline node has 3 child elements (only element nodes)"
+ );
+
+ // Within the inline formatting context in div#inline, the whitespace text nodes between
+ // the images have layout, so they should appear in the markup-view.
+ info("Check that the div#inline's whitespace text node children are shown");
+ await selectNode("#inline", inspector);
+ let divContainer = markup.getContainer(inspector.selection.nodeFront);
+ childContainers = divContainer.getChildContainers();
+ is(
+ childContainers.length,
+ 5,
+ "Both the element nodes and some text nodes are shown in the markup view"
+ );
+
+ // div#pre has 2 element children, but there are 3 text nodes in there too, like in
+ // div#inline, they come from spaces and carriage returns in the HTML file.
+ info("Verify the number of child nodes and child elements in div#pre");
+ is(
+ await getElementChildNodesCount("#pre"),
+ 5,
+ "The div#pre node has 5 child nodes (includes text nodes)"
+ );
+ is(
+ await getContentPageElementProperty("#pre", "childElementCount"),
+ 2,
+ "The div#pre node has 2 child elements (only element nodes)"
+ );
+
+ // Within the inline formatting context in div#pre, the whitespace text nodes between
+ // the images have layout, so they should appear in the markup-view, but since
+ // white-space is set to pre, then the whitespace text nodes before and after the first
+ // and last image should also appear.
+ info("Check that the div#pre's whitespace text node children are shown");
+ await selectNode("#pre", inspector);
+ divContainer = markup.getContainer(inspector.selection.nodeFront);
+ childContainers = divContainer.getChildContainers();
+ is(
+ childContainers.length,
+ 5,
+ "Both the element nodes and all text nodes are shown in the markup view"
+ );
+});
+
+function getElementChildNodesCount(selector) {
+ return SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [selector],
+ function (innerSelector) {
+ const node = content.document.querySelector(innerSelector);
+ return node.childNodes.length;
+ }
+ );
+}
diff --git a/devtools/client/inspector/markup/test/doc_markup_anonymous.html b/devtools/client/inspector/markup/test/doc_markup_anonymous.html
new file mode 100644
index 0000000000..1be4594030
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_anonymous.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Anonymous content test</title>
+ <style type="text/css">
+ #pseudo::before {
+ content: "before";
+ }
+ #pseudo::after {
+ content: "after";
+ }
+ #shadow::before {
+ content: "Testing ::before on a shadow host";
+ }
+ </style>
+</head>
+<body>
+ <div id="pseudo"><span>middle</span></div>
+
+ <div id="shadow">light dom</div>
+
+ <div id="native"><input type="file"></div>
+
+ <script>
+ "use strict";
+ var host = document.querySelector("#shadow");
+ var root = host.attachShadow({ mode: "open" });
+ root.innerHTML = "<h3>Shadow DOM</h3><select multiple></select>";
+ </script>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_dragdrop.html b/devtools/client/inspector/markup/test/doc_markup_dragdrop.html
new file mode 100644
index 0000000000..a13d42cbce
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_dragdrop.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=858038
+-->
+<head>
+ <meta charset="utf-8">
+ <title>Test for Bug 858038</title>
+ <style>
+ #test::before {
+ content: 'This should not be draggable';
+ }
+ </style>
+</head>
+<body>
+ <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=858038">Mozilla Bug 858038</a>
+ <p id="display"></p>
+ <div id="content" style="display: none">
+ </div>
+ <input id="anonymousParent" /><span id="before">Before<!-- Force not-inline --></span>
+ <pre id="test"><span id="firstChild">First</span><span id="middleChild">Middle</span><span id="lastChild">Last</span></pre> <span id="after">After</span>
+
+ <test-component class="test-component">
+ <div slot="slot1" class="slotted1">slot1-1</div>
+ <div slot="slot1" class="slotted2">slot1-2</div>
+ </test-component>
+
+ <ol>
+ <li id="list"><span id="first-list-child"
+ >List item start</span><span id="last-list-child"
+ >List item end</span></li>
+ </ol>
+
+ <script>
+ "use strict";
+ customElements.define("test-component", class extends HTMLElement {
+ constructor() {
+ super();
+ const shadowRoot = this.attachShadow({mode: "open"});
+ shadowRoot.innerHTML = '<slot class="slot1" name="slot1"></slot>';
+ }
+ });
+ </script>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_dragdrop_autoscroll_01.html b/devtools/client/inspector/markup/test/doc_markup_dragdrop_autoscroll_01.html
new file mode 100644
index 0000000000..35f3b5f31e
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_dragdrop_autoscroll_01.html
@@ -0,0 +1,87 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=858038
+https://bugzilla.mozilla.org/show_bug.cgi?id=1226898
+-->
+<head>
+ <meta charset="utf-8">
+ <title>Test for Bug 858038 and 1226898 - Autoscroll</title>
+</head>
+<body>
+ <div id="first"></div>
+ <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=858038">Mozilla Bug 858038</a>
+ <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1226898">Mozilla Bug 1226898</a>
+ <p id="display">Test</p>
+ <div id="content" style="display: none">
+
+ </div>
+
+ <!-- Make sure the markup-view has enough nodes shown by default that it has a scrollbar -->
+
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_dragdrop_autoscroll_02.html b/devtools/client/inspector/markup/test/doc_markup_dragdrop_autoscroll_02.html
new file mode 100644
index 0000000000..9e4d92cf3b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_dragdrop_autoscroll_02.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=858038
+https://bugzilla.mozilla.org/show_bug.cgi?id=1226898
+-->
+<head>
+ <meta charset="utf-8">
+ <title>Test for Bug 858038 and 1226898 - Autoscroll</title>
+</head>
+<body>
+ <div id="first"></div>
+ <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=858038">Mozilla Bug 858038</a>
+ <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1226898">Mozilla Bug 1226898</a>
+ <p id="display">Test</p>
+ <div id="content" style="display: none">
+
+ </div>
+
+ <!-- Make sure the markup-view has enough nodes shown by default that it has a scrollbar -->
+
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_edit.html b/devtools/client/inspector/markup/test/doc_markup_edit.html
new file mode 100644
index 0000000000..ddefd1d873
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_edit.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+
+<html class="html">
+
+ <body class="body">
+ <div class="node0">
+ <div id="node1" class="node1">line1</div>
+ <div id="node2" class="node2">line2</div>
+ <p class="node3">line3</p>
+ <!-- A comment -->
+ <p id="node4" class="node4">line4
+ <span class="node5">line5</span>
+ <span class="node6">line6</span>
+ <!-- A comment -->
+ <a class="node7">line7<span class="node8">line8</span></a>
+ <span class="node9">line9</span>
+ <span class="node10">line10</span>
+ <span class="node11">line11</span>
+ <a class="node12">line12<span class="node13">line13</span></a>
+ </p>
+ <p id="node14">line14</p>
+ <p class="node15">line15</p>
+ </div>
+ <div id="node16">
+ <p id="node17">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec posuere placerat magna et imperdiet.</p>
+ </div>
+ <div id="node18">
+ <div id="node19">
+ <div id="node20">
+ <div id="node21">
+ line21
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="node22" class="unchanged"></div>
+ <div id="node23"></div>
+ <div id="node24"></div>
+ <div id="retag-me">
+ <div id="retag-me-2"></div>
+ </div>
+ <div id="node25"></div>
+ <div id="node26" style='background-image: url("moz-page-thumb://thumbnail?url=http%3A%2F%2Fwww.mozilla.org%2F");'></div>
+ <div id="node27" class="Double &quot; and single &apos;"></div>
+ <img id="node-data-url" />
+ <div id="node-data-url-style"></div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events-overflow.html b/devtools/client/inspector/markup/test/doc_markup_events-overflow.html
new file mode 100644
index 0000000000..d604245fe8
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events-overflow.html
@@ -0,0 +1,19 @@
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>doc_markup_events-overflow.html</title>
+</head>
+<body>
+ <h1>doc_markup_events-overflow.html</h1>
+ <span id="events">Inspect me!</span>
+ <script>
+ "use strict";
+ var el = document.getElementById("events");
+ for (var i = 50; i > 0; i--) {
+ el.addEventListener("click", function onClick() {
+ alert("click");
+ });
+ }
+ </script>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events-source_map.html b/devtools/client/inspector/markup/test/doc_markup_events-source_map.html
new file mode 100644
index 0000000000..ece3abd7b8
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events-source_map.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <script type="application/javascript" src="events_bundle.js"></script>
+ </head>
+ <body onload="init();">
+ <div id="clicky">click here</div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_01.html b/devtools/client/inspector/markup/test/doc_markup_events_01.html
new file mode 100644
index 0000000000..49496dc2f2
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_01.html
@@ -0,0 +1,118 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ #container {
+ border: 1px solid #000;
+ width: 200px;
+ height: 85px;
+ }
+
+ #container > div {
+ border: 1px solid #000;
+ display: inline-block;
+ margin: 2px;
+ }
+
+ #output,
+ #noevents,
+ #DOM0,
+ #handleevent,
+ #output,
+ #noevents {
+ cursor: auto;
+ }
+
+ #output {
+ min-height: 1.5em;
+ }
+ </style>
+ <script type="application/javascript">
+ "use strict";
+
+ /* exported init */
+ function init() {
+ const container = document.getElementById("container");
+ const multiple = document.getElementById("multiple");
+
+ container.addEventListener("mouseover", mouseoverHandler, true);
+ multiple.addEventListener("click", clickHandler);
+ multiple.addEventListener("mouseup", mouseupHandler);
+
+ const he = new HandleEventClick();
+ const handleevent = document.getElementById("handleevent");
+ handleevent.addEventListener("click", he);
+ }
+
+ function mouseoverHandler(event) {
+ if (event.target.id !== "container") {
+ const output = document.getElementById("output");
+ output.textContent = event.target.textContent;
+ }
+ }
+
+ function clickHandler(event) {
+ const output = document.getElementById("output");
+ output.textContent = "click";
+ }
+
+ function mouseupHandler(event) {
+ const output = document.getElementById("output");
+ output.textContent = "mouseup";
+ }
+
+ function HandleEventClick(hehe) {
+
+ }
+
+ HandleEventClick.prototype = {
+ // eslint-disable-next-line object-shorthand
+ handleEvent: function(blah) {
+ alert("handleEvent");
+ }
+ };
+
+ function noeventsClickHandler(event) {
+ alert("noevents has an event listener");
+ }
+
+ /* exported addNoeventsClickHandler, removeNoeventsClickHandler */
+ function addNoeventsClickHandler() {
+ const noevents = document.getElementById("noevents");
+ noevents.addEventListener("click", noeventsClickHandler);
+ }
+
+ function removeNoeventsClickHandler() {
+ const noevents = document.getElementById("noevents");
+ noevents.removeEventListener("click", noeventsClickHandler);
+ }
+ </script>
+ </head>
+ <body onload="init();">
+ <h1>Events test 1</h1>
+ <div id="container">
+ <div>1</div>
+ <div>2</div>
+ <div>3</div>
+ <div>4</div>
+ <div>5</div>
+ <div>6</div>
+ <div>7</div>
+ <div>8</div>
+ <div>9</div>
+ <div>10</div>
+ <div>11</div>
+ <div>12</div>
+ <div>13</div>
+ <div>14</div>
+ <div>15</div>
+ <div>16</div>
+ <div id="multiple">multiple</div>
+ </div>
+ <div id="output"></div>
+ <div id="noevents">noevents</div>
+ <div id="DOM0" onclick="alert('DOM0')">DOM0 event here</div>
+ <div id="handleevent">handleEvent</div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_02.html b/devtools/client/inspector/markup/test/doc_markup_events_02.html
new file mode 100644
index 0000000000..0da7c397a6
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_02.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ #fatarrow,
+ #bound,
+ #boundhe,
+ #comment-inline,
+ #comment-streaming,
+ #anon-object-method,
+ #object-method {
+ border: 1px solid #000;
+ width: 200px;
+ min-height: 1em;
+ cursor: pointer;
+ }
+ </style>
+ <script type="application/javascript">
+ "use strict";
+
+ /* exported init */
+ function init() {
+ const fatarrow = document.getElementById("fatarrow");
+
+ const he = new HandleEventClick();
+ const anonObjectMethod = document.getElementById("anon-object-method");
+ anonObjectMethod.addEventListener("click", he.anonObjectMethod);
+
+ const objectMethod = document.getElementById("object-method");
+ objectMethod.addEventListener("click", he.objectMethod);
+
+ const bhe = new BoundHandleEventClick();
+ const boundheNode = document.getElementById("boundhe");
+ bhe.handleEvent = bhe.handleEvent.bind(bhe);
+ boundheNode.addEventListener("click", bhe);
+
+ const boundNode = document.getElementById("bound");
+ BoundClickHandler = BoundClickHandler.bind(this);
+ boundNode.addEventListener("click", BoundClickHandler);
+
+ fatarrow.addEventListener("click", () => {
+ alert("Fat arrow without params!");
+ });
+
+ fatarrow.addEventListener("click", event => {
+ alert("Fat arrow with 1 param!");
+ });
+
+ fatarrow.addEventListener("click", (event, foo, bar) => {
+ alert("Fat arrow with 3 params!");
+ });
+
+ fatarrow.addEventListener("click", b => b);
+
+ const inlineCommentNode = document.getElementById("comment-inline");
+ inlineCommentNode
+ .addEventListener("click", functionProceededByInlineComment);
+
+ const streamingCommentNode = document.getElementById("comment-streaming");
+ streamingCommentNode
+ .addEventListener("click", functionProceededByStreamingComment);
+ }
+
+ function BoundClickHandler(event) {
+ alert("Bound event");
+ }
+
+ function HandleEventClick(hehe) {
+
+ }
+
+ HandleEventClick.prototype = {
+ // eslint-disable-next-line object-shorthand
+ anonObjectMethod: function() {
+ alert("obj.anonObjectMethod");
+ },
+
+ objectMethod: function kay() {
+ alert("obj.objectMethod");
+ },
+ };
+
+ function BoundHandleEventClick() {
+
+ }
+
+ BoundHandleEventClick.prototype = {
+ handleEvent() {
+ alert("boundHandleEvent");
+ }
+ };
+
+ // A function proceeded with an inline comment
+ function functionProceededByInlineComment() {
+ alert("comment-inline");
+ }
+
+ /* A function proceeded with a streaming comment */
+ function functionProceededByStreamingComment() {
+ alert("comment-streaming");
+ }
+ </script>
+ </head>
+ <body onload="init();">
+ <h1>Events test 2</h1>
+ <div id="fatarrow">Fat arrows</div>
+ <div id="boundhe">Bound handleEvent</div>
+ <div id="bound">Bound event</div>
+ <div id="comment-inline">Event proceeded by an inline comment</div>
+ <div id="comment-streaming">Event proceeded by a streaming comment</div>
+ <div id="anon-object-method">Anonymous object method</div>
+ <div id="object-method">Object method</div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_03.html b/devtools/client/inspector/markup/test/doc_markup_events_03.html
new file mode 100644
index 0000000000..a0c067e33e
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_03.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ #es6-method,
+ #generator,
+ #anon-generator,
+ #named-function-expression,
+ #anon-function-expression,
+ #returned-function {
+ border: 1px solid #000;
+ width: 200px;
+ min-height: 1em;
+ cursor: pointer;
+ }
+ </style>
+ <script type="application/javascript">
+ "use strict";
+
+ const namedFunctionExpression =
+ function foo() {
+ alert("namedFunctionExpression");
+ }
+
+ const anonFunctionExpression = function() {
+ alert("anonFunctionExpression");
+ };
+
+ const returnedFunction = (function() {
+ return function bar() {
+ alert("returnedFunction");
+ }
+ })();
+
+ /* exported init */
+ function init() {
+ const em = new Es6Method();
+ const es6Method = document.getElementById("es6-method");
+ es6Method.addEventListener("click", em.es6Method);
+
+ const generatorNode = document.getElementById("generator");
+ generatorNode.addEventListener("click", generator);
+
+ const anonGenerator = document.getElementById("anon-generator");
+ anonGenerator.addEventListener("click", function* () {
+ alert("anonGenerator");
+ });
+
+ const namedFunctionExpressionNode =
+ document.getElementById("named-function-expression");
+ namedFunctionExpressionNode.addEventListener("click",
+ namedFunctionExpression);
+
+ const anonFunctionExpressionNode =
+ document.getElementById("anon-function-expression");
+ anonFunctionExpressionNode.addEventListener("click",
+ anonFunctionExpression);
+
+ const returnedFunctionNode = document.getElementById("returned-function");
+ returnedFunctionNode.addEventListener("click", returnedFunction);
+ }
+
+ function Es6Method(hehe) {
+
+ }
+
+ Es6Method.prototype = {
+ es6Method(foo, bar) {
+ alert("obj.es6Method");
+ }
+ };
+
+ function HandleEvent() {
+ const handleEventNode = document.getElementById("handleEvent");
+ handleEventNode.addEventListener("click", this);
+ }
+
+ HandleEvent.prototype = {
+ // eslint-disable-next-line object-shorthand
+ handleEvent: function(event) {
+ switch (event.type) {
+ case "click":
+ alert("handleEvent click");
+ }
+ }
+ };
+
+ function* generator() {
+ alert("generator");
+ }
+ </script>
+ </head>
+ <body onload="init();">
+ <h1>Events test 3</h1>
+ <div id="es6-method">ES6 method</div>
+ <div id="generator">Generator</div>
+ <div id="anon-generator">Anonymous Generator</div>
+ <div id="named-function-expression">Named Function Expression</div>
+ <div id="anon-function-expression">Anonymous Function Expression</div>
+ <div id="returned-function">Returned Function</div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_04.html b/devtools/client/inspector/markup/test/doc_markup_events_04.html
new file mode 100644
index 0000000000..93d105bf3d
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_04.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ #constructed-function,
+ #constructed-function-with-body-string,
+ #multiple-assignment,
+ #promise,
+ #math-pow,
+ #handleEvent {
+ border: 1px solid #000;
+ width: 200px;
+ min-height: 1em;
+ cursor: pointer;
+ }
+ </style>
+ <script type="application/javascript">
+ "use strict";
+
+ const constructedFunc = new Function();
+
+ const constructedFuncWithBodyString =
+ new Function('a', 'b', 'c', 'alert("constructedFuncWithBodyString");');
+
+ const multipleAssignment = function multi() {
+ alert("multipleAssignment");
+ }
+
+ /* exported init */
+ function init() {
+ const constructedFunctionNode =
+ document.getElementById("constructed-function");
+ constructedFunctionNode.addEventListener("click", constructedFunc);
+
+ const constructedFunctionWithBodyStringNode =
+ document.getElementById("constructed-function-with-body-string");
+ constructedFunctionWithBodyStringNode
+ .addEventListener("click", constructedFuncWithBodyString);
+
+ const multipleAssignmentNode =
+ document.getElementById("multiple-assignment");
+ multipleAssignmentNode.addEventListener("click", multipleAssignment);
+
+ const promiseNode = document.getElementById("promise");
+ new Promise((resolve, reject) => {
+ promiseNode.addEventListener("click", resolve);
+ });
+
+ const mathPowNode = document.getElementById("math-pow");
+ mathPowNode.addEventListener("click", Math.pow);
+
+ new HandleEvent();
+
+ document.addEventListener("click", function(foo, bar) {
+ alert("document event listener clicked");
+ });
+
+ document.documentElement.addEventListener("click", function(foo2, bar2) {
+ alert("documentElement event listener clicked");
+ });
+ }
+
+ function Es6Method(hehe) {
+
+ }
+
+ Es6Method.prototype = {
+ es6Method(foo, bar) {
+ alert("obj.es6Method");
+ }
+ };
+
+ function HandleEvent() {
+ const handleEventNode = document.getElementById("handleEvent");
+ handleEventNode.addEventListener("click", this);
+ }
+
+ HandleEvent.prototype = {
+ // eslint-disable-next-line object-shorthand
+ handleEvent: function(event) {
+ switch (event.type) {
+ case "click":
+ alert("handleEvent click");
+ }
+ }
+ };
+ </script>
+ </head>
+ <body onload="init();">
+ <h1>Events test 4</h1>
+ <div id="constructed-function">Constructed Function</div>
+ <div id="constructed-function-with-body-string">
+ Constructed Function with body string
+ </div>
+ <div id="multiple-assignment">Multiple Assignment</div>
+ <div id="promise">Promise</div>
+ <div id="math-pow">Math.pow</div>
+ <div id="handleEvent">HandleEvent</div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_chrome_listeners.html b/devtools/client/inspector/markup/test/doc_markup_events_chrome_listeners.html
new file mode 100644
index 0000000000..1158a24daf
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_chrome_listeners.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+ <div></div>
+</body>
+</html> \ No newline at end of file
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_jquery.html b/devtools/client/inspector/markup/test/doc_markup_events_jquery.html
new file mode 100644
index 0000000000..fa3253f223
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_jquery.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+
+ <style>
+ input {
+ margin: 5px 3px 10px 10px;
+ }
+
+ div {
+ width: 100px;
+ height: 100px;
+ border: 1px solid #000;
+ }
+ </style>
+
+ <script type="application/javascript">
+ "use strict";
+
+ const jq = document.location.search.substr(1);
+
+ const script = document.createElement("script");
+ script.setAttribute("type", "text/javascript");
+ script.setAttribute("src", jq);
+
+ document.head.appendChild(script);
+
+ window.addEventListener("load", () => {
+ const handler1 = function liveDivDblClick() { alert(1); };
+ const handler2 = function liveDivDragStart() { alert(2); };
+ const handler3 = function liveDivDragLeave() { alert(3); };
+ const handler4 = function liveDivDragEnd() { alert(4); };
+ const handler5 = function liveDivDrop() { alert(5); };
+ const handler6 = function liveDivDragOver() { alert(6); };
+ const handler7 = function divClick1() { alert(7); };
+ const handler8 = function divClick2() { alert(8); };
+ const handler9 = function divKeyDown() { alert(9); };
+ const handler10 = function divDragOut() { alert(10); };
+
+ if ($("#livediv").live) {
+ $("#livediv").live( "dblclick", handler1);
+ $("#livediv").live( "dragstart", handler2);
+ }
+
+ if ($("#livediv").delegate) {
+ $(document).delegate( "#livediv", "dragleave", handler3);
+ $(document).delegate( "#livediv", "dragend", handler4);
+ }
+
+ if ($("#livediv").on) {
+ $(document).on( "drop", "#livediv", handler5);
+ $(document).on( "dragover", "#livediv", handler6);
+ $(document).on( "dragout", "#livediv:xxxxx", handler10);
+ }
+
+ const div = $("div")[0];
+ $(div).click(handler7);
+ $(div).click(handler8);
+ $(div).keydown(handler9);
+ });
+ </script>
+ </head>
+ <body>
+ <div id="testdiv"></div>
+ <br>
+ <div id="livediv"></div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_object_listener.html b/devtools/client/inspector/markup/test/doc_markup_events_object_listener.html
new file mode 100644
index 0000000000..07000977bd
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_object_listener.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ div {
+ border: 1px solid #000;
+ }
+ </style>
+ <script>
+ "use strict";
+
+ /* exported init */
+ function init() {
+ const valid = document.querySelector("#valid-object-listener");
+ const validInvalid = document.querySelector("#valid-invalid-object-listeners");
+
+ // Add a valid event to #valid.
+ valid.addEventListener('click', {
+ handleEvent: () => {
+ console.log("handleEvent");
+ }
+ });
+
+ // Add valid and invalid events to #validInvalid.
+ validInvalid.addEventListener('click', {
+ handleEvent: () => {
+ console.log("handleEvent");
+ }
+ });
+ validInvalid.addEventListener('dblclick', {});
+ }
+ </script>
+ </head>
+ <body onload="init();">
+ <h1>Events test with event object listeners</h1>
+ <div id="valid-object-listener">Valid object listener</div>
+ <div id="valid-invalid-object-listeners">Valid and invalid object listeners</div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_react_development_15.4.1.html b/devtools/client/inspector/markup/test/doc_markup_events_react_development_15.4.1.html
new file mode 100644
index 0000000000..e467b9baa0
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_react_development_15.4.1.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+
+ <script src="lib_react_with_addons_15.4.1.js"></script>
+ <script src="lib_react_dom_15.4.1.js"></script>
+ <script src="react_external_listeners.js"></script>
+ </head>
+ <body>
+ <h1>doc_markup_events_react_development_15.4.1.html</h1>
+
+ <div id="container"></div>
+
+ <script>
+ "use strict";
+
+ /* global React, ReactDOM, externalCapturingFunction, externalFunction */
+
+ var ClickMe2 = React.createClass({
+ // eslint-disable-next-line object-shorthand
+ inlineFunction: function () {
+ alert("inlineFunction");
+ },
+
+ render() {
+ return React.createElement(
+ "div",
+ null,
+ React.createElement(
+ "h3",
+ {
+ id: "inline",
+ onClick: this.inlineFunction
+ },
+ "Click for inlineFunction"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "external",
+ onClick: externalFunction
+ },
+ "Click for externalFunction"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "externalinline",
+ onClick: externalFunction,
+ onMouseUp: this.inlineFunction
+ },
+ "Click for both"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "externalcapturing",
+ onClickCapture: externalCapturingFunction
+ },
+ "Click for externalCapturingFunction"
+ )
+ );
+ }
+ });
+
+ ReactDOM.render(
+ React.createElement(ClickMe2),
+ document.getElementById("container")
+ );
+ </script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_react_development_15.4.1_jsx.html b/devtools/client/inspector/markup/test/doc_markup_events_react_development_15.4.1_jsx.html
new file mode 100644
index 0000000000..2483984ca1
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_react_development_15.4.1_jsx.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+
+ <script src="lib_babel_6.21.0_min.js"></script>
+ <script src="lib_react_with_addons_15.4.1.js"></script>
+ <script src="lib_react_dom_15.4.1.js"></script>
+ <script src="react_external_listeners.js"></script>
+ </head>
+ <body>
+ <h1>doc_markup_events_react_development_15.4.1_jsx.html</h1>
+
+ <div id="container"></div>
+
+ <script type="text/babel">
+ "use strict";
+
+ /* global React, ReactDOM, externalCapturingFunction, externalFunction */
+ /* exported ClickMe */
+
+ var ClickMe = React.createClass({
+ // eslint-disable-next-line object-shorthand
+ inlineFunction: function () {
+ alert("inlineFunction");
+ },
+
+ render() {
+ return (
+ <div>
+ <h3 id="inlinejsx" onClick={this.inlineFunction}>Click for inlineFunction</h3>
+ <h3 id="externaljsx" onClick={externalFunction}>Click for externalFunction</h3>
+ <h3 id="externalinlinejsx" onClick={externalFunction}
+ onMouseUp={this.inlineFunction}>
+ Click for both
+ </h3>
+ <h3 id="externalcapturingjsx" onClickCapture={externalCapturingFunction}>
+ Click for externalCapturingFunction
+ </h3>
+ </div>
+ );
+ }
+ });
+
+ ReactDOM.render(
+ <ClickMe />,
+ document.getElementById("container")
+ );
+ </script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_react_production_15.3.1.html b/devtools/client/inspector/markup/test/doc_markup_events_react_production_15.3.1.html
new file mode 100644
index 0000000000..5cf07bec32
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_react_production_15.3.1.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+
+ <script src="lib_react_with_addons_15.3.1_min.js"></script>
+ <script src="lib_react_dom_15.3.1_min.js"></script>
+ <script src="react_external_listeners.js"></script>
+ </head>
+ <body>
+ <h1>doc_markup_events_react_production_15.3.1.html</h1>
+
+ <div id="container"></div>
+
+ <script>
+ "use strict";
+
+ /* global React, ReactDOM, externalCapturingFunction, externalFunction */
+
+ var ClickMe2 = React.createClass({
+ // eslint-disable-next-line object-shorthand
+ inlineFunction: function () {
+ alert("inlineFunction");
+ },
+
+ render() {
+ return React.createElement(
+ "div",
+ null,
+ React.createElement(
+ "h3",
+ {
+ id: "inline",
+ onClick: this.inlineFunction
+ },
+ "Click for inlineFunction"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "external",
+ onClick: externalFunction
+ },
+ "Click for externalFunction"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "externalinline",
+ onClick: externalFunction,
+ onMouseUp: this.inlineFunction
+ },
+ "Click for both"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "externalcapturing",
+ onClickCapture: externalCapturingFunction
+ },
+ "Click for externalCapturingFunction"
+ )
+ );
+ }
+ });
+
+ ReactDOM.render(
+ React.createElement(ClickMe2),
+ document.getElementById("container")
+ );
+ </script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_react_production_15.3.1_jsx.html b/devtools/client/inspector/markup/test/doc_markup_events_react_production_15.3.1_jsx.html
new file mode 100644
index 0000000000..f67317c9df
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_react_production_15.3.1_jsx.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+
+ <script src="lib_babel_6.21.0_min.js"></script>
+ <script src="lib_react_with_addons_15.3.1_min.js"></script>
+ <script src="lib_react_dom_15.3.1_min.js"></script>
+ <script src="react_external_listeners.js"></script>
+ </head>
+ <body>
+ <h1>doc_markup_events_react_production_15.3.1_jsx.html</h1>
+
+ <div id="container"></div>
+
+ <script type="text/babel">
+ "use strict";
+
+ /* global React, ReactDOM, externalCapturingFunction, externalFunction */
+ /* exported ClickMe */
+
+ var ClickMe = React.createClass({
+ // eslint-disable-next-line object-shorthand
+ inlineFunction: function () {
+ alert("inlineFunction");
+ },
+
+ render() {
+ return (
+ <div>
+ <h3 id="inlinejsx" onClick={this.inlineFunction}>Click for inlineFunction</h3>
+ <h3 id="externaljsx" onClick={externalFunction}>Click for externalFunction</h3>
+ <h3 id="externalinlinejsx" onClick={externalFunction}
+ onMouseUp={this.inlineFunction}>
+ Click for both
+ </h3>
+ <h3 id="externalcapturingjsx" onClickCapture={externalCapturingFunction}>
+ Click for externalCapturingFunction
+ </h3>
+ </div>
+ );
+ }
+ });
+
+ ReactDOM.render(
+ <ClickMe />,
+ document.getElementById("container")
+ );
+ </script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_react_production_16.2.0.html b/devtools/client/inspector/markup/test/doc_markup_events_react_production_16.2.0.html
new file mode 100644
index 0000000000..032d57539c
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_react_production_16.2.0.html
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+
+ <script src="lib_react_16.2.0_min.js"></script>
+ <script src="lib_react_dom_16.2.0_min.js"></script>
+ <script src="react_external_listeners.js"></script>
+ </head>
+ <body>
+ <h1>doc_markup_events_react_production_16.2.0.html</h1>
+
+ <div id="container"></div>
+
+ <script>
+ "use strict";
+
+ /* global React, ReactDOM, externalCapturingFunction, externalFunction */
+
+ class ClickMe2 extends React.Component {
+ inlineFunction() {
+ alert("inlineFunction");
+ }
+
+ render() {
+ return React.createElement(
+ "div",
+ null,
+ React.createElement(
+ "h3",
+ {
+ id: "inline",
+ onClick: this.inlineFunction
+ },
+ "Click for inlineFunction"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "external",
+ onClick: externalFunction
+ },
+ "Click for externalFunction"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "externalinline",
+ onClick: externalFunction,
+ onMouseUp: this.inlineFunction
+ },
+ "Click for both"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "externalcapturing",
+ onClickCapture: externalCapturingFunction
+ },
+ "Click for externalCapturingFunction"
+ ),
+ React.createElement(
+ "h3",
+ {
+ id: "doublebind",
+ onClick: this.inlineFunction.bind(this).bind(this)
+ },
+ "Click for inlineFunction bound twice"
+ )
+ );
+ }
+ }
+
+ ReactDOM.render(
+ React.createElement(ClickMe2),
+ document.getElementById("container")
+ );
+ </script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_react_production_16.2.0_jsx.html b/devtools/client/inspector/markup/test/doc_markup_events_react_production_16.2.0_jsx.html
new file mode 100644
index 0000000000..ed39b90c2b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_react_production_16.2.0_jsx.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+
+ <script src="lib_babel_6.21.0_min.js"></script>
+ <script src="lib_react_16.2.0_min.js"></script>
+ <script src="lib_react_dom_16.2.0_min.js"></script>
+ <script src="react_external_listeners.js"></script>
+ </head>
+ <body>
+ <h1>doc_markup_events_react_production_16.2.0_jsx.html</h1>
+
+ <div id="container"></div>
+
+ <script type="text/babel">
+ "use strict";
+
+ /* global React, ReactDOM, externalCapturingFunction, externalFunction */
+ /* exported ClickMe */
+
+ class ClickMe extends React.Component {
+ inlineFunction() {
+ alert("inlineFunction");
+ }
+
+ render() {
+ return (
+ <div>
+ <h3 id="inlinejsx" onClick={this.inlineFunction}>Click for inlineFunction</h3>
+ <h3 id="externaljsx" onClick={externalFunction}>Click for externalFunction</h3>
+ <h3 id="externalinlinejsx" onClick={externalFunction}
+ onMouseUp={this.inlineFunction}>
+ Click for both
+ </h3>
+ <h3 id="externalcapturingjsx" onClickCapture={externalCapturingFunction}>
+ Click for externalCapturingFunction
+ </h3>
+ </div>
+ );
+ }
+ }
+
+ ReactDOM.render(
+ <ClickMe />,
+ document.getElementById("container")
+ );
+ </script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_events_toggle.html b/devtools/client/inspector/markup/test/doc_markup_events_toggle.html
new file mode 100644
index 0000000000..0f9bdc6a11
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_events_toggle.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <h1>Toggle Event Listeners</h1>
+ <button id="target" onclick="handleEvent(event)">Target</button>
+ <script>
+ "use strict";
+
+ function handleEvent(e) {
+ const data = JSON.parse(e.target.dataset.handledEvents || "{}");
+ data[e.type] = (data[e.type] || 0) + 1;
+ e.target.dataset.handledEvents = JSON.stringify(data);
+ }
+
+ const domEventsElement = document.getElementById("target");
+ // adding regular event listener
+ domEventsElement.addEventListener("mousedown", handleEvent);
+ // and a "native" event listener
+ domEventsElement.addEventListener("mouseup", console.info)
+ </script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_flashing.html b/devtools/client/inspector/markup/test/doc_markup_flashing.html
new file mode 100644
index 0000000000..82df5b05d5
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_flashing.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>mutation flashing test</title>
+</head>
+<body>
+ <div id="root">
+ <ul class="list">
+ <li class="item">item</li>
+ <li class="item">item</li>
+ </ul>
+ </div>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_html_mixed_case.html b/devtools/client/inspector/markup/test/doc_markup_html_mixed_case.html
new file mode 100644
index 0000000000..ab26005e17
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_html_mixed_case.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <svg viewBox="0 0 2 2" width=200 height=200>
+ <clipPath>
+ <rect x=0 y=0 width=1 height=1 />
+ </clipPath>
+ <circle cx=1 cy=1 r=1 fill=lime />
+ </svg>
+ <DIV></DIV>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_image_and_canvas.html b/devtools/client/inspector/markup/test/doc_markup_image_and_canvas.html
new file mode 100644
index 0000000000..6486bd2d40
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_image_and_canvas.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html class="html">
+ <head class="head">
+ <meta charset=utf-8 />
+ <title>Image and Canvas markup-view test</title>
+ </head>
+ <body>
+ <div></div>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAdYElEQVRogVWYZ3QV5pWuz6y5694pKzNzZ26SyWQyccpkJo5jx8GOHXcbgzHYgOkgJECIYoQAIQkhoYoaoIKEQEK9HUnnqJxedXpvOk3l6OiogkB0XOLkzpo/z/2BV9a6P971re/ffvbe6/32twVB3QFC+oMEdcmMa/cT0uxnwpBCwnaEZc8J7npPMDO2n8Dop3iHNhIc2URUtoVp1XYS2iSiol3E5UeZ12YRNxSz6G1idXaU5Xk9E5MqEvNO4vMu4gk7iYSVpYSRlYSelVk1t+Mqlue1LM1pWE5ouJPQcG9WxaNZNU/ier6aNfF1wspKUM29yTGeLNq4k9CyEJdxa0HC4vwwgoDmWeBBXTJBXTIRXQqTxgPELanM2Y8QUe4krNhBWLadSfVO5saSWLaksGw5yLLpEM62j/F17SQ6cpQ5UzHLgSZuTw1yZ17L6oqd+TkLc3M25uYsLM2ZuTVnYGVOy524gltxOUuzapa+hVlNqFidkbASEbHg6SZubWfJPcgXcT1P5wysTCm5HVdxO6FkcVbK8oIMQXjsAOGxZCL6Z5mfNB5gynSQKUMKE/r9hBW7mBnbz5L1MCvOYzzwZ/A0coZH/gxuW45gbHwfbe372Dt2sWAu5PFkK6tTvdyeFnN3QcPctJK5mIaFuI7lhI47CQ2rCRX3EjJW43LuJLTcndPxYE7Dw1kJtyO9TBirMfZnMXw9FU3nGR5MDPD1kpqliJg7cQWri3rmZ+QsJlQIosYDhPT7CWn3EdYlEf0WJqzZS1C5i1lLKnc86Tzwn+Zh4AxfTeTyf+OFfBHMYslwGHvLR0grX2O44i08A4e467vC41gHD2N93J8Rczcu4e6snNWE4tk5K+VefJT7iVHuz0pYjal4mNDxJKHg3kQ/cVstNtFpBmu30pj3FvXn3sQnO8+TmX4ezo6yGpdzb2GM5cQYs1MqBCHtXsbVuwmodhHU7GFyLJmY6SAzpoPEjAdYdBznrv80D8fP8iScw59mCvnvuVIe+M8wpUjC2voR0srf0XX+VwxVvoVPdJhV7yW+jnfwzVwff1gU8/XiCE/nh3g0K+Z+TMj9mJBHs4M8mRvlaVzJFzNK7keExM3VeIcz0bXtRVSzlo7S16n8/Gf0XfmIeXcNf1yRc2d6hDszWh4uu0hM6hFMGJKZNKYwbT5IwnGEW9507oUyeRTN5slELg9CWTyOnufrqQL+OFPMfycq+GaqmAXTcdx9W9DUv81Yw7vorr6HqvY9LC1biclPcNtSyC17Kfd81dwPNHA/dIN7oSZWI83cn2zl6Ww3f1gU86c5GV9MiJg31WHvO4mi/jNGqtcjrnobYflr1Gf9B/U5L+KVneWb5WFWJgZZmlDwZMXP0owdwe1AOndDp3gYzebJVC5Pp/P4IpbPV7ELfD1TxNPJfL6YKuQP08V8Eyvhy2gRK85MIrJkHN2bMTV/yHjfZ0wO7SEo3IG/ZxvBvt2M9+/D07OH8FAaE9J0YqpsYrrzzBgKmDEXMeeoYNlTx21nPXFtOY7uEwxXfUpf4bsIC9+iO+8VmjKf50bWC9RkPI+u7QD3ox3cnxnh9qSCe3M2bsWsCJ7O5PFVooA/LZTwx/kSvojlcz+cw11/Jnd8Z7njzWbFk8WqJ4dVTw5L1jNMqtIIDCUREO1mSpJEXJbEzGgS0cGdBPs+I9K7g1D3Nvxdn+Fu34qvdzfjAwfwDR7E2ZeCqXs/hu5kjN0HMLYmoW7YzmDJOjpy3qAr5036z79N26k1XD74U+qOP09t+ouM1O5i3tXI10sq7ie0LExoWJwyIPhDoogvYvk8iGRzJ5DJHd8ZbnvOMG89ybT+CBOawwTlKbjFe3EM7MErSiYqP0pMk05ce4JF/XFmZSnMjO5lQrQDb9sGXE3r8bVuxNvyMYGOLQR7dxAS7iHQv4/AwAG8gwcxd+9B1bSZ0cvv0p3/Mo0n/pO2U2sQ5a2j9cQbFG/5MWfXfpfinT+jIf0N2gs2ccvdzJ9uabgbk3JrSsXqnAnBnUAmi650pg1pjCuScIl3Yuz+BG3bBlTNH6Fs2oD65kZ0bVuwCfcQlR9nwZjDsuU8C4ZMFvWfMzm6j1D/dvzdm3E0rcPRtA5/2yYC7Z/8GSLQvQ1vzw68vbvx9e/F0bcHc8dmdNffo6/wBerS/pXGY88zkv8xA2c3UrrleY68+vec3/RTrqW/R/uFzcwYr/J4ZoT7szLufWu/AlPPZnTtH6Ns/hBp43uIqt+kp/wVhFW/Z7T+QzQ3t+AWHWBae5o5Uw4LljwWrfksWPJYMGUzrzvB+MBObG0bsTStx3DtA6w31hPo2MJ451Y8LZvwdmzB27UVZ8dmHJ1bcXZvw927A3ffZ7h6N6C6+hqd2c/Tdvq3DJ/fRFf6enLX/Zyk5/+G8xv/k9asjfSU7CSivsTdSB8P5xQ8Xh5jZVaNoLvsVTpL19BT/jsGLr/JwOW3GbzyDpqbW/ANpzJvPseKq5i7nlKWrIXMGfNYMF9g0VLEoukccdVxHJ2b0TWuRX9tHWON67Hc3ISneye+rp14O3fg796Bt2cH7q5t2Ns+wdb+Cc6uLbh7P8E3sBFX90eMNa5HUfkRPZlrKdz0Cw6++B32/fKvqNy3hv6i7Ygu7WXSeIXVqQEezct5tKTndlyNoLf8Tfoq3mLw8vtI6jcgb9yEvm07gdFjLFrzeTR+mRVnKdOaLIKSDKY1OdxxlbPqqeKW9QLR0cOYbm5EffVDjDc3Y23fhqNzN57e/bi69+HuScLTm4Svbx/e3t24u7bhaP8UZ+eneHo+wdmzDo9wIz7hLhyt++jN/oBT7/4Te3/5Fxx74x+4fvL3DJR9ysDlLSSc1TydH+L+nJQ7CS0rCQOCgUsfILryISO1G5E1bEbXsgvXwGFi2mxu2UtZtpVw113BirOcOWMB86ZCVpzl3HaUMTeWi1e4D8219agbPsLevQfvYCo+0RE8omM4+9OwdR3A1p2EszcJr3AfPuEuvD3b8PdsIdC/FVffx7iFn+Lr38t4fxr6ut00HH6Zwi0/omr/v9N+7jW6S9+h4+K7xB3lfLE4xOqslNszelbnHQgGK9YxWr0JWd1mVNe2Ye05yLQmhxVn2bMs2y+ybCtlWn0en/gkvuEMprV5TGvzCEoyMLVtR167FnXjJ/jFaUQVmUQUZwkpsghIz2DpOYyxIxlzxx6cvfvwC/fi79tBULiNkGg740Pb8Yl34RXuIzhwmPDgCaxN+xkpW8dA8Rt0Fb1MZ+nLXM//NaGxHB7O9nF3RsbtmJG7CS+Ckas7kTfvR30zBU37IbySLG7763g61cLDyA2eTLZi78+g5vRrFCT/gq6SjwiMZjKlycc1cBRd0xZGrnyA5sZWxkczmNYVMKkvIaorIawpwiLMQN+Vhr4tCWvXPrzCffj7dhEU7iAs3sO4eA+h0RR8/Ul4e/YzLUknLs3A27kLzdUPGCx7icHy33A99z/wyT9nNXqT+zMj3IsbuBO3I1D3ZyPtPcXYUC4uXRlhey1LU518uSLlm1U1y+EeJC0nObPnBfa9+48UpLyAtH4fPvEZxofSsXbuxtmbhLM/jZD0HFO6SsZVldiHi3FKL+JXlSFpPkTf5c3Im7Zj696Lo2snnp5dTAynMC1NIyRKxte3j/GBZKZHj5CQHWV6aD+Rvm0Ya99EXPBLbp5+DkXtem45qngSE7I6KebxvA6BS3+Vcdt1pv3tTI23MR1sZ3VxlG8em/jqgYFEsA9x82kObvwJ7/xCQMZnP8HYcYw5XQkB8edMKdLxDBwgLDuDazCToKKCwfpj1Odv51TSGmovfIq84wRm0SlGr+9AXLMBW/deIsNp+Pr2MTFyhLA4lcDAAcZFKUREB5kaSmF6KIkZ0R58TeuQFf+G5s//lcHi3xNT5fAo0sKDSSGPZyUIJpxdxP19zIWETHrbiAU6eHJbxX89sfD0loqovZmumlRO7vwVJz/7KS0X1uEZPMmMOocJaTqhkTSiss+JyrMZrt1NXdZ6Sk+8T27aW+z44F9Y/+pfk536G7qufMbojd0om3dh7UkhIErDN3gQ/+BhxsVHCAwdwSc6hE+YQqB/P5PiZOKjKUwKd6C/8hbN6c/Rnv0ibuERVgPXeRzr52F8CMFiYJhZ3yAJ/wDz4X7uJST81xMLf3pgYnlyEK+2Bml7JoP1aZj6zjKlLWbOWMCCMZcVWx7zY2eJqU/RX7GB0sO/Zucb36Hy9Hoy9r7CKz8V8G/fEfDRa/+Tyqw30fQewz2agV2YhnvwKFFFJh7RMXzD6fhHTuId/hxnfyouYTLBwRQmRw4wM5KCrWkDfXkv0XHuZYztB1jxNvBlQszjxAiChEvElK2HeZ+I+3EVX67o+eaegYcLSmb83QT0DUxYbjBtbSA6Vsm0oYQlewl3nBdYsmSzZDnHtDaToZrNXDn9Ojvf/nuyU15l59of8fPvCnj9lwLOH/s9yr7TeFT5uGXnCCrPManJJ6o6z7g0h4D8HOOKXMYVufhkZ/BJ0hkfPsr4UCqRoUO4OrejrF6LuPw99C37WbBX82VCxOPEEIJZp5gpWx/zPjF3p+Xcm1XwaEnL09tjPF7UPhucwoPMutuIWa8SM1UQtxSTMOWSMGYxqc4gMHqMsDwHVUsa9ec/ISv5d5xLe4czh96grngX6sF8Io6rRGxXmLBUseC9yoKzhrCmiLDuIuGxMsJjZUQM5USMpUR0+YSVZwlJTzI+dBhPbxKW1u2oGj5F25LEtOEij2NCHsYHEMy6RcRdgyyGRrk7o+LRkp6v7jl4esfK4pQcn7EVnfgS8p5CrKNlhMYuMWmsJGEv5+74ZRZthbhEaXiGzmAWZuJXViHryEHdV4isJx+nthab6hJOXSUTrgaWwm0sh9tIOK8RNVwmarpCxFxD1FJLxFpL2FJN1FxJ1FDM5Nh5IvJT+ESHcfcdwNi2B21LEhFNIQ+mOng0I0RgkdbhUjcy5e7j9rSCp3esPL5jxWHqoK7qBAf3vs3xlLWkJ39AZupaGor3YhoqZtbVyIKnjthYHvGxfILK8/ikBfiVVbiV1ZhHKhkbqcAgKcesrMRjqCbqamTGd5O4t5mY8zqTtgaCxjqClnrCtusEbQ34zTUEzJeZsFQxY6tgxpBPUJKOR3QES3cyutZ9hFR5PJhs5VG8G4F3rBGLsppJfw8L0xLik6PcWTYh7C7jxz/6H/zz9/6CH37vL3nuB/+L//jx3/DRmz/jUn4ybt0NVqJ9rASuEjcWElTmE9JWELM0MmVrIWxqxme4jt/UiM/cQMBylbCjkZi3hYXxThaDPSwGe5gPdBHzthFxNBO03yBov07IXk/EWkPUXEbMXMSMMY+gJB2H8BDOgaN4JZnMOi7z1XwfAr2kFKu2hrmJQW7NK1iaU3P3roP+/su89OIP+NEP/44ffP9v+bu/+Qv++i8FPP+zf+JCVgpOXSfLkRHmnHXEzaVMGcqYNtcQdzQRd3Uw6+lhbryfCVcLEVczEed1JtxNxLwtxP0dzHo7iHvambQ3E7U3E3G0EHG2Eva0EHXfJOqsZ8JeRcx2kVlTAWHFKdyDabhERwlITzHnqOCPCz0I1EMFeK0N3JodZnlOTiIuZ3JSTnNzIW+8+Ut+/vN/4SfP/ZDvffd/8w/f+St+++K/U5yXjlbajlPbzIztKtPGMqJj5UyZa5mxNzPjbCXu7mTG20XM18GUp5VJVxMTzhtM2q8zYbtB1NxE2HidgK6OkOkaEUcLk54Oor42JjwtRF0NTDmqmTSVEjNdIKw4hWvwEM7+VHwjJ5izFPGHRCuCMUkREed1bsXELM4MMxESYTC0UFl5ik2fvMWPf/x9nvvxD/n5z37CmpdeYN+uT7l5rRyjug+T4joR4xX8qgu4ZBfwa8qZsFwn5mghYm7Cq69j2tPKlLuZCWcjE/YGIpYGwsYGxvUNBLX1BDTVhAz1TNqbmXC1EHY2M25rZNxSTdhcybgmn7AmG9/Icay9+7D0JOEcOEhMn8vTyXoE5pEiwuZ6liL9rMyMMhMeQiW9SnnJMVKSNvL273/Db196nt+teZFPN3zA2ZMHab9RhlrajF5ag01aiEOSi1NSgFdZTshQz4TlBiHTNXy6WqLWa0Rt9USsV4mY6wibrhIx1BPWXyM61kBUX8uksZ4Jy3XC5mt4xmpxaKtwaC7i0RThkmbhlWZgF6ZgbN+OqX0ntr4kosoM7geqEFjFxUQM9dwO93MvLmUuNIxe1kBF4VGSdnzA5g1v8e7rv+GDN9ewb8cGcs+kcKMum6Gei8j7CzGIc3HJ8vCqSvEoynDIKnArL+PT1RIYq8OprMClvohXU45XU45fXYlffYmgppaI9ioxQx3TY7VE9LX4NNXYVVVY5Bexygqxy/NwSs7iHD6OqWs3uptbMLZvx967l7DkGLccFxA4RaXMmJt4MCHmXnSEOe8gfkMnzdVZ7N38Fq/9+ie8+IsfsuZX/8bH773E8ZR11JSlIu7OQ9F/HllXOsquE8g70pG2ZqDszsE0VIJDVoFTUY55pACrpACXvAiXvAi3rBSPrJyA4gphZTWT2ktEVOX4FeW45eXY5WVYFaXYFUXYFbm4ZJk4xUfRtW5Ddf1jjK1bsXbvxic+yKz+DAK7uJSEo5VHk6MsBQZIeIXcisrQiGo5vv9D3lvzHK/88ru88JO/5YXn/ooPXvk+pw69w7WKJNpqD9JxeTeNhZu4nPUBV/M3IWo8jm2kFI+iAvNIATZpMU5FCV5VKT51GT5VBT5VFUFNLVHdVYKKMvyyYpySQhySYhyKctyaCtzqUjyqAryybByDR1E3f4a8YQP65k8xt2/D1beXCdlRBDPeDhbDQpajAyxEBliKDjEXHMCuuoqwKYuTyW+x/cOf8eGr/4cNr3+fjW/8Mx+/9k9sf/+HHN3+K5LX/wtJa7/LiW0/p+7cBmQ3T2AduoBjtACHtBC3ogSPshSPugKf9jI+TTVedTVuZTUuxSWc0ou4FSX4VBUE9JcJGqoJj1UzrinHryzGJz2HuecI2pu70d/cjq5pM/obH+Pu3cGs5giCh0sKHt9SsjonYWGin4WJfpYmBog6b2KWVtJ86QAlp9ZzOvlVsg6+TvbBNzm171VOJ/2OC0feoezE+1SdfJemC5tRNB/HMXwBt7QQ23Ae1qHzeJSluBUlOBUXcSkrcKku4VZfwaupw6utwaWqxKOtxK+7RMRQw4S5hgnjFSL6CsKaEkLyPKy9R9E070J/czvG5q0YbmzE1b2VKWkKgq/v6vjDPS2PFuUsRoXMjnexEO4l7u8gbG7ENFKKuOkkHVcOIqw7grjxJH21R+m6nEpfzWFGrh9H3nQMU28WflkxAdVFnKN5mMXZWIZycEgLcMqK/gzgUV3Gq67Gq63Bq615VhVtFaGxS0SMV5gwXmHCUPHsS6rOJyjNxNyVgvb6VsZubMbU/Anm5o24OrcQGdqL4NHCCF+syHmyJOH2VB+J8TYS/hamnU2EjM9szyEpxTiYj22kGLe0AvtwKebBQmziQhyiPOyiXJxDebhH8rAP52IaOINZnI1DkodtJBeHtACPshSftgq/7go+TTUu1SUcikq8mkt4NZUEtBUEtRWEtKWE1AUE5Nn4JRk4+1MxtG5H2/gxumvP9kfGxg9xtW4i0r8LwYPZAb64LeHr21Lux/tZDLWR8DYx7Wggaqpm1tXIhLGaoLaScU0FfsVFnCMF2MR5uIYu4B7JwyY6i0l4CmNfBmN9GRgHMrANZeOS5eFRXMCtKMSjLMGruohHXYFHXYVbVYlb9cxSfaoK/KqL+FSFBBR5+GRn8AwdxTV4AHP7NgzNH6O/thZ9/Xuor7yJ6vIb2BrXEe7ZjuDx3CBf3hriyyUxd6c6SfgaiTuvErPXErPVELPVMGW6TERfQUBVglt6AYf4HHZRDo6hbBxDZ7EOnsbcfxJz/0msg6ewDWfilOTgluUS0pcQ0BTjVhTikBZgkxbiUpbh01YxPnaFce0V/OpKfMpSvIo8vJJMXENHsAuTsHZvx9iyAUPzWgzX3kNT8zry8jXIyn6Lqe49Au2bETyZFfJkXsjj2R5uhZqIOaqZNFcxZakkZq0iMlZKVFfyrKyKPHyyXHzSc7hHsnCIT2EXZWAXZWAbPIllMB2r6CSO4dO4ZefwKs4T1BUT0BTjURXgkhfgVBbjUZcR0FcRNFwmqLvMuKYCn6IIjyQH99Dn2Pr3Y+78DEPbBvQ33kV77Q00Nb9DWfky0osvoSx/BWvDWsbbtyJ4ONPF49keHs50sBxsZMZ+mQlzGZOmZ5oyXGRirIigOo+AModxxTO5Rk5iEqZhEx3HLv4cm+g4xt4jjPWmYRlMxyXNYlyTj0t+Do8ij4CmmHF9KaGxCgJjlfj1FQS05QS1lQTUZXhk+ThHzmAfTMPcvRt960Z0N95H0/B7lNVrkFa+iPTir5GXr0F35S1czRsJ9+xCcH+ylccznTyYamPRV8+0pYKooZSorpiw9gJRfSFhbR5BVTYBxVnGZafxSzLwjqTjHvocu/gYdvExbKKjWAePYRk8hlV0Aos4A+vQKbyK8/jVBYT0F4mYKoiYKgjqy/GpS/AoS/DIi3FK87ENn8UuSsc+mIq1dy/mjs0YW9ahqHmNweL/pPf8TxkqeQH1lTcxNqzF1bKVUO9eBKvRVh5MtXF/spVFXz0xaxUTxotE9YWENPmENOcJqnMYV2bil58mIMvAJ0nHPXwch+gIloHDmPtTMQkPYew7xFhvKoa+wxiFxxkTHieoLSSkKyakv0hIf5FxfSk+TRFuRSFO2QXc8gIcklxsw5k4hk7gFKdh69uHsW0z2utrUda+wXDFbxkpexlt3TvYmjfh6tzOuHA/U5JjCFZCLaxGW1mNtrIcuMas4wpT5nIiY0UEtRcIqnMJKLMIKM4QUJxhXH6KgCwd7+hx3MNHcQ0dwSlOwypK/RbmMKb+I5j6P8c8cAK37BxuWS5ueT5ueT5OeR4O2XlsknNYR3Oe3SU5OEazcA2fwj18HFtfMvqWrSivrkVy5R1GL72Bsu49rK1b8PTtJTBwgNDIEaZVpxEs+2+yEmrhbqSNlVAzi54G4vbLTJrKiIwVEVDm4JWdwSM5iWvkBJ6Rz/+/wJ3iVByiQ1hFqZj7UzH3H8YsPPYMoP8kqs4jaLqPoRdmYBw8g3k4C8tI9p9ll+bglOXgkmbhGj2NY/A4xq5k9Dd3or62GVndRygbNmJs3Y6nP4XA0BECI58TVpxhSn8OwYKvmeXxFu5EOrgbbWcl1MK851krTZrKCChzcEtOYR08gqH3ILqu/Wg7k9B37kXXsQdN2w40bTtQt+5E1bILRctulC37UbUfRNWWymhzCrKWw6i70zEMZGIdPod99FkFbJJszMNncEjP4pJl4hjOwNSdhq41hbHWZMztB7B1peLqO4p/OJ2wPPPZukWdQ1Sfx5SlCMGcu5kFXzMr4Q7uT/Vwf6Kb5UATs/aaZxCGYsZV53AOp2PoPYi6fS+Kll0omrchb9rCSMNGRq5tYKThE0avbWH0+jZkTXuRtySjbE1F232Csb4MTKIsbCO5OKX5uOUFuBT5uBTnMY+cwiY9jVOWiXXoFKa+4xi7jmHvO4l3MJOINI+o4gJT6iIm9UVEdAUE9QWExgqJmIsQxJxNxN1N3Brv4GFMyMNYH7eCN5l11jJtrWLKXE5YX4hPnol9+Dgm4SH03cmoO3ajaH0GIW/+FOXN7ahbd6Pt3I+hJ+3bR+00Lsl5XJJ8XJICXJKCPwN4FIV4VPk4FWdxKTNxK7LwyHPwSXIJSi8QlRcxpSojrqsiPnaJ2NglpgwVhPQl+PRFeHUFuLTnEUzaGpl23GDJ38bDmJBHM/3fAlxl2lpFSFdMQJ2HT56FS5KOXXwMc38q+p4kNJ270HXsQt+1E2PPfqz9qdjFx/BKMgko8gipCwmoSvApinBJCrAPfzsbSfJwywvwqi8QNFzAqz+HX5NLSFdEzFTBnLWaJUs9C6Y65k1XmbPUM2e5SsxSTdR0iYCxFLe2AKs6l/8HXK32/y5m8HIAAAAASUVORK5CYII=" />
+ <canvas class="canvas" width="600" height="600"></canvas>
+ <script type="text/javascript">
+ "use strict";
+
+ const context = document.querySelector(".canvas").getContext("2d");
+ context.beginPath();
+ context.moveTo(300, 0);
+ context.lineTo(600, 600);
+ context.lineTo(0, 600);
+ context.closePath();
+ context.fillStyle = "#ffc821";
+ context.fill();
+ </script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_image_and_canvas_2.html b/devtools/client/inspector/markup/test/doc_markup_image_and_canvas_2.html
new file mode 100644
index 0000000000..00fbd36168
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_image_and_canvas_2.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class="html">
+ <head class="head">
+ <meta charset=utf-8 />
+ <title>Image and Canvas markup-view test</title>
+ </head>
+ <body>
+ <img class="local" src="chrome://branding/content/about-logo.png" />
+ <img class="data" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADI5JREFUeNrsWwuQFNUVPf1m5z87szv7HWSWj8CigBFMEFZKiQsB1PgJwUAZg1HBpIQsKmokEhNjWUnFVPnDWBT+KolJYbRMoqUVq0yCClpqiX8sCchPWFwVlt2db7+X93pez7zu6Vn2NxsVWh8987p7pu+9555z7+tZjTGGY3kjOMa34w447oBjfKsY7i/UNM3Y8eFSAkD50Plgw03K5P9gvGv7U5ieeR3PszeREiPNX3/0DL4hjslzhm8THh+OITfXk3dhiv4GDtGPVzCaeJmPLYzuu5qJuWfuw2QTlcN1X9pwQU7LhdZ/ZAseD45cOh9hHvDkc/yAF/DNhdb5Mrr3PvBMaAYW8fMSIi2G497IMEK/YutGtAYr6+ej+nxu/NN8Ks3N7AR6HgcLz0Eg1Ljg1UcxZzi5qewIkMYLRweTr2Kzp+nmyXAd5pS3XQDd+N/4h4zgu9FI7brlXf90nMEnuwQxlvv+hosE3TuexmWeysmT4W+WxkMaLzf9Y8ATgjcUn7T9H1gqrpFq8eV1gMn6t16NhngjfoX6q4DUP032Rd4LJgpSLwJ1yzFqBG69eRkah0MVyo0Acfe+yy9AG4nMiYCkeM53KKFXncBLAXqEm+wCqZwaueq7WCmuLTcKSJmj737ol2hurA9eq9VdyiO8yWa3NNyog+SB5CZodSsQq/dfu34tJpYbBaTMzvVddDZu16q5smXf4G8zEvqm4cyaAmJPuTJk3oJWdS4WzcVtfMZbThSQckb/pYfRGgo3zNOqZnEHbJPGK4abaDCQIIsT8V/qTaBqHkLh6LzXH8XZQhbLhYKyyCC/WeHYcNdmvOgfe8skzbWL270/T3wf7tSx/lGCbTu8xlzzmCSWLc5iwmgikcCHi3Mga0Ry913vBFvQwg90l6M4ImWKfsWOp7DSWxmfpPlCFuPFfsNfKrCnPYpQKIRgqBK7D0SxYaNHwkEiJMtl0ReDp3Lc5D3PGoTo/sKngCl7a5chFqvBatKwjBd7WwqIlzB/78NcoUcp5VSgGxm+7b8eqQRGnHMO634epO4S1EZww09/iFg5UmGoESDuznP1xVhTUX1WWHPzjpd25wyH0hRxI3LGM75nxmuNEEUVpAN0XgxmPoKralakbQnWlIMQyVBD/w+3orkq4lvualjKyWwzt4MaxqspQHVhPOWG64bxYuhZXSFGWhipbSDVragOu5Y9eAsmDDUKyBA703vemVhHoueD6e9wAzJK1WfmN0Umk5GGM4kEMZcuIECqgjm0nldAqmbjwtm4VxZH5AvlADP6mx9Eqy9Q0+KqW8Ch+47FaMMYmnNGfY1iPMshoC6qFxme4wQ+0p+ARE6H3+9veWEDWgUhDhUKyFARn4jM5BNxT0XsMg7bfymGK1ov3wtjDfhL4w0HVGUVBEjDaaE+QNdrcNWch1PG4W6xrjBUXECGivg++Cva3JUT4iQUz3V2RsSVaKLwOuDT89A3HdBQoxhNC+fnVm74ual2EG893P6G+PuP4SfiO4cCBWQooL9qCWKNXPbcI37Aa/lnlZxXRt4RFONGwSDCPAHqOuqjWct1QiEMw5mChM5X4K47FyNqcd3aK9AwFH0CGYLoe1ctxk2eWi57rg5JfGp9rzC6ggCdFlAgHBDw5Yxlcg6G8SyHCjMlsgmDD9zhSeHlF+JnAgWDTQUy2NxfdwOao1UVV3pi3+bE97YSbWpLAbn6zefHNQkp1PMpIBwwvslKgIYTKM2nEpNzrGcH3FXTEal0L38kJ4uDQgEZbO4vnI173LXf5NHZaiUxtaCxyZuo/rK6LpUg54yg3zTWRAArvDcRIPZ6BqzrQ1REpmL+DNw32OKIDCb3X1qPVn8wNNMT4w2bvs+q4bAZrqBh2skaL3yyhhIIZ4i6oHkUK0RckcB8GigEyRIH4A6Mgc8fatl0/+BkkQxC9gIT4ljna1rIZW9rEdNbjJcNjsnoYj7LHWCUwpITzEgzRQKZ3XAFHbTzA3hrz8TEUUZxFBhoKpABQt/97p+w0hMZG68I8R6FtlsJT3FELndZntjM+VMnylKYq8GJI3UZaRMpquGSGFVOEfv0YZBMNzz+uvjbfzS6xQERIhlI9FcvQWNdFVb7x1zCb+QNK8vb9NsiifmI5hBgVoOCBC1sb0ab5RomqENxLO3eA1/0NDRU47q2RQNbRCUDIb7lF2CNL3ZGxEV4n08TVvZWYG4pZyV0zUdS45tyCBByOHWiyvZmxFXDCyRo1ge5+Sy0TA+8lWMiP/6O0S32exGV9Jf4fr8azdUR3zL/CZz4MtvzdX5uOYs6NDOmpkuj5Huh+7qUQSYl0ThHzw0YQzcGo6bhzEqoYq5rN3yRiYiG3Vfe2Ybm/qKA9NNZ3nNm4F7/yDkg9AN+U1mHiBcXP8zuDN76jj8hg1QyiWQigalj02BJPhK8I0zxijAjhp5zhlpLUDvS+BCy2HMAvvB4XDgL9/SXC0g/ou/5+6/xLX8w0uJrOIkXfPvyhY0F6gr7M8H0KWFYikcqAXakB+xwD9CdREBLoau7Gz3cAdSIdLFxFtJTCqRChSjnutvhDcREtzjz2Tswtz+yeNRFUeXZXtWux7C1fuoVcbd3J//ipDX3uZZDLGrwweS+UBLL5TDliVBnF8P7H+XI8aRRGsIBJg/Zlslt1+W+D1JWoSyi+kD9jfhs78t7mhZhSl+fLfY1Bdyv3I8V/qpY3B1McgN7ZFT5/vNO0I5DPLLdPBIJA8qc4h2I0QplYfDpJwHT+aj0246r5S8rToG8OjCle8wk4OLvvYGa+Ovr84uo2qBSwJS9G5egoZFLTfiEqWDtbwGfHgKOdPHcS+ai7XDzMPW/FJRLGGcxnBbK4YJC2K+h+T6Bdu5CqHqCWERd3bawb7JI+iJ735+LNaHaprBLLHBm08U3XxShEsdt+f3eTh3v7aC95Dct4RCWL5OZWh/oXBZThxAIxyOXLzBk8aiEWJID8rK3CpPOmeHaGpvCS+7EHv5FujVHUSJPLXvIFeHcNc+9xrB2gws9KZdxuLFax/WLM5gzzSm/lTXF/OdAcapyvjxPqxqHjr2v4ckX2bS2dRBrc5lSdpKjEJ9/9tdwX2WMd53ZQ2IVo3RES+UwVSpCPvYepNx4gmTGDUKIMQ4eduPnD7mx9xOn/KZKOlFbStjONxHTtR+BYAPmnoZ1Zp8wkBRwP/EL3u0F/C2hGl7vpz7vW37T3vP7if8wroKuoh8ribknX9BK5rcF+mo1qKaKyRPJTgTDjbzY8szcuLb3bpH00u35T47j7prRpwDJTxzyG0dHgxPp5bPG8VdkpfPbUg3SgoOo2mwVukb98D5EqpswZTTulCggTk4gpYhv0++wIhCJxr0+Hq1sondis0SE2oxQe3qWXwWyO4DSQg9gJ8Iiw1VFcGqXxet0N9xE4ygIxv/9W6wo9WyROEX/R+eiobYSq2vHTOR631Eiv2lRfh9dvxkumkXh92Qsx8XrAJ+7YGbWuhxOi/U+31NQmzyqNYG8N/3wfo6CRtRHcN01FzkvojohwLu0VVvDa56IS/xcj2b7nN+O+m0jqpE1wMPXZxAN9iCVThtDvH7gmiRGRpU8Lspv1Uhq4wIVdQoyuGSLNYPKUCS8+CzNURbzMmjK3i8u0U793lmuV0ef9nWQ5MGC/DiUqEUSaCtXna9RJEspZS1lrXINK/pcq+SpT50t98QKMq1FRmDfx3vxty102k0PM4ssEnvuz5+G26Ij4yDpz6z9fV8bkyIkqBFkhej0Ib+ZQ34XJK9AfozaiimqIoX3Jp3tiISrcfYpuN2+iFph/02P36PNC9fVcCnp6H9jYouKyfaWufz5Tp9tVxcUniw7IohZv4dZz81/ns67z3AYPrc2n0+Ix2q8k0PWjgBy88XaibnfK9A+5LdDY2Ivhy36fbT8Zv3Lb1U1qLqUxorXEEXIs0mjjrtxoTZWtdvigNs2sgPiujTv6DIZLld6b/V5742JZV3fUsUVFy5gdsNtKWFzUCEVbNepD1MkSMVbsb6SZm7jI3/zODtQKgUMsOw8wDZ63t5xcV1TnaEAxoc6wrqY+Fj+N4DsqOnhOIdicrQSm1MPYCPlIqHn5bbHg8/bj2D3QfZnCX3mpAICDZV8jH5kpbZqTD0W+DxaA74CWzLN2nd14OlL72J38Lf7+TjC7dadZFDoZJQPrtaIKL/G0L6ktptPZVJ8fMqHYPZOKYPMyQGadIJfDvdXwAFiZOTvDBPydf5vk4rWA+RfdhBlaF/yDDBRoMu9pfnSjv/p7DG+HXfAcQcc49v/BBgAcFAO4DmB2GQAAAAASUVORK5CYII=" />
+ <img class="remote" src="http://example.com/browser/devtools/client/inspector/markup/test/doc_markup_tooltip.png" />
+ <canvas class="canvas" width="600" height="600"></canvas>
+ <script type="text/javascript">
+ "use strict";
+
+ const context = document.querySelector(".canvas").getContext("2d");
+ context.beginPath();
+ context.moveTo(300, 0);
+ context.lineTo(600, 600);
+ context.lineTo(0, 600);
+ context.closePath();
+ context.fillStyle = "#ffc821";
+ context.fill();
+ </script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_links.html b/devtools/client/inspector/markup/test/doc_markup_links.html
new file mode 100644
index 0000000000..f393319f8d
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_links.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>Markup-view links</title>
+ <link rel="stylesheet" type="text/css" href="style.css">
+ <link rel="icon" type="image/png" sizes="196x196" href="/media/img/firefox/favicon-196.223e1bcaf067.png">
+ </head>
+ <body>
+ <form id="message-form" method="post" action="/post_message">
+ <p for="invalid-idref">
+ <label for="name">Name</label>
+ <input id="name" type="text" />
+ </p>
+ <p>
+ <label for="message">Message</label>
+ <input id="message" type="text" />
+ </p>
+ <p>
+ <button>Send message</button>
+ </p>
+ <output form="message-form" for="name message invalid">Thank you for your message!</output>
+ </form>
+ <a href="/go/somewhere/else" ping="/analytics?page=pageA /analytics?user=test">Click me, I'm a link</a>
+ <ul>
+ <li contextmenu="menu1">Item 1</li>
+ <li contextmenu="menu2">Item 2</li>
+ <li contextmenu="menu3">Item 3</li>
+ </ul>
+ <menu type="context" id="menu1">
+ <menuitem label="custom menu 1"></menuitem>
+ </menu>
+ <menu type="context" id="menu2">
+ <menuitem label="custom menu 2"></menuitem>
+ </menu>
+ <menu type="context" id="menu3">
+ <menuitem label="custom menu 3"></menuitem>
+ </menu>
+ <video controls poster="doc_markup_tooltip.png" src="code-rush.mp4"></video>
+ <script type="text/javascript" src="lib_jquery_1.0.js"></script>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_mutation.html b/devtools/client/inspector/markup/test/doc_markup_mutation.html
new file mode 100644
index 0000000000..f021c9fcf7
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_mutation.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+
+<html class="html">
+ <style type="text/css">
+ #node1.pseudo::after {
+ content: "after";
+ }
+ </style>
+
+ <body class="body">
+ <div class="node0">
+ <div id="node1" class="node1">line1</div>
+ <div id="node2" class="node2">line2</div>
+ <p class="node3">line3</p>
+ <!-- A comment -->
+ <p id="node4" class="node4">line4
+ <span class="node5">line5</span>
+ <span class="node6">line6</span>
+ <!-- A comment -->
+ <a class="node7">line7<span class="node8">line8</span></a>
+ <span class="node9">line9</span>
+ <span class="node10">line10</span>
+ <span class="node11">line11</span>
+ <a class="node12">line12<span class="node13">line13</span></a>
+ </p>
+ <p id="node14">line14</p>
+ <p class="node15">line15</p>
+ </div>
+ <div id="node16">
+ <p id="node17">line17</p>
+ </div>
+ <div id="node18">
+ <div id="node19">
+ <div id="node20">
+ <div id="node21">
+ line21
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_navigation.html b/devtools/client/inspector/markup/test/doc_markup_navigation.html
new file mode 100644
index 0000000000..9633052e17
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_navigation.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+
+<html class="html">
+ <head class="head">
+ <meta charset=utf-8 />
+ </head>
+
+ <body class="body">
+ <div class="node0">
+ <p class="node1">line1</p>
+ <p class="node2">line2</p>
+ <p class="node3">line3</p>
+ <!-- A comment -->
+ <p class="node4">line4
+ <span class="node5">line5</span>
+ <span class="node6">line6</span>
+ <!-- A comment -->
+ <a class="node7">line7<span class="node8">line8</span></a>
+ <span class="node9">line9</span>
+ <span class="node10">line10</span>
+ <span class="node11">line11</span>
+ <a class="node12">line12<span class="node13">line13</span></a>
+ </p>
+ <p class="node14">line14</p>
+ <p class="node15">line15</p>
+ </div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_not_displayed.html b/devtools/client/inspector/markup/test/doc_markup_not_displayed.html
new file mode 100644
index 0000000000..20a4b94155
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_not_displayed.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ #hidden-via-stylesheet {
+ display: none;
+ }
+ </style>
+</head>
+<body>
+ <div id="normal-div"></div>
+ <div id="display-none" style="display:none;"></div>
+ <div id="hidden-true" hidden="true"></div>
+ <div id="hidden-via-hide-shortcut" class="__fx-devtools-hide-shortcut__"></div>
+ <div id="visibility-hidden" style="visibility:hidden;"></div>
+ <div id="hidden-via-stylesheet"></div>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_pagesize_01.html b/devtools/client/inspector/markup/test/doc_markup_pagesize_01.html
new file mode 100644
index 0000000000..8323f0b2e7
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_pagesize_01.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+
+<html class="html">
+ <body class="body">
+ <div id="a"></div>
+ <div id="b"></div>
+ <div id="c"></div>
+ <div id="d"></div>
+ <div id="e"></div>
+ <div id="f"></div>
+ <div id="g"></div>
+ <div id="h"></div>
+ <div id="i"></div>
+ <div id="j"></div>
+ <div id="k"></div>
+ <div id="l"></div>
+ <div id="m"></div>
+ <div id="n"></div>
+ <div id="o"></div>
+ <div id="p"></div>
+ <div id="q"></div>
+ <div id="r"></div>
+ <div id="s"></div>
+ <div id="t"></div>
+ <div id="u"></div>
+ <div id="v"></div>
+ <div id="w"></div>
+ <div id="x"></div>
+ <div id="y"></div>
+ <div id="z"></div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_pagesize_02.html b/devtools/client/inspector/markup/test/doc_markup_pagesize_02.html
new file mode 100644
index 0000000000..db2502c89c
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_pagesize_02.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+
+<html class="html">
+ <body class="body">
+ <ul>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ <li>some content</li>
+ </ul>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_pseudo.html b/devtools/client/inspector/markup/test/doc_markup_pseudo.html
new file mode 100644
index 0000000000..7da0970f15
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_pseudo.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<style>
+article::before,
+article::after {
+ content: "";
+}
+</style>
+<article>
+ <div>test node</div>
+</article>
diff --git a/devtools/client/inspector/markup/test/doc_markup_search.html b/devtools/client/inspector/markup/test/doc_markup_search.html
new file mode 100644
index 0000000000..e4c6fa02cd
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_search.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head></head>
+<body>
+ <ul>
+ <li>
+ <span>this is an <em>important</em> node</span>
+ </li>
+ </ul>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_shadowdom_open_debugger_pretty_printed.html b/devtools/client/inspector/markup/test/doc_markup_shadowdom_open_debugger_pretty_printed.html
new file mode 100644
index 0000000000..725bb0753b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_shadowdom_open_debugger_pretty_printed.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Custom Element Pretty-Printed Source Test</title>
+ <script src="shadowdom_open_debugger.min.js"></script>
+</head>
+<body>
+ <test-component></test-component>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_subgrid.html b/devtools/client/inspector/markup/test/doc_markup_subgrid.html
new file mode 100644
index 0000000000..b66ef1a9b6
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_subgrid.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <style>
+ .container {
+ display: grid;
+ grid-gap: 5px;
+ grid-template: auto / 1fr 3fr 1fr;
+ background: lightyellow;
+ }
+
+ header, aside, section, footer {
+ background: lightblue;
+ font-family: sans-serif;
+ font-size: 3em;
+ }
+
+ header, footer {
+ grid-column: span 3;
+ }
+
+ main {
+ grid-column: span 3;
+ display: grid;
+ grid: subgrid / subgrid;
+ }
+
+ .aside1 {
+ grid-column: 1;
+ }
+
+ .aside2 {
+ grid-column: 3;
+ }
+
+ section {
+ grid-column: 2;
+ }
+ </style>
+</head>
+<body>
+ <div class="container">
+ <header>Header</header>
+ <main>
+ <aside class="aside1">aside</aside>
+ <section>section</section>
+ <aside class="aside2">aside2</aside>
+ </main>
+ <footer>footer</footer>
+ </div>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_svg_attributes.html b/devtools/client/inspector/markup/test/doc_markup_svg_attributes.html
new file mode 100644
index 0000000000..04b699be71
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_svg_attributes.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+ <body>
+ <svg viewBox="0 0 2 2" width=200 height=200>
+ <circle cx=1 cy=1 r=1 fill=lime />
+ </svg>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_toggle.html b/devtools/client/inspector/markup/test/doc_markup_toggle.html
new file mode 100644
index 0000000000..521db100ca
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_toggle.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>Expanding and collapsing markup-view containers</title>
+</head>
+<body>
+ <ul>
+ <li>
+ <span>list <em>item<!-- force expand --></em></span>
+ </li>
+ <li>
+ <span>list <em>item<!-- force expand --></em></span>
+ </li>
+ <li>
+ <span>list <em>item<!-- force expand --></em></span>
+ </li>
+ <li>
+ <span>list <em>item<!-- force expand --></em></span>
+ </li>
+ <li>
+ <span>list <em>item<!-- force expand --></em></span>
+ </li>
+ <li>
+ <span>list <em>item<!-- force expand --></em></span>
+ </li>
+ </ul>
+</body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_tooltip.png b/devtools/client/inspector/markup/test/doc_markup_tooltip.png
new file mode 100644
index 0000000000..699ef7940b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_tooltip.png
Binary files differ
diff --git a/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_1.html b/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_1.html
new file mode 100644
index 0000000000..d2fdb16294
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_1.html
@@ -0,0 +1 @@
+<div id='one' style='color:red;'>ONE</div>
diff --git a/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_2.html b/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_2.html
new file mode 100644
index 0000000000..93d84a0885
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_update-on-navigtion_2.html
@@ -0,0 +1 @@
+<div id='two' style='color:green;'>TWO</div>
diff --git a/devtools/client/inspector/markup/test/doc_markup_view-original-source.html b/devtools/client/inspector/markup/test/doc_markup_view-original-source.html
new file mode 100644
index 0000000000..4d080ab607
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_view-original-source.html
@@ -0,0 +1,9 @@
+<body>
+<button id="foo">Button</button>
+<script src="events_bundle.js"></script>
+<script>
+"use strict";
+var button = document.getElementById("foo");
+button.addEventListener("click", window.init);
+</script>
+</body>
diff --git a/devtools/client/inspector/markup/test/doc_markup_void_elements.html b/devtools/client/inspector/markup/test/doc_markup_void_elements.html
new file mode 100644
index 0000000000..72a937980f
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_void_elements.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html class="html">
+ <head class="head">
+ <meta charset=utf-8 />
+ <style>
+ .before:before {
+ content: "before";
+ }
+ </style>
+ </head>
+ <body class="body">
+ <h1>Test void elements in HTML document</h1>
+ <img>
+ <hr>
+ <hr class="before">
+ <br>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_void_elements.xhtml b/devtools/client/inspector/markup/test/doc_markup_void_elements.xhtml
new file mode 100644
index 0000000000..331346b24a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_void_elements.xhtml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head class="head">
+ <meta charset="utf-8" />
+ <style>
+ .before:before {
+ content: "before";
+ }
+ </style>
+ </head>
+ <body class="body">
+ <h1>Test void elements in XHTML document</h1>
+ <hr class="before" />
+ <img />
+ <hr />
+ <br />
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_whitespace.html b/devtools/client/inspector/markup/test/doc_markup_whitespace.html
new file mode 100644
index 0000000000..b0b999f1b2
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_whitespace.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ #pre {
+ white-space: pre;
+ }
+ </style>
+ </head>
+ <body>
+ <div>div 1</div>
+ <div>div 2</div>
+ <div>div 3</div>
+ <div id="inline">
+ <img src="chrome://branding/content/about-logo.png" />
+ <img src="chrome://branding/content/about-logo.png" />
+ <img src="chrome://branding/content/about-logo.png" />
+ </div>
+ <div id="pre">
+ <img src="chrome://branding/content/about-logo.png" />
+ <img src="chrome://branding/content/about-logo.png" />
+ </div>
+ </body>
+</html>
diff --git a/devtools/client/inspector/markup/test/doc_markup_xul.xhtml b/devtools/client/inspector/markup/test/doc_markup_xul.xhtml
new file mode 100644
index 0000000000..34f13dae0b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/doc_markup_xul.xhtml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xul:window xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ title="Test Bug 984442">
+
+ <xul:panel id="test"></xul:panel>
+
+</xul:window>
diff --git a/devtools/client/inspector/markup/test/events_bundle.js b/devtools/client/inspector/markup/test/events_bundle.js
new file mode 100644
index 0000000000..4759b27226
--- /dev/null
+++ b/devtools/client/inspector/markup/test/events_bundle.js
@@ -0,0 +1,94 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // identity function for calling harmony imports with the correct context
+/******/ __webpack_require__.i = function(value) { return value; };
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, {
+/******/ configurable: false,
+/******/ enumerable: true,
+/******/ get: getter
+/******/ });
+/******/ }
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* vim: set ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+
+
+function clickme() {
+ console.log("clickme");
+}
+
+function init() {
+ let s = document.querySelector("#clicky");
+ s.addEventListener("click", clickme);
+}
+
+window.init = init;
+
+
+/***/ })
+/******/ ]);
+//# sourceMappingURL=events_bundle.js.map \ No newline at end of file
diff --git a/devtools/client/inspector/markup/test/events_bundle.js.map b/devtools/client/inspector/markup/test/events_bundle.js.map
new file mode 100644
index 0000000000..ab8e56cd2f
--- /dev/null
+++ b/devtools/client/inspector/markup/test/events_bundle.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/bootstrap 43c031d75b9220c44a01","webpack:///./events_original.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AChEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA","file":"events_bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 43c031d75b9220c44a01","/* vim: set ts=2 et sw=2 tw=80: */\n/* Any copyright is dedicated to the Public Domain.\n http://creativecommons.org/publicdomain/zero/1.0/ */\n\n\"use strict\";\n\nfunction clickme() {\n console.log(\"clickme\");\n}\n\nfunction init() {\n let s = document.querySelector(\"#clicky\");\n s.addEventListener(\"click\", clickme);\n}\n\nwindow.init = init;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./events_original.js\n// module id = 0\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file
diff --git a/devtools/client/inspector/markup/test/events_original.js b/devtools/client/inspector/markup/test/events_original.js
new file mode 100644
index 0000000000..4b45f7db56
--- /dev/null
+++ b/devtools/client/inspector/markup/test/events_original.js
@@ -0,0 +1,15 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+function clickme() {
+ console.log("clickme");
+}
+
+function init() {
+ const s = document.querySelector("#clicky");
+ s.addEventListener("click", clickme);
+}
+
+window.init = init;
diff --git a/devtools/client/inspector/markup/test/head.js b/devtools/client/inspector/markup/test/head.js
new file mode 100644
index 0000000000..fb2153d5dc
--- /dev/null
+++ b/devtools/client/inspector/markup/test/head.js
@@ -0,0 +1,670 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* eslint no-unused-vars: [2, {"vars": "local"}] */
+
+"use strict";
+
+// Import the inspector's head.js first (which itself imports shared-head.js).
+Services.scriptloader.loadSubScript(
+ "chrome://mochitests/content/browser/devtools/client/inspector/test/head.js",
+ this
+);
+
+var {
+ getInplaceEditorForSpan: inplaceEditor,
+} = require("resource://devtools/client/shared/inplace-editor.js");
+var clipboard = require("resource://devtools/shared/platform/clipboard.js");
+
+// If a test times out we want to see the complete log and not just the last few
+// lines.
+SimpleTest.requestCompleteLog();
+
+// Toggle this pref on to see all DevTools event communication. This is hugely
+// useful for fixing race conditions.
+// Services.prefs.setBoolPref("devtools.dump.emit", true);
+
+// Clear preferences that may be set during the course of tests.
+registerCleanupFunction(() => {
+ Services.prefs.clearUserPref("devtools.dump.emit");
+ Services.prefs.clearUserPref("devtools.inspector.htmlPanelOpen");
+ Services.prefs.clearUserPref("devtools.inspector.sidebarOpen");
+ Services.prefs.clearUserPref("devtools.markup.pagesize");
+ Services.prefs.clearUserPref("devtools.inspector.showAllAnonymousContent");
+});
+
+/**
+ * Some tests may need to import one or more of the test helper scripts.
+ * A test helper script is simply a js file that contains common test code that
+ * is either not common-enough to be in head.js, or that is located in a
+ * separate directory.
+ * The script will be loaded synchronously and in the test's scope.
+ * @param {String} filePath The file path, relative to the current directory.
+ * Examples:
+ * - "helper_attributes_test_runner.js"
+ */
+function loadHelperScript(filePath) {
+ const testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/"));
+ Services.scriptloader.loadSubScript(testDir + "/" + filePath, this);
+}
+
+/**
+ * Get the MarkupContainer object instance that corresponds to the given
+ * NodeFront
+ * @param {NodeFront} nodeFront
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * loaded in the toolbox
+ * @return {MarkupContainer}
+ */
+function getContainerForNodeFront(nodeFront, { markup }) {
+ return markup.getContainer(nodeFront);
+}
+
+/**
+ * Get the MarkupContainer object instance that corresponds to the given
+ * selector
+ * @param {String|NodeFront} selector
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * loaded in the toolbox
+ * @param {Boolean} Set to true in the event that the node shouldn't be found.
+ * @return {MarkupContainer}
+ */
+var getContainerForSelector = async function (
+ selector,
+ inspector,
+ expectFailure = false
+) {
+ info("Getting the markup-container for node " + selector);
+ const nodeFront = await getNodeFront(selector, inspector);
+ const container = getContainerForNodeFront(nodeFront, inspector);
+
+ if (expectFailure) {
+ ok(!container, "Shouldn't find markup-container for selector: " + selector);
+ } else {
+ ok(container, "Found markup-container for selector: " + selector);
+ }
+
+ return container;
+};
+
+/**
+ * Retrieve the nodeValue for the firstChild of a provided selector on the content page.
+ *
+ * @param {String} selector
+ * @return {String} the nodeValue of the first
+ */
+function getFirstChildNodeValue(selector) {
+ return SpecialPowers.spawn(
+ gBrowser.selectedBrowser,
+ [selector],
+ _selector => {
+ return content.document.querySelector(_selector).firstChild.nodeValue;
+ }
+ );
+}
+
+/**
+ * Using the markupview's _waitForChildren function, wait for all queued
+ * children updates to be handled.
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * loaded in the toolbox
+ * @return a promise that resolves when all queued children updates have been
+ * handled
+ */
+function waitForChildrenUpdated({ markup }) {
+ info("Waiting for queued children updates to be handled");
+ return new Promise(resolve => {
+ markup._waitForChildren().then(() => {
+ executeSoon(resolve);
+ });
+ });
+}
+
+/**
+ * Simulate a click on the markup-container (a line in the markup-view)
+ * that corresponds to the selector passed.
+ * @param {String|NodeFront} selector
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * loaded in the toolbox
+ * @return {Promise} Resolves when the node has been selected.
+ */
+var clickContainer = async function (selector, inspector) {
+ info("Clicking on the markup-container for node " + selector);
+
+ const nodeFront = await getNodeFront(selector, inspector);
+ const container = getContainerForNodeFront(nodeFront, inspector);
+
+ const updated = container.selected
+ ? Promise.resolve()
+ : inspector.once("inspector-updated");
+ EventUtils.synthesizeMouseAtCenter(
+ container.tagLine,
+ { type: "mousedown" },
+ inspector.markup.doc.defaultView
+ );
+ EventUtils.synthesizeMouseAtCenter(
+ container.tagLine,
+ { type: "mouseup" },
+ inspector.markup.doc.defaultView
+ );
+ return updated;
+};
+
+/**
+ * Focus a given editable element, enter edit mode, set value, and commit
+ * @param {DOMNode} field The element that gets editable after receiving focus
+ * and <ENTER> keypress
+ * @param {String} value The string value to be set into the edited field
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * loaded in the toolbox
+ */
+function setEditableFieldValue(field, value, inspector) {
+ field.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+ const input = inplaceEditor(field).input;
+ ok(input, "Found editable field for setting value: " + value);
+ input.value = value;
+ EventUtils.sendKey("return", inspector.panelWin);
+}
+
+/**
+ * Focus the new-attribute inplace-editor field of a node's markup container
+ * and enters the given text, then wait for it to be applied and the for the
+ * node to mutates (when new attribute(s) is(are) created)
+ * @param {String} selector The selector for the node to edit.
+ * @param {String} text The new attribute text to be entered (e.g. "id='test'")
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * loaded in the toolbox
+ * @return a promise that resolves when the node has mutated
+ */
+var addNewAttributes = async function (selector, text, inspector) {
+ info(`Entering text "${text}" in new attribute field for node ${selector}`);
+
+ const container = await focusNode(selector, inspector);
+ ok(container, "The container for '" + selector + "' was found");
+
+ info("Listening for the markupmutation event");
+ const nodeMutated = inspector.once("markupmutation");
+ setEditableFieldValue(container.editor.newAttr, text, inspector);
+ await nodeMutated;
+};
+
+/**
+ * Checks that a node has the given attributes.
+ *
+ * @param {String} selector The selector for the node to check.
+ * @param {Object} expected An object containing the attributes to check.
+ * e.g. {id: "id1", class: "someclass"}
+ *
+ * Note that node.getAttribute() returns attribute values provided by the HTML
+ * parser. The parser only provides unescaped entities so &amp; will return &.
+ */
+var assertAttributes = async function (selector, expected) {
+ const actualAttributes = await getContentPageElementAttributes(selector);
+ is(
+ actualAttributes.length,
+ Object.keys(expected).length,
+ "The node " + selector + " has the expected number of attributes."
+ );
+ for (const attr in expected) {
+ const foundAttr = actualAttributes.find(({ name }) => name === attr);
+ const foundValue = foundAttr ? foundAttr.value : undefined;
+ ok(foundAttr, "The node " + selector + " has the attribute " + attr);
+ is(
+ foundValue,
+ expected[attr],
+ "The node " + selector + " has the correct " + attr + " attribute value"
+ );
+ }
+};
+
+/**
+ * Undo the last markup-view action and wait for the corresponding mutation to
+ * occur
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * loaded in the toolbox
+ * @return a promise that resolves when the markup-mutation has been treated or
+ * rejects if no undo action is possible
+ */
+function undoChange(inspector) {
+ const canUndo = inspector.markup.undo.canUndo();
+ ok(canUndo, "The last change in the markup-view can be undone");
+ if (!canUndo) {
+ return Promise.reject();
+ }
+
+ const mutated = inspector.once("markupmutation");
+ inspector.markup.undo.undo();
+ return mutated;
+}
+
+/**
+ * Redo the last markup-view action and wait for the corresponding mutation to
+ * occur
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * loaded in the toolbox
+ * @return a promise that resolves when the markup-mutation has been treated or
+ * rejects if no redo action is possible
+ */
+function redoChange(inspector) {
+ const canRedo = inspector.markup.undo.canRedo();
+ ok(canRedo, "The last change in the markup-view can be redone");
+ if (!canRedo) {
+ return Promise.reject();
+ }
+
+ const mutated = inspector.once("markupmutation");
+ inspector.markup.undo.redo();
+ return mutated;
+}
+
+/**
+ * Get the selector-search input box from the inspector panel
+ * @return {DOMNode}
+ */
+function getSelectorSearchBox(inspector) {
+ return inspector.panelWin.document.getElementById("inspector-searchbox");
+}
+
+/**
+ * Using the inspector panel's selector search box, search for a given selector.
+ * The selector input string will be entered in the input field and the <ENTER>
+ * keypress will be simulated.
+ * This function won't wait for any events and is not async. It's up to callers
+ * to subscribe to events and react accordingly.
+ */
+function searchUsingSelectorSearch(selector, inspector) {
+ info('Entering "' + selector + '" into the selector-search input field');
+ const field = getSelectorSearchBox(inspector);
+ field.focus();
+ field.value = selector;
+ EventUtils.sendKey("return", inspector.panelWin);
+}
+
+/**
+ * Check to see if the inspector menu items for editing are disabled.
+ * Things like Edit As HTML, Delete Node, etc.
+ * @param {NodeFront} nodeFront
+ * @param {InspectorPanel} inspector
+ * @param {Boolean} assert Should this function run assertions inline.
+ * @return A promise that resolves with a boolean indicating whether
+ * the menu items are disabled once the menu has been checked.
+ */
+var isEditingMenuDisabled = async function (
+ nodeFront,
+ inspector,
+ assert = true
+) {
+ // To ensure clipboard contains something to paste.
+ clipboard.copyString("<p>test</p>");
+
+ await selectNode(nodeFront, inspector);
+ const allMenuItems = openContextMenuAndGetAllItems(inspector);
+
+ const deleteMenuItem = allMenuItems.find(i => i.id === "node-menu-delete");
+ const editHTMLMenuItem = allMenuItems.find(
+ i => i.id === "node-menu-edithtml"
+ );
+ const pasteHTMLMenuItem = allMenuItems.find(
+ i => i.id === "node-menu-pasteouterhtml"
+ );
+
+ if (assert) {
+ ok(deleteMenuItem.disabled, "Delete menu item is disabled");
+ ok(editHTMLMenuItem.disabled, "Edit HTML menu item is disabled");
+ ok(pasteHTMLMenuItem.disabled, "Paste HTML menu item is disabled");
+ }
+
+ return (
+ deleteMenuItem.disabled &&
+ editHTMLMenuItem.disabled &&
+ pasteHTMLMenuItem.disabled
+ );
+};
+
+/**
+ * Check to see if the inspector menu items for editing are enabled.
+ * Things like Edit As HTML, Delete Node, etc.
+ * @param {NodeFront} nodeFront
+ * @param {InspectorPanel} inspector
+ * @param {Boolean} assert Should this function run assertions inline.
+ * @return A promise that resolves with a boolean indicating whether
+ * the menu items are enabled once the menu has been checked.
+ */
+var isEditingMenuEnabled = async function (
+ nodeFront,
+ inspector,
+ assert = true
+) {
+ // To ensure clipboard contains something to paste.
+ clipboard.copyString("<p>test</p>");
+
+ await selectNode(nodeFront, inspector);
+ const allMenuItems = openContextMenuAndGetAllItems(inspector);
+
+ const deleteMenuItem = allMenuItems.find(i => i.id === "node-menu-delete");
+ const editHTMLMenuItem = allMenuItems.find(
+ i => i.id === "node-menu-edithtml"
+ );
+ const pasteHTMLMenuItem = allMenuItems.find(
+ i => i.id === "node-menu-pasteouterhtml"
+ );
+
+ if (assert) {
+ ok(!deleteMenuItem.disabled, "Delete menu item is enabled");
+ ok(!editHTMLMenuItem.disabled, "Edit HTML menu item is enabled");
+ ok(!pasteHTMLMenuItem.disabled, "Paste HTML menu item is enabled");
+ }
+
+ return (
+ !deleteMenuItem.disabled &&
+ !editHTMLMenuItem.disabled &&
+ !pasteHTMLMenuItem.disabled
+ );
+};
+
+/**
+ * Wait for all current promises to be resolved. See this as executeSoon that
+ * can be used with yield.
+ */
+function promiseNextTick() {
+ return new Promise(resolve => {
+ executeSoon(resolve);
+ });
+}
+
+/**
+ * `await` with timeout.
+ *
+ * Usage:
+ * const badgeEventAdded = inspector.markup.once("badge-added-event");
+ * ...
+ * const result = await awaitWithTimeout(badgeEventAdded, 3000);
+ * is(result, "timeout", "Ensure that no event badges were added");
+ *
+ * @param {Promise} promise
+ * Promise to resolve
+ * @param {Number} ms
+ * Milliseconds to wait.
+ * @return "timeout" on timeout, otherwise the result of the fulfilled promise.
+ */
+async function awaitWithTimeout(promise, ms) {
+ const timeout = new Promise(resolve => {
+ // eslint-disable-next-line
+ const wait = setTimeout(() => {
+ clearTimeout(wait);
+ resolve("timeout");
+ }, ms);
+ });
+
+ return Promise.race([promise, timeout]);
+}
+
+/**
+ * Collapses the current text selection in an input field and tabs to the next
+ * field.
+ */
+function collapseSelectionAndTab(inspector) {
+ // collapse selection and move caret to end
+ EventUtils.sendKey("tab", inspector.panelWin);
+ // next element
+ EventUtils.sendKey("tab", inspector.panelWin);
+}
+
+/**
+ * Collapses the current text selection in an input field and tabs to the
+ * previous field.
+ */
+function collapseSelectionAndShiftTab(inspector) {
+ // collapse selection and move caret to end
+ EventUtils.synthesizeKey("VK_TAB", { shiftKey: true }, inspector.panelWin);
+ // previous element
+ EventUtils.synthesizeKey("VK_TAB", { shiftKey: true }, inspector.panelWin);
+}
+
+/**
+ * Check that the current focused element is an attribute element in the markup
+ * view.
+ * @param {String} attrName The attribute name expected to be found
+ * @param {Boolean} editMode Whether or not the attribute should be in edit mode
+ */
+function checkFocusedAttribute(attrName, editMode) {
+ const focusedAttr = Services.focus.focusedElement;
+ ok(focusedAttr, "Has a focused element");
+
+ const dataAttr = focusedAttr.parentNode.dataset.attr;
+ is(dataAttr, attrName, attrName + " attribute editor is currently focused.");
+ if (editMode) {
+ // Using a multiline editor for attributes, the focused element should be a textarea.
+ is(focusedAttr.tagName, "textarea", attrName + "is in edit mode");
+ } else {
+ is(focusedAttr.tagName, "span", attrName + "is not in edit mode");
+ }
+}
+
+/**
+ * Get attributes for node as how they are represented in editor.
+ *
+ * @param {String} selector
+ * @param {InspectorPanel} inspector
+ * @return {Promise}
+ * A promise that resolves with an array of attribute names
+ * (e.g. ["id", "class", "href"])
+ */
+var getAttributesFromEditor = async function (selector, inspector) {
+ const nodeList = (
+ await getContainerForSelector(selector, inspector)
+ ).tagLine.querySelectorAll("[data-attr]");
+
+ return [...nodeList].map(node => node.getAttribute("data-attr"));
+};
+
+/**
+ * Simulate dragging a MarkupContainer by calling its mousedown and mousemove
+ * handlers.
+ * @param {InspectorPanel} inspector The current inspector-panel instance.
+ * @param {String|MarkupContainer} selector The selector to identify the node or
+ * the MarkupContainer for this node.
+ * @param {Number} xOffset Optional x offset to drag by.
+ * @param {Number} yOffset Optional y offset to drag by.
+ */
+async function simulateNodeDrag(
+ inspector,
+ selector,
+ xOffset = 10,
+ yOffset = 10
+) {
+ const container =
+ typeof selector === "string"
+ ? await getContainerForSelector(selector, inspector)
+ : selector;
+ const rect = container.tagLine.getBoundingClientRect();
+ const scrollX = inspector.markup.doc.documentElement.scrollLeft;
+ const scrollY = inspector.markup.doc.documentElement.scrollTop;
+
+ info("Simulate mouseDown on element " + selector);
+ container._onMouseDown({
+ target: container.tagLine,
+ button: 0,
+ pageX: scrollX + rect.x,
+ pageY: scrollY + rect.y,
+ stopPropagation: () => {},
+ preventDefault: () => {},
+ });
+
+ // _onMouseDown selects the node, so make sure to wait for the
+ // inspector-updated event if the current selection was different.
+ if (inspector.selection.nodeFront !== container.node) {
+ await inspector.once("inspector-updated");
+ }
+
+ info("Simulate mouseMove on element " + selector);
+ container.onMouseMove({
+ pageX: scrollX + rect.x + xOffset,
+ pageY: scrollY + rect.y + yOffset,
+ });
+}
+
+/**
+ * Simulate dropping a MarkupContainer by calling its mouseup handler. This is
+ * meant to be called after simulateNodeDrag has been called.
+ * @param {InspectorPanel} inspector The current inspector-panel instance.
+ * @param {String|MarkupContainer} selector The selector to identify the node or
+ * the MarkupContainer for this node.
+ */
+async function simulateNodeDrop(inspector, selector) {
+ info("Simulate mouseUp on element " + selector);
+ const container =
+ typeof selector === "string"
+ ? await getContainerForSelector(selector, inspector)
+ : selector;
+ container.onMouseUp();
+ inspector.markup._onMouseUp();
+}
+
+/**
+ * Simulate drag'n'dropping a MarkupContainer by calling its mousedown,
+ * mousemove and mouseup handlers.
+ * @param {InspectorPanel} inspector The current inspector-panel instance.
+ * @param {String|MarkupContainer} selector The selector to identify the node or
+ * the MarkupContainer for this node.
+ * @param {Number} xOffset Optional x offset to drag by.
+ * @param {Number} yOffset Optional y offset to drag by.
+ */
+async function simulateNodeDragAndDrop(inspector, selector, xOffset, yOffset) {
+ await simulateNodeDrag(inspector, selector, xOffset, yOffset);
+ await simulateNodeDrop(inspector, selector);
+}
+
+/**
+ * Waits until the element has not scrolled for 30 consecutive frames.
+ */
+async function waitForScrollStop(doc) {
+ const el = doc.documentElement;
+ const win = doc.defaultView;
+ let lastScrollTop = el.scrollTop;
+ let stopFrameCount = 0;
+ while (stopFrameCount < 30) {
+ // Wait for a frame.
+ await new Promise(resolve => win.requestAnimationFrame(resolve));
+
+ // Check if the element has scrolled.
+ if (lastScrollTop == el.scrollTop) {
+ // No scrolling since the last frame.
+ stopFrameCount++;
+ } else {
+ // The element has scrolled. Reset the frame counter.
+ stopFrameCount = 0;
+ lastScrollTop = el.scrollTop;
+ }
+ }
+
+ return lastScrollTop;
+}
+
+/**
+ * Select a node in the inspector and try to delete it using the provided key. After that,
+ * check that the expected element is focused.
+ *
+ * @param {InspectorPanel} inspector
+ * The current inspector-panel instance.
+ * @param {String} key
+ * The key to simulate to delete the node
+ * @param {Object}
+ * - {String} selector: selector of the element to delete.
+ * - {String} focusedSelector: selector of the element that should be selected
+ * after deleting the node.
+ * - {String} pseudo: optional, "before" or "after" if the element focused after
+ * deleting the node is supposed to be a before/after pseudo-element.
+ */
+async function checkDeleteAndSelection(
+ inspector,
+ key,
+ { selector, focusedSelector, pseudo }
+) {
+ info(
+ "Test deleting node " +
+ selector +
+ " with " +
+ key +
+ ", " +
+ "expecting " +
+ focusedSelector +
+ " to be focused"
+ );
+
+ info("Select node " + selector + " and make sure it is focused");
+ await selectNode(selector, inspector);
+ await clickContainer(selector, inspector);
+
+ info("Delete the node with: " + key);
+ const mutated = inspector.once("markupmutation");
+ EventUtils.sendKey(key, inspector.panelWin);
+ await Promise.all([mutated, inspector.once("inspector-updated")]);
+
+ let nodeFront = await getNodeFront(focusedSelector, inspector);
+ if (pseudo) {
+ // Update the selector for logging in case of failure.
+ focusedSelector = focusedSelector + "::" + pseudo;
+ // Retrieve the :before or :after pseudo element of the nodeFront.
+ const { nodes } = await inspector.walker.children(nodeFront);
+ nodeFront = pseudo === "before" ? nodes[0] : nodes[nodes.length - 1];
+ }
+
+ is(
+ inspector.selection.nodeFront,
+ nodeFront,
+ focusedSelector + " is selected after deletion"
+ );
+
+ info("Check that the node was really removed");
+ let node = await getNodeFront(selector, inspector);
+ ok(!node, "The node can't be found in the page anymore");
+
+ info("Undo the deletion to restore the original markup");
+ await undoChange(inspector);
+ node = await getNodeFront(selector, inspector);
+ ok(node, "The node is back");
+}
+
+/**
+ * Click on the reveal link the provided slotted container.
+ * Will resolve when selection emits "new-node-front".
+ */
+async function clickOnRevealLink(inspector, container) {
+ const onSelection = inspector.selection.once("new-node-front");
+ const revealLink = container.elt.querySelector(".reveal-link");
+ const tagline = revealLink.closest(".tag-line");
+ const win = inspector.markup.doc.defaultView;
+
+ // First send a mouseover on the tagline to force the link to be displayed.
+ EventUtils.synthesizeMouseAtCenter(tagline, { type: "mouseover" }, win);
+ EventUtils.synthesizeMouseAtCenter(revealLink, {}, win);
+
+ await onSelection;
+}
+
+/**
+ * Hit `key` on the reveal link in the provided slotted container.
+ * Will resolve when selection emits "new-node-front".
+ */
+async function keydownOnRevealLink(key, inspector, container) {
+ const revealLink = container.elt.querySelector(".reveal-link");
+ const win = inspector.markup.doc.defaultView;
+
+ const root = inspector.markup.getContainer(inspector.markup._rootNode);
+ root.elt.focus();
+
+ // we need to go through a ENTER + TAB key sequence to focus on
+ // the .reveal-link element with the keyboard
+ const revealFocused = once(revealLink, "focus");
+ EventUtils.synthesizeKey("KEY_Enter", {}, win);
+ EventUtils.synthesizeKey("KEY_Tab", {}, win);
+ info("Waiting for .reveal-link to be focused");
+ await revealFocused;
+
+ // hit `key` on the .reveal-link
+ const onSelection = inspector.selection.once("new-node-front");
+ EventUtils.synthesizeKey(key, {}, win);
+ await onSelection;
+}
diff --git a/devtools/client/inspector/markup/test/helper_attributes_test_runner.js b/devtools/client/inspector/markup/test/helper_attributes_test_runner.js
new file mode 100644
index 0000000000..ff8fbdeb09
--- /dev/null
+++ b/devtools/client/inspector/markup/test/helper_attributes_test_runner.js
@@ -0,0 +1,161 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* eslint no-unused-vars: [2, {"vars": "local"}] */
+/* import-globals-from head.js */
+"use strict";
+
+/**
+ * Run a series of add-attributes tests.
+ * This function will iterate over the provided tests array and run each test.
+ * Each test's goal is to provide some text to be entered into the test node's
+ * new-attribute field and check that the given attributes have been created.
+ * After each test has run, the markup-view's undo command will be called and
+ * the test runner will check if all the new attributes are gone.
+ * @param {Array} tests See runAddAttributesTest for the structure
+ * @param {DOMNode|String} nodeOrSelector The node or node selector
+ * corresponding to an element on the current test page that has *no attributes*
+ * when the test starts. It will be used to add and remove attributes.
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * opened
+ * @return a promise that resolves when the tests have run
+ */
+function runAddAttributesTests(tests, nodeOrSelector, inspector) {
+ info("Running " + tests.length + " add-attributes tests");
+ return (async function () {
+ info("Selecting the test node");
+ await selectNode("div", inspector);
+
+ for (const test of tests) {
+ await runAddAttributesTest(test, "div", inspector);
+ }
+ })();
+}
+
+/**
+ * Run a single add-attribute test.
+ * See runAddAttributesTests for a description.
+ * @param {Object} test A test object should contain the following properties:
+ * - desc {String} a textual description for that test, to help when
+ * reading logs
+ * - text {String} the string to be inserted into the new attribute field
+ * - expectedAttributes {Object} a key/value pair object that will be
+ * used to check the attributes on the test element
+ * - validate {Function} optional extra function that will be called
+ * after the attributes have been added and which should be used to
+ * assert some more things this test runner might not be checking. The
+ * function will be called with the following arguments:
+ * - {DOMNode} The element being tested
+ * - {MarkupContainer} The corresponding container in the markup-view
+ * - {InspectorPanel} The instance of the InspectorPanel opened
+ * @param {String} selector The node selector corresponding to the test element
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * opened
+ */
+async function runAddAttributesTest(test, selector, inspector) {
+ if (test.setUp) {
+ test.setUp(inspector);
+ }
+
+ info("Starting add-attribute test: " + test.desc);
+ await addNewAttributes(selector, test.text, inspector);
+
+ info("Assert that the attribute(s) has/have been applied correctly");
+ await assertAttributes(selector, test.expectedAttributes);
+
+ if (test.validate) {
+ const container = await getContainerForSelector(selector, inspector);
+ test.validate(container, inspector);
+ }
+
+ info("Undo the change");
+ await undoChange(inspector);
+
+ info("Assert that the attribute(s) has/have been removed correctly");
+ await assertAttributes(selector, {});
+ if (test.tearDown) {
+ test.tearDown(inspector);
+ }
+}
+
+/**
+ * Run a series of edit-attributes tests.
+ * This function will iterate over the provided tests array and run each test.
+ * Each test's goal is to locate a given element on the current test page,
+ * assert its current attributes, then provide the name of one of them and a
+ * value to be set into it, and then check if the new attributes are correct.
+ * After each test has run, the markup-view's undo and redo commands will be
+ * called and the test runner will assert again that the attributes are correct.
+ * @param {Array} tests See runEditAttributesTest for the structure
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * opened
+ * @return a promise that resolves when the tests have run
+ */
+function runEditAttributesTests(tests, inspector) {
+ info("Running " + tests.length + " edit-attributes tests");
+ return (async function () {
+ info("Expanding all nodes in the markup-view");
+ await inspector.markup.expandAll();
+
+ for (const test of tests) {
+ await runEditAttributesTest(test, inspector);
+ }
+ })();
+}
+
+/**
+ * Run a single edit-attribute test.
+ * See runEditAttributesTests for a description.
+ * @param {Object} test A test object should contain the following properties:
+ * - desc {String} a textual description for that test, to help when
+ * reading logs
+ * - node {String} a css selector that will be used to select the node
+ * which will be tested during this iteration
+ * - originalAttributes {Object} a key/value pair object that will be
+ * used to check the attributes of the node before the test runs
+ * - name {String} the name of the attribute to focus the editor for
+ * - value {String} the new value to be typed in the focused editor
+ * - expectedAttributes {Object} a key/value pair object that will be
+ * used to check the attributes on the test element
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * opened
+ */
+async function runEditAttributesTest(test, inspector) {
+ info("Starting edit-attribute test: " + test.desc);
+
+ info("Selecting the test node " + test.node);
+ await selectNode(test.node, inspector);
+
+ info("Asserting that the node has the right attributes to start with");
+ await assertAttributes(test.node, test.originalAttributes);
+
+ info("Editing attribute " + test.name + " with value " + test.value);
+
+ const container = await focusNode(test.node, inspector);
+ ok(
+ container && container.editor,
+ "The markup-container for " + test.node + " was found"
+ );
+
+ info("Listening for the markupmutation event");
+ const nodeMutated = inspector.once("markupmutation");
+ const attr = container.editor.attrElements
+ .get(test.name)
+ .querySelector(".editable");
+ setEditableFieldValue(attr, test.value, inspector);
+ await nodeMutated;
+
+ info("Asserting the new attributes after edition");
+ await assertAttributes(test.node, test.expectedAttributes);
+
+ info("Undo the change and assert that the attributes have been changed back");
+ await undoChange(inspector);
+ await assertAttributes(test.node, test.originalAttributes);
+
+ info(
+ "Redo the change and assert that the attributes have been changed " +
+ "again"
+ );
+ await redoChange(inspector);
+ await assertAttributes(test.node, test.expectedAttributes);
+}
diff --git a/devtools/client/inspector/markup/test/helper_diff.js b/devtools/client/inspector/markup/test/helper_diff.js
new file mode 100644
index 0000000000..5a97fa548d
--- /dev/null
+++ b/devtools/client/inspector/markup/test/helper_diff.js
@@ -0,0 +1,286 @@
+/**
+ * This diff utility is taken from:
+ * https://github.com/Slava/diff.js
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014 Slava
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+/**
+ * USAGE:
+ * diff(text1, text2);
+ */
+
+/**
+ * Longest Common Subsequence
+ *
+ * @param A - sequence of atoms - Array
+ * @param B - sequence of atoms - Array
+ * @param equals - optional comparator of atoms - returns true or false,
+ * if not specified, triple equals operator is used
+ * @returns Array - sequence of atoms, one of LCSs, edit script from A to B
+ */
+var LCS = function (A, B, /* optional */ equals) {
+ // We just compare atoms with default equals operator by default
+ if (equals === undefined)
+ equals = function (a, b) { return a === b; };
+
+ // NOTE: all intervals from now on are both sides inclusive
+ // Get the points in Edit Graph, one of the LCS paths goes through.
+ // The points are located on the same diagonal and represent the middle
+ // snake ([D/2] out of D+1) in the optimal edit path in edit graph.
+ // @param startA, endA - substring of A we are working on
+ // @param startB, endB - substring of B we are working on
+ // @returns Array - [
+ // [x, y], - beginning of the middle snake
+ // [u, v], - end of the middle snake
+ // D, - optimal edit distance
+ // LCS ] - length of LCS
+ var findMidSnake = function (startA, endA, startB, endB) {
+ var N = endA - startA + 1;
+ var M = endB - startB + 1;
+ var Max = N + M;
+ var Delta = N - M;
+ var halfMaxCeil = (Max + 1) / 2 | 0;
+
+ var foundOverlap = false;
+ var overlap = null;
+
+ // Maps -Max .. 0 .. +Max, diagonal index to endpoints for furthest reaching
+ // D-path on current iteration.
+ var V = {};
+ // Same but for reversed paths.
+ var U = {};
+
+ // Special case for the base case, D = 0, k = 0, x = y = 0
+ V[1] = 0;
+ // Special case for the base case reversed, D = 0, k = 0, x = N, y = M
+ U[Delta - 1] = N;
+
+ // Iterate over each possible length of edit script
+ for (var D = 0; D <= halfMaxCeil; D++) {
+ // Iterate over each diagonal
+ for (var k = -D; k <= D && !overlap; k += 2) {
+ // Positions in sequences A and B of furthest going D-path on diagonal k.
+ var x, y;
+
+ // Choose from each diagonal we extend
+ if (k === -D || (k !== D && V[k - 1] < V[k + 1]))
+ // Extending path one point down, that's why x doesn't change, y
+ // increases implicitly
+ x = V[k + 1];
+ else
+ // Extending path one point to the right, x increases
+ x = V[k - 1] + 1;
+
+ // We can calculate the y out of x and diagonal index.
+ y = x - k;
+
+ if (isNaN(y) || x > N || y > M)
+ continue;
+
+ var xx = x;
+ // Try to extend the D-path with diagonal paths. Possible only if atoms
+ // A_x match B_y
+ while (x < N && y < M // if there are atoms to compare
+ && equals(A[startA + x], B[startB + y])) {
+ x++; y++;
+ }
+
+ // We can safely update diagonal k, since on every iteration we consider
+ // only even or only odd diagonals and the result of one depends only on
+ // diagonals of different iteration.
+ V[k] = x;
+
+ // Check feasibility, Delta is checked for being odd.
+ if ((Delta & 1) === 1 && inRange(k, Delta - (D - 1), Delta + (D - 1)))
+ // Forward D-path can overlap with reversed D-1-path
+ if (V[k] >= U[k])
+ // Found an overlap, the middle snake, convert X-components to dots
+ overlap = [xx, x].map(toPoint, k); // XXX ES5
+ }
+
+ if (overlap)
+ var SES = D * 2 - 1;
+
+ // Iterate over each diagonal for reversed case
+ for (var k = -D; k <= D && !overlap; k += 2) {
+ // The real diagonal we are looking for is k + Delta
+ var K = k + Delta;
+ var x, y;
+ if (k === D || (k !== -D && U[K - 1] < U[K + 1]))
+ x = U[K - 1];
+ else
+ x = U[K + 1] - 1;
+
+ y = x - K;
+ if (isNaN(y) || x < 0 || y < 0)
+ continue;
+ var xx = x;
+ while (x > 0 && y > 0 && equals(A[startA + x - 1], B[startB + y - 1])) {
+ x--; y--;
+ }
+ U[K] = x;
+
+ if (Delta % 2 === 0 && inRange(K, -D, D))
+ if (U[K] <= V[K])
+ overlap = [x, xx].map(toPoint, K); // XXX ES5
+ }
+
+ if (overlap) {
+ SES = SES || D * 2;
+ // Remember we had offset of each sequence?
+ for (var i = 0; i < 2; i++) for (var j = 0; j < 2; j++)
+ overlap[i][j] += [startA, startB][j] - i;
+ return overlap.concat([ SES, (Max - SES) / 2 ]);
+ }
+ }
+ };
+
+ var lcsAtoms = [];
+ var lcs = function (startA, endA, startB, endB) {
+ var N = endA - startA + 1;
+ var M = endB - startB + 1;
+
+ if (N > 0 && M > 0) {
+ var middleSnake = findMidSnake(startA, endA, startB, endB);
+ // A[x;u] == B[y,v] and is part of LCS
+ var x = middleSnake[0][0], y = middleSnake[0][1];
+ var u = middleSnake[1][0], v = middleSnake[1][1];
+ var D = middleSnake[2];
+
+ if (D > 1) {
+ lcs(startA, x - 1, startB, y - 1);
+ if (x <= u) {
+ [].push.apply(lcsAtoms, A.slice(x, u + 1));
+ }
+ lcs(u + 1, endA, v + 1, endB);
+ } else if (M > N)
+ [].push.apply(lcsAtoms, A.slice(startA, endA + 1));
+ else
+ [].push.apply(lcsAtoms, B.slice(startB, endB + 1));
+ }
+ };
+
+ lcs(0, A.length - 1, 0, B.length - 1);
+ return lcsAtoms;
+};
+
+// Helpers
+var inRange = function (x, l, r) {
+ return (l <= x && x <= r) || (r <= x && x <= l);
+};
+
+// Takes X-component as argument, diagonal as context,
+// returns array-pair of form x, y
+var toPoint = function (x) {
+ return [x, x - this]; // XXX context is not the best way to pass diagonal
+};
+
+// Wrappers
+LCS.StringLCS = function (A, B) {
+ return LCS(A.split(''), B.split('')).join('');
+};
+
+/**
+ * Diff sequence
+ *
+ * @param A - sequence of atoms - Array
+ * @param B - sequence of atoms - Array
+ * @param equals - optional comparator of atoms - returns true or false,
+ * if not specified, triple equals operator is used
+ * @returns Array - sequence of objects in a form of:
+ * - operation: one of "none", "add", "delete"
+ * - atom: the atom found in either A or B
+ * Applying operations from diff sequence you should be able to transform A to B
+ */
+function diff(A, B, equals) {
+ // We just compare atoms with default equals operator by default
+ if (equals === undefined)
+ equals = function (a, b) { return a === b; };
+
+ var diff = [];
+ var i = 0, j = 0;
+ var N = A.length, M = B.length, K = 0;
+
+ while (i < N && j < M && equals(A[i], B[j]))
+ i++, j++;
+
+ while (i < N && j < M && equals(A[N-1], B[M-1]))
+ N--, M--, K++;
+
+ [].push.apply(diff, A.slice(0, i).map(function (atom) {
+ return { operation: "none", atom: atom }; }));
+
+ var lcs = LCS(A.slice(i, N), B.slice(j, M), equals);
+
+ for (var k = 0; k < lcs.length; k++) {
+ var atom = lcs[k];
+ var ni = customIndexOf.call(A, atom, i, equals);
+ var nj = customIndexOf.call(B, atom, j, equals);
+
+ // XXX ES5 map
+ // Delete unmatched atoms from A
+ [].push.apply(diff, A.slice(i, ni).map(function (atom) {
+ return { operation: "delete", atom: atom };
+ }));
+
+ // Add unmatched atoms from B
+ [].push.apply(diff, B.slice(j, nj).map(function (atom) {
+ return { operation: "add", atom: atom };
+ }));
+
+ // Add the atom found in both sequences
+ diff.push({ operation: "none", atom: atom });
+
+ i = ni + 1;
+ j = nj + 1;
+ }
+
+ // Don't forget about the rest
+
+ [].push.apply(diff, A.slice(i, N).map(function (atom) {
+ return { operation: "delete", atom: atom };
+ }));
+
+ [].push.apply(diff, B.slice(j, M).map(function (atom) {
+ return { operation: "add", atom: atom };
+ }));
+
+ [].push.apply(diff, A.slice(N, N + K).map(function (atom) {
+ return { operation: "none", atom: atom }; }));
+
+ return diff;
+};
+
+// Accepts custom comparator
+var customIndexOf = function(item, start, equals){
+ var arr = this;
+ for (var i = start; i < arr.length; i++)
+ if (equals(item, arr[i]))
+ return i;
+ return -1;
+};
+
+function textDiff(text1, text2) {
+ return diff(text1.split("\n"), text2.split("\n"));
+}
diff --git a/devtools/client/inspector/markup/test/helper_events_test_runner.js b/devtools/client/inspector/markup/test/helper_events_test_runner.js
new file mode 100644
index 0000000000..d6f96cdfb2
--- /dev/null
+++ b/devtools/client/inspector/markup/test/helper_events_test_runner.js
@@ -0,0 +1,229 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* eslint no-unused-vars: [2, {"vars": "local"}] */
+/* import-globals-from head.js */
+/* import-globals-from helper_diff.js */
+"use strict";
+
+const beautify = require("resource://devtools/shared/jsbeautify/beautify.js");
+
+loadHelperScript("helper_diff.js");
+
+/**
+ * Generator function that runs checkEventsForNode() for each object in the
+ * TEST_DATA array.
+ */
+async function runEventPopupTests(url, tests) {
+ const { inspector } = await openInspectorForURL(url);
+
+ await inspector.markup.expandAll();
+
+ for (const test of tests) {
+ await checkEventsForNode(test, inspector);
+ }
+
+ // Wait for promises to avoid leaks when running this as a single test.
+ // We need to do this because we have opened a bunch of popups and don't them
+ // to affect other test runs when they are GCd.
+ await promiseNextTick();
+}
+
+/**
+ * Generator function that takes a selector and expected results and returns
+ * the event info.
+ *
+ * @param {Object} test
+ * A test object should contain the following properties:
+ * - selector {String} a css selector targeting the node to edit
+ * - expected {Array} array of expected event objects
+ * - type {String} event type
+ * - filename {String} filename:line where the evt handler is defined
+ * - attributes {Array} array of event attributes ({String})
+ * - handler {String} string representation of the handler
+ * - beforeTest {Function} (optional) a function to execute on the page
+ * before running the test
+ * - isSourceMapped {Boolean} (optional) true if the location
+ * is source-mapped, requiring some extra delay before the checks
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * opened
+ */
+async function checkEventsForNode(test, inspector) {
+ const { selector, expected, beforeTest, isSourceMapped } = test;
+ const container = await getContainerForSelector(selector, inspector);
+
+ if (typeof beforeTest === "function") {
+ await beforeTest(inspector);
+ }
+
+ const evHolder = container.elt.querySelector(
+ ".inspector-badge.interactive[data-event]"
+ );
+
+ if (expected.length === 0) {
+ // If no event is expected, check that event bubble is hidden.
+ ok(!evHolder, "event bubble should be hidden");
+ return;
+ }
+
+ const tooltip = inspector.markup.eventDetailsTooltip;
+
+ await selectNode(selector, inspector);
+
+ let sourceMapPromise = null;
+ if (isSourceMapped) {
+ sourceMapPromise = tooltip.once("event-tooltip-source-map-ready");
+ }
+
+ // Click button to show tooltip
+ info("Clicking evHolder");
+ evHolder.scrollIntoView();
+ EventUtils.synthesizeMouseAtCenter(
+ evHolder,
+ {},
+ inspector.markup.doc.defaultView
+ );
+ await tooltip.once("shown");
+ info("tooltip shown");
+
+ if (isSourceMapped) {
+ info("Waiting for source map to be applied");
+ await sourceMapPromise;
+ }
+
+ // Check values
+ const headers = tooltip.panel.querySelectorAll(".event-header");
+ const nodeFront = container.node;
+ const cssSelector = nodeFront.nodeName + "#" + nodeFront.id;
+
+ for (let i = 0; i < headers.length; i++) {
+ const label = `${cssSelector}.${expected[i].type} (index ${i})`;
+ info(`${label} START`);
+
+ const header = headers[i];
+ const type = header.querySelector(".event-tooltip-event-type");
+ const filename = header.querySelector(".event-tooltip-filename");
+ const attributes = header.querySelectorAll(".event-tooltip-attributes");
+ const contentBox = header.nextElementSibling;
+
+ info("Looking for " + type.textContent);
+
+ is(type.textContent, expected[i].type, "type matches for " + cssSelector);
+ is(
+ filename.textContent,
+ expected[i].filename,
+ "filename matches for " + cssSelector
+ );
+
+ is(
+ attributes.length,
+ expected[i].attributes.length,
+ "we have the correct number of attributes"
+ );
+
+ for (let j = 0; j < expected[i].attributes.length; j++) {
+ is(
+ attributes[j].textContent,
+ expected[i].attributes[j],
+ "attribute[" + j + "] matches for " + cssSelector
+ );
+ }
+
+ is(
+ header.classList.contains("content-expanded"),
+ false,
+ "We are not in expanded state"
+ );
+
+ // Make sure the header is not hidden by scrollbars before clicking.
+ header.scrollIntoView();
+
+ // Avoid clicking the header's center (could hit the debugger button)
+ EventUtils.synthesizeMouse(header, 2, 2, {}, type.ownerGlobal);
+ await tooltip.once("event-tooltip-ready");
+
+ is(
+ header.classList.contains("content-expanded") &&
+ contentBox.hasAttribute("open"),
+ true,
+ "We are in expanded state and icon changed"
+ );
+
+ is(
+ tooltip.panel.querySelectorAll(".event-header.content-expanded")
+ .length === 1 &&
+ tooltip.panel.querySelectorAll(".event-tooltip-content-box[open]")
+ .length === 1,
+ true,
+ "Only one event box is expanded at a time"
+ );
+
+ const editor = tooltip.eventTooltip._eventEditors.get(contentBox).editor;
+ const tidiedHandler = beautify.js(expected[i].handler, {
+ indent_size: 2,
+ });
+ testDiff(
+ editor.getText(),
+ tidiedHandler,
+ "handler matches for " + cssSelector,
+ ok
+ );
+
+ const checkbox = header.querySelector("input[type=checkbox]");
+ ok(checkbox, "The event toggling checkbox is displayed");
+ const disabled = checkbox.hasAttribute("disabled");
+ // We can't disable React/jQuery events at the moment, so ensure that for those,
+ // the checkbox is disabled.
+ const shouldBeDisabled =
+ expected[i].attributes?.includes("React") ||
+ expected[i].attributes?.includes("jQuery");
+ ok(
+ disabled === shouldBeDisabled,
+ `The checkbox is ${shouldBeDisabled ? "disabled" : "enabled"}\n`
+ );
+
+ info(`${label} END`);
+ }
+
+ const tooltipHidden = tooltip.once("hidden");
+ tooltip.hide();
+ await tooltipHidden;
+}
+
+/**
+ * Create diff of two strings.
+ *
+ * @param {String} text1
+ * String to compare with text2.
+ * @param {String} text2 [description]
+ * String to compare with text1.
+ * @param {String} msg
+ * Message to display on failure. A diff will be displayed after this
+ * message.
+ */
+function testDiff(text1, text2, msg) {
+ let out = "";
+
+ if (text1 === text2) {
+ ok(true, msg);
+ return;
+ }
+
+ const result = textDiff(text1, text2);
+
+ for (const { atom, operation } of result) {
+ switch (operation) {
+ case "add":
+ out += "+ " + atom + "\n";
+ break;
+ case "delete":
+ out += "- " + atom + "\n";
+ break;
+ case "none":
+ out += " " + atom + "\n";
+ break;
+ }
+ }
+
+ ok(false, msg + "\nDIFF:\n==========\n" + out + "==========\n");
+}
diff --git a/devtools/client/inspector/markup/test/helper_markup_accessibility_navigation.js b/devtools/client/inspector/markup/test/helper_markup_accessibility_navigation.js
new file mode 100644
index 0000000000..870a58abf8
--- /dev/null
+++ b/devtools/client/inspector/markup/test/helper_markup_accessibility_navigation.js
@@ -0,0 +1,92 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* eslint no-unused-vars: [2, {"vars": "local"}] */
+/* import-globals-from head.js */
+"use strict";
+
+/**
+ * Execute a keyboard event and check that the state is as expected (focused element, aria
+ * attribute etc...).
+ *
+ * @param {InspectorPanel} inspector
+ * Current instance of the inspector being tested.
+ * @param {Object} elms
+ * Map of elements that will be used to retrieve live references to children
+ * elements
+ * @param {Element} focused
+ * Element expected to be focused
+ * @param {Element} activedescendant
+ * Element expected to be the aria activedescendant of the root node
+ */
+function testNavigationState(inspector, elms, focused, activedescendant) {
+ const doc = inspector.markup.doc;
+ const id = activedescendant.getAttribute("id");
+ is(doc.activeElement, focused, `Keyboard focus should be set to ${focused}`);
+ is(
+ elms.root.elt.getAttribute("aria-activedescendant"),
+ id,
+ `Active descendant should be set to ${id}`
+ );
+}
+
+/**
+ * Lookup the provided dotted path ("prop1.subprop2.myProp") in the provided object.
+ *
+ * @param {Object} obj
+ * Object to expand.
+ * @param {String} path
+ * Dotted path to use to expand the object.
+ * @return {?} anything that is found at the provided path in the object.
+ */
+function lookupPath(obj, path) {
+ const segments = path.split(".");
+ return segments.reduce((prev, current) => prev[current], obj);
+}
+
+/**
+ * Execute a keyboard event and check that the state is as expected (focused element, aria
+ * attribute etc...).
+ *
+ * @param {InspectorPanel} inspector
+ * Current instance of the inspector being tested.
+ * @param {Object} elms
+ * MarkupContainers/Elements that will be used to retrieve references to other
+ * elements based on objects' paths.
+ * @param {Object} testData
+ * - {String} desc: description for better logging.
+ * - {String} key: keyboard event's key.
+ * - {Object} options, optional: event data such as shiftKey, etc.
+ * - {String} focused: path to expected focused element in elms map.
+ * - {String} activedescendant: path to expected aria-activedescendant element in
+ * elms map.
+ * - {String} waitFor, optional: markupview event to wait for if keyboard actions
+ * result in async updates. Also accepts the inspector event "inspector-updated".
+ */
+async function runAccessibilityNavigationTest(
+ inspector,
+ elms,
+ { desc, key, options, focused, activedescendant, waitFor }
+) {
+ info(desc);
+
+ const markup = inspector.markup;
+ const doc = markup.doc;
+ const win = doc.defaultView;
+
+ let updated;
+ if (waitFor) {
+ updated =
+ waitFor === "inspector-updated"
+ ? inspector.once(waitFor)
+ : markup.once(waitFor);
+ } else {
+ updated = Promise.resolve();
+ }
+ EventUtils.synthesizeKey(key, options, win);
+ await updated;
+
+ const focusedElement = lookupPath(elms, focused);
+ const activeDescendantElement = lookupPath(elms, activedescendant);
+ testNavigationState(inspector, elms, focusedElement, activeDescendantElement);
+}
diff --git a/devtools/client/inspector/markup/test/helper_outerhtml_test_runner.js b/devtools/client/inspector/markup/test/helper_outerhtml_test_runner.js
new file mode 100644
index 0000000000..223a36dd4f
--- /dev/null
+++ b/devtools/client/inspector/markup/test/helper_outerhtml_test_runner.js
@@ -0,0 +1,99 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* eslint no-unused-vars: [2, {"vars": "local"}] */
+/* import-globals-from head.js */
+"use strict";
+
+/**
+ * Run a series of edit-outer-html tests.
+ * This function will iterate over the provided tests array and run each test.
+ * Each test's goal is to provide a node (a selector) and a new outer-HTML to be
+ * inserted in place of the current one for that node.
+ * This test runner will wait for the mutation event to be fired and will check
+ * a few things. Each test may also provide its own validate function to perform
+ * assertions and verify that the new outer html is correct.
+ * @param {Array} tests See runEditOuterHTMLTest for the structure
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * opened
+ * @return a promise that resolves when the tests have run
+ */
+function runEditOuterHTMLTests(tests, inspector) {
+ info("Running " + tests.length + " edit-outer-html tests");
+ return (async function () {
+ for (const step of tests) {
+ await runEditOuterHTMLTest(step, inspector);
+ }
+ })();
+}
+
+/**
+ * Run a single edit-outer-html test.
+ * See runEditOuterHTMLTests for a description.
+ * @param {Object} test A test object should contain the following properties:
+ * - selector {String} a css selector targeting the node to edit
+ * - oldHTML {String}
+ * - newHTML {String}
+ * - validate {Function} will be executed when the edition test is done,
+ * after the new outer-html has been inserted. Should be used to verify
+ * the actual DOM, see if it corresponds to the newHTML string provided
+ * @param {InspectorPanel} inspector The instance of InspectorPanel currently
+ * opened
+ */
+async function runEditOuterHTMLTest(test, inspector) {
+ info("Running an edit outerHTML test on '" + test.selector + "'");
+ await selectNode(test.selector, inspector);
+
+ const onUpdated = inspector.once("inspector-updated");
+
+ info("Listen for reselectedonremoved and edit the outerHTML");
+ const onReselected = inspector.markup.once("reselectedonremoved");
+ await inspector.markup.updateNodeOuterHTML(
+ inspector.selection.nodeFront,
+ test.newHTML,
+ test.oldHTML
+ );
+ await onReselected;
+
+ // Typically selectedNode will === pageNode, but if a new element has been
+ // injected in front of it, this will not be the case. If this happens.
+ const selectedNodeFront = inspector.selection.nodeFront;
+ const pageNodeFront = await inspector.walker.querySelector(
+ inspector.walker.rootNode,
+ test.selector
+ );
+
+ if (test.validate) {
+ await test.validate({
+ pageNodeFront,
+ selectedNodeFront,
+ inspector,
+ });
+ } else {
+ is(
+ pageNodeFront,
+ selectedNodeFront,
+ "Original node (grabbed by selector) is selected"
+ );
+
+ const outerHTML = await getContentPageElementProperty(
+ test.selector,
+ "outerHTML"
+ );
+ is(outerHTML, test.newHTML, "Outer HTML has been updated");
+ }
+
+ // Wait for the inspector to be fully updated to avoid causing errors by
+ // abruptly closing hanging requests when the test ends
+ await onUpdated;
+
+ const closeTagLine =
+ inspector.markup.getContainer(pageNodeFront).closeTagLine;
+ if (closeTagLine) {
+ is(
+ closeTagLine.querySelectorAll(".theme-fg-contrast").length,
+ 0,
+ "No contrast class"
+ );
+ }
+}
diff --git a/devtools/client/inspector/markup/test/helper_style_attr_test_runner.js b/devtools/client/inspector/markup/test/helper_style_attr_test_runner.js
new file mode 100644
index 0000000000..029651cf74
--- /dev/null
+++ b/devtools/client/inspector/markup/test/helper_style_attr_test_runner.js
@@ -0,0 +1,151 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+/* eslint no-unused-vars: [2, {"vars": "local"}] */
+/* import-globals-from head.js */
+"use strict";
+
+/**
+ * Perform an style attribute edition and autocompletion test in the test
+ * url, for #node14. Test data should be an
+ * array of arrays structured as follows :
+ * [
+ * what key to press,
+ * expected input box value after keypress,
+ * expected input.selectionStart,
+ * expected input.selectionEnd,
+ * is popup expected to be open ?
+ * ]
+ *
+ * The test will start by adding a new attribute on the node, and then send each
+ * key specified in the testData. The last item of this array should leave the
+ * new attribute editor, either by committing or cancelling the edit.
+ *
+ * @param {InspectorPanel} inspector
+ * @param {Array} testData
+ * Array of arrays representing the characters to type for the new
+ * attribute as well as the expected state at each step
+ */
+async function runStyleAttributeAutocompleteTests(inspector, testData) {
+ info("Expand all markup nodes");
+ await inspector.markup.expandAll();
+
+ info("Select #node14");
+ const container = await focusNode("#node14", inspector);
+
+ info("Focus and open the new attribute inplace-editor");
+ const attr = container.editor.newAttr;
+ attr.focus();
+ EventUtils.sendKey("return", inspector.panelWin);
+ const editor = inplaceEditor(attr);
+
+ for (let i = 0; i < testData.length; i++) {
+ const data = testData[i];
+
+ // Skip empty key.
+ if (!data.length) {
+ continue;
+ }
+
+ // Expect a markupmutation event at the last iteration since that's when the
+ // attribute is actually created.
+ const onMutation =
+ i === testData.length - 1 ? inspector.once("markupmutation") : null;
+
+ info(`Entering test data ${i}: ${data[0]}, expecting: [${data[1]}]`);
+ await enterData(data, editor, inspector);
+
+ info(`Test data ${i} entered. Checking state.`);
+ await checkData(data, editor, inspector);
+
+ await onMutation;
+ }
+
+ // Undoing the action will remove the new attribute, so make sure to wait for
+ // the markupmutation event here again.
+ const onMutation = inspector.once("markupmutation");
+ while (inspector.markup.undo.canUndo()) {
+ await undoChange(inspector);
+ }
+ await onMutation;
+}
+
+/**
+ * Process a test data entry.
+ * @param {Array} data
+ * test data - click or key - to enter
+ * @param {InplaceEditor} editor
+ * @param {InspectorPanel} inspector
+ * @return {Promise} promise that will resolve when the test data has been
+ * applied
+ */
+function enterData(data, editor, inspector) {
+ const key = data[0];
+
+ if (/^click_[0-9]+$/.test(key)) {
+ const suggestionIndex = parseInt(key.split("_")[1], 10);
+ return clickOnSuggestion(suggestionIndex, editor);
+ }
+
+ return sendKey(key, editor, inspector);
+}
+
+function clickOnSuggestion(index, editor) {
+ return new Promise(resolve => {
+ info("Clicking on item " + index + " in the list");
+ editor.once("after-suggest", () => executeSoon(resolve));
+ editor.popup._list.childNodes[index].click();
+ });
+}
+
+function sendKey(key, editor, inspector) {
+ return new Promise(resolve => {
+ if (/(down|left|right|back_space|return)/gi.test(key)) {
+ info("Adding event listener for down|left|right|back_space|return keys");
+ editor.input.addEventListener("keypress", function onKeypress() {
+ if (editor.input) {
+ editor.input.removeEventListener("keypress", onKeypress);
+ }
+ executeSoon(resolve);
+ });
+ } else {
+ editor.once("after-suggest", () => executeSoon(resolve));
+ }
+
+ EventUtils.synthesizeKey(key, {}, inspector.panelWin);
+ });
+}
+
+/**
+ * Verify that the inplace editor is in the expected state for the provided
+ * test data.
+ */
+async function checkData(data, editor, inspector) {
+ const [, completion, selStart, selEnd, popupOpen] = data;
+
+ if (selEnd != -1) {
+ is(editor.input.value, completion, "Completed value is correct");
+ is(
+ editor.input.selectionStart,
+ selStart,
+ "Selection start position is correct"
+ );
+ is(editor.input.selectionEnd, selEnd, "Selection end position is correct");
+ is(
+ editor.popup.isOpen,
+ popupOpen,
+ "Popup is " + (popupOpen ? "open" : "closed")
+ );
+ } else {
+ const nodeFront = await getNodeFront("#node14", inspector);
+ const container = getContainerForNodeFront(nodeFront, inspector);
+ const attr = container.editor.attrElements
+ .get("style")
+ .querySelector(".editable");
+ is(
+ attr.textContent,
+ completion,
+ "Correct value is persisted after pressing Enter"
+ );
+ }
+}
diff --git a/devtools/client/inspector/markup/test/lib_babel_6.21.0_min.js b/devtools/client/inspector/markup/test/lib_babel_6.21.0_min.js
new file mode 100644
index 0000000000..584af43bfe
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_babel_6.21.0_min.js
@@ -0,0 +1,24 @@
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Babel=t():e.Babel=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,i){n.apply(this,[e,t,i].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e,t){return g(t)&&"string"==typeof t[0]?e.hasOwnProperty(t[0])?[e[t[0]]].concat(t.slice(1)):void 0:"string"==typeof t?e[t]:t}function s(e){var t=(e.presets||[]).map(function(e){var t=i(E,e);if(!t)throw new Error('Invalid preset specified in Babel options: "'+e+'"');return g(t)&&"object"===h(t[0])&&t[0].hasOwnProperty("buildPreset")&&(t[0]=d({},t[0],{buildPreset:t[0].buildPreset})),t}),r=(e.plugins||[]).map(function(e){var t=i(b,e);if(!t)throw new Error('Invalid plugin specified in Babel options: "'+e+'"');return t});return d({babelrc:!1},e,{presets:t,plugins:r})}function a(e,t){return v.transform(e,s(t))}function o(e,t,r){return v.transformFromAst(e,t,s(r))}function u(e,t){b.hasOwnProperty(e)&&console.warn('A plugin named "'+e+'" is already registered, it will be overridden'),b[e]=t}function l(e){Object.keys(e).forEach(function(t){return u(t,e[t])})}function c(e,t){E.hasOwnProperty(e)&&console.warn('A preset named "'+e+'" is already registered, it will be overridden'),E[e]=t}function f(e){Object.keys(e).forEach(function(t){return c(t,e[t])})}function p(){window.removeEventListener("DOMContentLoaded",x)}Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.availablePresets=t.availablePlugins=void 0;var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.transform=a,t.transformFromAst=o,t.registerPlugin=u,t.registerPlugins=l,t.registerPreset=c,t.registerPresets=f,t.disableScriptTags=p;var m=r(289),v=n(m),y=r(623),g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},b=t.availablePlugins={},E=t.availablePresets={};l({"check-es2015-constants":r(66),"external-helpers":r(319),"syntax-async-functions":r(67),"syntax-async-generators":r(193),"syntax-class-constructor-call":r(194),"syntax-class-properties":r(195),"syntax-decorators":r(126),"syntax-do-expressions":r(196),"syntax-exponentiation-operator":r(197),"syntax-export-extensions":r(198),"syntax-flow":r(68),"syntax-function-bind":r(199),"syntax-function-sent":r(321),"syntax-jsx":r(127),"syntax-object-rest-spread":r(200),"syntax-trailing-function-commas":r(128),"transform-async-functions":r(322),"transform-async-to-generator":r(129),"transform-async-to-module-method":r(324),"transform-class-constructor-call":r(201),"transform-class-properties":r(202),"transform-decorators":r(203),"transform-decorators-legacy":r(325).default,"transform-do-expressions":r(204),"transform-es2015-arrow-functions":r(69),"transform-es2015-block-scoped-functions":r(70),"transform-es2015-block-scoping":r(71),"transform-es2015-classes":r(72),"transform-es2015-computed-properties":r(73),"transform-es2015-destructuring":r(74),"transform-es2015-duplicate-keys":r(130),"transform-es2015-for-of":r(75),"transform-es2015-function-name":r(76),"transform-es2015-instanceof":r(328),"transform-es2015-literals":r(77),"transform-es2015-modules-amd":r(131),"transform-es2015-modules-commonjs":r(78),"transform-es2015-modules-systemjs":r(206),"transform-es2015-modules-umd":r(207),"transform-es2015-object-super":r(79),"transform-es2015-parameters":r(80),"transform-es2015-shorthand-properties":r(81),"transform-es2015-spread":r(82),"transform-es2015-sticky-regex":r(83),"transform-es2015-template-literals":r(84),"transform-es2015-typeof-symbol":r(85),"transform-es2015-unicode-regex":r(86),"transform-es3-member-expression-literals":r(332),"transform-es3-property-literals":r(333),"transform-es5-property-mutators":r(334),"transform-eval":r(335),"transform-exponentiation-operator":r(132),"transform-export-extensions":r(208),"transform-flow-comments":r(336),"transform-flow-strip-types":r(209),"transform-function-bind":r(210),"transform-jscript":r(337),"transform-object-assign":r(338),"transform-object-rest-spread":r(211),"transform-object-set-prototype-of-to-assign":r(339),"transform-proto-to-assign":r(340),"transform-react-constant-elements":r(341),"transform-react-display-name":r(212),"transform-react-inline-elements":r(342),"transform-react-jsx":r(213),"transform-react-jsx-compat":r(343),"transform-react-jsx-self":r(344),"transform-react-jsx-source":r(345),"transform-regenerator":r(87),"transform-runtime":r(347),"transform-strict-mode":r(214),"undeclared-variables-check":r(348)}),f({es2015:r(215),es2016:r(216),es2017:r(217),latest:r(349),react:r(350),"stage-0":r(351),"stage-1":r(218),"stage-2":r(219),"stage-3":r(220),"es2015-no-commonjs":{plugins:[r(84),r(77),r(76),r(69),r(70),r(72),r(79),r(81),r(73),r(75),r(83),r(86),r(66),r(82),r(80),r(74),r(71),r(85),[r(87),{async:!1,asyncGenerators:!1}]]},"es2015-loose":{plugins:[[r(84),{loose:!0}],r(77),r(76),r(69),r(70),[r(72),{loose:!0}],r(79),r(81),r(130),[r(73),{loose:!0}],[r(75),{loose:!0}],r(83),r(86),r(66),[r(82),{loose:!0}],r(80),[r(74),{loose:!0}],r(71),r(85),[r(78),{loose:!0}],[r(87),{async:!1,asyncGenerators:!1}]]}});var x=(t.version="6.19.0",function(){return(0,y.runScripts)(a)});"undefined"!=typeof window&&window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",x,!1)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=te["is"+e];t||(t=te["is"+e]=function(t,r){return te.is(e,t,r)}),te["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,M.default)(e)+" with option "+(0,M.default)(n))}}function a(e,t,r){if(!t)return!1;var n=o(t.type,e);return!!n&&("undefined"==typeof r||te.shallowEqual(t,r))}function o(e,t){if(e===t)return!0;if(te.ALIAS_KEYS[t])return!1;var r=te.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,O.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(e===o)return!0}}return!1}function u(e,t,r){if(e){var n=te.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function l(e,t){for(var r=(0,R.default)(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,O.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(e[o]!==t[o])return!1}return!0}function c(e,t,r){return e.object=te.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}function f(e,t){return e.object=te.memberExpression(t,e.object),e}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=te.toBlock(e[t],e)}function d(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function h(e){var t=d(e);return delete t.loc,t}function m(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=te.cloneDeep(n):Array.isArray(n)&&(n=n.map(te.cloneDeep))),t[r]=n}return t}function v(e,t){var r=e.split(".");return function(e){if(!te.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(te.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!te.isStringLiteral(s)){if(te.isMemberExpression(s)){if(s.computed&&!te.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}}function y(e){for(var t=te.COMMENT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,O.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;delete e[s]}return e}function g(e,t){return b(e,t),E(e,t),x(e,t),e}function b(e,t){A("trailingComments",e,t)}function E(e,t){A("leadingComments",e,t)}function x(e,t){A("innerComments",e,t)}function A(e,t,r){t&&r&&(t[e]=(0,$.default)((0,q.default)([].concat(t[e],r[e]))))}function S(e,t){if(!e||!t)return e;for(var r=te.INHERIT_KEYS.optional,n=Array.isArray(r),i=0,r=n?r:(0,O.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=te.INHERIT_KEYS.force,l=Array.isArray(u),c=0,u=l?u:(0,O.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;e[p]=t[p]}return te.inheritsComments(e,t),e}function _(e){if(!D(e))throw new TypeError("Not a valid node "+(e&&e.type))}function D(e){return!(!e||!Q.VISITOR_KEYS[e.type])}function C(e,t,r){if(e){var n=te.VISITOR_KEYS[e.type];if(n){r=r||{},t(e,r);for(var i=n,s=Array.isArray(i),a=0,i=s?i:(0,O.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var c=l,f=Array.isArray(c),p=0,c=f?c:(0,O.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;C(h,t,r)}else C(l,t,r)}}}}function w(e,t){t=t||{};for(var r=t.preserveComments?se:ae,n=r,i=Array.isArray(n),s=0,n=i?n:(0,O.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,P.default)(e),c=l,f=Array.isArray(c),p=0,c=f?c:(0,O.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;e[h]=null}}function F(e,t){return C(e,w,t),e}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isNodesEquivalent=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var k=r(353),P=i(k),T=r(2),O=i(T),B=r(20),R=i(B),I=r(34),M=i(I),N=r(135);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return N.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return N.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return N.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return N.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return N.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return N.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return N.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return N.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return N.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return N.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return N.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return N.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return N.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return N.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return N.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return N.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return N.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return N.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return N.NOT_LOCAL_BINDING}}),t.is=a,t.isType=o,t.validate=u,t.shallowEqual=l,t.appendToMemberExpression=c,t.prependToMemberExpression=f,t.ensureBlock=p,t.clone=d,t.cloneWithoutLoc=h,t.cloneDeep=m,t.buildMatchMemberExpression=v,t.removeComments=y,t.inheritsComments=g,t.inheritTrailingComments=b,t.inheritLeadingComments=E,t.inheritInnerComments=x,t.inherits=S,t.assertNode=_,t.isNode=D,t.traverseFast=C,t.removeProperties=w,t.removePropertiesDeep=F;var L=r(224);Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return L.getBindingIdentifiers}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return L.getOuterBindingIdentifiers}});var j=r(388);Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return j.isBinding}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return j.isReferenced}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return j.isValidIdentifier}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return j.isLet}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return j.isBlockScoped}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return j.isVar}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return j.isSpecifierDefault}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return j.isScope}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return j.isImmutable}}),Object.defineProperty(t,"isNodesEquivalent",{enumerable:!0,get:function(){return j.isNodesEquivalent}});var U=r(378);Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return U.toComputedKey}}),Object.defineProperty(t,"toSequenceExpression",{enumerable:!0,get:function(){return U.toSequenceExpression}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return U.toKeyAlias}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return U.toIdentifier}}),Object.defineProperty(t,"toBindingIdentifierName",{enumerable:!0,get:function(){return U.toBindingIdentifierName}}),Object.defineProperty(t,"toStatement",{enumerable:!0,get:function(){return U.toStatement}}),Object.defineProperty(t,"toExpression",{enumerable:!0,get:function(){return U.toExpression}}),Object.defineProperty(t,"toBlock",{enumerable:!0,get:function(){return U.toBlock}}),Object.defineProperty(t,"valueToNode",{enumerable:!0,get:function(){return U.valueToNode}});var V=r(386);Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return V.createUnionTypeAnnotation}}),Object.defineProperty(t,"removeTypeDuplicates",{enumerable:!0,get:function(){return V.removeTypeDuplicates}}),Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return V.createTypeAnnotationBasedOnTypeof}});var G=r(619),W=i(G),Y=r(570),q=i(Y),K=r(111),H=i(K),J=r(112),X=i(J),z=r(596),$=i(z);r(383);var Q=r(28),Z=r(387),ee=n(Z),te=t;t.VISITOR_KEYS=Q.VISITOR_KEYS,t.ALIAS_KEYS=Q.ALIAS_KEYS,t.NODE_FIELDS=Q.NODE_FIELDS,t.BUILDER_KEYS=Q.BUILDER_KEYS,t.DEPRECATED_KEYS=Q.DEPRECATED_KEYS,t.react=ee;for(var re in te.VISITOR_KEYS)s(re);te.FLIPPED_ALIAS_KEYS={},(0,X.default)(te.ALIAS_KEYS,function(e,t){(0,X.default)(e,function(e){var r=te.FLIPPED_ALIAS_KEYS[e]=te.FLIPPED_ALIAS_KEYS[e]||[];r.push(t)})}),(0,X.default)(te.FLIPPED_ALIAS_KEYS,function(e,t){te[t.toUpperCase()+"_TYPES"]=e,s(t)});t.TYPES=(0,R.default)(te.VISITOR_KEYS).concat((0,R.default)(te.FLIPPED_ALIAS_KEYS)).concat((0,R.default)(te.DEPRECATED_KEYS));(0,X.default)(te.BUILDER_KEYS,function(e,t){function r(){if(arguments.length>e.length)throw new Error("t."+t+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+e.length);var r={};r.type=t;for(var n=0,i=e,s=Array.isArray(i),a=0,i=s?i:(0,O.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var l=o,c=te.NODE_FIELDS[t][l],f=arguments[n++];void 0===f&&(f=(0,H.default)(c.default)),r[l]=f}for(var p in r)u(r,p,r[p]);return r}te[t]=r,te[t[0].toLowerCase()+t.slice(1)]=r});var ne=function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=te.DEPRECATED_KEYS[e];te[e]=te[e[0].toLowerCase()+e.slice(1)]=t(te[r]),te["is"+e]=t(te["is"+r]),te["assert"+e]=t(te["assert"+r])};for(var ie in te.DEPRECATED_KEYS)ne(ie);(0,W.default)(te),(0,W.default)(te.VISITOR_KEYS);var se=["tokens","start","end","loc","raw","rawValue"],ae=te.COMMENT_KEYS.concat(["comments"]).concat(se)},function(e,t,r){"use strict";e.exports={default:r(397),__esModule:!0}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){e=(0,l.default)(e);var r=e,n=r.program;return t.length&&(0,m.default)(e,A,null,t),n.body.length>1?n.body:n.body[0]}t.__esModule=!0;var a=r(10),o=i(a);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,f.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=y.parse(e,t),i=m.default.removeProperties(i,{preserveComments:t.preserveComments}),m.default.cheap(i,function(e){e[E]=!0})}catch(e){throw (e.stack=e.stack+"from\n"+r, e)}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return s(n(),t)}};var u=r(568),l=i(u),c=r(174),f=i(c),p=r(270),d=i(p),h=r(8),m=i(h),v=r(136),y=n(v),g=r(1),b=n(g),E="_fromTemplate",x=(0,o.default)(),A={noScope:!0,enter:function(e,t){var r=e.node;if(r[x])return e.skip();b.isExpressionStatement(r)&&(r=r.expression);var n=void 0;if(b.isIdentifier(r)&&r[E])if((0,d.default)(t[0],r.name))n=t[0][r.name];else if("$"===r.name[0]){var i=+r.name.slice(1);t[i]&&(n=t[i])}null===n&&e.remove(),n&&(n[x]=!0,e.replaceInline(n))},exit:function(e){var t=e.node;t.loc||m.default.clearNode(t)}};e.exports=t.default},function(e,t){"use strict";var r=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(e,t){"use strict";var r=Array.isArray;e.exports=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.__esModule=!0;var s=r(356),a=n(s),o=r(10),u=n(o),l="function"==typeof u.default&&"symbol"===i(a.default)?function(e){return"undefined"==typeof e?"undefined":i(e)}:function(e){return e&&"function"==typeof u.default&&e.constructor===u.default&&e!==u.default.prototype?"symbol":"undefined"==typeof e?"undefined":i(e)};t.default="function"==typeof u.default&&"symbol"===l(a.default)?function(e){return"undefined"==typeof e?"undefined":l(e)}:function(e){return e&&"function"==typeof u.default&&e.constructor===u.default&&e!==u.default.prototype?"symbol":"undefined"==typeof e?"undefined":l(e)}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(y.get("traverseNeedsParent",e.type));m.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var o=r(2),u=i(o),l=r(35);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return i(l).default}});var c=r(134);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i(c).default}});var f=r(221);Object.defineProperty(t,"Hub",{enumerable:!0,get:function(){return i(f).default}}),t.default=s;var p=r(360),d=i(p),h=r(377),m=n(h),v=r(19),y=n(v),g=r(113),b=i(g),E=r(1),x=n(E),A=r(89),S=n(A);t.visitors=m,s.visitors=m,s.verify=m.verify,s.explode=m.explode,s.NodePath=r(35),s.Scope=r(134),s.Hub=r(221),s.cheap=function(e,t){return x.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=x.VISITOR_KEYS[e.type];if(a)for(var o=new d.default(r,t,n,i),l=a,c=Array.isArray(l),f=0,l=c?l:(0,u.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var h=p;if((!s||!s[h])&&o.visit(e,h))return}},s.clearNode=function(e,t){x.removeProperties(e,t),S.path.delete(e)},s.removeProperties=function(e,t){return x.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,b.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},s.clearCache=function(){S.clear()},s.clearCache.clearPath=S.clearPath,s.clearCache.clearScope=S.clearScope,s.copyCache=function(e,t){S.path.has(e)&&S.path.set(t,S.path.get(e))}},function(e,t,r){"use strict";e.exports={default:r(402),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(407),__esModule:!0}},function(e,t,r){"use strict";var n=r(149)("wks"),i=r(97),s=r(14).Symbol,a="function"==typeof s,o=e.exports=function(e){return n[e]||(n[e]=a&&s[e]||(a?s:i)("Symbol."+e))};o.store=n},function(e,t){"use strict";function r(e){var t="undefined"==typeof e?"undefined":n(e);return null!=e&&("object"==t||"function"==t)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=r},function(e,t){"use strict";function r(e){return null!=e&&"object"==("undefined"==typeof e?"undefined":n(e))}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=r},function(e,t){"use strict";var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){"use strict";function n(e){return null==e?void 0===e?u:o:(e=Object(e),l&&l in e?s(e):a(e))}var i=r(44),s=r(525),a=r(551),o="[object Null]",u="[object Undefined]",l=i?i.toStringTag:void 0;e.exports=n},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(259),s="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,a=i||s||Function("return this")();e.exports=a},function(e,t,r){(function(e){"use strict";function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return i.exec(e).slice(1)};t.resolve=function(){for(var t="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a=s>=0?arguments[s]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,i="/"===a.charAt(0))}return t=r(n(t.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+t||"."},t.normalize=function(e){var i=t.isAbsolute(e),s="/"===a(e,-1);return e=r(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),s=n(r.split("/")),a=Math.min(i.length,s.length),o=a,u=0;u<a;u++)if(i[u]!==s[u]){o=u;break}for(var l=[],u=o;u<i.length;u++)l.push("..");return l=l.concat(s.slice(o)),l.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=s(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},t.basename=function(e,t){var r=s(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){return s(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(t,r(18))},function(e,t){"use strict";function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function s(e){if(f===clearTimeout)return clearTimeout(e);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):v=-1,h.length&&o())}function o(){if(!m){var e=i(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++v<t;)d&&d[v].run();v=-1,t=h.length}d=null,m=!1,s(e)}}function u(e,t){this.fun=e,this.array=t}function l(){}var c,f,p=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(e){c=r}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(e){f=n}}();var d,h=[],m=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new u(e,t)),1!==h.length||m||i(o)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=l,p.addListener=l,p.once=l,p.off=l,p.removeListener=l,p.removeAllListeners=l,p.emit=l,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=f[e];if(!i)throw new ReferenceError("Unknown message "+(0,u.default)(e));return r=a(r),i.replace(/\$(\d+)/g,function(e,t){return r[t-1]})}function a(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return(0,u.default)(e)||e+""}catch(t){return c.inspect(e)}})}t.__esModule=!0,t.MESSAGES=void 0;var o=r(34),u=i(o);t.get=s,t.parseArgs=a;var l=r(118),c=n(l),f=t.MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginNotObject:"Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",pluginNotFunction:"Plugin $2 specified in $1 was expected to return a function but returned $3",pluginUnknown:"Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",pluginInvalidProperty:"Plugin $2 specified in $1 provided an invalid property of $3"}},function(e,t,r){"use strict";e.exports={default:r(404),__esModule:!0}},function(e,t,r){"use strict";var n=r(24);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){"use strict";e.exports=!r(36)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";var n=r(14),i=r(5),s=r(54),a=r(30),o="prototype",u=function e(t,r,u){var l,c,f,p=t&e.F,d=t&e.G,h=t&e.S,m=t&e.P,v=t&e.B,y=t&e.W,g=d?i:i[r]||(i[r]={}),b=g[o],E=d?n:h?n[r]:(n[r]||{})[o];d&&(u=r);
+for(l in u)c=!p&&E&&void 0!==E[l],c&&l in g||(f=c?E[l]:u[l],g[l]=d&&"function"!=typeof E[l]?u[l]:v&&c?s(f,n):y&&E[l]==f?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[o]=e[o],t}(f):m&&"function"==typeof f?s(Function.call,f):f,m&&((g.virtual||(g.virtual={}))[l]=f,t&e.R&&b&&!b[l]&&a(b,l,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return"object"===("undefined"==typeof e?"undefined":r(e))?null!==e:"function"==typeof e}},function(e,t,r){"use strict";var n=r(21),i=r(228),s=r(152),a=Object.defineProperty;t.f=r(22)?Object.defineProperty:function(e,t,r){if(n(e),t=s(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){"use strict";function n(e){return null!=e&&s(e.length)&&!i(e)}var i=r(116),s=r(175);e.exports=n},function(e,t,r){"use strict";function n(e){return a(e)?i(e):s(e)}var i=r(243),s=r(487),a=r(26);e.exports=n},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":"undefined"==typeof e?"undefined":(0,g.default)(e)}function a(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)e(t,r+"["+i+"]",n[i])}return t.each=e,t}function o(){function e(e,t,n){if(r.indexOf(n)<0)throw new TypeError("Property "+t+" expected value to be one of "+(0,v.default)(r)+" but got "+(0,v.default)(n))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOf=r,e}function u(){function e(e,t,n){for(var i=!1,s=r,a=Array.isArray(s),o=0,s=a?s:(0,h.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(E.is(l,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,v.default)(r)+" but instead got "+(0,v.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeTypes=r,e}function l(){function e(e,t,n){for(var i=!1,a=r,o=Array.isArray(a),u=0,a=o?a:(0,h.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(s(n)===c||E.is(c,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,v.default)(r)+" but instead got "+(0,v.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeOrValueTypes=r,e}function c(e){function t(t,r,n){var i=s(n)===e;if(!i)throw new TypeError("Property "+r+" expected type of "+e+" but got "+s(n))}return t.type=e,t}function f(){function e(){for(var e=r,t=Array.isArray(e),n=0,e=t?e:(0,h.default)(e);;){var i;if(t){if(n>=e.length)break;i=e[n++]}else{if(n=e.next(),n.done)break;i=n.value}var s=i;s.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.chainOf=r,e}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&C[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(D[t.deprecatedAlias]=e);for(var n=t.visitor.concat(t.builder),i=Array.isArray(n),a=0,n=i?n:(0,h.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;t.fields[u]=t.fields[u]||{}}for(var l in t.fields){var f=t.fields[l];t.builder.indexOf(l)===-1&&(f.optional=!0),void 0===f.default?f.default=null:f.validate||(f.validate=c(s(f.default)))}x[e]=t.visitor,_[e]=t.builder,S[e]=t.fields,A[e]=t.aliases,C[e]=t}t.__esModule=!0,t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var d=r(2),h=i(d),m=r(34),v=i(m),y=r(7),g=i(y);t.assertEach=a,t.assertOneOf=o,t.assertNodeType=u,t.assertNodeOrValueType=l,t.assertValueType=c,t.chain=f,t.default=p;var b=r(1),E=n(b),x=t.VISITOR_KEYS={},A=t.ALIAS_KEYS={},S=t.NODE_FIELDS={},_=t.BUILDER_KEYS={},D=t.DEPRECATED_KEYS={},C={}},function(e,t){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){"use strict";var n=r(25),i=r(94);e.exports=r(22)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";function n(e,t,r,n){var a=!r;r||(r={});for(var o=-1,u=t.length;++o<u;){var l=t[o],c=n?n(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),a?s(r,l,c):i(r,l,c)}return r}var i=r(161),s=r(162);e.exports=n},function(e,t){"use strict";e.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=r(359),o=s(a),u=r(34),l=s(u),c=r(88),f=s(c),p=r(2),d=s(p),h=r(7),m=s(h),v=r(3),y=s(v),g=r(182),b=i(g),E=r(65),x=s(E),A=r(19),S=i(A),_=r(51),D=r(119),C=s(D),w=r(569),F=s(w),k=r(111),P=s(k),T=r(290),O=s(T),B=r(32),R=s(B),I=r(53),M=s(I),N=r(50),L=s(N),j=r(17),U=s(j),V=function(){function e(t){(0,y.default)(this,e),this.resolvedConfigs=[],this.options=e.createBareOptions(),this.log=t}return e.memoisePluginContainer=function(t,r,n,i){for(var s=e.memoisedPlugins,a=Array.isArray(s),o=0,s=a?s:(0,d.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.container===t)return l.plugin}var c=void 0;if(c="function"==typeof t?t(b):t,"object"===("undefined"==typeof c?"undefined":(0,m.default)(c))){var f=new x.default(c,i);return e.memoisedPlugins.push({container:t,plugin:f}),f}throw new TypeError(S.get("pluginNotObject",r,n,"undefined"==typeof c?"undefined":(0,m.default)(c))+r+n)},e.createBareOptions=function(){var e={};for(var t in R.default){var r=R.default[t];e[t]=(0,P.default)(r.default)}return e},e.normalisePlugin=function(t,r,n,i){if(t=t.__esModule?t.default:t,!(t instanceof x.default)){if("function"!=typeof t&&"object"!==("undefined"==typeof t?"undefined":(0,m.default)(t)))throw new TypeError(S.get("pluginNotFunction",r,n,"undefined"==typeof t?"undefined":(0,m.default)(t)));t=e.memoisePluginContainer(t,r,n,i)}return t.init(r,n),t},e.normalisePlugins=function(t,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:t+"$"+s;if("string"==typeof a){var l=(0,C.default)("babel-plugin-"+a,n)||(0,C.default)(a,n);if(!l)throw new ReferenceError(S.get("pluginUnknown",a,t,s,n));a=r(179)(l)}return a=e.normalisePlugin(a,t,s,u),[a,o]})},e.prototype.mergeOptions=function(t){var r=this,i=t.options,s=t.extending,a=t.alias,o=t.loc,u=t.dirname;if(a=a||"foreign",i){("object"!==("undefined"==typeof i?"undefined":(0,m.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var l=(0,F.default)(i,function(e){if(e instanceof x.default)return e});u=u||n.cwd(),o=o||a;for(var c in l){var p=R.default[c];if(!p&&this.log)if(M.default[c])this.log.error("Using removed Babel 5 option: "+a+"."+c+" - "+M.default[c].message,ReferenceError);else{var d="Unknown option: "+a+"."+c+". Check out http://babeljs.io/docs/usage/options/ for more information about options.",h="A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.";this.log.error(d+"\n\n"+h,ReferenceError)}}(0,_.normaliseOptions)(l),l.plugins&&(l.plugins=e.normalisePlugins(o,u,l.plugins)),l.presets&&(l.passPerPreset?l.presets=this.resolvePresets(l.presets,u,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:u})}):(this.mergePresets(l.presets,u),delete l.presets)),i===s?(0,f.default)(s,l):(0,O.default)(s||this.options,l)}},e.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:U.default.dirname(t||"")})})},e.prototype.resolvePresets=function(e,t,n){return e.map(function(e){var i=void 0;if(Array.isArray(e)){if(e.length>2)throw new Error("Unexpected extra options "+(0,l.default)(e.slice(2))+" passed to preset.");var s=e;e=s[0],i=s[1]}var a=void 0;try{if("string"==typeof e){if(a=(0,C.default)("babel-preset-"+e,t)||(0,C.default)(e,t),!a){var u=e.match(/^(@[^\/]+)\/(.+)$/);if(u){var c=u[1],f=u[2];e=c+"/babel-preset-"+f,a=(0,C.default)(e,t)}}if(!a)throw new Error("Couldn't find preset "+(0,l.default)(e)+" relative to directory "+(0,l.default)(t));e=r(179)(a)}if("object"===("undefined"==typeof e?"undefined":(0,m.default)(e))&&e.__esModule)if(e.default)e=e.default;else{var p=e,d=(p.__esModule,(0,o.default)(p,["__esModule"]));e=d}if("object"===("undefined"==typeof e?"undefined":(0,m.default)(e))&&e.buildPreset&&(e=e.buildPreset),"function"!=typeof e&&void 0!==i)throw new Error("Options "+(0,l.default)(i)+" passed to "+(a||"a preset")+" which does not accept options.");if("function"==typeof e&&(e=e(b,i)),"object"!==("undefined"==typeof e?"undefined":(0,m.default)(e)))throw new Error("Unsupported preset format: "+e+".");n&&n(e,a)}catch(e){throw (a&&(e.message+=" (While processing preset: "+(0,l.default)(a)+")"), e)}return e});},e.prototype.normaliseOptions=function(){var e=this.options;for(var t in R.default){var r=R.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},e.prototype.init=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,L.default)(e,this.log),r=Array.isArray(t),n=0,t=r?t:(0,d.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},e;}();t.default=V,V.memoisedPlugins=[],e.exports=t.default}).call(t,r(18))},function(e,t,r){"use strict";e.exports={default:r(398),__esModule:!0}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s),o=r(3),u=i(o),l=r(222),c=n(l),f=r(236),p=i(f),d=r(454),h=i(d),m=r(8),v=i(m),y=r(174),g=i(y),b=r(134),E=i(b),x=r(1),A=n(x),S=r(89),_=(0,p.default)("babel"),D=function(){function e(t,r){(0,u.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,n=t.parentPath,i=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&n&&(r=n.hub),(0,h.default)(i,"To get a node path the parent needs to exist");var u=s[o],l=S.path.get(i)||[];S.path.has(i)||S.path.set(i,l);for(var c=void 0,f=0;f<l.length;f++){var p=l[f];if(p.node===u){c=p;break}}return c||(c=new e(r,i),l.push(c)),c.setup(n,s,a,o),c},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new E.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,v.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){A.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){_.enabled&&_(this.getPathLocation()+" "+this.type+": "+e())},e}();t.default=D,(0,g.default)(D.prototype,r(361)),(0,g.default)(D.prototype,r(367)),(0,g.default)(D.prototype,r(375)),(0,g.default)(D.prototype,r(365)),(0,g.default)(D.prototype,r(364)),(0,g.default)(D.prototype,r(370)),(0,g.default)(D.prototype,r(363)),(0,g.default)(D.prototype,r(374)),(0,g.default)(D.prototype,r(373)),(0,g.default)(D.prototype,r(366)),(0,g.default)(D.prototype,r(362));for(var C=function(){if(F){if(k>=w.length)return"break";P=w[k++]}else{if(k=w.next(),k.done)return"break";P=k.value}var e=P,t="is"+e;D.prototype[t]=function(e){return A[t](this.node,e)},D.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}},w=A.TYPES,F=Array.isArray(w),k=0,w=F?w:(0,a.default)(w);;){var P,T=C();if("break"===T)break}var O=function(e){if("_"===e[0])return"continue";A.TYPES.indexOf(e)<0&&A.TYPES.push(e);var t=c[e];D.prototype["is"+e]=function(e){return t.checkPath(this,e)}};for(var B in c){O(B)}e.exports=t.default},function(e,t){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){"use strict";var n=r(142),i=r(90);e.exports=function(e){return n(i(e))}},function(e,t,r){"use strict";function n(e,t){var r=s(e,t);return i(r)?r:void 0}var i=r(484),s=r(526);e.exports=n},function(e,t){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n){if(e.selfReference){if(!n.hasBinding(r.name)||n.hasGlobal(r.name)){if(!p.isFunction(t))return;var i=d;t.generator&&(i=h);var s=i({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:n.generateUidIdentifier(r.name)}).expression;s.callee._skipModulesRemap=!0;for(var a=s.callee.body.body[0].params,o=0,l=(0,u.default)(t);o<l;o++)a.push(n.generateUidIdentifier("x"));return s}n.rename(r.name)}t.id=r,n.getProgramParent().references[r.name]=!0}function a(e,t,r){var n={selfAssignment:!1,selfReference:!1,outerDeclar:r.getBindingIdentifier(t),references:[],name:t},i=r.getOwnBinding(t);return i?"param"===i.kind&&(n.selfReference=!0):(n.outerDeclar||r.hasGlobal(t))&&r.traverse(e,m,n),n}t.__esModule=!0,t.default=function(e){var t=e.node,r=e.parent,n=e.scope,i=e.id;if(!t.id){if(!p.isObjectProperty(r)&&!p.isObjectMethod(r,{kind:"method"})||r.computed&&!p.isLiteral(r.key)){if(p.isVariableDeclarator(r)){if(i=r.id,p.isIdentifier(i)){var o=n.parent.getBinding(i.name);if(o&&o.constant&&n.getBinding(i.name)===o)return t.id=i,void(t.id[p.NOT_LOCAL_BINDING]=!0)}}else if(p.isAssignmentExpression(r))i=r.left;else if(!i)return}else i=r.key;var u=void 0;if(i&&p.isLiteral(i))u=i.value;else{if(!i||!p.isIdentifier(i))return;u=i.name}u=p.toBindingIdentifierName(u),i=p.identifier(u),i[p.NOT_LOCAL_BINDING]=!0;var l=a(t,u,n);return s(l,t,i,n)||t}};var o=r(187),u=i(o),l=r(4),c=i(l),f=r(1),p=n(f),d=(0,c.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),h=(0,c.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),m={"ReferencedIdentifier|BindingIdentifier":function(e,t){if(e.node.name===t.name){var r=e.scope.getBindingIdentifier(t.name);r===t.outerDeclar&&(t.selfReference=!0,e.stop())}}};e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(354),s=n(i),a=r(9),o=n(a),u=r(7),l=n(u);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,l.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(s.default?(0,s.default)(e,t):e.__proto__=t)}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(7),s=n(i);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,s.default)(t))&&"function"!=typeof t?e:t}},function(e,t,r){"use strict";var n=r(234),i=r(141);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t,r){"use strict";var n=r(16),i=n.Symbol;e.exports=i},function(e,t){"use strict";function r(e,t){return e===t||e!==e&&t!==t}e.exports=r},function(e,t,r){"use strict";function n(e){return a(e)?i(e,!0):s(e)}var i=r(243),s=r(488),a=r(26);e.exports=n},function(e,t,r){"use strict";function n(e){var t=i(e),r=t%1;return t===t?r?t-r:t:0}var i=r(592);e.exports=n},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,r){(function(e){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.File=void 0;var s=r(7),a=i(s),o=r(2),u=i(o),l=r(9),c=i(l),f=r(88),p=i(f),d=r(3),h=i(d),m=r(42),v=i(m),y=r(41),g=i(y),b=r(192),E=i(b),x=r(122),A=n(x),S=r(396),_=i(S),D=r(33),C=i(D),w=r(296),F=i(w),k=r(8),P=i(k),T=r(287),O=i(T),B=r(183),R=i(B),I=r(181),M=i(I),N=r(269),L=i(N),j=r(121),U=i(j),V=r(120),G=i(V),W=r(136),Y=r(123),q=n(Y),K=r(17),H=i(K),J=r(1),X=n(J),z=r(119),$=i(z),Q=r(293),Z=i(Q),ee=r(294),te=i(ee),re=/^#!.*/,ne=[[Z.default],[te.default]],ie={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},se=function(t){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1];(0,h.default)(this,n);var i=(0,v.default)(this,t.call(this));return i.pipeline=r,i.log=new U.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,p.default)((0,c.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new k.Hub(i),i}return(0,g.default)(n,t),n.prototype.getMetadata=function(){for(var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0,t=r?t:(0,u.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(X.isModuleDeclaration(s)){e=!0;break}}e&&this.path.traverse(A,this)},n.prototype.initOptions=function(e){e=new C.default(this.log,this.pipeline).init(e),e.inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=H.default.basename(e.filename,H.default.extname(e.filename)),e.ignore=q.arrayify(e.ignore,q.regexify),e.only&&(e.only=q.arrayify(e.only,q.regexify)),(0,L.default)(e,{moduleRoot:e.sourceRoot}),(0,L.default)(e,{sourceRoot:e.moduleRoot}),(0,L.default)(e,{filenameRelative:e.filename});var t=H.default.basename(e.filenameRelative);return(0,L.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){for(var t=e.plugins.concat(ne),r=[],n=[],i=t,s=Array.isArray(i),a=0,i=s?i:(0,u.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var l=o,c=l[0],f=l[1];r.push(c.visitor),n.push(new F.default(this,c,f)),c.manipulateOptions&&c.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(r),this.pluginPasses.push(n)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function e(t){var e=this.opts.resolveModuleSource;return e&&(t=e(t,this.opts.filename)),t},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(X.importNamespaceSpecifier(i)):"default"===t?s.push(X.importDefaultSpecifier(i)):s.push(X.importSpecifier(i,X.identifier(t)));var a=X.importDeclaration(s,X.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return X.memberExpression(n,X.identifier(e));var s=(0,E.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return X.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=X.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,P.default)(e,ie,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(!t)return e;var r=function(){var r=new O.default.SourceMapConsumer(t),n=new O.default.SourceMapConsumer(e),i=new O.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,{v:t}}();return"object"===("undefined"==typeof r?"undefined":(0,a.default)(r))?r.v:void 0},n.prototype.parse=function(t){var n=W.parse,i=this.opts.parserOpts;if(i&&(i=(0,p.default)({},this.parserOpts,i),i.parser)){if("string"==typeof i.parser){var s=H.default.dirname(this.opts.filename)||e.cwd(),a=(0,$.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=r(178)(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,W.parse)(e,i)}}}this.log.debug("Parse start");var o=n(t,i||this.parserOpts);return this.log.debug("Parse stop"),o},n.prototype._addAst=function(e){this.path=k.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e<this.pluginPasses.length;e++){var t=this.pluginPasses[e];this.call("pre",t),this.log.debug("Start transform traverse");var r=P.default.visitors.merge(this.pluginVisitors[e],t,this.opts.wrapPluginVisitorMethod);(0,P.default)(this.ast,r,this.scope),this.log.debug("End transform traverse"),this.call("post",t)}return this.generate()},n.prototype.wrap=function(t,r){t+="";try{return this.shouldIgnore()?this.makeResult({code:t,ignored:!0}):r()}catch(r){if(r._babel)throw r;r._babel=!0;var n=r.message=this.opts.filename+": "+r.message,i=r.loc;if(i&&(r.codeFrame=(0,M.default)(t,i.line,i.column+1,this.opts),n+="\n"+r.codeFrame),e.browser&&(r.message=n),r.stack){var s=r.stack.replace(r.message,n);r.stack=s}throw r}},n.prototype.addCode=function(e){e=(e||"")+"",e=this.parseInputSourceMap(e),this.code=e},n.prototype.parseCode=function(){this.parseShebang();var e=this.parse(this.code);this.addAst(e)},n.prototype.shouldIgnore=function(){var e=this.opts;return q.shouldIgnore(e.filename,e.ignore,e.only)},n.prototype.call=function(e,t){for(var r=t,n=Array.isArray(r),i=0,r=n?r:(0,u.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s,o=a.plugin,l=o[e];l&&l.call(a,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(t.inputSourceMap!==!1){var r=_.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=_.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=re.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(re,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var t=this.opts,n=this.ast,i={ast:n};if(!t.code)return this.makeResult(i);var s=R.default;if(t.generatorOpts.generator&&(s=t.generatorOpts.generator,"string"==typeof s)){var a=H.default.dirname(this.opts.filename)||e.cwd(),o=(0,$.default)(s,a);if(!o)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=r(178)(o).print}this.log.debug("Generation start");var u=s(n,t.generatorOpts?(0,p.default)(t,t.generatorOpts):t,this.code);return i.code=u.code,i.map=u.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==t.sourceMaps&&"both"!==t.sourceMaps||(i.code+="\n"+_.default.fromObject(i.map).toComment()),"inline"===t.sourceMaps&&(i.map=null),this.makeResult(i)},n}(G.default);t.default=se,t.File=se}).call(t,r(18))},function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=x[e];return null==t?x[e]=E.default.existsSync(e):t}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new C(t);return e.babelrc!==!1&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&g.default.dirname(r)}),n.configs}t.__esModule=!0;var o=r(88),u=i(o),l=r(3),c=i(l);t.default=a;var f=r(119),p=i(f),d=r(458),h=i(d),m=r(600),v=i(m),y=r(17),g=i(y),b=r(117),E=i(b),x={},A={},S=".babelignore",_=".babelrc",D="package.json",C=function(){function e(t){(0,c.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,v.default)(e)||(e=g.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=g.default.dirname(e));){if(!t){var i=g.default.join(e,_);s(i)&&(this.addConfig(i),t=!0);var a=g.default.join(e,D);!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=g.default.join(e,S);s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=E.default.readFileSync(e,"utf8"),r=t.split("\n");r=r.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e}),r.length&&this.mergeConfig({options:{ignore:r},alias:e,dirname:g.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.default;
+if(this.resolvedConfigs.indexOf(e)>=0)return!1;this.resolvedConfigs.push(e);var n=E.default.readFileSync(e,"utf8"),i=void 0;try{i=A[n]=A[n]||r.parse(n),t&&(i=i[t])}catch(t){throw (t.message=e+": Error while parsing JSON - "+t.message, t)}return this.mergeConfig({options:i,alias:e,dirname:g.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,u.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var a=(0,p.default)(t.extends,s);a?this.addConfig(a):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var o=void 0,l=n.env.BABEL_ENV||"production"||"development";t.env&&(o=t.env[l],delete t.env),this.mergeConfig({options:o,alias:r+".env."+l,dirname:s})},e;}();e.exports=t.default}).call(t,r(18))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var n=l.default[t];if(n&&n.alias&&(n=l.default[n.alias]),n){var i=o[n.type];i&&(r=i(r)),e[t]=r}}}return e}t.__esModule=!0,t.config=void 0,t.normaliseOptions=s;var a=r(52),o=i(a),u=r(32),l=n(u);t.config=l.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){return!!e}function a(e){return f.booleanify(e)}function o(e){return f.list(e)}t.__esModule=!0,t.filename=void 0,t.boolean=s,t.booleanString=a,t.list=o;var u=r(283),l=i(u),c=r(123),f=n(c);t.filename=l.default},function(e,t){"use strict";e.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},function(e,t,r){"use strict";var n=r(411);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){"use strict";e.exports={}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(97)("meta"),s=r(24),a=r(29),o=r(25).f,u=0,l=Object.isExtensible||function(){return!0},c=!r(36)(function(){return l(Object.preventExtensions({}))}),f=function(e){o(e,i,{value:{i:"O"+ ++u,w:{}}})},p=function(e,t){if(!s(e))return"symbol"==("undefined"==typeof e?"undefined":n(e))?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!l(e))return"F";if(!t)return"E";f(e)}return e[i].i},d=function(e,t){if(!a(e,i)){if(!l(e))return!0;if(!t)return!1;f(e)}return e[i].w},h=function(e){return c&&m.NEED&&l(e)&&!a(e,i)&&f(e),e},m=e.exports={KEY:i,NEED:!1,fastKey:p,getWeak:d,onFreeze:h}},function(e,t,r){"use strict";r(434);for(var n=r(14),i=r(30),s=r(55),a=r(11)("toStringTag"),o=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var l=o[u],c=n[l],f=c&&c.prototype;f&&!f[a]&&i(f,a,l),s[l]=s.Array}},function(e,t){"use strict";function r(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}e.exports=r},function(e,t,r){"use strict";function n(e){return"function"==typeof e?e:null==e?o:"object"==("undefined"==typeof e?"undefined":i(e))?u(e)?a(e[0],e[1]):s(e):l(e)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(489),a=r(490),o=r(60),u=r(6),l=r(587);e.exports=n},function(e,t){"use strict";function r(e){return e}e.exports=r},function(e,t,r){"use strict";function n(e){return"symbol"==("undefined"==typeof e?"undefined":i(e))||a(e)&&s(e)==o}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(15),a=r(13),o="[object Symbol]";e.exports=n},function(e,t,r){"use strict";function n(e){return null==e?"":i(e)}var i=r(165);e.exports=n},function(e,t){"use strict";function r(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')}function n(e){var t=e.match(v);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function s(e){var r=e,s=n(e);if(s){if(!s.path)return e;r=s.path}for(var a,o=t.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)a=u[c],"."===a?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=o?"/":"."),s?(s.path=r,i(s)):r}function a(e,t){""===e&&(e="."),""===t&&(t=".");var r=n(t),a=n(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||t.match(y))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var o="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=o,i(a)):o}function o(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}function u(e){return e}function l(e){return f(e)?"$"+e:e}function c(e){return f(e)?e.slice(1):e}function f(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,t,r){var n=e.source-t.source;return 0!==n?n:(n=e.originalLine-t.originalLine,0!==n?n:(n=e.originalColumn-t.originalColumn,0!==n||r?n:(n=e.generatedColumn-t.generatedColumn,0!==n?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name))))}function d(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:(n=e.generatedColumn-t.generatedColumn,0!==n||r?n:(n=e.source-t.source,0!==n?n:(n=e.originalLine-t.originalLine,0!==n?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name))))}function h(e,t){return e===t?0:e>t?1:-1}function m(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:(r=e.generatedColumn-t.generatedColumn,0!==r?r:(r=h(e.source,t.source),0!==r?r:(r=e.originalLine-t.originalLine,0!==r?r:(r=e.originalColumn-t.originalColumn,0!==r?r:h(e.name,t.name)))))}t.getArg=r;var v=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,y=/^data:.+\,.+$/;t.urlParse=n,t.urlGenerate=i,t.normalize=s,t.join=a,t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(v)},t.relative=o;var g=function(){var e=Object.create(null);return!("__proto__"in e)}();t.toSetString=g?u:l,t.fromSetString=g?u:c,t.compareByOriginalPositions=p,t.compareByGeneratedPositionsDeflated=d,t.compareByGeneratedPositionsInflated=m},function(e,t,r){(function(t){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function i(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}function s(e){return Object.prototype.toString.call(e)}function a(e){return!i(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function o(e){if(x.isFunction(e)){if(_)return e.name;var t=e.toString(),r=t.match(C);return r&&r[1]}}function u(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function l(e){if(_||!x.isFunction(e))return x.inspect(e);var t=o(e),r=t?": "+t:"";return"[Function"+r+"]"}function c(e){return u(l(e.actual),128)+" "+e.operator+" "+u(l(e.expected),128)}function f(e,t,r,n,i){throw new D.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function p(e,t){e||f(e,!0,t,"==",D.ok)}function d(e,t,r,o){if(e===t)return!0;if(i(e)&&i(t))return 0===n(e,t);if(x.isDate(e)&&x.isDate(t))return e.getTime()===t.getTime();if(x.isRegExp(e)&&x.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"===("undefined"==typeof e?"undefined":E(e))||null!==t&&"object"===("undefined"==typeof t?"undefined":E(t))){if(a(e)&&a(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;o=o||{actual:[],expected:[]};var u=o.actual.indexOf(e);return u!==-1&&u===o.expected.indexOf(t)||(o.actual.push(e),o.expected.push(t),m(e,t,r,o))}return r?e===t:e==t}function h(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function m(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1;if(x.isPrimitive(e)||x.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=h(e),s=h(t);if(i&&!s||!i&&s)return!1;if(i)return e=S.call(e),t=S.call(t),d(e,t,r);var a,o,u=w(e),l=w(t);if(u.length!==l.length)return!1;for(u.sort(),l.sort(),o=u.length-1;o>=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!d(e[a],t[a],r,n))return!1;return!0}function v(e,t,r){d(e,t,!0)&&f(e,t,r,"notDeepStrictEqual",v)}function y(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&t.call({},e)===!0}function g(e){var t;try{e()}catch(e){t=e}return t}function b(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=g(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&f(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&x.isError(i),o=!e&&i&&!r;if((a&&s&&y(i,r)||o)&&f(i,r,"Got unwanted exception"+n),e&&i&&r&&!y(i,r)||!e&&i)throw i}var E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x=r(118),A=Object.prototype.hasOwnProperty,S=Array.prototype.slice,_=function(){return"foo"===function(){}.name}(),D=e.exports=p,C=/\s*function\s+([^\(\s]*)\s*/;D.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var t=e.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},x.inherits(D.AssertionError,Error),D.fail=f,D.ok=p,D.equal=function(e,t,r){e!=t&&f(e,t,r,"==",D.equal)},D.notEqual=function(e,t,r){e==t&&f(e,t,r,"!=",D.notEqual)},D.deepEqual=function(e,t,r){d(e,t,!1)||f(e,t,r,"deepEqual",D.deepEqual)},D.deepStrictEqual=function(e,t,r){d(e,t,!0)||f(e,t,r,"deepStrictEqual",D.deepStrictEqual)},D.notDeepEqual=function(e,t,r){d(e,t,!1)&&f(e,t,r,"notDeepEqual",D.notDeepEqual)},D.notDeepStrictEqual=v,D.strictEqual=function(e,t,r){e!==t&&f(e,t,r,"===",D.strictEqual)},D.notStrictEqual=function(e,t,r){e===t&&f(e,t,r,"!==",D.notStrictEqual)},D.throws=function(e,t,r){b(!0,e,t,r)},D.doesNotThrow=function(e,t,r){b(!1,e,t,r)},D.ifError=function(e){if(e)throw e};var w=Object.keys||function(e){var t=[];for(var r in e)A.call(e,r)&&t.push(r);return t}}).call(t,function(){return this}())},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s),o=r(3),u=i(o),l=r(42),c=i(l),f=r(41),p=i(f),d=r(33),h=i(d),m=r(19),v=n(m),y=r(120),g=i(y),b=r(8),E=i(b),x=r(174),A=i(x),S=r(111),_=i(S),D=["enter","exit"],C=function(e){function t(r,n){(0,u.default)(this,t);var i=(0,c.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,A.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,_.default)(i.take("visitor"))||{}),i}return(0,p.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];for(var s=r,o=Array.isArray(s),u=0,s=o?s:(0,a.default)(s);;){var l;if(o){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var c=l;if(c){var f=c.apply(this,n);null!=f&&(e=f)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=h.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=E.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(v.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=D,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return E.default.explode(e),e},t}(g.default);t.default=C,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){var t=e.messages;return{visitor:{Scope:function(e){var r=e.scope;for(var n in r.bindings){var i=r.bindings[n];if("const"===i.kind||"module"===i.kind)for(var a=i.constantViolations,o=Array.isArray(a),u=0,a=o?a:(0,s.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;throw c.buildCodeFrameError(t.get("readOnly",n))}}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("flow")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var n=e.node;if(n.shadow)return;n.shadow={this:!1},n.type="FunctionExpression";var i=t.thisExpression();i._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),i]))),e.replaceWith(t.callExpression(t.memberExpression(n,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){function t(e,t){for(var n=t.get(e),i=n,a=Array.isArray(i),o=0,i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u,c=l.node;if(l.isFunctionDeclaration()){var f=r.variableDeclaration("let",[r.variableDeclarator(c.id,r.toExpression(c))]);f._blockHoist=2,c.id=null,l.replaceWith(f)}}}var r=e.types;return{visitor:{BlockStatement:function(e){var n=e.node,i=e.parent;r.isFunction(i,{body:n})||r.isExportDeclaration(i)||t("body",e)},SwitchCase:function(e){t("consequent",e)}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){return E.isLoop(e.parent)||E.isCatchClause(e.parent)}function a(e){return!!E.isVariableDeclaration(e)&&(!!e[E.BLOCK_SCOPED_SYMBOL]||("let"===e.kind||"const"===e.kind))}function o(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!E.isFor(r))for(var s=0;s<t.declarations.length;s++){var a=t.declarations[s];a.init=a.init||n.buildUndefinedNode()}if(t[E.BLOCK_SCOPED_SYMBOL]=!0,t.kind="var",i){var o=n.getFunctionParent(),u=e.getBindingIdentifiers();for(var l in u){var c=n.getOwnBinding(l);c&&(c.kind="var"),n.moveBindingTo(l,o)}}}function u(e){return E.isVariableDeclaration(e,{kind:"var"})&&!a(e)}function l(e){return E.isBreakStatement(e)?"break":E.isContinueStatement(e)?"continue":void 0}t.__esModule=!0;var c=r(10),f=i(c),p=r(9),d=i(p),h=r(3),m=i(h);t.default=function(){return{visitor:{VariableDeclaration:function(e,t){var r=e.node,n=e.parent,i=e.scope;if(a(r)&&(o(e,null,n,i,!0),r._tdzThis)){for(var s=[r],u=0;u<r.declarations.length;u++){var l=r.declarations[u];if(l.init){var c=E.assignmentExpression("=",l.id,l.init);c._ignoreBlockScopingTDZ=!0,s.push(E.expressionStatement(c))}l.init=t.addHelper("temporalUndefined")}r._blockHoist=2,e.isCompletionRecord()&&s.push(E.expressionStatement(i.buildUndefinedNode())),e.replaceWithMultiple(s)}},Loop:function(e,t){var r=e.node,n=e.parent,i=e.scope;E.ensureBlock(r);var s=new R(e,e.get("body"),n,i,t),a=s.run();a&&e.replaceWith(a)},CatchClause:function(e,t){var r=e.parent,n=e.scope,i=new R(null,e.get("body"),r,n,t);i.run()},"BlockStatement|SwitchStatement|Program":function(e,t){if(!s(e)){var r=new R(null,e,e.parent,e.scope,t);r.run()}}}}};var v=r(8),y=i(v),g=r(326),b=r(1),E=n(b),x=r(278),A=i(x),S=r(573),_=i(S),D=r(4),C=i(D),w=(0,C.default)('\n if (typeof RETURN === "object") return RETURN.v;\n'),F=y.default.visitors.merge([{Function:function(e,t){return e.traverse(k,t),e.skip()}},g.visitor]),k=y.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},g.visitor]),P={enter:function(e,t){var r=e.node,n=e.parent;if(e.isForStatement()){if(u(r.init,r)){var i=t.pushDeclar(r.init);1===i.length?r.init=i[0]:r.init=E.sequenceExpression(i)}}else if(e.isFor())u(r.left,r)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(u(r,n))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return E.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},T={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},O={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},B={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(B,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(B,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=l(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(E.isBreakStatement(r)&&E.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=E.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=E.objectExpression([E.objectProperty(E.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&(s=E.returnStatement(s),s[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(E.inherits(s,r)))}}},R=function(){function e(t,r,n,i,s){(0,m.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,d.default)(null),this.hasLetReferences=!1,this.letReferences=(0,d.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=E.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(E.isFunction(this.parent)||E.isProgram(this.block))return void this.updateScopeInfo();if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!E.isLabeledStatement(this.loopParent)?E.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,A.default)(t),s=(0,A.default)(t),a=this.blockPath.isSwitchStatement(),o=E.functionExpression(null,i,E.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(E.variableDeclaration("var",[E.variableDeclarator(u,o)])));var l=E.callExpression(u,s),c=this.scope.generateUidIdentifier("ret"),f=y.default.hasType(o.body,this.scope,"YieldExpression",E.FUNCTION_TYPES);f&&(o.generator=!0,l=E.yieldExpression(l,!0));var p=y.default.hasType(o.body,this.scope,"AwaitExpression",E.FUNCTION_TYPES);p&&(o.async=!0,l=E.awaitExpression(l)),this.buildClosure(c,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(E.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,O,t);for(var r=0;r<e.params.length;r++){var n=e.params[r];if(t.reassignments[n.name]){var i=this.scope.generateUidIdentifier(n.name);e.params[r]=i,this.scope.rename(n.name,i.name,e),e.body.body.push(E.expressionStatement(E.assignmentExpression("=",n,i)))}}},e.prototype.getLetReferences=function(){var e=this,t=this.block,r=[];if(this.loop){var n=this.loop.left||this.loop.init;a(n)&&(r.push(n),(0,_.default)(this.outsideLetReferences,E.getBindingIdentifiers(n)))}var i=function n(i,s){s=s||i.node,(E.isClassDeclaration(s)||E.isFunctionDeclaration(s)||a(s))&&(a(s)&&o(i,s,t,e.scope),r=r.concat(s.declarations||s)),E.isLabeledStatement(s)&&n(i.get("body"),s.body)};if(t.body)for(var s=0;s<t.body.length;s++){var u=this.blockPath.get("body")[s];i(u)}if(t.cases)for(var l=0;l<t.cases.length;l++)for(var c=t.cases[l].consequent,f=0;f<c.length;f++){var p=this.blockPath.get("cases")[l],d=c[f];i(p,d)}for(var h=0;h<r.length;h++){var m=r[h],v=E.getBindingIdentifiers(m,!1,!0);(0,_.default)(this.letReferences,v),this.hasLetReferences=!0}if(this.hasLetReferences){var y={letReferences:this.letReferences,closurify:!1,file:this.file};return this.blockPath.traverse(F,y),y.closurify}},e.prototype.checkLoop=function(){var e={hasBreakContinue:!1,ignoreLabeless:!1,inSwitchCase:!1,innerLabels:[],hasReturn:!1,isLoop:!!this.loop,map:{},LOOP_IGNORE:(0,f.default)()};return this.blockPath.traverse(T,e),this.blockPath.traverse(B,e),e},e.prototype.hoistVarDeclarations=function(){this.blockPath.traverse(P,this)},e.prototype.pushDeclar=function(e){var t=[],r=E.getBindingIdentifiers(e);for(var n in r)t.push(E.variableDeclarator(r[n]));this.body.push(E.variableDeclaration(e.kind,t));for(var i=[],s=0;s<e.declarations.length;s++){var a=e.declarations[s];if(a.init){var o=E.assignmentExpression("=",a.id,a.init);i.push(E.inherits(o,a))}}return i},e.prototype.buildHas=function(e,t){var r=this.body;r.push(E.variableDeclaration("var",[E.variableDeclarator(e,t)]));var n=void 0,i=this.has,s=[];if(i.hasReturn&&(n=w({RETURN:e})),i.hasBreakContinue){for(var a in i.map)s.push(E.switchCase(E.stringLiteral(a),[i.map[a]]));if(i.hasReturn&&s.push(E.switchCase(null,[n])),1===s.length){var o=s[0];r.push(E.ifStatement(E.binaryExpression("===",e,o.test),o.consequent[0]))}else{if(this.loop)for(var u=0;u<s.length;u++){var l=s[u].consequent[0];E.isBreakStatement(l)&&!l.label&&(l.label=this.loopLabel=this.loopLabel||this.scope.generateUidIdentifier("loop"))}r.push(E.switchStatement(e,s))}}else i.hasReturn&&r.push(n)},e}();e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(10),s=n(i);t.default=function(e){var t=e.types,r=(0,s.default)();return{visitor:{ExportDefaultDeclaration:function(e){if(e.get("declaration").isClassDeclaration()){var r=e.node,n=r.declaration.id||e.scope.generateUidIdentifier("class");r.declaration.id=n,e.replaceWith(r.declaration),e.insertAfter(t.exportDefaultDeclaration(n))}},ClassDeclaration:function(e){var r=e.node,n=r.id||e.scope.generateUidIdentifier("class");e.replaceWith(t.variableDeclaration("let",[t.variableDeclarator(n,t.toExpression(r))]))},ClassExpression:function(e,t){var n=e.node;if(!n[r]){var i=(0,f.default)(e);if(i&&i!==n)return e.replaceWith(i);n[r]=!0;var s=l.default;t.opts.loose&&(s=o.default),e.replaceWith(new s(e,t.file).run())}}}}};var a=r(327),o=n(a),u=r(205),l=n(u),c=r(40),f=n(c);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){function t(e){return o.isObjectProperty(e)?e.value:o.isObjectMethod(e)?o.functionExpression(null,e.params,e.body,e.generator,e.async):void 0}function r(e,r,i){"get"===r.kind&&"set"===r.kind?n(e,r,i):i.push(o.expressionStatement(o.assignmentExpression("=",o.memberExpression(e,r.key,r.computed||o.isLiteral(r.key)),t(r))))}function n(e,r){var n=(e.objId,e.body),i=e.getMutatorId,s=e.scope,a=!r.computed&&o.isIdentifier(r.key)?o.stringLiteral(r.key.name):r.key,u=s.maybeGenerateMemoised(a);u&&(n.push(o.expressionStatement(o.assignmentExpression("=",u,a))),a=u),n.push.apply(n,l({MUTATOR_MAP_REF:i(),KEY:a,VALUE:t(r),KIND:o.identifier(r.kind)}))}function i(e){for(var t=e.computedProps,i=Array.isArray(t),a=0,t=i?t:(0,s.default)(t);;){var o;if(i){if(a>=t.length)break;o=t[a++]}else{if(a=t.next(),a.done)break;o=a.value}var u=o;"get"===u.kind||"set"===u.kind?n(e,u):r(e.objId,u,e.body)}}function a(e){for(var i=e.objId,a=e.body,u=e.computedProps,l=e.state,c=u,f=Array.isArray(c),p=0,c=f?c:(0,s.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d,m=o.toComputedKey(h);if("get"===h.kind||"set"===h.kind)n(e,h);else if(o.isStringLiteral(m,{value:"__proto__"}))r(i,h,a);else{if(1===u.length)return o.callExpression(l.addHelper("defineProperty"),[e.initPropExpression,m,t(h)]);a.push(o.expressionStatement(o.callExpression(l.addHelper("defineProperty"),[i,m,t(h)])))}}}var o=e.types,u=e.template,l=u("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n ");return{visitor:{ObjectExpression:{exit:function(e,t){for(var r=e.node,n=e.parent,u=e.scope,l=!1,c=r.properties,f=Array.isArray(c),p=0,c=f?c:(0,s.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;if(l=h.computed===!0)break}if(l){for(var m=[],v=[],y=!1,g=r.properties,b=Array.isArray(g),E=0,g=b?g:(0,s.default)(g);;){var x;if(b){if(E>=g.length)break;x=g[E++]}else{if(E=g.next(),E.done)break;x=E.value}var A=x;A.computed&&(y=!0),y?v.push(A):m.push(A)}var S=u.generateUidIdentifierBasedOnNode(n),_=o.objectExpression(m),D=[];D.push(o.variableDeclaration("var",[o.variableDeclarator(S,_)]));var C=a;t.opts.loose&&(C=i);var w=void 0,F=function(){return w||(w=u.generateUidIdentifier("mutatorMap"),D.push(o.variableDeclaration("var",[o.variableDeclarator(w,o.objectExpression([]))]))),w},k=C({scope:u,objId:S,body:D,computedProps:v,initPropExpression:_,getMutatorId:F,state:t});w&&D.push(o.expressionStatement(o.callExpression(t.addHelper("defineEnumerableProperties"),[S,w]))),k?e.replaceWith(k):(D.push(o.expressionStatement(S)),e.replaceWithMultiple(D))}}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(2),o=n(a);t.default=function(e){function t(e){for(var t=e.declarations,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var s;if(r){if(i>=t.length)break;s=t[i++]}else{if(i=t.next(),i.done)break;s=i.value}var a=s;if(n.isPattern(a.id))return!0}return!1}function r(e){for(var t=e.elements,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var s;if(r){if(i>=t.length)break;s=t[i++]}else{if(i=t.next(),i.done)break;s=i.value}var a=s;if(n.isRestElement(a))return!0}return!1}var n=e.types,i={ReferencedIdentifier:function(e,t){t.bindings[e.node.name]&&(t.deopt=!0,e.stop())}},a=function(){function e(t){(0,s.default)(this,e),this.blockHoist=t.blockHoist,this.operator=t.operator,this.arrays={},this.nodes=t.nodes||[],this.scope=t.scope,this.file=t.file,this.kind=t.kind}return e.prototype.buildVariableAssignment=function(e,t){var r=this.operator;n.isMemberExpression(e)&&(r="=");var i=void 0;return i=r?n.expressionStatement(n.assignmentExpression(r,e,t)):n.variableDeclaration(this.kind,[n.variableDeclarator(e,t)]),i._blockHoist=this.blockHoist,i},e.prototype.buildVariableDeclaration=function(e,t){var r=n.variableDeclaration("var",[n.variableDeclarator(e,t)]);return r._blockHoist=this.blockHoist,r},e.prototype.push=function(e,t){n.isObjectPattern(e)?this.pushObjectPattern(e,t):n.isArrayPattern(e)?this.pushArrayPattern(e,t):n.isAssignmentPattern(e)?this.pushAssignmentPattern(e,t):this.nodes.push(this.buildVariableAssignment(e,t));
+},e.prototype.toArray=function(e,t){return this.file.opts.loose||n.isIdentifier(e)&&this.arrays[e.name]?e:this.scope.toArray(e,t)},e.prototype.pushAssignmentPattern=function(e,t){var r=this.scope.generateUidIdentifierBasedOnNode(t),i=n.variableDeclaration("var",[n.variableDeclarator(r,t)]);i._blockHoist=this.blockHoist,this.nodes.push(i);var s=n.conditionalExpression(n.binaryExpression("===",r,n.identifier("undefined")),e.right,r),a=e.left;if(n.isPattern(a)){var o=n.expressionStatement(n.assignmentExpression("=",r,s));o._blockHoist=this.blockHoist,this.nodes.push(o),this.push(a,r)}else this.nodes.push(this.buildVariableAssignment(a,s))},e.prototype.pushObjectRest=function(e,t,r,i){for(var s=[],a=0;a<e.properties.length;a++){var o=e.properties[a];if(a>=i)break;if(!n.isRestProperty(o)){var u=o.key;n.isIdentifier(u)&&!o.computed&&(u=n.stringLiteral(o.key.name)),s.push(u)}}s=n.arrayExpression(s);var l=n.callExpression(this.file.addHelper("objectWithoutProperties"),[t,s]);this.nodes.push(this.buildVariableAssignment(r.argument,l))},e.prototype.pushObjectProperty=function(e,t){n.isLiteral(e.key)&&(e.computed=!0);var r=e.value,i=n.memberExpression(t,e.key,e.computed);n.isPattern(r)?this.push(r,i):this.nodes.push(this.buildVariableAssignment(r,i))},e.prototype.pushObjectPattern=function(e,t){if(e.properties.length||this.nodes.push(n.expressionStatement(n.callExpression(this.file.addHelper("objectDestructuringEmpty"),[t]))),e.properties.length>1&&!this.scope.isStatic(t)){var r=this.scope.generateUidIdentifierBasedOnNode(t);this.nodes.push(this.buildVariableDeclaration(r,t)),t=r}for(var i=0;i<e.properties.length;i++){var s=e.properties[i];n.isRestProperty(s)?this.pushObjectRest(e,t,s,i):this.pushObjectProperty(s,t)}},e.prototype.canUnpackArrayPattern=function(e,t){if(!n.isArrayExpression(t))return!1;if(!(e.elements.length>t.elements.length)){if(e.elements.length<t.elements.length&&!r(e))return!1;for(var s=e.elements,a=Array.isArray(s),u=0,s=a?s:(0,o.default)(s);;){var l;if(a){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var c=l;if(!c)return!1;if(n.isMemberExpression(c))return!1}for(var f=t.elements,p=Array.isArray(f),d=0,f=p?f:(0,o.default)(f);;){var h;if(p){if(d>=f.length)break;h=f[d++]}else{if(d=f.next(),d.done)break;h=d.value}var m=h;if(n.isSpreadElement(m))return!1;if(n.isCallExpression(m))return!1;if(n.isMemberExpression(m))return!1}var v=n.getBindingIdentifiers(e),y={deopt:!1,bindings:v};return this.scope.traverse(t,i,y),!y.deopt}},e.prototype.pushUnpackedArrayPattern=function(e,t){for(var r=0;r<e.elements.length;r++){var i=e.elements[r];n.isRestElement(i)?this.push(i.argument,n.arrayExpression(t.elements.slice(r))):this.push(i,t.elements[r])}},e.prototype.pushArrayPattern=function(e,t){if(e.elements){if(this.canUnpackArrayPattern(e,t))return this.pushUnpackedArrayPattern(e,t);var i=!r(e)&&e.elements.length,s=this.toArray(t,i);n.isIdentifier(s)?t=s:(t=this.scope.generateUidIdentifierBasedOnNode(t),this.arrays[t.name]=!0,this.nodes.push(this.buildVariableDeclaration(t,s)));for(var a=0;a<e.elements.length;a++){var o=e.elements[a];if(o){var u=void 0;n.isRestElement(o)?(u=this.toArray(t),a>0&&(u=n.callExpression(n.memberExpression(u,n.identifier("slice")),[n.numericLiteral(a)])),o=o.argument):u=n.memberExpression(t,n.numericLiteral(a),!0),this.push(o,u)}}}},e.prototype.init=function(e,t){if(!n.isArrayExpression(t)&&!n.isMemberExpression(t)){var r=this.scope.maybeGenerateMemoised(t,!0);r&&(this.nodes.push(this.buildVariableDeclaration(r,t)),t=r)}return this.push(e,t),this.nodes},e}();return{visitor:{ExportNamedDeclaration:function(e){var r=e.get("declaration");if(r.isVariableDeclaration()&&t(r.node)){var i=[];for(var s in e.getOuterBindingIdentifiers(e)){var a=n.identifier(s);i.push(n.exportSpecifier(a,a))}e.replaceWith(r.node),e.insertAfter(n.exportNamedDeclaration(null,i))}},ForXStatement:function(e,t){var r=e.node,i=e.scope,s=r.left;if(n.isPattern(s)){var o=i.generateUidIdentifier("ref");return r.left=n.variableDeclaration("var",[n.variableDeclarator(o)]),e.ensureBlock(),void r.body.body.unshift(n.variableDeclaration("var",[n.variableDeclarator(s,o)]))}if(n.isVariableDeclaration(s)){var u=s.declarations[0].id;if(n.isPattern(u)){var l=i.generateUidIdentifier("ref");r.left=n.variableDeclaration(s.kind,[n.variableDeclarator(l,null)]);var c=[],f=new a({kind:s.kind,file:t,scope:i,nodes:c});f.init(u,l),e.ensureBlock();var p=r.body;p.body=c.concat(p.body)}}},CatchClause:function(e,t){var r=e.node,i=e.scope,s=r.param;if(n.isPattern(s)){var o=i.generateUidIdentifier("ref");r.param=o;var u=[],l=new a({kind:"let",file:t,scope:i,nodes:u});l.init(s,o),r.body.body=u.concat(r.body.body)}},AssignmentExpression:function(e,t){var r=e.node,i=e.scope;if(n.isPattern(r.left)){var s=[],o=new a({operator:r.operator,file:t,scope:i,nodes:s}),u=void 0;!e.isCompletionRecord()&&e.parentPath.isExpressionStatement()||(u=i.generateUidIdentifierBasedOnNode(r.right,"ref"),s.push(n.variableDeclaration("var",[n.variableDeclarator(u,r.right)])),n.isArrayExpression(r.right)&&(o.arrays[u.name]=!0)),o.init(r.left,u||r.right),u&&s.push(n.expressionStatement(u)),e.replaceWithMultiple(s)}},VariableDeclaration:function(e,r){var i=e.node,s=e.scope,u=e.parent;if(!n.isForXStatement(u)&&u&&e.container&&t(i)){for(var l=[],c=void 0,f=0;f<i.declarations.length;f++){c=i.declarations[f];var p=c.init,d=c.id,h=new a({blockHoist:i._blockHoist,nodes:l,scope:s,kind:i.kind,file:r});n.isPattern(d)?(h.init(d,p),+f!==i.declarations.length-1&&n.inherits(l[l.length-1],c)):l.push(n.inherits(h.buildVariableAssignment(c.id,c.init),c))}for(var m=[],v=l,y=Array.isArray(v),g=0,v=y?v:(0,o.default)(v);;){var b;if(y){if(g>=v.length)break;b=v[g++]}else{if(g=v.next(),g.done)break;b=g.value}var E=b,x=m[m.length-1];if(x&&n.isVariableDeclaration(x)&&n.isVariableDeclaration(E)&&x.kind===E.kind){var A;(A=x.declarations).push.apply(A,E.declarations)}else m.push(E)}for(var S=m,_=Array.isArray(S),D=0,S=_?S:(0,o.default)(S);;){var C;if(_){if(D>=S.length)break;C=S[D++]}else{if(D=S.next(),D.done)break;C=D.value}var w=C;if(w.declarations)for(var F=w.declarations,k=Array.isArray(F),P=0,F=k?F:(0,o.default)(F);;){var T;if(k){if(P>=F.length)break;T=F[P++]}else{if(P=F.next(),P.done)break;T=P.value}var O=T,B=O.id.name;s.bindings[B]&&(s.bindings[B].kind=w.kind)}}1===m.length?e.replaceWith(m[0]):e.replaceWithMultiple(m)}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),f=t.left;return a.isVariableDeclaration(f)?(f.declarations[0].init=c,l.body.body.unshift(f)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",f,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=r.left,o=void 0,l=void 0;if(a.isIdentifier(s)||a.isPattern(s)||a.isMemberExpression(s))l=s;else{if(!a.isVariableDeclaration(s))throw t.buildCodeFrameError(s,i.get("unknownForHead",s.type));l=n.generateUidIdentifier("ref"),o=a.variableDeclaration(s.kind,[a.variableDeclarator(s.declarations[0].id,l)])}var c=n.generateUidIdentifier("iterator"),f=n.generateUidIdentifier("isArray"),p=u({LOOP_OBJECT:c,IS_ARRAY:f,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:l});return o||p.body.body.shift(),{declar:o,node:p,loop:p}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),f=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,f));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,f)])}var p=n.generateUidIdentifier("iterator"),d=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:p,STEP_KEY:c,OBJECT:r.right,BODY:null}),h=a.isLabeledStatement(s),m=d[3].block.body,v=m[0];return h&&(m[0]=a.labeledStatement(s.label,v)),{replaceParent:h,declar:u,loop:v,node:d}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,f=c.body;e.ensureBlock(),l&&f.body.push(l),f.body=f.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(){return{visitor:{"ArrowFunctionExpression|FunctionExpression":{exit:function(e){if("value"!==e.key&&!e.parentPath.isObjectProperty()){var t=(0,s.default)(e);t&&e.replaceWith(t)}}},ObjectProperty:function(e){var t=e.get("value");if(t.isFunction()){var r=(0,s.default)(t);r&&t.replaceWith(r)}}}}};var i=r(40),s=n(i);e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{NumericLiteral:function(e){var t=e.node;t.extra&&/^0[ob]/i.test(t.extra.raw)&&(t.extra=void 0)},StringLiteral:function(e){var t=e.node;t.extra&&/\\[u]/gi.test(t.extra.raw)&&(t.extra=void 0)}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(20),a=i(s),o=r(9),u=i(o),l=r(2),c=i(l),f=r(10),p=i(f);t.default=function(){var e=(0,p.default)(),t={ReferencedIdentifier:function(e){var t=e.node.name,r=this.remaps[t];if(r&&this.scope.getBinding(t)===e.scope.getBinding(t)){if(e.parentPath.isCallExpression({callee:e.node}))e.replaceWith(y.sequenceExpression([y.numericLiteral(0),r]));else if(e.isJSXIdentifier()&&y.isMemberExpression(r)){var n=r.object,i=r.property;e.replaceWith(y.JSXMemberExpression(y.JSXIdentifier(n.name),y.JSXIdentifier(i.name)))}else e.replaceWith(r);this.requeueInParent(e)}},AssignmentExpression:function(t){var r=t.node;if(!r[e]){var n=t.get("left");if(n.isIdentifier()){var i=n.node.name,s=this.exports[i];if(s&&this.scope.getBinding(i)===t.scope.getBinding(i)){r[e]=!0;for(var a=s,o=Array.isArray(a),u=0,a=o?a:(0,c.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var f=l;r=A(f,r).expression}t.replaceWith(r),this.requeueInParent(t)}}}},UpdateExpression:function(e){var t=e.get("argument");if(t.isIdentifier()){var r=t.node.name,n=this.exports[r];if(n&&this.scope.getBinding(r)===e.scope.getBinding(r)){var i=y.assignmentExpression(e.node.operator[0]+"=",t.node,y.numericLiteral(1));if(e.parentPath.isExpressionStatement()&&!e.isCompletionRecord()||e.node.prefix)return e.replaceWith(i),void this.requeueInParent(e);var s=[];s.push(i);var a=void 0;a="--"===e.node.operator?"+":"-",s.push(y.binaryExpression(a,t.node,y.numericLiteral(1))),e.replaceWithMultiple(y.sequenceExpression(s))}}}};return{inherits:r(214),visitor:{ThisExpression:function(e,t){this.ranCommonJS||t.opts.allowTopLevelThis===!0||e.findParent(function(e){return!e.is("shadow")&&_.indexOf(e.type)>=0})||e.replaceWith(y.identifier("undefined"))},Program:{exit:function(e){function r(t,r){var n=D[t];if(n)return n;var i=e.scope.generateUidIdentifier((0,d.basename)(t,(0,d.extname)(t))),s=y.variableDeclaration("var",[y.variableDeclarator(i,g(y.stringLiteral(t)).expression)]);return p[t]&&(s.loc=p[t].loc),"number"==typeof r&&r>0&&(s._blockHoist=r),v.push(s),D[t]=i}function n(e,t,r){var n=e[t]||[];e[t]=n.concat(r)}this.ranCommonJS=!0;var i=!!this.opts.strict,s=e.scope;s.rename("module"),s.rename("exports"),s.rename("require");for(var o=!1,l=!1,f=e.get("body"),p=(0,u.default)(null),h=(0,u.default)(null),m=(0,u.default)(null),v=[],_=(0,u.default)(null),D=(0,u.default)(null),C=f,w=Array.isArray(C),F=0,C=w?C:(0,c.default)(C);;){var k;if(w){if(F>=C.length)break;k=C[F++]}else{if(F=C.next(),F.done)break;k=F.value}var P=k;if(P.isExportDeclaration()){o=!0;for(var T=[].concat(P.get("declaration"),P.get("specifiers")),O=T,B=Array.isArray(O),R=0,O=B?O:(0,c.default)(O);;){var I;if(B){if(R>=O.length)break;I=O[R++]}else{if(R=O.next(),R.done)break;I=R.value}var M=I,N=M.getBindingIdentifiers();if(N.__esModule)throw M.buildCodeFrameError('Illegal export "__esModule"')}}if(P.isImportDeclaration()){var L;l=!0;var j=P.node.source.value,U=p[j]||{specifiers:[],maxBlockHoist:0,loc:P.node.loc};(L=U.specifiers).push.apply(L,P.node.specifiers),"number"==typeof P.node._blockHoist&&(U.maxBlockHoist=Math.max(P.node._blockHoist,U.maxBlockHoist)),p[j]=U,P.remove()}else if(P.isExportDefaultDeclaration()){var V=P.get("declaration");if(V.isFunctionDeclaration()){var G=V.node.id,W=y.identifier("default");G?(n(h,G.name,W),v.push(A(W,G)),P.replaceWith(V.node)):(v.push(A(W,y.toExpression(V.node))),P.remove())}else if(V.isClassDeclaration()){var Y=V.node.id,q=y.identifier("default");Y?(n(h,Y.name,q),P.replaceWithMultiple([V.node,A(q,Y)])):(P.replaceWith(A(q,y.toExpression(V.node))),P.parentPath.requeue(P.get("expression.left")))}else P.replaceWith(A(y.identifier("default"),V.node)),P.parentPath.requeue(P.get("expression.left"))}else if(P.isExportNamedDeclaration()){var K=P.get("declaration");if(K.node){if(K.isFunctionDeclaration()){var H=K.node.id;n(h,H.name,H),v.push(A(H,H)),P.replaceWith(K.node)}else if(K.isClassDeclaration()){var J=K.node.id;n(h,J.name,J),P.replaceWithMultiple([K.node,A(J,J)]),m[J.name]=!0}else if(K.isVariableDeclaration()){for(var X=K.get("declarations"),z=X,$=Array.isArray(z),Q=0,z=$?z:(0,c.default)(z);;){var Z;if($){if(Q>=z.length)break;Z=z[Q++]}else{if(Q=z.next(),Q.done)break;Z=Q.value}var ee=Z,te=ee.get("id"),re=ee.get("init");re.node||re.replaceWith(y.identifier("undefined")),te.isIdentifier()&&(n(h,te.node.name,te.node),re.replaceWith(A(te.node,re.node).expression),m[te.node.name]=!0)}P.replaceWith(K.node)}continue}var ne=P.get("specifiers"),ie=[],se=P.node.source;if(se)for(var ae=r(se.value,P.node._blockHoist),oe=ne,ue=Array.isArray(oe),le=0,oe=ue?oe:(0,c.default)(oe);;){var ce;if(ue){if(le>=oe.length)break;ce=oe[le++]}else{if(le=oe.next(),le.done)break;ce=le.value}var fe=ce;fe.isExportNamespaceSpecifier()||fe.isExportDefaultSpecifier()||fe.isExportSpecifier()&&("default"===fe.node.local.name?v.push(E(y.stringLiteral(fe.node.exported.name),y.memberExpression(y.callExpression(this.addHelper("interopRequireDefault"),[ae]),fe.node.local))):v.push(E(y.stringLiteral(fe.node.exported.name),y.memberExpression(ae,fe.node.local))),m[fe.node.exported.name]=!0)}else for(var pe=ne,de=Array.isArray(pe),he=0,pe=de?pe:(0,c.default)(pe);;){var me;if(de){if(he>=pe.length)break;me=pe[he++]}else{if(he=pe.next(),he.done)break;me=he.value}var ve=me;ve.isExportSpecifier()&&(n(h,ve.node.local.name,ve.node.exported),m[ve.node.exported.name]=!0,ie.push(A(ve.node.exported,ve.node.local)))}P.replaceWithMultiple(ie)}else if(P.isExportAllDeclaration()){var ye=S({OBJECT:r(P.node.source.value,P.node._blockHoist)});ye.loc=P.node.loc,v.push(ye),P.remove()}}for(var ge in p){var be=p[ge],T=be.specifiers,Ee=be.maxBlockHoist;if(T.length){for(var xe=r(ge,Ee),Ae=void 0,Se=0;Se<T.length;Se++){var _e=T[Se];if(y.isImportNamespaceSpecifier(_e)){if(i)_[_e.local.name]=xe;else{var De=y.variableDeclaration("var",[y.variableDeclarator(_e.local,y.callExpression(this.addHelper("interopRequireWildcard"),[xe]))]);Ee>0&&(De._blockHoist=Ee),v.push(De)}Ae=_e.local}else y.isImportDefaultSpecifier(_e)&&(T[Se]=y.importSpecifier(_e.local,y.identifier("default")))}for(var Ce=T,we=Array.isArray(Ce),Fe=0,Ce=we?Ce:(0,c.default)(Ce);;){var ke;if(we){if(Fe>=Ce.length)break;ke=Ce[Fe++]}else{if(Fe=Ce.next(),Fe.done)break;ke=Fe.value}var Pe=ke;if(y.isImportSpecifier(Pe)){var Te=xe;if("default"===Pe.imported.name)if(Ae)Te=Ae;else{Te=Ae=e.scope.generateUidIdentifier(xe.name);var Oe=y.variableDeclaration("var",[y.variableDeclarator(Te,y.callExpression(this.addHelper("interopRequireDefault"),[xe]))]);Ee>0&&(Oe._blockHoist=Ee),v.push(Oe)}_[Pe.local.name]=y.memberExpression(Te,y.cloneWithoutLoc(Pe.imported))}}}else{var Be=g(y.stringLiteral(ge));Be.loc=p[ge].loc,v.push(Be)}}if(l&&(0,a.default)(m).length){var Re=y.identifier("undefined");for(var Ie in m)Re=A(y.identifier(Ie),Re).expression;var Me=y.expressionStatement(Re);Me._blockHoist=3,v.unshift(Me)}if(o&&!i){var Ne=b;this.opts.loose&&(Ne=x);var Le=Ne();Le._blockHoist=3,v.unshift(Le)}e.unshiftContainer("body",v),e.traverse(t,{remaps:_,scope:s,exports:h,requeueInParent:function(t){return e.requeue(t)}})}}}}};var d=r(17),h=r(4),m=i(h),v=r(1),y=n(v),g=(0,m.default)("\n require($0);\n"),b=(0,m.default)('\n Object.defineProperty(exports, "__esModule", {\n value: true\n });\n'),E=(0,m.default)("\n Object.defineProperty(exports, $0, {\n enumerable: true,\n get: function () {\n return $1;\n }\n });\n"),x=(0,m.default)("\n exports.__esModule = true;\n"),A=(0,m.default)("\n exports.$0 = $1;\n"),S=(0,m.default)('\n Object.keys(OBJECT).forEach(function (key) {\n if (key === "default" || key === "__esModule") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return OBJECT[key];\n }\n });\n });\n'),_=["FunctionExpression","FunctionDeclaration","ClassProperty","ClassMethod","ObjectMethod"];e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i),a=r(10),o=n(a);t.default=function(e){function t(e,t,r,n,i){var s=new l.default({getObjectRef:n,methodNode:t,methodPath:e,isStatic:!0,scope:r,file:i});s.replace()}var r=e.types,n=(0,o.default)();return{visitor:{Super:function(e){var t=e.findParent(function(e){return e.isObjectExpression()});t&&(t.node[n]=!0)},ObjectExpression:{exit:function(e,i){if(e.node[n]){for(var a=void 0,o=function(){return a=a||e.scope.generateUidIdentifier("obj")},u=e.get("properties"),l=u,c=Array.isArray(l),f=0,l=c?l:(0,s.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;d.isObjectProperty()&&(d=d.get("value")),t(d,d.node,e.scope,o,i)}a&&(e.scope.push({id:a}),e.replaceWith(r.assignmentExpression("=",a,e.node)))}}}}}};var u=r(191),l=n(u);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s);t.default=function(){return{visitor:o.visitors.merge([{ArrowFunctionExpression:function(e){for(var t=e.get("params"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s;if(o.isRestElement()||o.isAssignmentPattern()){e.arrowFunctionToShadowed();break}}}},l.visitor,d.visitor,f.visitor])}};var o=r(8),u=r(330),l=n(u),c=r(329),f=n(c),p=r(331),d=n(p);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.default=function(){return{visitor:{ObjectMethod:function(e){var t=e.node;if("method"===t.kind){var r=s.functionExpression(null,t.params,t.body,t.generator,t.async);r.returnType=t.returnType,e.replaceWith(s.objectProperty(t.key,r,t.computed))}},ObjectProperty:function(e){var t=e.node;t.shorthand&&(t.shorthand=!1)}}}};var i=r(1),s=n(i);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){function t(e,t,r){return r.opts.loose&&!i.isIdentifier(e.argument,{name:"arguments"})?e.argument:t.toArray(e.argument,!0)}function r(e){for(var t=0;t<e.length;t++)if(i.isSpreadElement(e[t]))return!0;return!1}function n(e,r,n){function a(){u.length&&(o.push(i.arrayExpression(u)),u=[])}for(var o=[],u=[],l=e,c=Array.isArray(l),f=0,l=c?l:(0,s.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;i.isSpreadElement(d)?(a(),o.push(t(d,r,n))):u.push(d)}return a(),o}var i=e.types;return{visitor:{ArrayExpression:function(e,t){var s=e.node,a=e.scope,o=s.elements;if(r(o)){var u=n(o,a,t),l=u.shift();i.isArrayExpression(l)||(u.unshift(l),l=i.arrayExpression([])),e.replaceWith(i.callExpression(i.memberExpression(l,i.identifier("concat")),u))}},CallExpression:function(e,t){var s=e.node,a=e.scope,o=s.arguments;if(r(o)){var u=e.get("callee");if(!u.isSuper()){var l=i.identifier("undefined");s.arguments=[];var c=void 0;c=1===o.length&&"arguments"===o[0].argument.name?[o[0].argument]:n(o,a,t);var f=c.shift();c.length?s.arguments.push(i.callExpression(i.memberExpression(f,i.identifier("concat")),c)):s.arguments.push(f);var p=s.callee;if(u.isMemberExpression()){var d=a.maybeGenerateMemoised(p.object);d?(p.object=i.assignmentExpression("=",d,p.object),l=d):l=p.object,i.appendToMemberExpression(p,i.identifier("apply"))}else s.callee=i.memberExpression(s.callee,i.identifier("apply"));i.isSuper(l)&&(l=i.thisExpression()),s.arguments.unshift(l)}}},NewExpression:function(e,t){var s=e.node,a=e.scope,o=s.arguments;if(r(o)){var u=n(o,a,t),l=i.arrayExpression([i.nullLiteral()]);o=i.callExpression(i.memberExpression(l,i.identifier("concat")),u),e.replaceWith(i.newExpression(i.callExpression(i.memberExpression(i.memberExpression(i.memberExpression(i.identifier("Function"),i.identifier("prototype")),i.identifier("bind")),i.identifier("apply")),[s.callee,o]),[]))}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.default=function(){return{visitor:{RegExpLiteral:function(e){var t=e.node;s.is(t,"y")&&e.replaceWith(o.newExpression(o.identifier("RegExp"),[o.stringLiteral(t.pattern),o.stringLiteral(t.flags)]))}}}};var i=r(190),s=n(i),a=r(1),o=n(a);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){function t(e){return n.isLiteral(e)&&"string"==typeof e.value}function r(e,t){return n.binaryExpression("+",e,t)}var n=e.types;return{visitor:{TaggedTemplateExpression:function(e,t){for(var r=e.node,i=r.quasi,a=[],o=[],u=[],l=i.quasis,c=Array.isArray(l),f=0,l=c?l:(0,s.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;o.push(n.stringLiteral(d.value.cooked)),u.push(n.stringLiteral(d.value.raw))}o=n.arrayExpression(o),u=n.arrayExpression(u);var h="taggedTemplateLiteral";t.opts.loose&&(h+="Loose");var m=t.file.addTemplateObject(h,o,u);a.push(m),a=a.concat(i.expressions),e.replaceWith(n.callExpression(r.tag,a))},TemplateLiteral:function(e,i){for(var a=[],o=e.get("expressions"),u=e.node.quasis,l=Array.isArray(u),c=0,u=l?u:(0,s.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;a.push(n.stringLiteral(p.value.cooked));var d=o.shift();d&&(!i.opts.spec||d.isBaseType("string")||d.isBaseType("number")?a.push(d.node):a.push(n.callExpression(n.identifier("String"),[d.node])))}if(a=a.filter(function(e){return!n.isLiteral(e,{value:""})}),t(a[0])||t(a[1])||a.unshift(n.stringLiteral("")),a.length>1){for(var h=r(a.shift(),a.shift()),m=a,v=Array.isArray(m),y=0,m=v?m:(0,s.default)(m);;){var g;if(v){if(y>=m.length)break;g=m[y++]}else{if(y=m.next(),y.done)break;g=y.value}var b=g;h=r(h,b)}e.replaceWith(h)}else e.replaceWith(a[0])}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(10),s=n(i);t.default=function(e){var t=e.types,r=(0,s.default)();return{visitor:{Scope:function(e){var t=e.scope;t.getBinding("Symbol")&&t.rename("Symbol")},UnaryExpression:function(e){var n=e.node,i=e.parent;if(!n[r]&&!e.find(function(e){return e.node&&!!e.node._generated})){if(e.parentPath.isBinaryExpression()&&t.EQUALITY_BINARY_OPERATORS.indexOf(i.operator)>=0){var s=e.getOpposite();if(s.isLiteral()&&"symbol"!==s.node.value&&"object"!==s.node.value)return}if("typeof"===n.operator){var a=t.callExpression(this.addHelper("typeof"),[n.argument]);if(e.get("argument").isIdentifier()){var o=t.stringLiteral("undefined"),u=t.unaryExpression("typeof",n.argument);u[r]=!0,e.replaceWith(t.conditionalExpression(t.binaryExpression("===",u,o),o,a))}else e.replaceWith(a)}}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(){return{visitor:{RegExpLiteral:function(e){var t=e.node;u.is(t,"u")&&(t.pattern=(0,a.default)(t.pattern,t.flags),u.pullFlag(t,"u"))}}}};var s=r(607),a=i(s),o=r(190),u=n(o);e.exports=t.default},function(e,t,r){"use strict";e.exports=r(602)},function(e,t,r){"use strict";e.exports={default:r(401),__esModule:!0}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){s(),a()}function s(){t.path=l=new u.default}function a(){t.scope=c=new u.default}t.__esModule=!0,t.scope=t.path=void 0;var o=r(357),u=n(o);t.clear=i,t.clearPath=s,t.clearScope=a;var l=t.path=new u.default,c=t.scope=new u.default},function(e,t){"use strict";e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){"use strict";var n=r(54),i=r(422),s=r(421),a=r(21),o=r(151),u=r(235),l={},c={},f=e.exports=function(e,t,r,f,p){var d,h,m,v,y=p?function(){return e}:u(e),g=n(r,f,t?2:1),b=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(s(y)){for(d=o(e.length);d>b;b++)if(v=t?g(a(h=e[b])[0],h[1]):g(e[b]),v===l||v===c)return v}else for(m=y.call(e);!(h=m.next()).done;)if(v=i(m,g,h.value,t),v===l||v===c)return v};f.BREAK=l,f.RETURN=c},function(e,t,r){"use strict";var n=r(21),i=r(425),s=r(141),a=r(148)("IE_PROTO"),o=function(){},u="prototype",l=function(){var e,t=r(227)("iframe"),n=s.length,i="<",a=">";for(t.style.display="none",r(420).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+a+"document.F=Object"+i+"/script"+a),e.close(),l=e.F;n--;)delete l[u][s[n]];return l()};e.exports=Object.create||function(e,t){var r;return null!==e?(o[u]=n(e),r=new o,o[u]=null,r[a]=e):r=l(),void 0===t?r:i(r,t)}},function(e,t){"use strict";t.f={}.propertyIsEnumerable},function(e,t){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){"use strict";var n=r(25).f,i=r(29),s=r(11)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,s)&&n(e,s,{configurable:!0,value:t})}},function(e,t,r){"use strict";var n=r(90);e.exports=function(e){return Object(n(e))}},function(e,t){"use strict";var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t){"use strict"},function(e,t,r){"use strict";function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=r(538),s=r(539),a=r(540),o=r(541),u=r(542);n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,e.exports=n},function(e,t,r){"use strict";function n(e){var t=this.__data__=new i(e);this.size=t.size}var i=r(99),s=r(557),a=r(558),o=r(559),u=r(560),l=r(561);n.prototype.clear=s,n.prototype.delete=a,n.prototype.get=o,n.prototype.has=u,n.prototype.set=l,e.exports=n},function(e,t,r){"use strict";function n(e,t){for(var r=e.length;r--;)if(i(e[r][0],t))return r;return-1}var i=r(45);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){return t===t?a(e,t,r):i(e,s,r)}var i=r(164),s=r(483),a=r(562);e.exports=n},function(e,t,r){"use strict";function n(e,t){return a(s(e,t,i),e+"")}var i=r(60),s=r(552),a=r(555);e.exports=n},function(e,t){"use strict";function r(e){return function(t){return e(t)}}e.exports=r},function(e,t,r){"use strict";function n(e){return i(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&s(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,a)}return t})}var i=r(103),s=r(171);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=e.__data__;return i(t)?r["string"==typeof t?"string":"hash"]:r.map}var i=r(536);e.exports=n},function(e,t){"use strict";function r(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||n;return e===r}var n=Object.prototype;e.exports=r},function(e,t,r){"use strict";var n=r(38),i=n(Object,"create");e.exports=i},function(e,t){"use strict";function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}e.exports=r},function(e,t,r){"use strict";function n(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}var i=r(61),s=1/0;e.exports=n},function(e,t,r){"use strict";function n(e){return i(e,s)}var i=r(163),s=4;e.exports=n},function(e,t,r){"use strict";e.exports=r(578)},function(e,t,r){"use strict";function n(e,t,r,n){e=s(e)?e:u(e),r=r&&!n?o(r):0;var c=e.length;return r<0&&(r=l(c+r,0)),a(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&i(e,t,r)>-1}var i=r(102),s=r(26),a=r(176),o=r(47),u=r(278),l=Math.max;e.exports=n},function(e,t,r){"use strict";var n=r(480),i=r(13),s=Object.prototype,a=s.hasOwnProperty,o=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!o.call(e,"callee")};e.exports=u},function(e,t,r){(function(e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(16),s=r(591),a="object"==n(t)&&t&&!t.nodeType&&t,o=a&&"object"==n(e)&&e&&!e.nodeType&&e,u=o&&o.exports===a,l=u?i.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||s;e.exports=f}).call(t,r(39)(e))},function(e,t,r){"use strict";function n(e){if(!s(e))return!1;var t=i(e);return t==o||t==u||t==a||t==l;
+}var i=r(15),s=r(12),a="[object AsyncFunction]",o="[object Function]",u="[object GeneratorFunction]",l="[object Proxy]";e.exports=n},98,function(e,t,r){(function(e,n){"use strict";function i(e,r){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,e,n.depth)}function s(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e,t){return e}function o(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,r,n){if(e.customInspect&&r&&C(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=u(e,i,n)),i}var s=l(e,r);if(s)return s;var a=Object.keys(r),m=o(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),D(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(r);if(0===a.length){if(C(r)){var v=r.name?": "+r.name:"";return e.stylize("[Function"+v+"]","special")}if(A(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(D(r))return c(r)}var y="",g=!1,E=["{","}"];if(h(r)&&(g=!0,E=["[","]"]),C(r)){var x=r.name?": "+r.name:"";y=" [Function"+x+"]"}if(A(r)&&(y=" "+RegExp.prototype.toString.call(r)),_(r)&&(y=" "+Date.prototype.toUTCString.call(r)),D(r)&&(y=" "+c(r)),0===a.length&&(!g||0==r.length))return E[0]+y+E[1];if(n<0)return A(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var S;return S=g?f(e,r,n,m,a):a.map(function(t){return p(e,r,n,m,t,g)}),e.seen.pop(),d(S,y,E)}function l(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i){for(var s=[],a=0,o=t.length;a<o;++a)T(t,String(a))?s.push(p(e,t,r,n,String(a),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(p(e,t,r,n,i,!0))}),s}function p(e,t,r,n,i,s){var a,o,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?o=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(o=e.stylize("[Setter]","special")),T(n,i)||(a="["+i+"]"),o||(e.seen.indexOf(l.value)<0?(o=v(r)?u(e,l.value,null):u(e,l.value,r-1),o.indexOf("\n")>-1&&(o=s?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n"))):o=e.stylize("[Circular]","special")),x(a)){if(s&&i.match(/^\d+$/))return o;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+o}function d(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function v(e){return null===e}function y(e){return null==e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function E(e){return"symbol"===("undefined"==typeof e?"undefined":O(e))}function x(e){return void 0===e}function A(e){return S(e)&&"[object RegExp]"===F(e)}function S(e){return"object"===("undefined"==typeof e?"undefined":O(e))&&null!==e}function _(e){return S(e)&&"[object Date]"===F(e)}function D(e){return S(e)&&("[object Error]"===F(e)||e instanceof Error)}function C(e){return"function"==typeof e}function w(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===("undefined"==typeof e?"undefined":O(e))||"undefined"==typeof e}function F(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}function P(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,s=n.length,a=String(e).replace(B,function(e){if("%%"===e)return"%";if(r>=s)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r<s;o=n[++r])a+=v(o)||!S(o)?" "+o:" "+i(o);return a},t.deprecate=function(r,i){function s(){if(!a){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),a=!0}return r.apply(this,arguments)}if(x(e.process))return function(){return t.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var a=!1;return s};var R,I={};t.debuglog=function(e){if(x(R)&&(R=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!I[e])if(new RegExp("\\b"+e+"\\b","i").test(R)){var r=n.pid;I[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else I[e]=function(){};return I[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=m,t.isNull=v,t.isNullOrUndefined=y,t.isNumber=g,t.isString=b,t.isSymbol=E,t.isUndefined=x,t.isRegExp=A,t.isObject=S,t.isDate=_,t.isError=D,t.isFunction=C,t.isPrimitive=w,t.isBuffer=r(621);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",P(),t.format.apply(t,arguments))},t.inherits=r(620),t._extend=function(e,t){if(!t||!S(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(t,function(){return this}(),r(18))},function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(7),a=i(s);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===("undefined"==typeof u.default?"undefined":(0,a.default)(u.default)))return null;var r=f[t];if(!r){r=new u.default;var i=c.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=u.default._nodeModulePaths(t),f[t]=r}try{return u.default._resolveFilename(e,r)}catch(e){return null}};var o=r(117),u=i(o),l=r(17),c=i(l),f={};e.exports=t.default}).call(t,r(18))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(133),s=n(i),a=r(3),o=n(a),u=r(42),l=n(u),c=r(41),f=n(c),p=function(e){function t(){(0,o.default)(this,t);var r=(0,l.default)(this,e.call(this));return r.dynamicData={},r}return(0,f.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(s.default);t.default=p,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(236),o=n(a),u=(0,o.default)("babel:verbose"),l=(0,o.default)("babel"),c=[],f=function(){function e(t,r){(0,s.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error;throw new t(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),c.indexOf(e)>=0||(c.push(e),console.error(e)))},e.prototype.verbose=function(e){u.enabled&&u(this._buildMessage(e))},e.prototype.debug=function(e){l.enabled&&l(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();t.default=f,e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=e.node,n=r.source?r.source.value:null,i=t.metadata.modules.exports,s=e.get("declaration");if(s.isStatement()){var a=s.getBindingIdentifiers();for(var o in a)i.exported.push(o),i.specifiers.push({kind:"local",local:o,exported:e.isExportDefaultDeclaration()?"default":o})}if(e.isExportNamedDeclaration()&&r.specifiers)for(var l=r.specifiers,f=Array.isArray(l),p=0,l=f?l:(0,u.default)(l);;){var d;if(f){if(p>=l.length)break;d=l[p++]}else{if(p=l.next(),p.done)break;d=p.value}var h=d,m=h.exported.name;i.exported.push(m),c.isExportDefaultSpecifier(h)&&i.specifiers.push({kind:"external",local:m,exported:m,source:n}),c.isExportNamespaceSpecifier(h)&&i.specifiers.push({kind:"external-namespace",exported:m,source:n});var v=h.local;v&&(n&&i.specifiers.push({kind:"external",local:v.name,exported:m,source:n}),n||i.specifiers.push({kind:"local",local:v.name,exported:m}))}e.isExportAllDeclaration()&&i.specifiers.push({kind:"external-all",source:n})}function a(e){e.skip()}t.__esModule=!0,t.ImportDeclaration=t.ModuleDeclaration=void 0;var o=r(2),u=i(o);t.ExportDeclaration=s,t.Scope=a;var l=r(1),c=n(l);t.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},t.ImportDeclaration={exit:function(e,t){var r=e.node,n=[],i=[];t.metadata.modules.imports.push({source:r.source.value,imported:i,specifiers:n});for(var s=e.get("specifiers"),a=Array.isArray(s),o=0,s=a?s:(0,u.default)(s);;){var l;if(a){if(o>=s.length)break;l=s[o++]}else{if(o=s.next(),o.done)break;l=o.value}var c=l,f=c.node.local.name;if(c.isImportDefaultSpecifier()&&(i.push("default"),n.push({kind:"named",imported:"default",local:f})),c.isImportSpecifier()){var p=c.node.imported.name;i.push(p),n.push({kind:"named",imported:p,local:f})}c.isImportNamespaceSpecifier()&&(i.push("*"),n.push({kind:"namespace",local:f}))}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=k.default.extname(e);return(0,S.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(m.default).join("|"),"i")),"string"==typeof e){e=(0,T.default)(e),((0,y.default)(e,"./")||(0,y.default)(e,"*/"))&&(e=e.slice(2)),(0,y.default)(e,"**/")&&(e=e.slice(3));var t=x.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,w.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?(0,b.default)(e)?o([e],t):(0,D.default)(e)?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,p.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(c(o,e))return!1}return!0}if(t.length)for(var u=t,l=Array.isArray(u),f=0,u=l?u:(0,p.default)(u);;){var d;if(l){if(f>=u.length)break;d=u[f++]}else{if(f=u.next(),f.done)break;d=f.value}var h=d;if(c(h,e))return!0}return!1}function c(e,t){return"function"==typeof e?e(t):e.test(t)}t.__esModule=!0,t.inspect=t.inherits=void 0;var f=r(2),p=n(f),d=r(118);Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return d.inherits}}),Object.defineProperty(t,"inspect",{enumerable:!0,get:function(){return d.inspect}}),t.canCompile=i,t.list=s,t.regexify=a,t.arrayify=o,t.booleanify=u,t.shouldIgnore=l;var h=r(572),m=n(h),v=r(590),y=n(v),g=r(271),b=n(g),E=r(597),x=n(E),A=r(113),S=n(A),_=r(176),D=n(_),C=r(274),w=n(C),F=r(17),k=n(F),P=r(283),T=n(P);i.EXTENSIONS=[".js",".jsx",".es6",".es"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)}function a(e){this.token("..."),this.print(e.argument,e)}function o(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function u(e){this.printJoin(e.decorators,e),this._method(e)}function l(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(y.isAssignmentPattern(e.value)&&y.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&y.isIdentifier(e.key)&&y.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)}function c(e){var t=e.elements,r=t.length;this.token("["),this.printInnerComments(e);for(var n=0;n<t.length;n++){var i=t[n];i?(n>0&&this.space(),this.print(i,e),n<r-1&&this.token(",")):this.token(",")}this.token("]")}function f(e){this.word("/"+e.pattern+"/"+e.flags)}function p(e){this.word(e.value?"true":"false")}function d(){this.word("null")}function h(e){var t=this.getPossibleRaw(e),r=e.value+"";null==t?this.number(r):this.format.minified?this.number(t.length<r.length?t:r):this.number(t)}function m(e,t){var r=this.getPossibleRaw(e);if(!this.format.minified&&null!=r)return void this.token(r);var n={quotes:y.isJSX(t)?"double":this.format.quotes,wrap:!0};this.format.jsonCompatibleStrings&&(n.json=!0);var i=(0,b.default)(e.value,n);return this.token(i)}t.__esModule=!0,t.ArrayPattern=t.ObjectPattern=t.RestProperty=t.SpreadProperty=t.SpreadElement=void 0,t.Identifier=s,t.RestElement=a,t.ObjectExpression=o,t.ObjectMethod=u,t.ObjectProperty=l,t.ArrayExpression=c,t.RegExpLiteral=f,t.BooleanLiteral=p,t.NullLiteral=d,t.NumericLiteral=h,t.StringLiteral=m;var v=r(1),y=i(v),g=r(457),b=n(g);t.SpreadElement=a,t.SpreadProperty=a,t.RestProperty=a,t.ObjectPattern=o,t.ArrayPattern=c},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=e.node,n=r.body;r.async=!1;var i=p.functionExpression(null,[],p.blockStatement(n.body),!0);i.shadow=!0,n.body=[p.returnStatement(p.callExpression(p.callExpression(t,[i]),[]))],r.generator=!1}function a(e,t){var r=e.node,n=e.isFunctionDeclaration(),i=r.id,s=m;e.isArrowFunctionExpression()?e.arrowFunctionToShadowed():!n&&i&&(s=v),r.async=!1,r.generator=!0,r.id=null,n&&(r.type="FunctionExpression");var a=p.callExpression(t,[r]),o=s({NAME:i,REF:e.scope.generateUidIdentifier("ref"),FUNCTION:a,PARAMS:r.params.reduce(function(t,r){return t.done=t.done||p.isAssignmentPattern(r)||p.isRestElement(r),t.done||t.params.push(e.scope.generateUidIdentifier("x")),t},{params:[],done:!1}).params}).expression;if(n){var l=p.variableDeclaration("let",[p.variableDeclarator(p.identifier(i.name),p.callExpression(o,[]))]);l._blockHoist=!0,e.replaceWith(l)}else{var c=o.body.body[1].argument;i||(0,u.default)({node:c,parent:e.parent,scope:e.scope}),!c||c.id||r.params.length?e.replaceWith(p.callExpression(o,[])):e.replaceWith(a)}}t.__esModule=!0,t.default=function(e,t,r){r||(r={wrapAsync:t},t=null),e.traverse(y,{file:t,wrapAwait:r.wrapAwait}),e.isClassMethod()||e.isObjectMethod()?s(e,r.wrapAsync):a(e,r.wrapAsync)};var o=r(40),u=i(o),l=r(4),c=i(l),f=r(1),p=n(f),d=r(317),h=i(d),m=(0,c.default)("\n (() => {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })\n"),v=(0,c.default)("\n (() => {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })\n"),y={Function:function(e){return e.isArrowFunctionExpression()&&!e.node.async?void e.arrowFunctionToShadowed():void e.skip()},AwaitExpression:function(e,t){var r=e.node,n=t.wrapAwait;r.type="YieldExpression",n&&(r.argument=p.callExpression(n,[r.argument]))},ForAwaitStatement:function(e,t){var r=t.file,n=t.wrapAwait,i=e.node,s=(0,h.default)(e,{getAsyncIterator:r.addHelper("asyncIterator"),wrapAwait:n}),a=s.declar,o=s.loop,u=o.body;e.ensureBlock(),a&&u.body.push(a),u.body=u.body.concat(i.body.body),p.inherits(o,i),p.inherits(o.body,i.body),s.replaceParent?(e.parentPath.replaceWithMultiple(s.node),e.remove()):e.replaceWithMultiple(s.node)}};e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("decorators")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("jsx")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("trailingFunctionCommas")}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(){return{inherits:r(67),visitor:{Function:function(e,t){e.node.async&&!e.node.generator&&(0,s.default)(e,t.file,{wrapAsync:t.addHelper("asyncToGenerator")})}}}};var i=r(125),s=n(i);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){return f.isIdentifier(e)?e.name:e.value.toString()}t.__esModule=!0;var a=r(2),o=i(a),u=r(9),l=i(u);t.default=function(){return{visitor:{ObjectExpression:function(e){for(var t=e.node,r=t.properties.filter(function(e){return!f.isSpreadProperty(e)&&!e.computed}),n=(0,l.default)(null),i=(0,l.default)(null),a=(0,l.default)(null),u=r,c=Array.isArray(u),p=0,u=c?u:(0,o.default)(u);;){var d;if(c){if(p>=u.length)break;d=u[p++]}else{if(p=u.next(),p.done)break;d=p.value}var h=d,m=s(h.key),v=!1;switch(h.kind){case"get":(n[m]||i[m])&&(v=!0),i[m]=!0;break;case"set":(n[m]||a[m])&&(v=!0),a[m]=!0;break;default:(n[m]||i[m]||a[m])&&(v=!0),n[m]=!0}v&&(h.computed=!0,h.key=f.stringLiteral(m))}}}}};var c=r(1),f=n(c);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(9),s=n(i);t.default=function(e){function t(e){if(!e.isCallExpression())return!1;if(!e.get("callee").isIdentifier({name:"require"}))return!1;if(e.scope.getBinding("require"))return!1;var t=e.get("arguments");if(1!==t.length)return!1;var r=t[0];return!!r.isStringLiteral()}var n=e.types,i={ReferencedIdentifier:function(e){var t=e.node,r=e.scope;"exports"!==t.name||r.getBinding("exports")||(this.hasExports=!0),"module"!==t.name||r.getBinding("module")||(this.hasModule=!0)},CallExpression:function(e){t(e)&&(this.bareSources.push(e.node.arguments[0]),e.remove())},VariableDeclarator:function(e){var r=e.get("id");if(r.isIdentifier()){var n=e.get("init");if(t(n)){var i=n.node.arguments[0];this.sourceNames[i.value]=!0,this.sources.push([r.node,i]),e.remove()}}}};return{inherits:r(78),pre:function(){this.sources=[],this.sourceNames=(0,s.default)(null),this.bareSources=[],this.hasExports=!1,this.hasModule=!1},visitor:{Program:{exit:function(e){var t=this;if(!this.ran){this.ran=!0,e.traverse(i,this);var r=this.sources.map(function(e){return e[0]}),s=this.sources.map(function(e){return e[1]});s=s.concat(this.bareSources.filter(function(e){return!t.sourceNames[e.value]}));var a=this.getModuleName();a&&(a=n.stringLiteral(a)),this.hasExports&&(s.unshift(n.stringLiteral("exports")),r.unshift(n.identifier("exports"))),this.hasModule&&(s.unshift(n.stringLiteral("module")),r.unshift(n.identifier("module")));var o=e.node,c=l({PARAMS:r,BODY:o.body});c.expression.body.directives=o.directives,o.directives=[],o.body=[u({MODULE_NAME:a,SOURCES:s,FACTORY:c})]}}}}}};var a=r(4),o=n(a),u=(0,o.default)("\n define(MODULE_NAME, [SOURCES], FACTORY);\n"),l=(0,o.default)("\n (function (PARAMS) {\n BODY;\n })\n");e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){var t=e.types;return{inherits:r(197),visitor:(0,s.default)({operator:"**",build:function(e,r){return t.callExpression(t.memberExpression(t.identifier("Math"),t.identifier("pow")),[e,r])}})}};var i=r(313),s=n(i);e.exports=t.default},function(e,t,r){"use strict";e.exports={default:r(399),__esModule:!0}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){for(var n=I.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0,i=s?i:(0,v.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),I.scope.has(e.node)||I.scope.set(e.node,n)}function a(e,t){if(R.isModuleDeclaration(e))if(e.source)a(e.source,t);else if(e.specifiers&&e.specifiers.length)for(var r=e.specifiers,n=Array.isArray(r),i=0,r=n?r:(0,v.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s;a(o,t)}else e.declaration&&a(e.declaration,t);else if(R.isModuleSpecifier(e))a(e.local,t);else if(R.isMemberExpression(e))a(e.object,t),a(e.property,t);else if(R.isIdentifier(e))t.push(e.name);else if(R.isLiteral(e))t.push(e.value);else if(R.isCallExpression(e))a(e.callee,t);else if(R.isObjectExpression(e)||R.isObjectPattern(e))for(var u=e.properties,l=Array.isArray(u),c=0,u=l?u:(0,v.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;a(p.key||p.argument,t)}}t.__esModule=!0;var o=r(20),u=i(o),l=r(9),c=i(l),f=r(133),p=i(f),d=r(3),h=i(d),m=r(2),v=i(m),y=r(113),g=i(y),b=r(276),E=i(b),x=r(376),A=i(x),S=r(8),_=i(S),D=r(269),C=i(D),w=r(19),F=n(w),k=r(223),P=i(k),T=r(451),O=i(T),B=r(1),R=n(B),I=r(89),M=0,N={For:function(e){for(var t=R.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,v.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(R.isClassDeclaration(n)||R.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(R.isVariableDeclaration(n))for(var a=n.declarations,o=Array.isArray(a),u=0,a=o?a:(0,v.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l,f=R.getBindingIdentifiers(c);for(var p in f){var d=r.getBinding(p);d&&d.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,v.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(a)}}},L=0,j=function(){function e(t,r){if((0,h.default)(this,e),r&&r.block===t.node)return r;var n=s(t,r,this);return n?n:(this.uid=L++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,void(this.labels=new p.default))}return e.prototype.traverse=function(e,t,r){(0,_.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return R.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=R.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do t=this._generateUid(e,r),r++;while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;R.isAssignmentExpression(e)?r=e.left:R.isVariableDeclarator(e)?r=e.id:(R.isObjectProperty(r)||R.isObjectMethod(r))&&(r=r.key);var n=[];a(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(R.isThisExpression(e)||R.isSuper(e))return!0;if(R.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){var i=!1;if(i||(i="let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind),i||(i="param"===e.kind&&("let"===t||"const"===t)),i)throw this.hub.file.buildCodeFrameError(n,F.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new A.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,E.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(R.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(R.isArrayExpression(e))return e;if(R.isIdentifier(e,{name:"arguments"}))return R.callExpression(R.memberExpression(R.memberExpression(R.memberExpression(R.identifier("Array"),R.identifier("prototype")),R.identifier("slice")),R.identifier("call")),[e]);var i="toArray",s=[e];return t===!0?i="toConsumableArray":t&&(s.push(R.numericLiteral(t)),i="slicedToArray"),R.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,v.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.registerBinding(e.node.kind,a)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var o=e.get("specifiers"),u=o,l=Array.isArray(u),c=0,u=l?u:(0,v.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;this.registerBinding("module",p)}else if(e.isExportDeclaration()){var d=e.get("declaration");(d.isClassDeclaration()||d.isFunctionDeclaration()||d.isVariableDeclaration())&&this.registerDeclaration(d)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?R.unaryExpression("void",R.numericLiteral(0),!0):R.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r);n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration())for(var n=t.get("declarations"),i=n,s=Array.isArray(i),a=0,i=s?i:(0,v.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;this.registerBinding(e,u)}else{var l=this.getProgramParent(),c=t.getBindingIdentifiers(!0);for(var f in c)for(var p=c[f],d=Array.isArray(p),h=0,p=d?p:(0,v.default)(p);;){var m;if(d){if(h>=p.length)break;m=p[h++]}else{if(h=p.next(),h.done)break;m=h.value}var y=m,g=this.getOwnBinding(f);if(g){if(g.identifier===y)continue;this.checkBlockScopedCollisions(g,e,f,y)}g&&g.path.isFlow()&&(g=null),l.references[f]=!0,this.bindings[f]=new P.default({identifier:y,existing:g,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do if(t.uids[e])return!0;while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do if(t.globals[e])return!0;while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do if(t.references[e])return!0;while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(R.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(R.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(R.isClassBody(e)){for(var n=e.body,i=Array.isArray(n),s=0,n=i?n:(0,v.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(R.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(R.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),c=0,u=l?u:(0,v.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;if(!this.isPure(p,t))return!1}return!0}if(R.isObjectExpression(e)){for(var d=e.properties,h=Array.isArray(d),m=0,d=h?d:(0,v.default)(d);;){var y;if(h){if(m>=d.length)break;y=d[m++]}else{if(m=d.next(),m.done)break;y=m.value}var g=y;if(!this.isPure(g,t))return!1}return!0}return R.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):R.isClassProperty(e)||R.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):R.isUnaryExpression(e)?this.isPure(e.argument,t):R.isPureish(e);
+},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{var r=t.data[e];null!=r&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){M++,this._crawl(),M--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,c.default)(null),this.bindings=(0,c.default)(null),this.globals=(0,c.default)(null),this.uids=(0,c.default)(null),this.data=(0,c.default)(null),e.isLoop())for(var t=R.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,v.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[R.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[R.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),u=o,l=Array.isArray(u),f=0,u=l?u:(0,v.default)(u);;){var p;if(l){if(f>=u.length)break;p=u[f++]}else{if(f=u.next(),f.done)break;p=f.value}var d=p;this.registerBinding("param",d)}e.isCatchClause()&&this.registerBinding("let",e);var h=this.getProgramParent();if(!h.crawling){var m={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(N,m),this.crawling=!1;for(var y=m.assignments,g=Array.isArray(y),b=0,y=g?y:(0,v.default)(y);;){var E;if(g){if(b>=y.length)break;E=y[b++]}else{if(b=y.next(),b.done)break;E=b.value}var x=E,A=x.getBindingIdentifiers(),S=void 0;for(var _ in A)x.scope.getBinding(_)||(S=S||x.scope.getProgramParent(),S.addGlobal(A[_]));x.scope.registerConstantViolation(x)}for(var D=m.references,C=Array.isArray(D),w=0,D=C?D:(0,v.default)(D);;){var F;if(C){if(w>=D.length)break;F=D[w++]}else{if(w=D.next(),w.done)break;F=w.value}var k=F,P=k.scope.getBinding(k.node.name);P?P.reference(k):k.scope.getProgramParent().addGlobal(k.node)}for(var T=m.constantViolations,O=Array.isArray(T),B=0,T=O?T:(0,v.default)(T);;){var I;if(O){if(B>=T.length)break;I=T[B++]}else{if(B=T.next(),B.done)break;I=B.value}var M=I;M.scope.registerConstantViolation(M)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(R.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=R.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i;var u=t.unshiftContainer("body",[o]);a=u[0],r||t.setData(s,a)}var l=R.variableDeclarator(e.id,e.init);a.node.declarations.push(l),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do if(e.path.isProgram())return e;while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do if(e.path.isFunctionParent())return e;while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do if(e.path.isBlockParent())return e;while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,c.default)(null),t=this;do(0,C.default)(e,t.bindings),t=t.parent;while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=(0,c.default)(null),t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,v.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=this;do{for(var o in a.bindings){var u=a.bindings[o];u.kind===s&&(e[o]=u)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===M&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 6.8. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,g.default)(e.globals,t))||!(r||!(0,g.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do r.uids[e]&&(r.uids[e]=!1);while(r=r.parent)},e}();j.globals=(0,u.default)(O.default.builtin),j.contextVariables=["arguments","undefined","Infinity","NaN"],t.default=j,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var i=r(355),s=n(i),a=(t.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],t.FLATTENABLE_KEYS=["body","expressions"],t.FOR_INIT_KEYS=["left","init"],t.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],t.LOGICAL_OPERATORS=["||","&&"],t.UPDATE_OPERATORS=["++","--"],t.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),o=t.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],u=t.COMPARISON_BINARY_OPERATORS=[].concat(o,["in","instanceof"]),l=t.BOOLEAN_BINARY_OPERATORS=[].concat(u,a),c=t.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],f=(t.BINARY_OPERATORS=["+"].concat(c,l),t.BOOLEAN_UNARY_OPERATORS=["delete","!"]),p=t.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],d=t.STRING_UNARY_OPERATORS=["typeof"];t.UNARY_OPERATORS=["void"].concat(f,p,d),t.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},t.BLOCK_SCOPED_SYMBOL=(0,s.default)("var used to be block scoped"),t.NOT_LOCAL_BINDING=(0,s.default)("should not be considered a local binding")},function(e,t){"use strict";function r(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function n(e,t){for(var r=65536,n=0;n<t.length;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}}function i(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&P.test(String.fromCharCode(e)):n(e,O)))}function s(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&T.test(String.fromCharCode(e)):n(e,O)||n(e,B))))}function a(e){var t={};for(var r in R)t[r]=e&&r in e?e[r]:R[r];return t}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){return new I(e,{beforeExpr:!0,binop:t})}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.keyword=e,j[e]=L["_"+e]=new I(e,t)}function c(e){return 10===e||13===e||8232===e||8233===e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=1,n=0;;){V.lastIndex=n;var i=V.exec(e);if(!(i&&i.index<t))return new q(r,t-n);++r,n=i.index+i[0].length}}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":D(t))&&"function"!=typeof t?e:t}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":D(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function A(e){return e[e.length-1]}function S(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?S(e.object)+"."+S(e.property):void 0}function _(e,t){return new $(t,e).parse()}var D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var C={6:r("enum await"),strict:r("implements interface let package private protected public static yield"),strictBind:r("eval arguments")},w=r("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),F="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",k="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",P=new RegExp("["+F+"]"),T=new RegExp("["+F+k+"]");F=k=null;var O=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],B=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],R={sourceType:"script",sourceFilename:void 0,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},I=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},M={beforeExpr:!0},N={startsExpr:!0},L={num:new I("num",N),regexp:new I("regexp",N),string:new I("string",N),name:new I("name",N),eof:new I("eof"),bracketL:new I("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new I("]"),braceL:new I("{",{beforeExpr:!0,startsExpr:!0}),braceBarL:new I("{|",{beforeExpr:!0,startsExpr:!0}),braceR:new I("}"),braceBarR:new I("|}"),parenL:new I("(",{beforeExpr:!0,startsExpr:!0}),parenR:new I(")"),comma:new I(",",M),semi:new I(";",M),colon:new I(":",M),doubleColon:new I("::",M),dot:new I("."),question:new I("?",M),arrow:new I("=>",M),template:new I("template"),ellipsis:new I("...",M),backQuote:new I("`",N),dollarBraceL:new I("${",{beforeExpr:!0,startsExpr:!0}),at:new I("@"),eq:new I("=",{beforeExpr:!0,isAssign:!0}),assign:new I("_=",{beforeExpr:!0,isAssign:!0}),incDec:new I("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new I("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:u("||",1),logicalAND:u("&&",2),bitwiseOR:u("|",3),bitwiseXOR:u("^",4),bitwiseAND:u("&",5),equality:u("==/!=",6),relational:u("</>",7),bitShift:u("<</>>",8),plusMin:new I("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:u("%",10),star:u("*",10),slash:u("/",10),exponent:new I("**",{beforeExpr:!0,binop:11,rightAssociative:!0})},j={};l("break"),l("case",M),l("catch"),l("continue"),l("debugger"),l("default",M),l("do",{isLoop:!0,beforeExpr:!0}),l("else",M),l("finally"),l("for",{isLoop:!0}),l("function",N),l("if"),l("return",M),l("switch"),l("throw",M),l("try"),l("var"),l("let"),l("const"),l("while",{isLoop:!0}),l("with"),l("new",{beforeExpr:!0,startsExpr:!0}),l("this",N),l("super",N),l("class"),l("extends",M),l("export"),l("import"),l("yield",{beforeExpr:!0,startsExpr:!0}),l("null",N),l("true",N),l("false",N),l("in",{beforeExpr:!0,binop:7}),l("instanceof",{beforeExpr:!0,binop:7}),l("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),l("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),l("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0});var U=/\r\n?|\n|\u2028|\u2029/,V=new RegExp(U.source,"g"),G=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,W=function e(t,r,n,i){f(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},Y={braceStatement:new W("{",(!1)),braceExpression:new W("{",(!0)),templateQuasi:new W("${",(!0)),parenStatement:new W("(",(!1)),parenExpression:new W("(",(!0)),template:new W("`",(!0),(!0),function(e){return e.readTmplToken()}),functionExpression:new W("function",(!0))};L.parenR.updateContext=L.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);var e=this.state.context.pop();e===Y.braceStatement&&this.curContext()===Y.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===Y.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr},L.name.updateContext=function(e){this.state.exprAllowed=!1,e!==L._let&&e!==L._const&&e!==L._var||U.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},L.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?Y.braceStatement:Y.braceExpression),this.state.exprAllowed=!0},L.dollarBraceL.updateContext=function(){this.state.context.push(Y.templateQuasi),this.state.exprAllowed=!0},L.parenL.updateContext=function(e){var t=e===L._if||e===L._for||e===L._with||e===L._while;this.state.context.push(t?Y.parenStatement:Y.parenExpression),this.state.exprAllowed=!0},L.incDec.updateContext=function(){},L._function.updateContext=function(){this.curContext()!==Y.braceStatement&&this.state.context.push(Y.functionExpression),this.state.exprAllowed=!1},L.backQuote.updateContext=function(){this.curContext()===Y.template?this.state.context.pop():this.state.context.push(Y.template),this.state.exprAllowed=!1};var q=function e(t,r){p(this,e),this.line=t,this.column=r},K=function e(t,r){p(this,e),this.start=t,this.end=r},H=function(){function e(){h(this,e)}return e.prototype.init=function(e,t){return this.strict=e.strictMode!==!1&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inType=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=1,this.type=L.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[Y.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new q(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),J=function e(t){m(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new K(t.startLoc,t.endLoc)},X=function(){function e(t,r){m(this,e),this.state=new H,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new J(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return w(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(L.num)||this.match(L.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},e.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},e.prototype.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(L.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return i(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.state.pos+1);return(e<<10)+t-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new K(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);r===-1&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,V.lastIndex=t;for(var n=void 0;(n=V.exec(this.input))&&n.index<this.state.pos;)++this.state.curLine,this.state.lineStart=n.index+n[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())},e.prototype.skipLineComment=function(e){for(var t=this.state.pos,r=this.state.curPosition(),n=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==n&&13!==n&&8232!==n&&8233!==n;)++this.state.pos,n=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())},e.prototype.skipSpace=function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&G.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(L.ellipsis)):(++this.state.pos,this.finishToken(L.dot))},e.prototype.readToken_slash=function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(L.assign,2):this.finishOp(L.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?L.star:L.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=L.exponent),61===n&&(r++,t=L.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?L.logicalOR:L.logicalAND,2):61===t?this.finishOp(L.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(L.braceBarR,2):this.finishOp(124===e?L.bitwiseOR:L.bitwiseAND,1)},e.prototype.readToken_caret=function(){var e=this.input.charCodeAt(this.state.pos+1);return 61===e?this.finishOp(L.assign,2):this.finishOp(L.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&U.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(L.incDec,2):61===t?this.finishOp(L.assign,2):this.finishOp(L.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(L.assign,r+1):this.finishOp(L.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(L.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(L.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(L.arrow)):this.finishOp(61===e?L.eq:L.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(L.parenL);case 41:return++this.state.pos,this.finishToken(L.parenR);case 59:return++this.state.pos,this.finishToken(L.semi);case 44:return++this.state.pos,this.finishToken(L.comma);case 91:return++this.state.pos,this.finishToken(L.bracketL);case 93:return++this.state.pos,this.finishToken(L.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(L.braceBarL,2):(++this.state.pos,this.finishToken(L.braceL));case 125:return++this.state.pos,this.finishToken(L.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(L.doubleColon,2):(++this.state.pos,this.finishToken(L.colon));case 63:return++this.state.pos,this.finishToken(L.question);case 64:return++this.state.pos,this.finishToken(L.at);case 96:return++this.state.pos,this.finishToken(L.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(L.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+v(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=void 0,t=void 0,r=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(U.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===n)t=!0;else if("]"===n&&t)t=!1;else if("/"===n&&!t)break;e="\\"===n}++this.state.pos}var i=this.input.slice(r,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){var a=/^[gmsiyu]*$/;a.test(s)||this.raise(r,"Invalid regular expression flag")}return this.finishToken(L.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i<s;++i){var a=this.input.charCodeAt(this.state.pos),o=void 0;if(o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0,o>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),i(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(L.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=!1,n=48===this.input.charCodeAt(this.state.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.state.pos);46===s&&(++this.state.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.state.pos)),69!==s&&101!==s||(s=this.input.charCodeAt(++this.state.pos),43!==s&&45!==s||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),i(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return r?o=parseFloat(a):n&&1!==a.length?/[89]/.test(a)||this.state.strict?this.raise(t,"Invalid number"):o=parseInt(a,8):o=parseInt(a,10),this.finishToken(L.num,o)},e.prototype.readCodePoint=function(){var e=this.input.charCodeAt(this.state.pos),t=void 0;if(123===e){var r=++this.state.pos;t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,t>1114111&&this.raise(r,"Code point out of bounds")}else t=this.readHexChar(4);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(c(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(L.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(L.template)?36===r?(this.state.pos+=2,this.finishToken(L.dollarBraceL)):(++this.state.pos,this.finishToken(L.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(L.template,e));if(92===r)e+=this.input.slice(t,this.state.pos),e+=this.readEscapedChar(!0),t=this.state.pos;else if(c(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return v(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(t>=48&&t<=55){var r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(r,8);return n>255&&(r=r.slice(0,-1),n=parseInt(r,8)),n>0&&(this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=this.state.pos-2),(this.state.strict||e)&&this.raise(this.state.pos-2,"Octal literal in strict mode")),this.state.pos+=r.length-1,String.fromCharCode(n)}return String.fromCharCode(t)}},e.prototype.readHexChar=function(e){var t=this.state.pos,r=this.readInt(16,e);return null===r&&this.raise(t,"Bad character escape sequence"),r},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(s(n))this.state.pos+=n<=65535?1:2;else{if(92!==n)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var a=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint();(t?i:s)(o,!0)||this.raise(a,"Invalid Unicode escape"),e+=v(o),
+r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)},e.prototype.readWord=function(){var e=this.readWord1(),t=L.name;return!this.state.containsEsc&&this.isKeyword(e)&&(t=j[e]),this.finishToken(t,e)},e.prototype.braceIsBlock=function(e){if(e===L.colon){var t=this.curContext();if(t===Y.braceStatement||t===Y.braceExpression)return!t.isExpr}return e===L._return?U.test(this.input.slice(this.state.lastTokEnd,this.state.start)):e===L._else||e===L.semi||e===L.eof||e===L.parenR||(e===L.braceL?this.curContext()===Y.braceStatement:!this.state.exprAllowed)},e.prototype.updateContext=function(e){var t=void 0,r=this.state.type;r.keyword&&e===L.dot?this.state.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.state.exprAllowed=r.beforeExpr},e}(),z={},$=function(e){function t(r,n){y(this,t),r=a(r);var i=g(this,e.call(this,r,n));return i.options=r,i.inModule="module"===i.options.sourceType,i.input=n,i.plugins=i.loadPlugins(i.options.plugins),i.filename=r.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return b(t,e),t.prototype.isReservedWord=function(e){return"await"===e?this.inModule:C[6](e)},t.prototype.hasPlugin=function(e){return!(!this.plugins["*"]&&!this.plugins[e])},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(z).filter(function(e){return"flow"!==e});t.push("flow"),t.forEach(function(t){var r=z[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow"));for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=z[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(X),Q="function"==typeof Symbol&&"symbol"===D(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":D(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":D(e)},Z=$.prototype;Z.addExtra=function(e,t,r){if(e){var n=e.extra=e.extra||{};n[t]=r}},Z.isRelational=function(e){return this.match(L.relational)&&this.state.value===e},Z.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,L.relational)},Z.isContextual=function(e){return this.match(L.name)&&this.state.value===e},Z.eatContextual=function(e){return this.state.value===e&&this.eat(L.name)},Z.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},Z.canInsertSemicolon=function(){return this.match(L.eof)||this.match(L.braceR)||U.test(this.input.slice(this.state.lastTokEnd,this.state.start))},Z.isLineTerminator=function(){return this.eat(L.semi)||this.canInsertSemicolon()},Z.semicolon=function(){this.isLineTerminator()||this.unexpected(null,L.semi)},Z.expect=function(e,t){return this.eat(e)||this.unexpected(t,e)},Z.unexpected=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===("undefined"==typeof t?"undefined":Q(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var ee=$.prototype;ee.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,L.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var te={kind:"loop"},re={kind:"switch"};ee.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},ee.parseStatement=function(e,t){this.match(L.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case L._break:case L._continue:return this.parseBreakContinueStatement(n,r.keyword);case L._debugger:return this.parseDebuggerStatement(n);case L._do:return this.parseDoStatement(n);case L._for:return this.parseForStatement(n);case L._function:return e||this.unexpected(),this.parseFunctionStatement(n);case L._class:return e||this.unexpected(),this.takeDecorators(n),this.parseClass(n,!0);case L._if:return this.parseIfStatement(n);case L._return:return this.parseReturnStatement(n);case L._switch:return this.parseSwitchStatement(n);case L._throw:return this.parseThrowStatement(n);case L._try:return this.parseTryStatement(n);case L._let:case L._const:e||this.unexpected();case L._var:return this.parseVarStatement(n,r);case L._while:return this.parseWhileStatement(n);case L._with:return this.parseWithStatement(n);case L.braceL:return this.parseBlock();case L.semi:return this.parseEmptyStatement(n);case L._export:case L._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===L.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===L._import?this.parseImport(n):this.parseExport(n);case L.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(L._function)&&!this.canInsertSemicolon())return this.expect(L._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===L.name&&"Identifier"===a.type&&this.eat(L.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},ee.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},ee.parseDecorators=function(e){for(;this.match(L.at);)this.state.decorators.push(this.parseDecorator());e&&this.match(L._export)||this.match(L._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},ee.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},ee.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(L.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n<this.state.labels.length;++n){var i=this.state.labels[n];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(r||"loop"===i.kind))break;if(e.label&&r)break}}return n===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},ee.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},ee.parseDoStatement=function(e){return this.next(),this.state.labels.push(te),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(L._while),e.test=this.parseParenExpression(),this.eat(L.semi),this.finishNode(e,"DoWhileStatement")},ee.parseForStatement=function(e){this.next(),this.state.labels.push(te);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(L.parenL),this.match(L.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(L._var)||this.match(L._let)||this.match(L._const)){var r=this.startNode(),n=this.state.type;return this.next(),this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),!this.match(L._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init?(t&&this.unexpected(),this.parseFor(e,r)):this.parseForIn(e,r,t)}var i={start:0},s=this.parseExpression(!0,i);if(this.match(L._in)||this.isContextual("of")){var a=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(s,void 0,a),this.checkLVal(s,void 0,void 0,a),this.parseForIn(e,s,t)}return i.start&&this.unexpected(i.start),t&&this.unexpected(),this.parseFor(e,s)},ee.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},ee.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(L._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},ee.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},ee.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(L.braceL),this.state.labels.push(re);for(var t,r=void 0;!this.match(L.braceR);)if(this.match(L._case)||this.match(L._default)){var n=this.match(L._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(L.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")},ee.parseThrowStatement=function(e){return this.next(),U.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ne=[];ee.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(L._catch)){var t=this.startNode();this.next(),this.expect(L.parenL),t.param=this.parseBindingAtom(),this.checkLVal(t.param,!0,Object.create(null),"catch clause"),this.expect(L.parenR),t.body=this.parseBlock(),e.handler=this.finishNode(t,"CatchClause")}return e.guardedHandlers=ne,e.finalizer=this.eat(L._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},ee.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},ee.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.state.labels.push(te),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"WhileStatement")},ee.parseWithStatement=function(e){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},ee.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},ee.parseLabeledStatement=function(e,t,r){for(var n=this.state.labels,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;o.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var u=this.state.type.isLoop?"loop":this.match(L._switch)?"switch":null,l=this.state.labels.length-1;l>=0;l--){var c=this.state.labels[l];if(c.statementStart!==e.start)break;c.statementStart=this.state.start,c.kind=u}return this.state.labels.push({name:t,kind:u,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},ee.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},ee.parseBlock=function(e){var t=this.startNode();return this.expect(L.braceL),this.parseBlockBody(t,e,!1,L.braceR),this.finishNode(t,"BlockStatement")},ee.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(!t||i||"ExpressionStatement"!==o.type||"StringLiteral"!==o.expression.type||o.expression.extra.parenthesized)i=!0,e.body.push(o);else{var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}}s===!1&&this.setStrict(!1)},ee.parseFor=function(e,t){return e.init=t,this.expect(L.semi),e.test=this.match(L.semi)?null:this.parseExpression(),this.expect(L.semi),e.update=this.match(L.parenR)?null:this.parseExpression(),this.expect(L.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},ee.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(L._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(L.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},ee.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(L.eq)?n.init=this.parseMaybeAssign(t):r!==L._const||this.match(L._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(L._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(L.comma))break}return e},ee.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},ee.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(L.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(L.name)||this.match(L._yield)||this.unexpected(),(this.match(L.name)||this.match(L._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},ee.parseFunctionParams=function(e){this.expect(L.parenL),e.params=this.parseBindingList(L.parenR)},ee.parseClass=function(e,t,r){return this.next(),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},ee.isClassProperty=function(){return this.match(L.eq)||this.isLineTerminator()},ee.isClassMutatorStarter=function(){return!1},ee.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(L.braceL);!this.eat(L.braceR);)if(!this.eat(L.semi))if(this.match(L.at))i.push(this.parseDecorator());else{var a=this.startNode();i.length&&(a.decorators=i,i=[]);var o=!1,u=this.match(L.name)&&"static"===this.state.value,l=this.eat(L.star),c=!1,f=!1;if(this.parsePropertyName(a),a.static=u&&!this.match(L.parenL),a.static&&(l=this.eat(L.star),this.parsePropertyName(a)),!l){if(this.isClassProperty()){s.body.push(this.parseClassProperty(a));continue}"Identifier"===a.key.type&&!a.computed&&this.hasPlugin("classConstructorCall")&&"call"===a.key.name&&this.match(L.name)&&"constructor"===this.state.value&&(o=!0,this.parsePropertyName(a))}var p=!this.match(L.parenL)&&!a.computed&&"Identifier"===a.key.type&&"async"===a.key.name;if(p&&(this.hasPlugin("asyncGenerators")&&this.eat(L.star)&&(l=!0),f=!0,this.parsePropertyName(a)),a.kind="method",!a.computed){var d=a.key;f||l||this.isClassMutatorStarter()||"Identifier"!==d.type||this.match(L.parenL)||"get"!==d.name&&"set"!==d.name||(c=!0,a.kind=d.name,d=this.parsePropertyName(a));var h=!o&&!a.static&&("Identifier"===d.type&&"constructor"===d.name||"StringLiteral"===d.type&&"constructor"===d.value);h&&(n&&this.raise(d.start,"Duplicate constructor in the same class"),c&&this.raise(d.start,"Constructor can't have get/set modifier"),l&&this.raise(d.start,"Constructor can't be a generator"),f&&this.raise(d.start,"Constructor can't be an async function"),a.kind="constructor",n=!0);var m=a.static&&("Identifier"===d.type&&"prototype"===d.name||"StringLiteral"===d.type&&"prototype"===d.value);m&&this.raise(d.start,"Classes may not have static property named prototype")}if(o&&(r&&this.raise(a.start,"Duplicate constructor call in the same class"),a.kind="constructorCall",r=!0),"constructor"!==a.kind&&"constructorCall"!==a.kind||!a.decorators||this.raise(a.start,"You can't attach decorators to a class constructor"),this.parseClassMethod(s,a,l,f),c){var v="get"===a.kind?0:1;if(a.params.length!==v){var y=a.start;"get"===a.kind?this.raise(y,"getter should have no params"):this.raise(y,"setter should have exactly one param")}}}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},ee.parseClassProperty=function(e){return this.match(L.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.finishNode(e,"ClassProperty")},ee.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},ee.parseClassId=function(e,t,r){this.match(L.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},ee.parseClassSuper=function(e){e.superClass=this.eat(L._extends)?this.parseExprSubscripts():null},ee.parseExport=function(e){if(this.next(),this.match(L.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(L.comma)&&this.lookahead().type===L.star){this.expect(L.comma);var n=this.startNode();this.expect(L.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(L._default)){var i=this.startNode(),s=!1;return this.eat(L._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(L._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.state.type.keyword||this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},ee.parseExportDeclaration=function(){return this.parseStatement(!0)},ee.isExportDefaultSpecifier=function(){if(this.match(L.name))return"type"!==this.state.value&&"async"!==this.state.value&&"interface"!==this.state.value;if(!this.match(L._default))return!1;var e=this.lookahead();return e.type===L.comma||e.type===L.name&&"from"===e.value},ee.parseExportSpecifiersMaybe=function(e){this.eat(L.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},ee.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(L.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},ee.shouldParseExportDeclaration=function(){return this.isContextual("async")},ee.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var n=e.specifiers,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type)for(var u=e.declaration.declarations,l=Array.isArray(u),c=0,u=l?u:u[Symbol.iterator]();;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;this.checkDeclaration(p.id)}if(this.state.decorators.length){var d=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&d||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},ee.checkDeclaration=function(e){if("ObjectPattern"===e.type)for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.checkDeclaration(s)}else if("ArrayPattern"===e.type)for(var a=e.elements,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},ee.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},ee.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},ee.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(L.braceL);!this.eat(L.braceR);){if(t)t=!1;else if(this.expect(L.comma),this.eat(L.braceR))break;var n=this.match(L._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},ee.parseImport=function(e){return this.next(),this.match(L.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(L.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},ee.parseImportSpecifiers=function(e){var t=!0;if(this.match(L.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(L.comma))return}if(this.match(L.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(L.braceL);!this.eat(L.braceR);){if(t)t=!1;else if(this.expect(L.comma),this.eat(L.braceR))break;var s=this.startNode();s.imported=this.parseIdentifier(!0),s.local=this.eatContextual("as")?this.parseIdentifier():s.imported.__clone(),this.checkLVal(s.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(s,"ImportSpecifier"))}},ee.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var ie=$.prototype;ie.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=e.properties,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var u="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,u)}return e},ie.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a<n;a++){var o=e[a];o&&this.toAssignable(o,t,r)}return e},ie.toReferencedList=function(e){return e},ie.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ie.parseRest=function(){var e=this.startNode();return this.next(),e.argument=this.parseBindingIdentifier(),this.finishNode(e,"RestElement")},ie.shouldAllowYieldIdentifier=function(){return this.match(L._yield)&&!this.state.strict&&!this.state.inGenerator},ie.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},ie.parseBindingAtom=function(){switch(this.state.type){case L._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case L.name:return this.parseIdentifier(!0);case L.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(L.bracketR,!0),this.finishNode(e,"ArrayPattern");case L.braceL:return this.parseObj(!0);default:this.unexpected()}},ie.parseBindingList=function(e,t){for(var r=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(L.comma),t&&this.match(L.comma))r.push(null);else{if(this.eat(e))break;if(this.match(L.ellipsis)){r.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var i=[];this.match(L.at);)i.push(this.parseDecorator());var s=this.parseMaybeDefault();i.length&&(s.decorators=i),this.parseAssignableListItemTypes(s),r.push(this.parseMaybeDefault(s.start,s.loc.start,s))}return r},ie.parseAssignableListItemTypes=function(e){return e},ie.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(L.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},ie.checkLVal=function(e,t,r,n){switch(e.type){case"Identifier":if(this.checkReservedWord(e.name,e.start,!1,!0),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var s=e.properties,a=Array.isArray(s),o=0,s=a?s:s[Symbol.iterator]();;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":for(var c=e.elements,f=Array.isArray(c),p=0,c=f?c:c[Symbol.iterator]();;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;h&&this.checkLVal(h,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var se=$.prototype;se.checkPropClash=function(e,t){if(!e.computed){var r=e.key,n=void 0;switch(r.type){case"Identifier":n=r.name;break;case"StringLiteral":case"NumericLiteral":n=String(r.value);break;default:return}"__proto__"!==n||e.kind||(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},se.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(L.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(L.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},se.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(L._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(L.parenL)||this.match(L.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(L.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},se.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},se.parseConditional=function(e,t,r,n){if(this.eat(L.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(L.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},se.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},se.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(L._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===L.logicalOR||o===L.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},se.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(L.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==L.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),
+this.next(),a=this.finishNode(o,"UpdateExpression")}return a},se.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},se.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(L.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(L.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(L.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(L.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(L.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(L.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(L.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(),e=this.finishNode(l,"TaggedTemplateExpression")}}},se.parseCallExpressionArguments=function(e,t){for(var r=void 0,n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(L.comma),this.eat(e))break;this.match(L.parenL)&&!r&&(r=this.state.start),n.push(this.parseExprListItem(void 0,t?{start:0}:void 0))}return t&&r&&this.shouldParseAsyncArrow()&&this.unexpected(),n},se.shouldParseAsyncArrow=function(){return this.match(L.arrow)},se.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(L.arrow),this.parseArrowExpression(e,t.arguments,!0)},se.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},se.parseExprAtom=function(e){var t=void 0,r=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case L._super:return this.state.inMethod||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),t=this.startNode(),this.next(),this.match(L.parenL)||this.match(L.bracketL)||this.match(L.dot)||this.unexpected(),this.match(L.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(t.start,"super() outside of class constructor"),this.finishNode(t,"Super");case L._import:return this.hasPlugin("dynamicImport")||this.unexpected(),t=this.startNode(),this.next(),this.match(L.parenL)||this.unexpected(null,L.parenL),this.finishNode(t,"Import");case L._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case L._yield:this.state.inGenerator&&this.unexpected();case L.name:t=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(t)}else{if("async"===s.name&&this.match(L._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(t,!1,!1,!0);if(r&&"async"===s.name&&this.match(L.name)){var a=[this.parseIdentifier()];return this.expect(L.arrow),this.parseArrowExpression(t,a,!0)}}return r&&!this.canInsertSemicolon()&&this.eat(L.arrow)?this.parseArrowExpression(t,[s]):s;case L._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case L.regexp:var c=this.state.value;return t=this.parseLiteral(c.value,"RegExpLiteral"),t.pattern=c.pattern,t.flags=c.flags,t;case L.num:return this.parseLiteral(this.state.value,"NumericLiteral");case L.string:return this.parseLiteral(this.state.value,"StringLiteral");case L._null:return t=this.startNode(),this.next(),this.finishNode(t,"NullLiteral");case L._true:case L._false:return t=this.startNode(),t.value=this.match(L._true),this.next(),this.finishNode(t,"BooleanLiteral");case L.parenL:return this.parseParenAndDistinguishExpression(null,null,r);case L.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(L.bracketR,!0,e),this.toReferencedList(t.elements),this.finishNode(t,"ArrayExpression");case L.braceL:return this.parseObj(!1,e);case L._function:return this.parseFunctionExpression();case L.at:this.parseDecorators();case L._class:return t=this.startNode(),this.takeDecorators(t),this.parseClass(t,!1);case L._new:return this.parseNew();case L.backQuote:return this.parseTemplate();case L.doubleColon:t=this.startNode(),this.next(),t.object=null;var f=t.callee=this.parseNoCallExpr();if("MemberExpression"===f.type)return this.finishNode(t,"BindExpression");this.raise(f.start,"Binding should be performed on object property.");default:this.unexpected()}},se.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(L.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},se.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},se.parseLiteral=function(e,t){var r=this.startNode();return this.addExtra(r,"rawValue",e),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),r.value=e,this.next(),this.finishNode(r,t)},se.parseParenExpression=function(){this.expect(L.parenL);var e=this.parseExpression();return this.expect(L.parenR),e},se.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(L.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o=!0,u={start:0},l=void 0,c=void 0,f={start:0};!this.match(L.parenR);){if(o)o=!1;else if(this.expect(L.comma,f.start||null),this.match(L.parenR)){c=this.state.start;break}if(this.match(L.ellipsis)){var p=this.state.start,d=this.state.startLoc;l=this.state.start,a.push(this.parseParenItem(this.parseRest(),d,p));break}a.push(this.parseMaybeAssign(!1,u,this.parseParenItem,f))}var h=this.state.start,m=this.state.startLoc;this.expect(L.parenR);var v=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(v=this.parseArrow(v))){for(var y=a,g=Array.isArray(y),b=0,y=g?y:y[Symbol.iterator]();;){var E;if(g){if(b>=y.length)break;E=y[b++]}else{if(b=y.next(),b.done)break;E=b.value}var x=E;x.extra&&x.extra.parenthesized&&this.unexpected(x.extra.parenStart)}return this.parseArrowExpression(v,a)}return a.length||this.unexpected(this.state.lastTokStart),c&&this.unexpected(c),l&&this.unexpected(l),u.start&&this.unexpected(u.start),f.start&&this.unexpected(f.start),a.length>1?(n=this.startNodeAt(i,s),n.expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",h,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},se.shouldParseArrow=function(){return!this.canInsertSemicolon()},se.parseArrow=function(e){if(this.eat(L.arrow))return e},se.parseParenItem=function(e){return e},se.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.eat(L.dot)?this.parseMetaProperty(e,t,"target"):(e.callee=this.parseNoCallExpr(),this.eat(L.parenL)?(e.arguments=this.parseExprList(L.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression"))},se.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(L.backQuote),this.finishNode(e,"TemplateElement")},se.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(L.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(L.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},se.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(L.braceR);){if(i)i=!1;else if(this.expect(L.comma),this.eat(L.braceR))break;for(;this.match(L.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,f=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(L.ellipsis)){if(o=this.parseSpread(),o.type=e?"RestProperty":"SpreadProperty",s.properties.push(o),!e)continue;var p=this.state.start;if(null===a){if(this.eat(L.braceR))break;if(this.match(L.comma)&&this.lookahead().type===L.braceR)continue;a=p;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,f=this.state.startLoc),e||(u=this.eat(L.star)),!e&&this.isContextual("async")){u&&this.unexpected();var d=this.parseIdentifier();this.match(L.colon)||this.match(L.parenL)||this.match(L.braceR)||this.match(L.eq)||this.match(L.comma)?o.key=d:(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(L.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,f,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},se.parseObjPropValue=function(e,t,r,n,i,s,a){if(i||n||this.match(L.parenL))return s&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,n,i),this.finishNode(e,"ObjectMethod");if(this.eat(L.colon))return e.value=s?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,a),this.finishNode(e,"ObjectProperty");if(!(s||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.match(L.comma)||this.match(L.braceR))){(n||i)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e,!1);var o="get"===e.kind?0:1;if(e.params.length!==o){var u=e.start;"get"===e.kind?this.raise(u,"getter should have no params"):this.raise(u,"setter should have exactly one param")}return this.finishNode(e,"ObjectMethod")}return e.computed||"Identifier"!==e.key.type?void this.unexpected():(s?(this.checkReservedWord(e.key.name,e.key.start,!0,!0),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):this.match(L.eq)&&a?(a.start||(a.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},se.parsePropertyName=function(e){return this.eat(L.bracketL)?(e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(L.bracketR),e.key):(e.computed=!1,e.key=this.match(L.num)||this.match(L.string)?this.parseExprAtom():this.parseIdentifier(!0))},se.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},se.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(L.parenL),e.params=this.parseBindingList(L.parenR),e.generator=t,this.parseFunctionBody(e),this.state.inMethod=n,e},se.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},se.parseFunctionBody=function(e,t){var r=t&&!this.match(L.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.state.strict,u=!1;if(t&&(o=!0),!r&&e.body.directives.length)for(var l=e.body.directives,c=Array.isArray(l),f=0,l=c?l:l[Symbol.iterator]();;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;if("use strict"===d.value.value){u=!0,o=!0;break}}if(u&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),o){var h=Object.create(null),m=this.state.strict;u&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");for(var v=e.params,y=Array.isArray(v),g=0,v=y?v:v[Symbol.iterator]();;){var b;if(y){if(g>=v.length)break;b=v[g++]}else{if(g=v.next(),g.done)break;b=g.value}var E=b;u&&"Identifier"!==E.type&&this.raise(E.start,"Non-simple parameter in strict mode"),this.checkLVal(E,!0,h,"function parameter list")}this.state.strict=m}},se.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(L.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},se.parseExprListItem=function(e,t){var r=void 0;return r=e&&this.match(L.comma)?null:this.match(L.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem)},se.parseIdentifier=function(e){var t=this.startNode();return this.match(L.name)?(e||this.checkReservedWord(this.state.value,this.state.start,!1,!1),t.name=this.state.value):e&&this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},se.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(C.strict(e)||n&&C.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},se.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(L.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},se.parseYield=function(){var e=this.startNode();return this.next(),this.match(L.semi)||this.canInsertSemicolon()||!this.match(L.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(L.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var ae=$.prototype,oe=["leadingComments","trailingComments","innerComments"],ue=function(){function e(t,r,n){E(this,e),this.type="",this.start=t,this.end=0,this.loc=new K(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)oe.indexOf(r)<0&&(t[r]=this[r]);return t},e}();ae.startNode=function(){return new ue(this.state.start,this.state.startLoc,this.filename)},ae.startNodeAt=function(e,t){return new ue(e,t,this.filename)},ae.finishNode=function(e,t){return x.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},ae.finishNodeAt=function(e,t,r,n){return x.call(this,e,t,r,n)};var le=$.prototype;le.raise=function(e,t){var r=d(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw (n.pos=e, n.loc=r, n)};var ce=$.prototype;ce.addComment=function(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)},ce.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(n=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var a=A(t);t.length>0&&a.trailingComments&&a.trailingComments[0].start>=e.end&&(n=a.trailingComments,a.trailingComments=null)}for(;t.length>0&&A(t).start>=e.start;)r=t.pop();if(r){if(r.leadingComments)if(r!==e&&A(r.leadingComments).end<=e.start)e.leadingComments=r.leadingComments,r.leadingComments=null;else for(i=r.leadingComments.length-2;i>=0;--i)if(r.leadingComments[i].end<=e.start){e.leadingComments=r.leadingComments.splice(0,i+1);break}}else if(this.state.leadingComments.length>0)if(A(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(s=0;s<this.state.leadingComments.length;s++)this.state.leadingComments[s].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(s,1),s--);this.state.leadingComments.length>0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(i=0;i<this.state.leadingComments.length&&!(this.state.leadingComments[i].end>e.start);i++);e.leadingComments=this.state.leadingComments.slice(0,i),0===e.leadingComments.length&&(e.leadingComments=null),n=this.state.leadingComments.slice(i),0===n.length&&(n=null)}this.state.commentPreviousNode=e,n&&(n.length&&n[0].start>=e.start&&A(n).end<=e.end?e.innerComments=n:e.trailingComments=n),t.push(e)}};var fe=$.prototype;fe.flowParseTypeInitialiser=function(e,t){var r=this.state.inType;this.state.inType=!0,this.expect(e||L.colon),t&&(this.match(L.bitwiseAND)||this.match(L.bitwiseOR))&&this.next();var n=this.flowParseType();return this.state.inType=r,n},fe.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},fe.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(L.parenL);var i=this.flowParseFunctionTypeParams();return r.params=i.params,r.rest=i.rest,this.expect(L.parenR),r.returnType=this.flowParseTypeInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},fe.flowParseDeclare=function(e){return this.match(L._class)?this.flowParseDeclareClass(e):this.match(L._function)?this.flowParseDeclareFunction(e):this.match(L._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===L.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):void this.unexpected()},fe.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},fe.flowParseDeclareModule=function(e){this.next(),this.match(L.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(L.braceL);!this.match(L.braceR);){var n=this.startNode();this.expectContextual("declare","Unexpected token. Only declares are allowed inside declare module"),r.push(this.flowParseDeclare(n))}return this.expect(L.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},fe.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(L.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},fe.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},fe.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},fe.flowParseInterfaceish=function(e,t){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(L._extends))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(L.comma));if(this.isContextual("mixins")){this.next();do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(L.comma))}e.body=this.flowParseObjectType(t)},fe.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},fe.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},fe.flowParseTypeAlias=function(e){return e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(L.eq,!0),this.semicolon(),this.finishNode(e,"TypeAlias")},fe.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(L.eq)&&(this.eat(L.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},fe.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(L.jsxTagStart)?this.next():this.unexpected();do t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(L.comma);while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},fe.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(L.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},fe.flowParseObjectPropertyKey=function(){return this.match(L.num)||this.match(L.string)?this.parseExprAtom():this.parseIdentifier(!0)},fe.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(L.bracketL),this.lookahead().type===L.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(L.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},fe.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(L.parenL);this.match(L.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(L.parenR)||this.expect(L.comma);return this.eat(L.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(L.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},fe.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},fe.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},fe.flowParseObjectType=function(e,t){var r=this.state.inType;this.state.inType=!0;var n=this.startNode(),i=void 0,s=void 0,a=!1;n.callProperties=[],n.properties=[],n.indexers=[];var o=void 0,u=void 0;for(t&&this.match(L.braceBarL)?(this.expect(L.braceBarL),o=L.braceBarR,u=!0):(this.expect(L.braceL),o=L.braceR,u=!1),n.exact=u;!this.match(o);){var l=!1,c=this.state.start,f=this.state.startLoc;i=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==L.colon&&(this.next(),a=!0);var p=this.state.start,d=this.flowParseVariance();this.match(L.bracketL)?n.indexers.push(this.flowParseObjectTypeIndexer(i,a,d)):this.match(L.parenL)||this.isRelational("<")?(d&&this.unexpected(p),n.callProperties.push(this.flowParseObjectTypeCallProperty(i,e))):(s=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(L.parenL)?(d&&this.unexpected(p),n.properties.push(this.flowParseObjectTypeMethod(c,f,a,s))):(this.eat(L.question)&&(l=!0),i.key=s,i.value=this.flowParseTypeInitialiser(),i.optional=l,i.static=a,i.variance=d,this.flowObjectTypeSemicolon(),n.properties.push(this.finishNode(i,"ObjectTypeProperty")))),a=!1}this.expect(o);var h=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=r,h},fe.flowObjectTypeSemicolon=function(){this.eat(L.semi)||this.eat(L.comma)||this.match(L.braceR)||this.match(L.braceBarR)||this.unexpected()},fe.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(L.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},fe.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},fe.flowParseTypeofType=function(){var e=this.startNode();return this.expect(L._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},fe.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(L.bracketL);this.state.pos<this.input.length&&!this.match(L.bracketR)&&(e.types.push(this.flowParseType()),!this.match(L.bracketR));)this.expect(L.comma);return this.expect(L.bracketR),this.finishNode(e,"TupleTypeAnnotation")},fe.flowParseFunctionTypeParam=function(){var e=null,t=!1,r=null,n=this.startNode(),i=this.lookahead();return i.type===L.colon||i.type===L.question?(e=this.parseIdentifier(),this.eat(L.question)&&(t=!0),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),n.name=e,n.optional=t,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")},fe.reinterpretTypeAsFunctionTypeParam=function(e){var t=this.startNodeAt(e.start,e.loc);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")},fe.flowParseFunctionTypeParams=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={params:e,rest:null};this.match(L.name);)t.params.push(this.flowParseFunctionTypeParam()),this.match(L.parenR)||this.expect(L.comma);return this.eat(L.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),t},fe.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},fe.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case L.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case L.braceL:return this.flowParseObjectType(!1,!1);case L.braceBarL:return this.flowParseObjectType(!1,!0);case L.bracketL:return this.flowParseTupleType();case L.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(L.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(L.parenR),this.expect(L.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case L.parenL:if(this.next(),!this.match(L.parenR)&&!this.match(L.ellipsis))if(this.match(L.name)){var o=this.lookahead().type;s=o!==L.question&&o!==L.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(L.comma)||this.match(L.parenR)&&this.lookahead().type===L.arrow))return this.expect(L.parenR),i;this.eat(L.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(L.parenR),this.expect(L.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case L.string:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"StringLiteralTypeAnnotation");case L._true:case L._false:return r.value=this.match(L._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case L.plusMin:if("-"===this.state.value)return this.next(),this.match(L.num)||this.unexpected(),r.value=-this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"NumericLiteralTypeAnnotation");case L.num:return r.value=this.state.value,this.addExtra(r,"rawValue",r.value),this.addExtra(r,"raw",this.input.slice(this.state.start,this.state.end)),this.next(),this.finishNode(r,"NumericLiteralTypeAnnotation");case L._null:return r.value=this.match(L._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case L._this:return r.value=this.match(L._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case L.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},fe.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(L.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(L.bracketL),this.expect(L.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},fe.flowParsePrefixType=function(){var e=this.startNode();return this.eat(L.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},fe.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(L.arrow)){var t=this.startNodeAt(e.start,e.loc);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},fe.flowParseIntersectionType=function(){var e=this.startNode(),t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(L.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},fe.flowParseUnionType=function(){var e=this.startNode(),t=this.flowParseIntersectionType();for(e.types=[t];this.eat(L.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},fe.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},fe.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},fe.flowParseTypeAnnotatableIdentifier=function(){var e=this.parseIdentifier();return this.match(L.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},fe.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,
+this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},fe.flowParseVariance=function(){var e=null;return this.match(L.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var pe=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(L.colon)&&!r&&(t.returnType=this.flowParseTypeAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(L.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(L._class)||this.match(L.name)||this.match(L._function)||this.match(L._var))return this.flowParseDeclare(t)}else if(this.match(L.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(L.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(L.question)&&(t.optional=!0),this.match(L.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(L.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("interface")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("parsePropertyName",function(e){return function(t){var r=this.state.inType;this.state.inType=!0;var n=e.call(this,t);return this.state.inType=r,n}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(L.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i<t.length;i++){var s=t[i];s&&"TypeCastExpression"===s.type&&(t[i]=this.typeCastToParameter(s))}return e.call(this,t,r,n)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(t,r){var n=this.startNode(),i=e.call(this,t,r);return this.match(L.colon)?(n._exprListItem=!0,n.expression=i,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")):i}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return delete t.variancePos,this.match(L.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassProperty",function(e){return function(){return this.match(L.colon)||e.call(this)}}),e.extend("parseClassMethod",function(){return function(e,t,r,n){t.variance&&this.unexpected(t.variancePos),delete t.variance,delete t.variancePos,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var n=t.implements=[];do{var i=this.startNode();i.id=this.parseIdentifier(),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(L.comma))}}}),e.extend("parsePropertyName",function(e){return function(t){var r=this.state.start,n=this.flowParseVariance(),i=e.call(this,t);return t.variance=n,t.variancePos=r,i}}),e.extend("parseObjPropValue",function(e){return function(t){t.variance&&this.unexpected(t.variancePos),delete t.variance,delete t.variancePos;var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(L.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(L.question)&&(e.optional=!0),this.match(L.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseMaybeDefault",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.apply(this,r);return"AssignmentPattern"===i.type&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(i.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),i}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(L._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var n=this.lookahead();(n.type===L.name&&"from"!==n.value||n.type===L.braceL||n.type===L.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(L.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){if(this.match(L.colon)){var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=n}return e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(L.colon)||e.call(this)}}),e.extend("parseMaybeAssign",function(e){return function(){for(var t=null,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];if(L.jsxTagStart&&this.match(L.jsxTagStart)){var s=this.state.clone();try{return e.apply(this,n)}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=s,t=e}}if(this.state.context.push(Y.parenExpression),null!=t||this.isRelational("<")){var a=void 0,o=void 0;try{o=this.flowParseTypeParameterDeclaration(),a=e.apply(this,n),a.typeParameters=o,a.start=o.start,a.loc.start=o.loc.start}catch(e){throw t||e}if("ArrowFunctionExpression"===a.type)return a;if(null!=t)throw t;this.raise(o.start,"Expected an arrow function after this type parameter declaration")}return this.state.context.pop(),e.apply(this,n)}}),e.extend("parseArrow",function(e){return function(t){if(this.match(L.colon)){var r=this.state.clone();try{var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;var i=this.flowParseTypeAnnotation();this.state.noAnonFunctionType=n,this.canInsertSemicolon()&&this.unexpected(),this.match(L.arrow)||this.unexpected(),t.returnType=i}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=r}}return e.call(this,t)}}),e.extend("shouldParseArrow",function(e){return function(){return this.match(L.colon)||e.call(this)}}),e.extend("isClassMutatorStarter",function(e){return function(){return!!this.isRelational("<")||e.call(this)}})},de={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},he=/^[\da-fA-F]+$/,me=/^\d+$/;Y.j_oTag=new W("<tag",(!1)),Y.j_cTag=new W("</tag",(!1)),Y.j_expr=new W("<tag>...</tag>",(!0),(!0)),L.jsxName=new I("jsxName"),L.jsxText=new I("jsxText",{beforeExpr:!0}),L.jsxTagStart=new I("jsxTagStart",{startsExpr:!0}),L.jsxTagEnd=new I("jsxTagEnd"),L.jsxTagStart.updateContext=function(){this.state.context.push(Y.j_expr),this.state.context.push(Y.j_oTag),this.state.exprAllowed=!1},L.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===Y.j_oTag&&e===L.slash||t===Y.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===Y.j_expr):this.state.exprAllowed=!0};var ve=$.prototype;ve.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(L.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(L.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:c(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},ve.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},ve.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):c(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(L.string,t)},ve.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos<this.input.length&&t++<10;){if(n=this.input[this.state.pos++],";"===n){"#"===e[0]?"x"===e[1]?(e=e.substr(2),he.test(e)&&(r=String.fromCharCode(parseInt(e,16)))):(e=e.substr(1),me.test(e)&&(r=String.fromCharCode(parseInt(e,10)))):r=de[e];break}e+=n}return r?r:(this.state.pos=i,"&")},ve.jsxReadWord=function(){var e=void 0,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(s(e)||45===e);return this.finishToken(L.jsxName,this.input.slice(t,this.state.pos))},ve.jsxParseIdentifier=function(){var e=this.startNode();return this.match(L.jsxName)?e.name=this.state.value:this.state.type.keyword?e.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")},ve.jsxParseNamespacedName=function(){var e=this.state.start,t=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(L.colon))return r;var n=this.startNodeAt(e,t);return n.namespace=r,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")},ve.jsxParseElementName=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.jsxParseNamespacedName();this.eat(L.dot);){var n=this.startNodeAt(e,t);n.object=r,n.property=this.jsxParseIdentifier(),r=this.finishNode(n,"JSXMemberExpression")}return r},ve.jsxParseAttributeValue=function(){var e=void 0;switch(this.state.type){case L.braceL:if(e=this.jsxParseExpressionContainer(),"JSXEmptyExpression"!==e.expression.type)return e;this.raise(e.start,"JSX attributes must only be assigned a non-empty expression");case L.jsxTagStart:case L.string:return e=this.parseExprAtom(),e.extra=null,e;default:this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},ve.jsxParseEmptyExpression=function(){var e=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.start,this.startLoc)},ve.jsxParseSpreadChild=function(){var e=this.startNode();return this.expect(L.braceL),this.expect(L.ellipsis),e.expression=this.parseExpression(),this.expect(L.braceR),this.finishNode(e,"JSXSpreadChild")},ve.jsxParseExpressionContainer=function(){var e=this.startNode();return this.next(),this.match(L.braceR)?e.expression=this.jsxParseEmptyExpression():e.expression=this.parseExpression(),this.expect(L.braceR),this.finishNode(e,"JSXExpressionContainer")},ve.jsxParseAttribute=function(){var e=this.startNode();return this.eat(L.braceL)?(this.expect(L.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(L.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(L.eq)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))},ve.jsxParseOpeningElementAt=function(e,t){var r=this.startNodeAt(e,t);for(r.attributes=[],r.name=this.jsxParseElementName();!this.match(L.slash)&&!this.match(L.jsxTagEnd);)r.attributes.push(this.jsxParseAttribute());return r.selfClosing=this.eat(L.slash),this.expect(L.jsxTagEnd),this.finishNode(r,"JSXOpeningElement")},ve.jsxParseClosingElementAt=function(e,t){var r=this.startNodeAt(e,t);return r.name=this.jsxParseElementName(),this.expect(L.jsxTagEnd),this.finishNode(r,"JSXClosingElement")},ve.jsxParseElementAt=function(e,t){var r=this.startNodeAt(e,t),n=[],i=this.jsxParseOpeningElementAt(e,t),s=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case L.jsxTagStart:if(e=this.state.start,t=this.state.startLoc,this.next(),this.eat(L.slash)){s=this.jsxParseClosingElementAt(e,t);break e}n.push(this.jsxParseElementAt(e,t));break;case L.jsxText:n.push(this.parseExprAtom());break;case L.braceL:this.lookahead().type===L.ellipsis?n.push(this.jsxParseSpreadChild()):n.push(this.jsxParseExpressionContainer());break;default:this.unexpected()}S(s.name)!==S(i.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+S(i.name)+">")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(L.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},ve.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};var ye=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(L.jsxText)){var r=this.parseLiteral(this.state.value,"JSXText");return r.extra=null,r}return this.match(L.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){var r=this.curContext();if(r===Y.j_expr)return this.jsxReadToken();if(r===Y.j_oTag||r===Y.j_cTag){if(i(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(L.jsxTagEnd);if((34===t||39===t)&&r===Y.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(L.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(L.braceL)){var r=this.curContext();r===Y.j_oTag?this.state.context.push(Y.braceExpression):r===Y.j_expr?this.state.context.push(Y.templateQuasi):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(L.slash)||t!==L.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(Y.j_cTag),this.state.exprAllowed=!1}}})};z.flow=pe,z.jsx=ye,t.parse=_,t.tokTypes=L},function(e,t){"use strict";e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){"use strict";var n=r(54),i=r(142),s=r(96),a=r(151),o=r(416);e.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,f=6==e,p=5==e||f,d=t||o;return function(t,o,h){for(var m,v,y=s(t),g=i(y),b=n(o,h,3),E=a(g.length),x=0,A=r?d(t,E):u?d(t,0):void 0;E>x;x++)if((p||x in g)&&(m=g[x],v=b(m,x,y),e))if(r)A[x]=v;else if(v)switch(e){case 3:return!0;case 5:return m;case 6:return x;case 2:A.push(m)}else if(c)return!1;return f?-1:l||c?c:A}}},function(e,t){"use strict";var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){"use strict";var n=r(14),i=r(23),s=r(56),a=r(36),o=r(30),u=r(146),l=r(91),c=r(137),f=r(24),p=r(95),d=r(25).f,h=r(138)(0),m=r(22);e.exports=function(e,t,r,v,y,g){var b=n[e],E=b,x=y?"set":"add",A=E&&E.prototype,S={};return m&&"function"==typeof E&&(g||A.forEach&&!a(function(){(new E).entries().next()}))?(E=t(function(t,r){c(t,E,e,"_c"),t._c=new b,void 0!=r&&l(r,y,t[x],t)}),h("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!g||"clear"!=e)&&o(E.prototype,e,function(r,n){if(c(this,E,e),!t&&g&&!f(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),"size"in A&&d(E.prototype,"size",{get:function(){return this._c.size}})):(E=v.getConstructor(t,e,y,x),u(E.prototype,r),s.NEED=!0),p(E,e),S[e]=E,i(i.G+i.W+i.F,S),g||v.setStrong(E,e,y),E}},function(e,t){"use strict";e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){"use strict";var n=r(139);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){"use strict";var n=r(144),i=r(23),s=r(147),a=r(30),o=r(29),u=r(55),l=r(423),c=r(95),f=r(427),p=r(11)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",y=function(){return this};e.exports=function(e,t,r,g,b,E,x){l(r,t,g);var A,S,_,D=function(e){if(!d&&e in k)return k[e];switch(e){case m:return function(){return new r(this,e)};case v:return function(){return new r(this,e)}}return function(){return new r(this,e)}},C=t+" Iterator",w=b==v,F=!1,k=e.prototype,P=k[p]||k[h]||b&&k[b],T=P||D(b),O=b?w?D("entries"):T:void 0,B="Array"==t?k.entries||P:P;if(B&&(_=f(B.call(new e)),_!==Object.prototype&&(c(_,C,!0),n||o(_,p)||a(_,p,y))),w&&P&&P.name!==v&&(F=!0,T=function(){return P.call(this)}),n&&!x||!d&&!F&&k[p]||a(k,p,T),u[t]=T,u[C]=y,b)if(A={values:w?T:D(v),keys:E?T:D(m),entries:O},x)for(S in A)S in k||s(k,S,A[S]);else i(i.P+i.F*(d||F),t,A);return A}},function(e,t){"use strict";e.exports=!0},function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,r){"use strict";var n=r(30);e.exports=function(e,t,r){for(var i in t)r&&e[i]?e[i]=t[i]:n(e,i,t[i]);return e}},function(e,t,r){"use strict";e.exports=r(30)},function(e,t,r){"use strict";var n=r(149)("keys"),i=r(97);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t,r){"use strict";var n=r(14),i="__core-js_shared__",s=n[i]||(n[i]={});e.exports=function(e){return s[e]||(s[e]={})}},function(e,t){"use strict";var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){"use strict";var n=r(150),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){"use strict";var n=r(24);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){"use strict";var n=r(14),i=r(5),s=r(144),a=r(154),o=r(25).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=s?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},function(e,t,r){"use strict";t.f=r(11)},function(e,t,r){"use strict";var n=r(431)(!0);r(143)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(14),s=r(29),a=r(22),o=r(23),u=r(147),l=r(56).KEY,c=r(36),f=r(149),p=r(95),d=r(97),h=r(11),m=r(154),v=r(153),y=r(424),g=r(419),b=r(229),E=r(21),x=r(37),A=r(152),S=r(94),_=r(92),D=r(426),C=r(232),w=r(25),F=r(43),k=C.f,P=w.f,T=D.f,O=i.Symbol,B=i.JSON,R=B&&B.stringify,I="prototype",M=h("_hidden"),N=h("toPrimitive"),L={}.propertyIsEnumerable,j=f("symbol-registry"),U=f("symbols"),V=f("op-symbols"),G=Object[I],W="function"==typeof O,Y=i.QObject,q=!Y||!Y[I]||!Y[I].findChild,K=a&&c(function(){return 7!=_(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=k(G,t);n&&delete G[t],P(e,t,r),n&&e!==G&&P(G,t,n)}:P,H=function(e){var t=U[e]=_(O[I]);return t._k=e,t},J=W&&"symbol"==n(O.iterator)?function(e){return"symbol"==("undefined"==typeof e?"undefined":n(e))}:function(e){return e instanceof O},X=function(e,t,r){return e===G&&X(V,t,r),E(e),t=A(t,!0),E(r),s(U,t)?(r.enumerable?(s(e,M)&&e[M][t]&&(e[M][t]=!1),r=_(r,{enumerable:S(0,!1)})):(s(e,M)||P(e,M,S(1,{})),e[M][t]=!0),K(e,t,r)):P(e,t,r)},z=function(e,t){E(e);for(var r,n=g(t=x(t)),i=0,s=n.length;s>i;)X(e,r=n[i++],t[r]);return e},$=function(e,t){return void 0===t?_(e):z(_(e),t)},Q=function(e){var t=L.call(this,e=A(e,!0));return!(this===G&&s(U,e)&&!s(V,e))&&(!(t||!s(this,e)||!s(U,e)||s(this,M)&&this[M][e])||t)},Z=function(e,t){if(e=x(e),t=A(t,!0),e!==G||!s(U,t)||s(V,t)){var r=k(e,t);return!r||!s(U,t)||s(e,M)&&e[M][t]||(r.enumerable=!0),r}},ee=function(e){for(var t,r=T(x(e)),n=[],i=0;r.length>i;)s(U,t=r[i++])||t==M||t==l||n.push(t);return n},te=function(e){for(var t,r=e===G,n=T(r?V:x(e)),i=[],a=0;n.length>a;)!s(U,t=n[a++])||r&&!s(G,t)||i.push(U[t]);return i};W||(O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function t(r){this===G&&t.call(V,r),s(this,M)&&s(this[M],e)&&(this[M][e]=!1),K(this,e,S(1,r))};return a&&q&&K(G,e,{configurable:!0,set:t}),H(e)},u(O[I],"toString",function(){return this._k}),C.f=Z,w.f=X,r(233).f=D.f=ee,r(93).f=Q,r(145).f=te,a&&!r(144)&&u(G,"propertyIsEnumerable",Q,!0),m.f=function(e){return H(h(e))}),o(o.G+o.W+o.F*!W,{Symbol:O});for(var re="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;re.length>ne;)h(re[ne++]);for(var re=F(h.store),ne=0;re.length>ne;)v(re[ne++]);o(o.S+o.F*!W,"Symbol",{for:function(e){return s(j,e+="")?j[e]:j[e]=O(e)},keyFor:function(e){if(J(e))return y(j,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){q=!0},useSimple:function(){q=!1}}),o(o.S+o.F*!W,"Object",{create:$,defineProperty:X,defineProperties:z,getOwnPropertyDescriptor:Z,getOwnPropertyNames:ee,getOwnPropertySymbols:te}),B&&o(o.S+o.F*(!W||c(function(){var e=O();return"[null]"!=R([e])||"{}"!=R({a:e})||"{}"!=R(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!J(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return t=n[1],"function"==typeof t&&(r=t),!r&&b(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!J(t))return t}),n[1]=t,R.apply(B,n)}}}),O[I][N]||r(30)(O[I],N,O[I].valueOf),p(O,"Symbol"),p(Math,"Math",!0),p(i.JSON,"JSON",!0)},function(e,t,r){"use strict";!function(){t.ast=r(449),t.code=r(237),t.keyword=r(450)}()},function(e,t,r){"use strict";var n=r(38),i=r(16),s=n(i,"Map");e.exports=s},function(e,t,r){"use strict";function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=r(543),s=r(544),a=r(545),o=r(546),u=r(547);n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,e.exports=n},function(e,t){"use strict";function r(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}e.exports=r},function(e,t,r){"use strict";function n(e,t,r){var n=e[t];o.call(e,t)&&s(n,r)&&(void 0!==r||t in e)||i(e,t,r)}var i=r(162),s=r(45),a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var i=r(257);e.exports=n},function(e,t,r){"use strict";function n(e,t,r,w,F,k){var P,B=t&S,R=t&_,M=t&D;if(r&&(P=F?r(e,w,F,k):r(e)),void 0!==P)return P;if(!x(e))return e;var N=b(e);if(N){if(P=v(e),!B)return c(e,P)}else{var L=m(e),j=L==T||L==O;if(E(e))return l(e,B);if(L==I||L==C||j&&!F){if(P=R||j?{}:g(e),!B)return R?p(e,u(P,e)):f(e,o(P,e))}else{if(!Q[L])return F?e:{};P=y(e,L,n,B)}}k||(k=new i);var U=k.get(e);if(U)return U;k.set(e,P);var V=M?R?h:d:R?keysIn:A,G=N?void 0:V(e);return s(G||e,function(i,s){G&&(s=i,i=e[s]),a(P,s,n(i,t,r,s,e,k))}),P}var i=r(100),s=r(242),a=r(161),o=r(471),u=r(472),l=r(254),c=r(167),f=r(514),p=r(515),d=r(522),h=r(523),m=r(261),v=r(533),y=r(534),g=r(263),b=r(6),E=r(115),x=r(12),A=r(27),S=1,_=2,D=4,C="[object Arguments]",w="[object Array]",F="[object Boolean]",k="[object Date]",P="[object Error]",T="[object Function]",O="[object GeneratorFunction]",B="[object Map]",R="[object Number]",I="[object Object]",M="[object RegExp]",N="[object Set]",L="[object String]",j="[object Symbol]",U="[object WeakMap]",V="[object ArrayBuffer]",G="[object DataView]",W="[object Float32Array]",Y="[object Float64Array]",q="[object Int8Array]",K="[object Int16Array]",H="[object Int32Array]",J="[object Uint8Array]",X="[object Uint8ClampedArray]",z="[object Uint16Array]",$="[object Uint32Array]",Q={};Q[C]=Q[w]=Q[V]=Q[G]=Q[F]=Q[k]=Q[W]=Q[Y]=Q[q]=Q[K]=Q[H]=Q[B]=Q[R]=Q[I]=Q[M]=Q[N]=Q[L]=Q[j]=Q[J]=Q[X]=Q[z]=Q[$]=!0,Q[P]=Q[T]=Q[U]=!1,e.exports=n},function(e,t){"use strict";function r(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}e.exports=r},function(e,t,r){"use strict";function n(e){if("string"==typeof e)return e;if(a(e))return s(e,n)+"";if(o(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=r(44),s=r(58),a=r(6),o=r(61),u=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;e.exports=n},function(e,t,r){"use strict";function n(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}var i=r(240);e.exports=n},function(e,t){"use strict";function r(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}e.exports=r},function(e,t,r){"use strict";var n=r(173),i=n(Object.getPrototypeOf,Object);e.exports=i},function(e,t,r){"use strict";var n=r(173),i=r(277),s=Object.getOwnPropertySymbols,a=s?n(s,Object):i;e.exports=a},function(e,t){"use strict";function r(e,t){return t=null==t?n:t,!!t&&("number"==typeof e||i.test(e))&&e>-1&&e%1==0&&e<t}var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;e.exports=r},function(e,t,r){"use strict";function n(e,t,r){if(!u(r))return!1;var n="undefined"==typeof t?"undefined":i(t);return!!("number"==n?a(r)&&o(t,r.length):"string"==n&&t in r)&&s(r[t],e)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(45),a=r(26),o=r(170),u=r(12);e.exports=n},function(e,t,r){"use strict";function n(e,t){if(s(e))return!1;var r="undefined"==typeof e?"undefined":i(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!a(e))||(u.test(e)||!o.test(e)||null!=t&&e in Object(t))}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(6),a=r(61),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;e.exports=n},function(e,t){"use strict";function r(e,t){return function(r){return e(t(r))}}e.exports=r},function(e,t,r){"use strict";var n=r(161),i=r(31),s=r(105),a=r(26),o=r(107),u=r(27),l=Object.prototype,c=l.hasOwnProperty,f=s(function(e,t){if(o(t)||a(t))return void i(t,u(t),e);for(var r in t)c.call(t,r)&&n(e,r,t[r])});e.exports=f},function(e,t){"use strict";function r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=r},function(e,t,r){"use strict";function n(e){return"string"==typeof e||!s(e)&&a(e)&&i(e)==o}var i=r(15),s=r(6),a=r(13),o="[object String]";e.exports=n},function(e,t,r){"use strict";var n=r(486),i=r(104),s=r(267),a=s&&s.isTypedArray,o=a?i(a):n;e.exports=o},function(e,t,r){function n(e){return r(i(e))}function i(e){return s[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var s={"./index":49,"./index.js":49,"./logger":121,"./logger.js":121,"./metadata":122,"./metadata.js":122,"./options/build-config-chain":50,"./options/build-config-chain.js":50,"./options/config":32,"./options/config.js":32,"./options/index":51,"./options/index.js":51,"./options/option-manager":33,"./options/option-manager.js":33,"./options/parsers":52,"./options/parsers.js":52,"./options/removed":53,"./options/removed.js":53};n.keys=function(){return Object.keys(s)},n.resolve=i,e.exports=n,n.id=178},function(e,t,r){function n(e){return r(i(e))}function i(e){return s[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}
+var s={"./build-config-chain":50,"./build-config-chain.js":50,"./config":32,"./config.js":32,"./index":51,"./index.js":51,"./option-manager":33,"./option-manager.js":33,"./parsers":52,"./parsers.js":52,"./removed":53,"./removed.js":53};n.keys=function(){return Object.keys(s)},n.resolve=i,e.exports=n,n.id=179},function(e,t){"use strict";e.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}function s(e){var t=e.slice(-2),r=t[0],n=t[1],i=u.default.matchToToken(e);if("name"===i.type){if(c.default.keyword.isReservedWordES6(i.value))return"keyword";if(h.test(i.value)&&("<"===n[r-1]||"</"==n.substr(r-2,2)))return"jsx_tag";if(i.value[0]!==i.value[0].toLowerCase())return"capitalized"}return"punctuator"===i.type&&m.test(i.value)?"bracket":i.type}function a(e,t){return t.replace(u.default,function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=s(r),a=e[i];return a?r[0].split(d).map(function(e){return a(e)}).join("\n"):r[0]})}t.__esModule=!0,t.default=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&p.default.supportsColor||n.forceColor,o=p.default;n.forceColor&&(o=new p.default.constructor({enabled:!0}));var u=function(e,t){return s?e(t):t},l=i(o);s&&(e=a(l,e));var c=n.linesAbove||2,f=n.linesBelow||3,h=e.split(d),m=Math.max(t-(c+1),0),v=Math.min(h.length,t+f);t||r||(m=0,v=h.length);var y=String(v).length,g=h.slice(m,v).map(function(e,n){var i=m+1+n,s=(" "+i).slice(-y),a=" "+s+" | ";if(i===t){var o="";if(r){var c=e.slice(0,r-1).replace(/[^\t]/g," ");o=["\n ",u(l.gutter,a.replace(/\d/g," ")),c,u(l.marker,"^")].join("")}return[u(l.marker,">"),u(l.gutter,a),e,o].join("")}return" "+u(l.gutter,a)+e}).join("\n");return s?o.reset(g):g};var o=r(456),u=n(o),l=r(157),c=n(l),f=r(394),p=n(f),d=/\r\n|[\n\r\u2028\u2029]/,h=/^[a-z][\w-]*$/i,m=/^[()\[\]{}]$/;e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){throw new Error("The ("+e+") Babel 5 plugin is being run with Babel 6.")}function a(e,t,r){(0,h.default)(t)&&(r=t,t={}),t.filename=e,v.default.readFile(e,function(e,n){var i=void 0;if(!e)try{i=P(n,t)}catch(t){e=t}e?r(e):r(null,i)})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,P(v.default.readFileSync(e,"utf8"),t)}t.__esModule=!0,t.transformFromAst=t.transform=t.analyse=t.Pipeline=t.OptionManager=t.traverse=t.types=t.messages=t.util=t.version=t.template=t.buildExternalHelpers=t.options=t.File=void 0;var u=r(49);Object.defineProperty(t,"File",{enumerable:!0,get:function(){return i(u).default}});var l=r(32);Object.defineProperty(t,"options",{enumerable:!0,get:function(){return i(l).default}});var c=r(292);Object.defineProperty(t,"buildExternalHelpers",{enumerable:!0,get:function(){return i(c).default}});var f=r(4);Object.defineProperty(t,"template",{enumerable:!0,get:function(){return i(f).default}});var p=r(622);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return p.version}}),t.Plugin=s,t.transformFile=a,t.transformFileSync=o;var d=r(116),h=i(d),m=r(117),v=i(m),y=r(123),g=n(y),b=r(19),E=n(b),x=r(1),A=n(x),S=r(8),_=i(S),D=r(33),C=i(D),w=r(295),F=i(w);t.util=g,t.messages=E,t.types=A,t.traverse=_.default,t.OptionManager=C.default,t.Pipeline=F.default;var k=new F.default,P=(t.analyse=k.analyse.bind(k),t.transform=k.transform.bind(k));t.transformFromAst=k.transformFromAst.bind(k)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){var n=" ";if(e&&"string"==typeof e){var i=(0,h.default)(e).indent;i&&" "!==i&&(n=i)}var s={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,quotes:t.quotes||a(e,r),jsonCompatibleStrings:t.jsonCompatibleStrings,indent:{adjustMultilineComment:!0,style:n,base:0},flowCommaSeparator:t.flowCommaSeparator};return s.minified?(s.compact=!0,s.shouldPrintComment=s.shouldPrintComment||function(){return s.comments}):s.shouldPrintComment=s.shouldPrintComment||function(e){return s.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0},"auto"===s.compact&&(s.compact=e.length>5e5,s.compact&&console.error("[BABEL] "+g.get("codeGeneratorDeopt",t.filename,"500KB"))),s.compact&&(s.indent.adjustMultilineComment=!1),s}function a(e,t){var r="double";if(!e)return r;for(var n={single:0,double:0},i=0,s=0;s<t.length;s++){var a=t[s];if("string"===a.type.label){var o=e.slice(a.start,a.end);if("'"===o[0]?n.single++:n.double++,i++,i>=3)break}}return n.single>n.double?"single":"double"}t.__esModule=!0,t.CodeGenerator=void 0;var o=r(3),u=i(o),l=r(42),c=i(l),f=r(41),p=i(f);t.default=function(e,t,r){var n=new x(e,t,r);return n.generate()};var d=r(447),h=i(d),m=r(310),v=i(m),y=r(19),g=n(y),b=r(309),E=i(b),x=function(e){function t(r,n,i){(0,u.default)(this,t),n=n||{};var a=r.tokens||[],o=s(i,n,a),l=n.sourceMaps?new v.default(n,i):null,f=(0,c.default)(this,e.call(this,o,l,a));return f.ast=r,f}return(0,p.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(E.default);t.CodeGenerator=function(){function e(t,r,n){(0,u.default)(this,e),this._generator=new x(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}for(var r={},n=(0,m.default)(e),i=Array.isArray(n),s=0,n=i?n:(0,d.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a,u=x.FLIPPED_ALIAS_KEYS[o];if(u)for(var l=u,c=Array.isArray(l),f=0,l=c?l:(0,d.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var h=p;t(h,e[o])}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!x.isCallExpression(e)||!!x.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;x.isExpressionStatement(e)&&(e=e.expression);var n=a(S,e,t);if(!n){var i=a(_,e,t);if(i)for(var s=0;s<i.length&&!(n=u(i[s],e,r));s++);}return n&&n[r]||0}function l(e,t){return u(e,t,"before")}function c(e,t){return u(e,t,"after")}function f(e,t,r){return!!t&&(!(!x.isNewExpression(t)||t.callee!==e||!o(e))||a(A,e,t,r))}t.__esModule=!0;var p=r(2),d=i(p),h=r(20),m=i(h);t.needsWhitespace=u,t.needsWhitespaceBefore=l,t.needsWhitespaceAfter=c,t.needsParens=f;var v=r(308),y=i(v),g=r(307),b=n(g),E=r(1),x=n(E),A=s(b),S=s(y.default.nodes),_=s(y.default.list)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){function t(e,r){if(u.isJSXIdentifier(e)){if("this"===e.name&&u.isReferenced(e,r))return u.thisExpression();if(!a.default.keyword.isIdentifierNameES6(e.name))return u.stringLiteral(e.name);e.type="Identifier"}else if(u.isJSXMemberExpression(e))return u.memberExpression(t(e.object,e),t(e.property,e));return e}function r(e){return u.isJSXExpressionContainer(e)?e.expression:e}function n(e){var t=r(e.value||u.booleanLiteral(!0));return u.isStringLiteral(t)&&!u.isJSXExpressionContainer(e.value)&&(t.value=t.value.replace(/\n\s+/g," ")),u.isValidIdentifier(e.name.name)?e.name.type="Identifier":e.name=u.stringLiteral(e.name.name),u.inherits(u.objectProperty(e.name,t),e)}function i(r,n){r.parent.children=u.react.buildChildren(r.parent);var i=t(r.node.name,r.node),a=[],o=void 0;u.isIdentifier(i)?o=i.name:u.isLiteral(i)&&(o=i.value);var l={tagExpr:i,tagName:o,args:a};e.pre&&e.pre(l,n);var c=r.node.attributes;return c=c.length?s(c,n):u.nullLiteral(),a.push(c),e.post&&e.post(l,n),l.call||u.callExpression(l.callee,a)}function s(e,t){function r(){i.length&&(s.push(u.objectExpression(i)),i=[])}var i=[],s=[],a=t.opts.useBuiltIns||!1;if("boolean"!=typeof a)throw new Error("transform-react-jsx currently only accepts a boolean option for useBuiltIns (defaults to false)");for(;e.length;){var o=e.shift();u.isJSXSpreadAttribute(o)?(r(),s.push(o.argument)):i.push(n(o))}if(r(),1===s.length)e=s[0];else{u.isObjectExpression(s[0])||s.unshift(u.objectExpression([]));var l=a?u.memberExpression(u.identifier("Object"),u.identifier("assign")):t.addHelper("extends");e=u.callExpression(l,s)}return e}var o={};return o.JSXNamespacedName=function(e){throw e.buildCodeFrameError("Namespace tags are not supported. ReactJSX is not XML.")},o.JSXElement={exit:function(e,t){var r=i(e.get("openingElement"),t);r.arguments=r.arguments.concat(e.node.children),r.arguments.length>=3&&(r._prettyCall=!0),e.replaceWith(u.inherits(r,e.node))}},o};var s=r(157),a=i(s),o=r(1),u=n(o);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){return!g.isClassMethod(e)&&!g.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}function a(e,t,r,n,i){var a=g.toKeyAlias(t),o={};if((0,v.default)(e,a)&&(o=e[a]),e[a]=o,o._inherits=o._inherits||[],o._inherits.push(t),o._key=t.key,t.computed&&(o._computed=!0),t.decorators){var u=o.decorators=o.decorators||g.arrayExpression([]);u.elements=u.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(o.value||o.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var l=void 0,c=void 0;(g.isObjectProperty(t)||g.isObjectMethod(t)||g.isClassMethod(t))&&(l=g.toComputedKey(t,t.key)),g.isObjectProperty(t)||g.isClassProperty(t)?c=t.value:(g.isObjectMethod(t)||g.isClassMethod(t))&&(c=g.functionExpression(null,t.params,t.body,t.generator,t.async),c.returnType=t.returnType);var f=s(t);return r&&"value"===f||(r=f),i&&g.isStringLiteral(l)&&("value"===r||"initializer"===r)&&g.isFunctionExpression(c)&&(c=(0,p.default)({id:l,node:c,scope:i})),c&&(g.inheritsComments(c,t),o[r]=c),o}function o(e){for(var t in e)if(e[t]._computed)return!0;return!1}function u(e){for(var t=g.arrayExpression([]),r=0;r<e.properties.length;r++){var n=e.properties[r],i=n.value;i.properties.unshift(g.objectProperty(g.identifier("key"),g.toComputedKey(n))),t.elements.push(i)}return t}function l(e){var t=g.objectExpression([]);return(0,h.default)(e,function(e){var r=g.objectExpression([]),n=g.objectProperty(e._key,r,e._computed);(0,h.default)(e,function(e,t){if("_"!==t[0]){var n=e;(g.isClassMethod(e)||g.isClassProperty(e))&&(e=e.value);var i=g.objectProperty(g.identifier(t),e);g.inheritsComments(i,n),g.removeComments(n),r.properties.push(i)}}),t.properties.push(n)}),t}function c(e){return(0,h.default)(e,function(e){e.value&&(e.writable=g.booleanLiteral(!0)),e.configurable=g.booleanLiteral(!0),e.enumerable=g.booleanLiteral(!0)}),l(e)}t.__esModule=!0,t.push=a,t.hasComputed=o,t.toComputedObjectFromClass=u,t.toClassObject=l,t.toDefineObject=c;var f=r(40),p=i(f),d=r(112),h=i(d),m=r(270),v=i(m),y=r(1),g=n(y)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.default=function(e){for(var t=e.params,r=0;r<t.length;r++){var n=t[r];if(s.isAssignmentPattern(n)||s.isRestElement(n))return r}return t.length};var i=r(1),s=n(i);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s);t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"var";e.traverse(l,{kind:r,emit:t})};var o=r(1),u=n(o),l={Scope:function(e,t){"let"===t.kind&&e.skip()},Function:function(e){e.skip()},VariableDeclaration:function(e,t){if(!t.kind||e.node.kind===t.kind){for(var r=[],n=e.get("declarations"),i=void 0,s=n,o=Array.isArray(s),l=0,s=o?s:(0,a.default)(s);;){var c;if(o){if(l>=s.length)break;c=s[l++]}else{if(l=s.next(),l.done)break;c=l.value}var f=c;i=f.node.id,f.node.init&&r.push(u.expressionStatement(u.assignmentExpression("=",f.node.id,f.node.init)));for(var p in f.getBindingIdentifiers())t.emit(u.identifier(p),p)}e.parentPath.isFor({left:e.node})?e.replaceWith(i):e.replaceWithMultiple(r)}}};e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.default=function(e,t,r){return 1===r.length&&s.isSpreadElement(r[0])&&s.isIdentifier(r[0].argument,{name:"arguments"})?s.callExpression(s.memberExpression(e,s.identifier("apply")),[t,r[0].argument]):s.callExpression(s.memberExpression(e,s.identifier("call")),[t].concat(r))};var i=r(1),s=n(i);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return c.isRegExpLiteral(e)&&e.flags.indexOf(t)>=0}function a(e,t){var r=e.flags.split("");e.flags.indexOf(t)<0||((0,u.default)(r,t),e.flags=r.join(""))}t.__esModule=!0,t.is=s,t.pullFlag=a;var o=r(275),u=i(o),l=r(1),c=n(l)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return!!y.isSuper(e)&&(!y.isMemberExpression(t,{computed:!1})&&!y.isCallExpression(t,{callee:e}))}function a(e){return y.isMemberExpression(e)&&y.isSuper(e.object)}function o(e,t){var r=t?e:y.memberExpression(e,y.identifier("prototype"));return y.logicalExpression("||",y.memberExpression(r,y.identifier("__proto__")),y.callExpression(y.memberExpression(y.identifier("Object"),y.identifier("getPrototypeOf")),[r]))}t.__esModule=!0;var u=r(3),l=i(u),c=r(10),f=i(c),p=r(189),d=i(p),h=r(19),m=n(h),v=r(1),y=n(v),g=(0,f.default)(),b={Function:function(e){e.inShadow("this")||e.skip()},ReturnStatement:function(e,t){e.inShadow("this")||t.returns.push(e)},ThisExpression:function(e,t){e.node[g]||t.thises.push(e)},enter:function(e,t){var r=t.specHandle;t.isLoose&&(r=t.looseHandle);var n=e.isCallExpression()&&e.get("callee").isSuper(),i=r.call(t,e);i&&(t.hasSuper=!0),n&&t.bareSupers.push(e),i===!0&&e.requeue(),i!==!0&&i&&(Array.isArray(i)?e.replaceWithMultiple(i):e.replaceWith(i))}},E=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,l.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return y.callExpression(this.file.addHelper("set"),[o(this.getObjectRef(),this.isStatic),r?e:y.stringLiteral(e.name),t,y.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return y.callExpression(this.file.addHelper("get"),[o(this.getObjectRef(),this.isStatic),t?e:y.stringLiteral(e.name),y.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(b,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||y.identifier("Function");return t.property===e?void 0:y.isCallExpression(t,{callee:e})?void 0:y.isMemberExpression(t)&&!r.static?y.memberExpression(n,y.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!y.isMemberExpression(r))return;if(!y.isSuper(r.object))return;return y.appendToMemberExpression(r,y.identifier("call")),t.arguments.unshift(y.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[y.variableDeclaration("var",[y.variableDeclarator(e,r.left)]),y.expressionStatement(y.assignmentExpression("=",r.left,y.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,o=e.node;if(s(o,i))throw e.buildCodeFrameError(m.get("classesIllegalBareSuper"));if(y.isCallExpression(o)){var u=o.callee;if(y.isSuper(u))return;a(u)&&(t=u.property,r=u.computed,n=o.arguments)}else if(y.isMemberExpression(o)&&y.isSuper(o.object))t=o.property,r=o.computed;else{if(y.isUpdateExpression(o)&&a(o.argument)){var l=y.binaryExpression(o.operator[0],o.argument,y.numericLiteral(1));if(o.prefix)return this.specHandleAssignmentExpression(null,e,l);var c=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(c,e,l).concat(y.expressionStatement(c))}if(y.isAssignmentExpression(o)&&a(o.left))return this.specHandleAssignmentExpression(null,e,o)}if(t){var f=this.getSuperProperty(t,r);return n?this.optimiseCall(f,n):f}},e.prototype.optimiseCall=function(e,t){var r=y.thisExpression();return r[g]=!0,(0,d.default)(e,r,t)},e}();t.default=E,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=u.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}t.__esModule=!0,t.list=void 0;var s=r(20),a=n(s);t.get=i;var o=r(318),u=n(o);t.list=(0,a.default)(u.default).map(function(e){return"_"===e[0]?e.slice(1):e}).filter(function(e){return"__esModule"!==e});t.default=i},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncGenerators")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("classConstructorCall")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("classProperties")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("doExpressions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("exponentiationOperator")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("exportExtensions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("functionBind")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("objectRestSpread")}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i),a=r(10),o=n(a);t.default=function(e){function t(e){for(var t=e.get("body.body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,s.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if(i=r.next(),i.done)break;a=i.value}var o=a;if("constructorCall"===o.node.kind)return o}return null}function n(e,t){var r=t,n=r.node,s=n.id||t.scope.generateUidIdentifier("class");t.parentPath.isExportDefaultDeclaration()&&(t=t.parentPath,t.insertAfter(i.exportDefaultDeclaration(s))),t.replaceWithMultiple(c({CLASS_REF:t.scope.generateUidIdentifier(s.name),CALL_REF:t.scope.generateUidIdentifier(s.name+"Call"),CALL:i.functionExpression(null,e.node.params,e.node.body),CLASS:i.toExpression(n),WRAPPER_REF:s})),e.remove()}var i=e.types,a=(0,o.default)();return{inherits:r(194),visitor:{Class:function(e){if(!e.node[a]){e.node[a]=!0;var r=t(e);r&&n(r,e)}}}}};var u=r(4),l=n(u),c=(0,l.default)("\n let CLASS_REF = CLASS;\n var CALL_REF = CALL;\n var WRAPPER_REF = function (...args) {\n if (this instanceof WRAPPER_REF) {\n return Reflect.construct(CLASS_REF, args);\n } else {\n return CALL_REF.apply(this, args);\n }\n };\n WRAPPER_REF.__proto__ = CLASS_REF;\n WRAPPER_REF;\n");e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){var t=e.types,n={Super:function(e){e.parentPath.isCallExpression({callee:e.node})&&this.push(e.parentPath)}},i={ReferencedIdentifier:function(e){this.scope.hasOwnBinding(e.node.name)&&(this.collision=!0,e.skip())}},a=(0,l.default)("\n Object.defineProperty(REF, KEY, {\n // configurable is false by default\n enumerable: true,\n writable: true,\n value: VALUE\n });\n "),u=function(e,r){var n=r.key,i=r.value,s=r.computed;return a({REF:e,KEY:t.isIdentifier(n)&&!s?t.stringLiteral(n.name):n,VALUE:i?i:t.identifier("undefined")})},c=function(e,r){var n=r.key,i=r.value,s=r.computed;return t.expressionStatement(t.assignmentExpression("=",t.memberExpression(e,n,s||t.isLiteral(n)),i))};return{inherits:r(195),visitor:{Class:function(e,r){for(var a=r.opts.spec?u:c,l=!!e.node.superClass,f=void 0,p=[],d=e.get("body"),h=d.get("body"),m=Array.isArray(h),v=0,h=m?h:(0,s.default)(h);;){var y;if(m){if(v>=h.length)break;y=h[v++]}else{if(v=h.next(),v.done)break;y=v.value}var g=y;g.isClassProperty()?p.push(g):g.isClassMethod({kind:"constructor"})&&(f=g)}if(p.length){var b=[],E=void 0;e.isClassExpression()||!e.node.id?((0,o.default)(e),E=e.scope.generateUidIdentifier("class")):E=e.node.id;for(var x=[],A=p,S=Array.isArray(A),_=0,A=S?A:(0,s.default)(A);;){var D;if(S){if(_>=A.length)break;D=A[_++]}else{if(_=A.next(),_.done)break;D=_.value}var C=D,w=C.node;if(!(w.decorators&&w.decorators.length>0)&&(r.opts.spec||w.value)){var F=w.static;if(F)b.push(a(E,w));else{if(!w.value)continue;x.push(a(t.thisExpression(),w))}}}if(x.length){if(!f){var k=t.classMethod("constructor",t.identifier("constructor"),[],t.blockStatement([]));l&&(k.params=[t.restElement(t.identifier("args"))],k.body.body.push(t.returnStatement(t.callExpression(t.super(),[t.spreadElement(t.identifier("args"))]))));var P=d.unshiftContainer("body",k);f=P[0]}for(var T={collision:!1,scope:f.scope},O=p,B=Array.isArray(O),R=0,O=B?O:(0,s.default)(O);;){var I;if(B){if(R>=O.length)break;I=O[R++]}else{if(R=O.next(),R.done)break;I=R.value}var M=I;if(M.traverse(i,T),T.collision)break}if(T.collision){var N=e.scope.generateUidIdentifier("initialiseProps");b.push(t.variableDeclaration("var",[t.variableDeclarator(N,t.functionExpression(null,[],t.blockStatement(x)))])),x=[t.expressionStatement(t.callExpression(t.memberExpression(N,t.identifier("call")),[t.thisExpression()]))]}if(l){var L=[];f.traverse(n,L);for(var j=L,U=Array.isArray(j),V=0,j=U?j:(0,s.default)(j);;){var G;if(U){if(V>=j.length)break;G=j[V++]}else{if(V=j.next(),V.done)break;G=V.value}var W=G;W.insertAfter(x)}}else f.get("body").unshiftContainer("body",x)}for(var Y=p,q=Array.isArray(Y),K=0,Y=q?Y:(0,s.default)(Y);;){var H;if(q){if(K>=Y.length)break;H=Y[K++]}else{if(K=Y.next(),K.done)break;H=K.value}var J=H;J.remove()}b.length&&(e.isClassExpression()?(e.scope.push({id:E}),e.replaceWith(t.assignmentExpression("=",E,e.node))):(e.node.id||(e.node.id=E),e.parentPath.isExportDeclaration()&&(e=e.parentPath)),e.insertAfter(b))}},ArrowFunctionExpression:function(e){var t=e.get("body");if(t.isClassExpression()){var r=t.get("body"),n=r.get("body");n.some(function(e){return e.isClassProperty()})&&e.ensureBlock()}}}}};var a=r(40),o=n(a),u=r(4),l=n(u);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(9),s=n(i),a=r(2),o=n(a);t.default=function(e){function t(e){return e.reverse().map(function(e){return e.expression})}function n(e,r,n){var i=[],a=e.node.decorators;if(a){e.node.decorators=null,a=t(a);for(var l=a,c=Array.isArray(l),f=0,l=c?l:(0,o.default)(l);;){var d;if(c){if(f>=l.length)break;d=l[f++]}else{if(f=l.next(),f.done)break;d=f.value}var h=d;i.push(p({CLASS_REF:r,DECORATOR:h}))}}for(var m=(0,s.default)(null),v=e.get("body.body"),y=Array.isArray(v),g=0,v=y?v:(0,o.default)(v);;){var b;if(y){if(g>=v.length)break;b=v[g++]}else{if(g=v.next(),g.done)break;b=g.value}var E=b,x=E.node.decorators;if(x){var A=u.toKeyAlias(E.node);m[A]=m[A]||[],m[A].push(E.node),E.remove()}}for(var S in m)var _=m[S];return i}function i(e){if(e.isClass()){if(e.node.decorators)return!0;for(var t=e.node.body.body,r=Array.isArray(t),n=0,t=r?t:(0,o.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(s.decorators)return!0}}else if(e.isObjectExpression())for(var a=e.node.properties,u=Array.isArray(a),l=0,a=u?a:(0,o.default)(a);;){var c;if(u){if(l>=a.length)break;c=a[l++]}else{if(l=a.next(),l.done)break;c=l.value}var f=c;if(f.decorators)return!0}return!1}function a(e){throw e.buildCodeFrameError('Decorators are not officially supported yet in 6.x pending a proposal update.\nHowever, if you need to use them you can install the legacy decorators transform with:\n\nnpm install babel-plugin-transform-decorators-legacy --save-dev\n\nand add the following line to your .babelrc file:\n\n{\n "plugins": ["transform-decorators-legacy"]\n}\n\nThe repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.\n ')}var u=e.types;return{inherits:r(126),visitor:{ClassExpression:function(e){if(i(e)){a(e),(0,f.default)(e);var t=e.scope.generateDeclaredUidIdentifier("ref"),r=[];r.push(u.assignmentExpression("=",t,e.node)),r=r.concat(n(e,t,this)),r.push(t),e.replaceWith(u.sequenceExpression(r))}},ClassDeclaration:function(e){if(i(e)){a(e),(0,f.default)(e);var t=e.node.id,r=[];r=r.concat(n(e,t,this).map(function(e){return u.expressionStatement(e)})),r.push(u.expressionStatement(t)),e.insertAfter(r)}},ObjectExpression:function(e){i(e)&&a(e)}}}};var u=r(4),l=n(u),c=r(316),f=n(c),p=(0,l.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n");e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(196),visitor:{DoExpression:function(e){var t=e.node.body.body;t.length?e.replaceWithMultiple(t):e.replaceWith(e.scope.buildUndefinedNode())}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s),o=r(3),u=i(o),l=r(8),c=r(191),f=i(c),p=r(189),d=i(p),h=r(186),m=n(h),v=r(4),y=i(v),g=r(1),b=n(g),E=(0,y.default)("\n (function () {\n super(...arguments);\n })\n"),x={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},A=l.visitors.merge([x,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:function(e){if(e.get("callee").isSuper()&&(this.hasBareSuper=!0,!this.isDerived))throw e.buildCodeFrameError("super() is only allowed in a derived constructor")}},ThisExpression:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.inShadow("this"))throw e.buildCodeFrameError("'this' is not allowed before super()")}}]),S=l.visitors.merge([x,{ThisExpression:function(e){this.superThises.push(e)}}]),_=function(){function e(t,r){(0,u.default)(this,e),this.parent=t.parent,this.scope=t.scope,this.node=t.node,this.path=t,this.file=r,this.clearDescriptors(),this.instancePropBody=[],this.instancePropRefs={},this.staticPropBody=[],this.body=[],this.bareSuperAfter=[],this.bareSupers=[],this.pushedConstructor=!1,this.pushedInherits=!1,this.isLoose=!1,this.superThises=[],this.classId=this.node.id,this.classRef=this.node.id?b.identifier(this.node.id.name):this.scope.generateUidIdentifier("class"),this.superName=this.node.superClass||b.identifier("Function"),this.isDerived=!!this.node.superClass}return e.prototype.run=function(){var e=this,t=this.superName,r=this.file,n=this.body,i=this.constructorBody=b.blockStatement([]);this.constructor=this.buildConstructor();var s=[],a=[];if(this.isDerived&&(a.push(t),t=this.scope.generateUidIdentifierBasedOnNode(t),s.push(t),this.superName=t),this.buildBody(),i.body.unshift(b.expressionStatement(b.callExpression(r.addHelper("classCallCheck"),[b.thisExpression(),this.classRef]))),n=n.concat(this.staticPropBody.map(function(t){return t(e.classRef)})),this.classId&&1===n.length)return b.toExpression(n[0]);n.push(b.returnStatement(this.classRef));var o=b.functionExpression(null,s,b.blockStatement(n));return o.shadow=!0,b.callExpression(o,a)},e.prototype.buildConstructor=function(){var e=b.functionDeclaration(this.classRef,[],this.constructorBody);return b.inherits(e,this.node),e},e.prototype.pushToMap=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=m.push(i,e,r,this.file,n);return t&&(s.enumerable=b.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){for(var e=!1,t=this.path.get("body.body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s;if(e=o.equals("kind","constructor"))break}if(!e){var u=void 0,l=void 0;if(this.isDerived){var c=E().expression;u=c.params,l=c.body}else u=[],l=b.blockStatement([]);this.path.get("body").unshiftContainer("body",b.classMethod("constructor",b.identifier("constructor"),u,l))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),b.inherits(this.constructor,this.userConstructor),b.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){for(var e=this.path.get("body.body"),t=e,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,o=s.node;if(s.isClassProperty())throw s.buildCodeFrameError("Missing class properties transform.");if(o.decorators)throw s.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(b.isClassMethod(o)){var u="constructor"===o.kind;if(u&&(s.traverse(A,this),!this.hasBareSuper&&this.isDerived))throw s.buildCodeFrameError("missing super() call in constructor");
+var l=new f.default({forceSuperMemoisation:u,methodPath:s,methodNode:o,objectRef:this.classRef,superRef:this.superName,isStatic:o.static,isLoose:this.isLoose,scope:this.scope,file:this.file},(!0));l.replace(),u?this.pushConstructor(l,o,s):this.pushMethod(o,s)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=m.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=m.toClassObject(this.staticMutatorMap)),t||r){t&&(t=m.toComputedObjectFromClass(t)),r&&(r=m.toComputedObjectFromClass(r));var n=b.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a<i.length;a++)i[a]!==n&&(s=a);i=i.slice(0,s+1),e.push(b.expressionStatement(b.callExpression(this.file.addHelper("createClass"),i)))}this.clearDescriptors()},e.prototype.buildObjectAssignment=function(e){return b.variableDeclaration("var",[b.variableDeclarator(e,b.objectExpression([]))])},e.prototype.wrapSuperCall=function(e,t,r,n){var i=e.node;this.isLoose?(i.arguments.unshift(b.thisExpression()),2===i.arguments.length&&b.isSpreadElement(i.arguments[1])&&b.isIdentifier(i.arguments[1].argument,{name:"arguments"})?(i.arguments[1]=i.arguments[1].argument,i.callee=b.memberExpression(t,b.identifier("apply"))):i.callee=b.memberExpression(t,b.identifier("call"))):i=(0,d.default)(b.logicalExpression("||",b.memberExpression(this.classRef,b.identifier("__proto__")),b.callExpression(b.memberExpression(b.identifier("Object"),b.identifier("getPrototypeOf")),[this.classRef])),b.thisExpression(),i.arguments);var s=b.callExpression(this.file.addHelper("possibleConstructorReturn"),[b.thisExpression(),i]),a=this.bareSuperAfter.map(function(e){return e(r)});e.parentPath.isExpressionStatement()&&e.parentPath.container===n.node.body&&n.node.body.length-1===e.parentPath.key?((this.superThises.length||a.length)&&(e.scope.push({id:r}),s=b.assignmentExpression("=",r,s)),a.length&&(s=b.toSequenceExpression([s].concat(a,[r]))),e.parentPath.replaceWith(b.returnStatement(s))):e.replaceWithMultiple([b.variableDeclaration("var",[b.variableDeclarator(r,s)])].concat(a,[b.expressionStatement(r)]))},e.prototype.verifyConstructor=function(){var e=this;if(this.isDerived){var t=this.userConstructorPath,r=t.get("body");t.traverse(S,this);for(var n=!!this.bareSupers.length,i=this.superName||b.identifier("Function"),s=t.scope.generateUidIdentifier("this"),o=this.bareSupers,u=Array.isArray(o),l=0,o=u?o:(0,a.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var f=c;this.wrapSuperCall(f,i,s,r),n&&f.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}for(var p=this.superThises,d=Array.isArray(p),h=0,p=d?p:(0,a.default)(p);;){var m;if(d){if(h>=p.length)break;m=p[h++]}else{if(h=p.next(),h.done)break;m=h.value}var v=m;v.replaceWith(s)}var y=function(t){return b.callExpression(e.file.addHelper("possibleConstructorReturn"),[s].concat(t||[]))},g=r.get("body");g.length&&!g.pop().isReturnStatement()&&r.pushContainer("body",b.returnStatement(n?s:y()));for(var E=this.superReturns,x=Array.isArray(E),A=0,E=x?E:(0,a.default)(E);;){var _;if(x){if(A>=E.length)break;_=E[A++]}else{if(A=E.next(),A.done)break;_=A.value}var D=_;if(D.node.argument){var C=D.scope.generateDeclaredUidIdentifier("ret");D.get("argument").replaceWithMultiple([b.assignmentExpression("=",C,D.node.argument),y(C)])}else D.get("argument").replaceWith(y())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,b.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,b.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(b.expressionStatement(b.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();t.default=_,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(9),s=n(i),a=r(2),o=n(a),u=r(10),l=n(u);t.default=function(e){var t=e.types,r=(0,l.default)(),n={"AssignmentExpression|UpdateExpression":function(e){if(!e.node[r]){e.node[r]=!0;var n=e.get(e.isAssignmentExpression()?"left":"argument");if(n.isIdentifier()){var i=n.node.name;if(this.scope.getBinding(i)===e.scope.getBinding(i)){var s=this.exports[i];if(s){var a=e.node,u=e.isUpdateExpression()&&!a.prefix;u&&("++"===a.operator?a=t.binaryExpression("+",a.argument,t.numericLiteral(1)):"--"===a.operator?a=t.binaryExpression("-",a.argument,t.numericLiteral(1)):u=!1);for(var l=s,c=Array.isArray(l),f=0,l=c?l:(0,o.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;a=this.buildCall(d,a).expression}u&&(a=t.sequenceExpression([a,e.node])),e.replaceWith(a)}}}}}};return{visitor:{CallExpression:function(e,r){if(e.node.callee.type===v){var n=r.contextIdent;e.replaceWith(t.callExpression(t.memberExpression(n,t.identifier("import")),e.node.arguments))}},ReferencedIdentifier:function(e,r){"__moduleName"!=e.node.name||e.scope.hasBinding("__moduleName")||e.replaceWith(t.memberExpression(r.contextIdent,t.identifier("id")))},Program:{enter:function(e,t){t.contextIdent=e.scope.generateUidIdentifier("context")},exit:function(e,r){function i(e,t){p[e]=p[e]||[],p[e].push(t)}function a(e,t,r){var n=void 0;d.forEach(function(t){t.key===e&&(n=t)}),n||d.push(n={key:e,imports:[],exports:[]}),n[t]=n[t].concat(r)}function u(e,r){return t.expressionStatement(t.callExpression(l,[t.stringLiteral(e),r]))}for(var l=e.scope.generateUidIdentifier("export"),c=r.contextIdent,p=(0,s.default)(null),d=[],v=[],y=[],g=[],b=[],E=[],x=e.get("body"),A=!0,S=x,_=Array.isArray(S),D=0,S=_?S:(0,o.default)(S);;){var C;if(_){if(D>=S.length)break;C=S[D++]}else{if(D=S.next(),D.done)break;C=D.value}var w=C;if(w.isExportDeclaration()&&(w=w.get("declaration")),w.isVariableDeclaration()&&"var"!==w.node.kind){A=!1;break}}for(var F=x,k=Array.isArray(F),P=0,F=k?F:(0,o.default)(F);;){var T;if(k){if(P>=F.length)break;T=F[P++]}else{if(P=F.next(),P.done)break;T=P.value}var O=T;if(A&&O.isFunctionDeclaration())v.push(O.node),E.push(O);else if(O.isImportDeclaration()){var B=O.node.source.value;a(B,"imports",O.node.specifiers);for(var R in O.getBindingIdentifiers())O.scope.removeBinding(R),b.push(t.identifier(R));O.remove()}else if(O.isExportAllDeclaration())a(O.node.source.value,"exports",O.node),O.remove();else if(O.isExportDefaultDeclaration()){var I=O.get("declaration");if(I.isClassDeclaration()||I.isFunctionDeclaration()){var M=I.node.id,N=[];M?(N.push(I.node),N.push(u("default",M)),i(M.name,"default")):N.push(u("default",t.toExpression(I.node))),!A||I.isClassDeclaration()?O.replaceWithMultiple(N):(v=v.concat(N),E.push(O))}else O.replaceWith(u("default",I.node))}else if(O.isExportNamedDeclaration()){var L=O.get("declaration");if(L.node){O.replaceWith(L);var j=[],U=void 0;if(O.isFunction()){var V=L.node,G=V.id.name;if(A)i(G,G),v.push(V),v.push(u(G,V.id)),E.push(O);else{var W;W={},W[G]=V.id,U=W}}else U=L.getBindingIdentifiers();for(var Y in U)i(Y,Y),j.push(u(Y,t.identifier(Y)));O.insertAfter(j)}else{var q=O.node.specifiers;if(q&&q.length)if(O.node.source)a(O.node.source.value,"exports",q),O.remove();else{for(var K=[],H=q,J=Array.isArray(H),X=0,H=J?H:(0,o.default)(H);;){var z;if(J){if(X>=H.length)break;z=H[X++]}else{if(X=H.next(),X.done)break;z=X.value}var $=z;K.push(u($.exported.name,$.local)),i($.local.name,$.exported.name)}O.replaceWithMultiple(K)}}}}d.forEach(function(r){for(var n=[],i=e.scope.generateUidIdentifier(r.key),s=r.imports,a=Array.isArray(s),u=0,s=a?s:(0,o.default)(s);;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if(u=s.next(),u.done)break;c=u.value}var f=c;t.isImportNamespaceSpecifier(f)?n.push(t.expressionStatement(t.assignmentExpression("=",f.local,i))):t.isImportDefaultSpecifier(f)&&(f=t.importSpecifier(f.local,t.identifier("default"))),t.isImportSpecifier(f)&&n.push(t.expressionStatement(t.assignmentExpression("=",f.local,t.memberExpression(i,f.imported))))}if(r.exports.length){var p=e.scope.generateUidIdentifier("exportObj");n.push(t.variableDeclaration("var",[t.variableDeclarator(p,t.objectExpression([]))]));for(var d=r.exports,h=Array.isArray(d),v=0,d=h?d:(0,o.default)(d);;){var b;if(h){if(v>=d.length)break;b=d[v++]}else{if(v=d.next(),v.done)break;b=v.value}var E=b;t.isExportAllDeclaration(E)?n.push(m({KEY:e.scope.generateUidIdentifier("key"),EXPORT_OBJ:p,TARGET:i})):t.isExportSpecifier(E)&&n.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(p,E.exported),t.memberExpression(i,E.local))))}n.push(t.expressionStatement(t.callExpression(l,[p])))}g.push(t.stringLiteral(r.key)),y.push(t.functionExpression(null,[i],t.blockStatement(n)))});var Q=this.getModuleName();Q&&(Q=t.stringLiteral(Q)),A&&(0,f.default)(e,function(e){return b.push(e)}),b.length&&v.unshift(t.variableDeclaration("var",b.map(function(e){return t.variableDeclarator(e)}))),e.traverse(n,{exports:p,buildCall:u,scope:e.scope});for(var Z=E,ee=Array.isArray(Z),te=0,Z=ee?Z:(0,o.default)(Z);;){var re;if(ee){if(te>=Z.length)break;re=Z[te++]}else{if(te=Z.next(),te.done)break;re=te.value}var ne=re;ne.remove()}e.node.body=[h({SYSTEM_REGISTER:t.memberExpression(t.identifier(r.opts.systemGlobal||"System"),t.identifier("register")),BEFORE_BODY:v,MODULE_NAME:Q,SETTERS:y,SOURCES:g,BODY:e.node.body,EXPORT_IDENTIFIER:l,CONTEXT_IDENTIFIER:c})]}}}}};var c=r(188),f=n(c),p=r(4),d=n(p),h=(0,d.default)('\n SYSTEM_REGISTER(MODULE_NAME, [SOURCES], function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n "use strict";\n BEFORE_BODY;\n return {\n setters: [SETTERS],\n execute: function () {\n BODY;\n }\n };\n });\n'),m=(0,d.default)('\n for (var KEY in TARGET) {\n if (KEY !== "default" && KEY !== "__esModule") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n'),v="Import";e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){function t(e){if(e.isExpressionStatement()){var t=e.get("expression");if(!t.isCallExpression())return!1;if(!t.get("callee").isIdentifier({name:"define"}))return!1;var r=t.get("arguments");return!(3===r.length&&!r.shift().isStringLiteral())&&(2===r.length&&(!!r.shift().isArrayExpression()&&!!r.shift().isFunctionExpression()))}}var n=e.types;return{inherits:r(131),visitor:{Program:{exit:function(e,r){var s=e.get("body").pop();if(t(s)){var a=s.node.expression,c=a.arguments,f=3===c.length?c.shift():null,p=a.arguments[0],d=a.arguments[1],h=r.opts.globals||{},m=p.elements.map(function(e){return"module"===e.value||"exports"===e.value?n.identifier(e.value):n.callExpression(n.identifier("require"),[e])}),v=p.elements.map(function(e){if("module"===e.value)return n.identifier("mod");if("exports"===e.value)return n.memberExpression(n.identifier("mod"),n.identifier("exports"));var t=void 0;if(r.opts.exactGlobals){var s=h[e.value];t=s?s.split(".").reduce(function(e,t){return n.memberExpression(e,n.identifier(t))},n.identifier("global")):n.memberExpression(n.identifier("global"),n.identifier(n.toIdentifier(e.value)))}else{var a=(0,i.basename)(e.value,(0,i.extname)(e.value)),o=h[a]||a;t=n.memberExpression(n.identifier("global"),n.identifier(n.toIdentifier(o)))}return t}),y=f?f.value:this.file.opts.basename,g=n.memberExpression(n.identifier("global"),n.identifier(n.toIdentifier(y))),b=null;if(r.opts.exactGlobals){var E=h[y];if(E){b=[];var x=E.split(".");g=x.slice(1).reduce(function(e,t){return b.push(o({GLOBAL_REFERENCE:e})),n.memberExpression(e,n.identifier(t))},n.memberExpression(n.identifier("global"),n.identifier(x[0])))}}var A=u({BROWSER_ARGUMENTS:v,PREREQUISITE_ASSIGNMENTS:b,GLOBAL_TO_ASSIGN:g});s.replaceWith(l({MODULE_NAME:f,AMD_ARGUMENTS:p,COMMON_ARGUMENTS:m,GLOBAL_EXPORT:A,FUNC:d}))}}}}}};var i=r(17),s=r(4),a=n(s),o=(0,a.default)("\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n"),u=(0,a.default)("\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n PREREQUISITE_ASSIGNMENTS\n GLOBAL_TO_ASSIGN = mod.exports;\n"),l=(0,a.default)('\n (function (global, factory) {\n if (typeof define === "function" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== "undefined") {\n factory(COMMON_ARGUMENTS);\n } else {\n GLOBAL_EXPORT\n }\n })(this, FUNC);\n');e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e,r,i){var s=e.specifiers[0];if(n.isExportNamespaceSpecifier(s)||n.isExportDefaultSpecifier(s)){var a=e.specifiers.shift(),o=i.generateUidIdentifier(a.exported.name),u=void 0;u=n.isExportNamespaceSpecifier(a)?n.importNamespaceSpecifier(o):n.importDefaultSpecifier(o),r.push(n.importDeclaration([u],e.source)),r.push(n.exportNamedDeclaration(null,[n.exportSpecifier(o,a.exported)])),t(e,r,i)}}var n=e.types;return{inherits:r(198),visitor:{ExportNamedDeclaration:function(e){var r=e.node,n=e.scope,i=[];t(r,i,n),i.length&&(r.specifiers.length>=1&&i.push(r),e.replaceWithMultiple(i))}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){var t=e.types,n="@flow";return{inherits:r(68),visitor:{Program:function(e,t){for(var r=t.file.ast.comments,i=r,a=Array.isArray(i),o=0,i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;l.value.indexOf(n)>=0&&(l.value=l.value.replace(n,""),l.value.replace(/\*/g,"").trim()||(l.ignore=!0))}},Flow:function(e){e.remove()},ClassProperty:function(e){e.node.variance=null,e.node.typeAnnotation=null,e.node.value||e.remove()},Class:function(e){e.node.implements=null,e.get("body.body").forEach(function(e){e.isClassProperty()&&(e.node.typeAnnotation=null,e.node.value||e.remove())})},AssignmentPattern:function(e){var t=e.node;t.left.optional=!1},Function:function(e){for(var t=e.node,r=0;r<t.params.length;r++){var n=t.params[r];n.optional=!1}},TypeCastExpression:function(e){var r=e.node;do r=r.expression;while(t.isTypeCastExpression(r));e.replaceWith(r)}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e){var t=e.path.getData("functionBind");return t?t:(t=e.generateDeclaredUidIdentifier("context"),e.path.setData("functionBind",t))}function n(e,t){var r=e.object||e.callee.object;return t.isStatic(r)&&r}function i(e,r){var i=n(e,r);if(i)return i;var a=t(r);return e.object?e.callee=s.sequenceExpression([s.assignmentExpression("=",a,e.object),e.callee]):e.callee.object=s.assignmentExpression("=",a,e.callee.object),a}var s=e.types;return{inherits:r(199),visitor:{CallExpression:function(e){var t=e.node,r=e.scope,n=t.callee;if(s.isBindExpression(n)){var a=i(n,r);t.callee=s.memberExpression(n.callee,s.identifier("call")),t.arguments.unshift(a)}},BindExpression:function(e){var t=e.node,r=e.scope,n=i(t,r);e.replaceWith(s.callExpression(s.memberExpression(t.callee,s.identifier("bind")),[n]))}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){function t(e){var t=!1;return e.traverse({RestProperty:function(){t=!0,e.stop()}}),t}function n(e){for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var a=i;if(o.isSpreadProperty(a))return!0}return!1}function i(e,t,r){for(var n=t.pop(),i=[],a=t,u=Array.isArray(a),l=0,a=u?a:(0,s.default)(a);;){var c;if(u){if(l>=a.length)break;c=a[l++]}else{if(l=a.next(),l.done)break;c=l.value}var f=c,p=f.key;o.isIdentifier(p)&&!f.computed&&(p=o.stringLiteral(f.key.name)),i.push(p)}return[n.argument,o.callExpression(e.addHelper("objectWithoutProperties"),[r,o.arrayExpression(i)])]}function a(e,r,n){if(e.isObjectPattern()&&t(e)){var i=e.parentPath,s=i.scope.generateUidIdentifier("ref"),a=o.variableDeclaration("let",[o.variableDeclarator(e.node,s)]);a._blockHoist=r?n-r:1,i.ensureBlock(),i.get("body").unshiftContainer("body",a),e.replaceWith(s)}}var o=e.types;return{inherits:r(200),visitor:{Function:function(e){for(var t=e.get("params"),r=0;r<t.length;r++)a(t[r],r,t.length)},VariableDeclarator:function(e,t){if(e.get("id").isObjectPattern()){var r=e.parentPath.node.kind,n=[];e.traverse({RestProperty:function(e){var r=this.originalPath.node.init;e.findParent(function(e){if(e.isObjectProperty())r=o.memberExpression(r,o.identifier(e.node.key.name));else if(e.isVariableDeclarator())return!0});var s=i(t,e.parentPath.node.properties,r),a=s[0],u=s[1];n.push(o.variableDeclarator(a,u)),0===e.parentPath.node.properties.length&&e.findParent(function(e){return e.isObjectProperty()||e.isVariableDeclaration()}).remove()}},{originalPath:e}),n.length>0&&e.parentPath.getSibling(e.parentPath.key+1).insertBefore(o.variableDeclaration(r,n))}},ExportNamedDeclaration:function(e){var r=e.get("declaration");if(r.isVariableDeclaration()&&t(r)){var n=[];for(var i in e.getOuterBindingIdentifiers(e)){var s=o.identifier(i);n.push(o.exportSpecifier(s,s))}e.replaceWith(r.node),e.insertAfter(o.exportNamedDeclaration(null,n))}},CatchClause:function(e){a(e.get("param"))},AssignmentExpression:function(e,r){var n=e.get("left");if(n.isObjectPattern()&&t(n)){var s=[],a=void 0;(e.isCompletionRecord()||e.parentPath.isExpressionStatement())&&(a=e.scope.generateUidIdentifierBasedOnNode(e.node.right,"ref"),s.push(o.variableDeclaration("var",[o.variableDeclarator(a,e.node.right)])));var u=i(r,e.node.left.properties,a),l=u[0],c=u[1],f=o.clone(e.node);f.right=a,s.push(o.expressionStatement(f)),s.push(o.toStatement(o.assignmentExpression("=",l,c))),a&&s.push(o.expressionStatement(a)),e.replaceWithMultiple(s)}},ForXStatement:function(e){var r=e.node,n=e.scope,i=e.get("left"),s=r.left;if(o.isObjectPattern(s)&&t(i)){var a=n.generateUidIdentifier("ref");return r.left=o.variableDeclaration("var",[o.variableDeclarator(a)]),e.ensureBlock(),void r.body.body.unshift(o.variableDeclaration("var",[o.variableDeclarator(s,a)]))}if(o.isVariableDeclaration(s)){var u=s.declarations[0].id;if(o.isObjectPattern(u)){var l=n.generateUidIdentifier("ref");r.left=o.variableDeclaration(s.kind,[o.variableDeclarator(l,null)]),e.ensureBlock(),r.body.body.unshift(o.variableDeclaration(r.left.kind,[o.variableDeclarator(u,l)]))}}},ObjectExpression:function(e,t){function r(){u.length&&(a.push(o.objectExpression(u)),u=[])}if(n(e.node)){var i=t.opts.useBuiltIns||!1;if("boolean"!=typeof i)throw new Error("transform-object-rest-spread currently only accepts a boolean option for useBuiltIns (defaults to false)");for(var a=[],u=[],l=e.node.properties,c=Array.isArray(l),f=0,l=c?l:(0,s.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;o.isSpreadProperty(d)?(r(),a.push(d.argument)):u.push(d)}r(),o.isObjectExpression(a[0])||a.unshift(o.objectExpression([]));var h=i?o.memberExpression(o.identifier("Object"),o.identifier("assign")):t.addHelper("extends");e.replaceWith(o.callExpression(h,a))}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){function t(e,t){for(var r=t.arguments[0].properties,i=!0,s=0;s<r.length;s++){var a=r[s],o=n.toComputedKey(a);if(n.isLiteral(o,{value:"displayName"})){i=!1;break}}i&&r.unshift(n.objectProperty(n.identifier("displayName"),n.stringLiteral(e)))}function r(e){if(!e||!n.isCallExpression(e))return!1;if(!i(e.callee))return!1;var t=e.arguments;if(1!==t.length)return!1;var r=t[0];return!!n.isObjectExpression(r)}var n=e.types,i=n.buildMatchMemberExpression("React.createClass");return{visitor:{ExportDefaultDeclaration:function(e,n){var i=e.node;if(r(i.declaration)){var a=n.file.opts.basename;"index"===a&&(a=s.default.basename(s.default.dirname(n.file.opts.filename))),t(a,i.declaration)}},CallExpression:function(e){var i=e.node;if(r(i)){var s=void 0;e.find(function(e){if(e.isAssignmentExpression())s=e.node.left;else if(e.isObjectProperty())s=e.node.key;else if(e.isVariableDeclarator())s=e.node.id;else if(e.isStatement())return!0;if(s)return!0}),s&&(n.isMemberExpression(s)&&(s=s.property),n.isIdentifier(s)&&t(s.name,i))}}}}};var i=r(17),s=n(i);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){var t=e.types,n=/\*?\s*@jsx\s+([^\s]+)/,i=r(185)({pre:function(e){var r=e.tagName,n=e.args;t.react.isCompatTag(r)?n.push(t.stringLiteral(r)):n.push(e.tagExpr)},post:function(e,t){e.callee=t.get("jsxIdentifier")()}});return i.Program=function(e,r){for(var i=r.file,a=r.opts.pragma||"React.createElement",o=i.ast.comments,u=Array.isArray(o),l=0,o=u?o:(0,s.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var f=c,p=n.exec(f.value);if(p){if(a=p[1],"React.DOM"===a)throw i.buildCodeFrameError(f,"The @jsx React.DOM pragma has been deprecated as of React 0.12");break}}r.set("jsxIdentifier",function(){return a.split(".").map(function(e){return t.identifier(e)}).reduce(function(e,r){return t.memberExpression(e,r)})})},{inherits:r(127),visitor:i}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s);t.default=function(){return{visitor:{Program:function(e,t){if(t.opts.strict!==!1&&t.opts.strictMode!==!1){for(var r=e.node,n=r.directives,i=Array.isArray(n),s=0,n=i?n:(0,a.default)(n);;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{if(s=n.next(),s.done)break;o=s.value}var l=o;if("use strict"===l.value.value)return}e.unshiftContainer("directives",u.directive(u.directiveLiteral("use strict")))}}}}};var o=r(1),u=n(o);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=["commonjs","amd","umd","systemjs"],n=!1,i="commonjs",s=!1;if(void 0!==t&&(void 0!==t.loose&&(n=t.loose),void 0!==t.modules&&(i=t.modules),void 0!==t.spec&&(s=t.spec)),"boolean"!=typeof n)throw new Error("Preset es2015 'loose' option must be a boolean.");if("boolean"!=typeof s)throw new Error("Preset es2015 'spec' option must be a boolean.");if(i!==!1&&r.indexOf(i)===-1)throw new Error("Preset es2015 'modules' option must be 'false' to indicate no modules\nor a module type which be be one of: 'commonjs' (default), 'amd', 'umd', 'systemjs'");var o={loose:n};return{plugins:[[a.default,{loose:n,spec:s}],u.default,c.default,[p.default,{spec:s}],h.default,[v.default,o],g.default,E.default,A.default,[_.default,o],[C.default,o],F.default,P.default,O.default,[R.default,o],M.default,[L.default,o],U.default,G.default,"commonjs"===i&&[Y.default,o],"systemjs"===i&&[K.default,o],"amd"===i&&[J.default,o],"umd"===i&&[z.default,o],[Q.default,{async:!1,asyncGenerators:!1}]].filter(Boolean)}}t.__esModule=!0;var s=r(84),a=n(s),o=r(77),u=n(o),l=r(76),c=n(l),f=r(69),p=n(f),d=r(70),h=n(d),m=r(72),v=n(m),y=r(79),g=n(y),b=r(81),E=n(b),x=r(130),A=n(x),S=r(73),_=n(S),D=r(75),C=n(D),w=r(83),F=n(w),k=r(86),P=n(k),T=r(66),O=n(T),B=r(82),R=n(B),I=r(80),M=n(I),N=r(74),L=n(N),j=r(71),U=n(j),V=r(85),G=n(V),W=r(78),Y=n(W),q=r(206),K=n(q),H=r(131),J=n(H),X=r(207),z=n(X),$=r(87),Q=n($),Z=i({});t.default=Z,Object.defineProperty(Z,"buildPreset",{configurable:!0,writable:!0,enumerable:!1,value:i}),e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(132),s=n(i);t.default={plugins:[s.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(128),s=n(i),a=r(129),o=n(a);t.default={plugins:[s.default,o.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(219),s=n(i),a=r(201),o=n(a),u=r(208),l=n(u);t.default={presets:[s.default],plugins:[o.default,l.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(220),s=n(i),a=r(202),o=n(a),u=r(203),l=n(u),c=r(320),f=n(c);t.default={presets:[s.default],plugins:[f.default,o.default,l.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(128),s=n(i),a=r(129),o=n(a),u=r(132),l=n(u),c=r(211),f=n(c),p=r(323),d=n(p);t.default={plugins:[s.default,o.default,l.default,d.default,f.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=function e(t,r){(0,s.default)(this,e),this.file=t,this.options=r};t.default=a,e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.Flow=t.Pure=t.Generated=t.User=t.Var=t.BlockScoped=t.Referenced=t.Scope=t.Expression=t.Statement=t.BindingIdentifier=t.ReferencedMemberExpression=t.ReferencedIdentifier=void 0;var i=r(1),s=n(i);t.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,n=e.parent;if(!s.isIdentifier(r,t)&&!s.isJSXMemberExpression(n,t)){if(!s.isJSXIdentifier(r,t))return!1;if(i.react.isCompatTag(r.name))return!1}return s.isReferenced(r,n)}},t.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return s.isMemberExpression(t)&&s.isReferenced(t,r)}},t.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return s.isIdentifier(t)&&s.isBinding(t,r)}},t.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(s.isStatement(t)){if(s.isVariableDeclaration(t)){if(s.isForXStatement(r,{left:t}))return!1;if(s.isForStatement(r,{init:t}))return!1}return!0}return!1}},t.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():s.isExpression(e.node)}},t.Scope={types:["Scopable"],checkPath:function(e){return s.isScope(e.node,e.parent)}},t.Referenced={checkPath:function(e){return s.isReferenced(e.node,e.parent)}},t.BlockScoped={checkPath:function(e){return s.isBlockScoped(e.node)}},t.Var={types:["VariableDeclaration"],checkPath:function(e){return s.isVar(e.node)}},t.User={checkPath:function(e){return e.node&&!!e.node.loc}},t.Generated={checkPath:function(e){return!e.isUser()}},t.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},t.Flow={types:["Flow","ImportDeclaration","ExportDeclaration"],checkPath:function(e){var t=e.node;return!!s.isFlow(t)||(s.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:!!s.isExportDeclaration(t)&&"type"===t.exportKind)}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=function(){function e(t){var r=t.existing,n=t.identifier,i=t.scope,a=t.path,o=t.kind;(0,s.default)(this,e),this.identifier=n,this.scope=i,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,this.constantViolations.indexOf(e)===-1&&this.constantViolations.push(e)},e.prototype.reference=function(e){this.referencePaths.indexOf(e)===-1&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();t.default=a,e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){for(var n=[].concat(e),i=(0,u.default)(null);n.length;){var s=n.shift();if(s){var a=c.getBindingIdentifiers.keys[s.type];if(c.isIdentifier(s))if(t){var o=i[s.name]=i[s.name]||[];o.push(s)}else i[s.name]=s;else if(c.isExportDeclaration(s))c.isDeclaration(e.declaration)&&n.push(e.declaration);else{if(r){if(c.isFunctionDeclaration(s)){n.push(s.id);continue}if(c.isFunctionExpression(s))continue}if(a)for(var l=0;l<a.length;l++){var f=a[l];s[f]&&(n=n.concat(s[f]))}}}}return i}function a(e,t){return s(e,t,!0)}t.__esModule=!0;var o=r(9),u=i(o);t.getBindingIdentifiers=s,t.getOuterBindingIdentifiers=a;var l=r(1),c=n(l);s.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],RestProperty:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},function(e,t,r){"use strict";var n=r(139),i=r(11)("toStringTag"),s="Arguments"==n(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=a(t=Object(e),i))?r:s?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,r){"use strict";var n=r(146),i=r(56).getWeak,s=r(21),a=r(24),o=r(137),u=r(91),l=r(138),c=r(29),f=l(5),p=l(6),d=0,h=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},v=function(e,t){return f(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var r=v(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._i=d++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){
+if(!a(e))return!1;var t=i(e);return t===!0?h(this).delete(e):t&&c(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=i(e);return t===!0?h(this).has(e):t&&c(t,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return n===!0?h(e).set(t,r):n[e._i]=r,e},ufstore:h}},function(e,t,r){"use strict";var n=r(24),i=r(14).document,s=n(i)&&n(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},function(e,t,r){"use strict";e.exports=!r(22)&&!r(36)(function(){return 7!=Object.defineProperty(r(227)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";var n=r(139);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t){"use strict";e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){"use strict";var n=r(43),i=r(145),s=r(93),a=r(96),o=r(142),u=Object.assign;e.exports=!u||r(36)(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,f=s.f;u>l;)for(var p,d=o(arguments[l++]),h=c?n(d).concat(c(d)):n(d),m=h.length,v=0;m>v;)f.call(d,p=h[v++])&&(r[p]=d[p]);return r}:u},function(e,t,r){"use strict";var n=r(93),i=r(94),s=r(37),a=r(152),o=r(29),u=r(228),l=Object.getOwnPropertyDescriptor;t.f=r(22)?l:function(e,t){if(e=s(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(o(e,t))return i(!n.f.call(e,t),e[t])}},function(e,t,r){"use strict";var n=r(234),i=r(141).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},function(e,t,r){"use strict";var n=r(29),i=r(37),s=r(414)(!1),a=r(148)("IE_PROTO");e.exports=function(e,t){var r,o=i(e),u=0,l=[];for(r in o)r!=a&&n(o,r)&&l.push(r);for(;t.length>u;)n(o,r=t[u++])&&(~s(l,r)||l.push(r));return l}},function(e,t,r){"use strict";var n=r(225),i=r(11)("iterator"),s=r(55);e.exports=r(5).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||s[n(e)]}},function(e,t,r){(function(n){"use strict";function i(){return"undefined"!=typeof window&&"process"in window&&"renderer"===window.process.type||("undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window.console&&(console.firebug||console.exception&&console.table)||navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,s=0;e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(s=i))}),e.splice(s,0,n)}}function a(){return"object"===("undefined"==typeof console?"undefined":c(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){try{return t.storage.debug}catch(e){}if("undefined"!=typeof n&&"env"in n)return n.env.DEBUG}function l(){try{return window.localStorage}catch(e){}}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t=e.exports=r(446),t.log=a,t.formatArgs=s,t.save=o,t.load=u,t.useColors=i,t.storage="undefined"!=typeof window.chrome&&"undefined"!=typeof window.chrome.storage?window.chrome.storage.local:l(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(t,r(18))},function(e,t){"use strict";!function(){function t(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function n(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&d.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){if(e<=65535)return String.fromCharCode(e);var t=String.fromCharCode(Math.floor((e-65536)/1024)+55296),r=String.fromCharCode((e-65536)%1024+56320);return t+r}function o(e){return e<128?h[e]:p.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?m[e]:p.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?h[e]:f.NonAsciiIdentifierStart.test(a(e))}function c(e){return e<128?m[e]:f.NonAsciiIdentifierPart.test(a(e))}var f,p,d,h,m,v;for(p={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},f={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},d=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],h=new Array(128),v=0;v<128;++v)h[v]=v>=97&&v<=122||v>=65&&v<=90||36===v||95===v;for(m=new Array(128),v=0;v<128;++v)m[v]=v>=97&&v<=122||v>=65&&v<=90||v>=48&&v<=57||36===v||95===v;e.exports={isDecimalDigit:t,isHexDigit:r,isOctalDigit:n,isWhiteSpace:i,isLineTerminator:s,isIdentifierStartES5:o,isIdentifierPartES5:u,isIdentifierStartES6:l,isIdentifierPartES6:c}}()},function(e,t,r){"use strict";var n=r(38),i=r(16),s=n(i,"Set");e.exports=s},function(e,t,r){"use strict";function n(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new i;++t<r;)this.add(e[t])}var i=r(159),s=r(553),a=r(554);n.prototype.add=n.prototype.push=s,n.prototype.has=a,e.exports=n},function(e,t,r){"use strict";var n=r(16),i=n.Uint8Array;e.exports=i},function(e,t){"use strict";function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}e.exports=r},function(e,t){"use strict";function r(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}e.exports=r},function(e,t,r){"use strict";function n(e,t){var r=a(e),n=!r&&s(e),c=!r&&!n&&o(e),p=!r&&!n&&!c&&l(e),d=r||n||c||p,h=d?i(e.length,String):[],m=h.length;for(var v in e)!t&&!f.call(e,v)||d&&("length"==v||c&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,m))||h.push(v);return h}var i=r(501),s=r(114),a=r(6),o=r(115),u=r(170),l=r(177),c=Object.prototype,f=c.hasOwnProperty;e.exports=n},function(e,t){"use strict";function r(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}e.exports=r},function(e,t,r){"use strict";function n(e,t,r){(void 0===r||s(e[t],r))&&(void 0!==r||t in e)||i(e,t,r)}var i=r(162),s=r(45);e.exports=n},function(e,t,r){"use strict";var n=r(476),i=r(517),s=i(n);e.exports=s},function(e,t,r){"use strict";var n=r(518),i=n();e.exports=i},function(e,t,r){"use strict";function n(e,t){t=i(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[s(t[r++])];return r&&r==n?e:void 0}var i=r(253),s=r(110);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){var n=t(e);return s(e)?n:i(n,r(e))}var i=r(160),s=r(6);e.exports=n},function(e,t,r){"use strict";function n(e,t,r,o,u){return e===t||(null==e||null==t||!s(e)&&!a(t)?e!==e&&t!==t:i(e,t,r,o,n,u))}var i=r(481),s=r(12),a=r(13);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=-1,n=s(e)?Array(e.length):[];return i(e,function(e,i,s){n[++r]=t(e,i,s)}),n}var i=r(246),s=r(26);e.exports=n},function(e,t){"use strict";function r(e,t){return e.has(t)}e.exports=r},function(e,t,r){"use strict";function n(e,t){return i(e)?e:s(e,t)?[e]:a(o(e))}var i=r(6),s=r(172),a=r(564),o=r(62);e.exports=n},function(e,t,r){(function(e){"use strict";function n(e,t){if(t)return e.slice();var r=e.length,n=c?c(r):new e.constructor(r);return e.copy(n),n}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(16),a="object"==i(t)&&t&&!t.nodeType&&t,o=a&&"object"==i(e)&&e&&!e.nodeType&&e,u=o&&o.exports===a,l=u?s.Buffer:void 0,c=l?l.allocUnsafe:void 0;e.exports=n}).call(t,r(39)(e))},function(e,t,r){"use strict";function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var i=r(166);e.exports=n},function(e,t,r){"use strict";function n(e){return function(t,r,n){var o=Object(t);if(!s(t)){var u=i(r,3);t=a(t),r=function(e){return u(o[e],e,o)}}var l=e(t,r,n);return l>-1?o[u?t[l]:l]:void 0}}var i=r(59),s=r(26),a=r(27);e.exports=n},function(e,t,r){"use strict";var n=r(38),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,r){"use strict";function n(e,t,r,n,l,c){
+var f=r&o,p=e.length,d=t.length;if(p!=d&&!(f&&d>p))return!1;var h=c.get(e);if(h&&c.get(t))return h==t;var m=-1,v=!0,y=r&u?new i:void 0;for(c.set(e,t),c.set(t,e);++m<p;){var g=e[m],b=t[m];if(n)var E=f?n(b,g,m,t,e,c):n(g,b,m,e,t,c);if(void 0!==E){if(E)continue;v=!1;break}if(y){if(!s(t,function(e,t){if(!a(y,t)&&(g===e||l(g,e,r,n,c)))return y.push(t)})){v=!1;break}}else if(g!==b&&!l(g,b,r,n,c)){v=!1;break}}return c.delete(e),c.delete(t),v}var i=r(239),s=r(468),a=r(252),o=1,u=2;e.exports=n},function(e,t){(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n="object"==("undefined"==typeof t?"undefined":r(t))&&t&&t.Object===Object&&t;e.exports=n}).call(t,function(){return this}())},function(e,t,r){"use strict";var n=r(160),i=r(168),s=r(169),a=r(277),o=Object.getOwnPropertySymbols,u=o?function(e){for(var t=[];e;)n(t,s(e)),e=i(e);return t}:a;e.exports=u},function(e,t,r){"use strict";var n=r(460),i=r(158),s=r(462),a=r(238),o=r(463),u=r(15),l=r(268),c="[object Map]",f="[object Object]",p="[object Promise]",d="[object Set]",h="[object WeakMap]",m="[object DataView]",v=l(n),y=l(i),g=l(s),b=l(a),E=l(o),x=u;(n&&x(new n(new ArrayBuffer(1)))!=m||i&&x(new i)!=c||s&&x(s.resolve())!=p||a&&x(new a)!=d||o&&x(new o)!=h)&&(x=function(e){var t=u(e),r=t==f?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case v:return m;case y:return c;case g:return p;case b:return d;case E:return h}return t}),e.exports=x},function(e,t,r){"use strict";function n(e,t,r){t=i(t,e);for(var n=-1,c=t.length,f=!1;++n<c;){var p=l(t[n]);if(!(f=null!=e&&r(e,p)))break;e=e[p]}return f||++n!=c?f:(c=null==e?0:e.length,!!c&&u(c)&&o(p,c)&&(a(e)||s(e)))}var i=r(253),s=r(114),a=r(6),o=r(170),u=r(175),l=r(110);e.exports=n},function(e,t,r){"use strict";function n(e){return"function"!=typeof e.constructor||a(e)?{}:i(s(e))}var i=r(474),s=r(168),a=r(107);e.exports=n},function(e,t,r){"use strict";function n(e){return e===e&&!i(e)}var i=r(12);e.exports=n},function(e,t){"use strict";function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}e.exports=r},function(e,t){"use strict";function r(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}e.exports=r},function(e,t,r){(function(e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(259),s="object"==n(t)&&t&&!t.nodeType&&t,a=s&&"object"==n(e)&&e&&!e.nodeType&&e,o=a&&a.exports===s,u=o&&i.process,l=function(){try{return u&&u.binding&&u.binding("util")}catch(e){}}();e.exports=l}).call(t,r(39)(e))},function(e,t){"use strict";function r(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var n=Function.prototype,i=n.toString;e.exports=r},function(e,t,r){"use strict";var n=r(241),i=r(470),s=r(567),a=r(103),o=a(function(e){return e.push(void 0,i),n(s,void 0,e)});e.exports=o},function(e,t,r){"use strict";function n(e,t){return null!=e&&s(e,t,i)}var i=r(477),s=r(262);e.exports=n},function(e,t,r){"use strict";function n(e){return e===!0||e===!1||s(e)&&i(e)==a}var i=r(15),s=r(13),a="[object Boolean]";e.exports=n},function(e,t,r){"use strict";function n(e){return"number"==typeof e||s(e)&&i(e)==a}var i=r(15),s=r(13),a="[object Number]";e.exports=n},function(e,t,r){"use strict";function n(e){if(!a(e)||i(e)!=o)return!1;var t=s(e);if(null===t)return!0;var r=f.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==p}var i=r(15),s=r(168),a=r(13),o="[object Object]",u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,p=c.call(Object);e.exports=n},function(e,t,r){"use strict";var n=r(485),i=r(104),s=r(267),a=s&&s.isRegExp,o=a?i(a):n;e.exports=o},function(e,t,r){"use strict";var n=r(103),i=r(588),s=n(i);e.exports=s},function(e,t,r){"use strict";function n(e,t,r){return t=(r?s(e,t,r):void 0===t)?1:a(t),i(o(e),t)}var i=r(497),s=r(171),a=r(47),o=r(62);e.exports=n},function(e,t){"use strict";function r(){return[]}e.exports=r},function(e,t,r){"use strict";function n(e){return null==e?[]:i(e,s(e))}var i=r(503),s=r(27);e.exports=n},function(e,t){"use strict";function r(e,t,r){if(c)try{c.call(l,e,t,{value:r})}catch(n){e[t]=r}else e[t]=r}function n(e){return e&&(r(e,"call",e.call),r(e,"apply",e.apply)),e}function i(e){return f?f.call(l,e):(m.prototype=e||null,new m)}function s(){do var e=a(h.call(d.call(v(),36),2));while(p.call(y,e));return y[e]=e}function a(e){var t={};return t[e]=!0,Object.keys(t)[0]}function o(e){return i(null)}function u(e){function t(t){function n(r,n){if(r===u)return n?i=null:i||(i=e(t))}var i;r(t,a,n)}function n(e){return p.call(e,a)||t(e),e[a](u)}var a=s(),u=i(null);return e=e||o,n.forget=function(e){p.call(e,a)&&e[a](u,!0)},n}var l=Object,c=Object.defineProperty,f=Object.create;n(c),n(f);var p=n(Object.prototype.hasOwnProperty),d=n(Number.prototype.toString),h=n(String.prototype.slice),m=function(){},v=Math.random,y=i(null);r(t,"makeUniqueKey",s);var g=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var t=g(e),r=0,n=0,i=t.length;r<i;++r)p.call(y,t[r])||(r>n&&(t[n]=t[r]),++n);return t.length=n,t},r(t,"makeAccessor",u)},function(e,t,r){var n;(function(e,i){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a){var o="object"==s(t)&&t,u="object"==s(e)&&e&&e.exports==o&&e,l="object"==("undefined"==typeof i?"undefined":s(i))&&i;l.global!==l&&l.window!==l||(a=l);var c={rangeOrder:"A range’s `stop` value must be greater than or equal to the `start` value.",codePointRange:"Invalid code point value. Code points range from U+000000 to U+10FFFF."},f=55296,p=56319,d=56320,h=57343,m=/\\x00([^0123456789]|$)/g,v={},y=v.hasOwnProperty,g=function(e,t){var r;for(r in t)y.call(t,r)&&(e[r]=t[r]);return e},b=function(e,t){for(var r=-1,n=e.length;++r<n;)t(e[r],r)},E=v.toString,x=function(e){return"[object Array]"==E.call(e)},A=function(e){return"number"==typeof e||"[object Number]"==E.call(e)},S="0000",_=function(e,t){var r=String(e);return r.length<t?(S+r).slice(-t):r},D=function(e){return Number(e).toString(16).toUpperCase()},C=[].slice,w=function(e){for(var t,r=-1,n=e.length,i=n-1,s=[],a=!0,o=0;++r<n;)if(t=e[r],a)s.push(t),o=t,a=!1;else if(t==o+1){if(r!=i){o=t;continue}a=!0,s.push(t+1)}else s.push(o+1,t),o=t;return a||s.push(t+1),s},F=function(e,t){for(var r,n,i=0,s=e.length;i<s;){if(r=e[i],n=e[i+1],t>=r&&t<n)return t==r?n==r+1?(e.splice(i,2),e):(e[i]=t+1,e):t==n-1?(e[i+1]=t,e):(e.splice(i,2,r,t,t+1,n),e);i+=2}return e},k=function(e,t,r){if(r<t)throw Error(c.rangeOrder);for(var n,i,s=0;s<e.length;){if(n=e[s],i=e[s+1]-1,n>r)return e;if(t<=n&&r>=i)e.splice(s,2);else{if(t>=n&&r<i)return t==n?(e[s]=r+1,e[s+1]=i+1,e):(e.splice(s,2,n,t,r+1,i+1),e);if(t>=n&&t<=i)e[s+1]=t;else if(r>=n&&r<=i)return e[s]=r+1,e;s+=2}}return e},P=function(e,t){var r,n,i=0,s=null,a=e.length;if(t<0||t>1114111)throw RangeError(c.codePointRange);for(;i<a;){if(r=e[i],n=e[i+1],t>=r&&t<n)return e;if(t==r-1)return e[i]=t,e;if(r>t)return e.splice(null!=s?s+2:0,0,t,t+1),e;if(t==n)return t+1==e[i+2]?(e.splice(i,4,r,e[i+3]),e):(e[i+1]=t+1,e);s=i,i+=2}return e.push(t,t+1),e},T=function(e,t){for(var r,n,i=0,s=e.slice(),a=t.length;i<a;)r=t[i],n=t[i+1]-1,s=r==n?P(s,r):B(s,r,n),i+=2;return s},O=function(e,t){for(var r,n,i=0,s=e.slice(),a=t.length;i<a;)r=t[i],n=t[i+1]-1,s=r==n?F(s,r):k(s,r,n),i+=2;return s},B=function(e,t,r){if(r<t)throw Error(c.rangeOrder);if(t<0||t>1114111||r<0||r>1114111)throw RangeError(c.codePointRange);for(var n,i,s=0,a=!1,o=e.length;s<o;){if(n=e[s],i=e[s+1],a){if(n==r+1)return e.splice(s-1,2),e;if(n>r)return e;n>=t&&n<=r&&(i>t&&i-1<=r?(e.splice(s,2),s-=2):(e.splice(s-1,2),s-=2))}else{if(n==r+1)return e[s]=t,e;if(n>r)return e.splice(s,0,t,r+1),e;if(t>=n&&t<i&&r+1<=i)return e;t>=n&&t<i||i==t?(e[s+1]=r+1,a=!0):t<=n&&r+1>=i&&(e[s]=t,e[s+1]=r+1,a=!0)}s+=2}return a||e.push(t,r+1),e},R=function(e,t){var r=0,n=e.length,i=e[r],s=e[n-1];if(n>=2&&(t<i||t>s))return!1;for(;r<n;){if(i=e[r],s=e[r+1],t>=i&&t<s)return!0;r+=2}return!1},I=function(e,t){for(var r,n=0,i=t.length,s=[];n<i;)r=t[n],R(e,r)&&s.push(r),++n;return w(s)},M=function(e){return!e.length},N=function(e){return 2==e.length&&e[0]+1==e[1]},L=function(e){for(var t,r,n=0,i=[],s=e.length;n<s;){for(t=e[n],r=e[n+1];t<r;)i.push(t),++t;n+=2}return i},j=Math.floor,U=function(e){return parseInt(j((e-65536)/1024)+f,10)},V=function(e){return parseInt((e-65536)%1024+d,10)},G=String.fromCharCode,W=function(e){var t;return t=9==e?"\\t":10==e?"\\n":12==e?"\\f":13==e?"\\r":92==e?"\\\\":36==e||e>=40&&e<=43||45==e||46==e||63==e||e>=91&&e<=94||e>=123&&e<=125?"\\"+G(e):e>=32&&e<=126?G(e):e<=255?"\\x"+_(D(e),2):"\\u"+_(D(e),4)},Y=function(e){return e<=65535?W(e):"\\u{"+e.toString(16).toUpperCase()+"}"},q=function(e){var t,r=e.length,n=e.charCodeAt(0);return n>=f&&n<=p&&r>1?(t=e.charCodeAt(1),1024*(n-f)+t-d+65536):n},K=function(e){var t,r,n="",i=0,s=e.length;if(N(e))return W(e[0]);for(;i<s;)t=e[i],r=e[i+1]-1,n+=t==r?W(t):t+1==r?W(t)+W(r):W(t)+"-"+W(r),i+=2;return"["+n+"]"},H=function(e){var t,r,n="",i=0,s=e.length;if(N(e))return Y(e[0]);for(;i<s;)t=e[i],r=e[i+1]-1,n+=t==r?Y(t):t+1==r?Y(t)+Y(r):Y(t)+"-"+Y(r),i+=2;return"["+n+"]"},J=function(e){for(var t,r,n=[],i=[],s=[],a=[],o=0,u=e.length;o<u;)t=e[o],r=e[o+1]-1,t<f?(r<f&&s.push(t,r+1),r>=f&&r<=p&&(s.push(t,f),n.push(f,r+1)),r>=d&&r<=h&&(s.push(t,f),n.push(f,p+1),i.push(d,r+1)),r>h&&(s.push(t,f),n.push(f,p+1),i.push(d,h+1),r<=65535?s.push(h+1,r+1):(s.push(h+1,65536),a.push(65536,r+1)))):t>=f&&t<=p?(r>=f&&r<=p&&n.push(t,r+1),r>=d&&r<=h&&(n.push(t,p+1),i.push(d,r+1)),r>h&&(n.push(t,p+1),i.push(d,h+1),r<=65535?s.push(h+1,r+1):(s.push(h+1,65536),a.push(65536,r+1)))):t>=d&&t<=h?(r>=d&&r<=h&&i.push(t,r+1),r>h&&(i.push(t,h+1),r<=65535?s.push(h+1,r+1):(s.push(h+1,65536),a.push(65536,r+1)))):t>h&&t<=65535?r<=65535?s.push(t,r+1):(s.push(t,65536),a.push(65536,r+1)):a.push(t,r+1),o+=2;return{loneHighSurrogates:n,loneLowSurrogates:i,bmp:s,astral:a}},X=function(e){for(var t,r,n,i,s,a,o=[],u=[],l=!1,c=-1,f=e.length;++c<f;)if(t=e[c],r=e[c+1]){for(n=t[0],i=t[1],s=r[0],a=r[1],u=i;s&&n[0]==s[0]&&n[1]==s[1];)u=N(a)?P(u,a[0]):B(u,a[0],a[1]-1),++c,t=e[c],n=t[0],i=t[1],r=e[c+1],s=r&&r[0],a=r&&r[1],l=!0;o.push([n,l?u:i]),l=!1}else o.push(t);return z(o)},z=function(e){if(1==e.length)return e;for(var t=-1,r=-1;++t<e.length;){var n=e[t],i=n[1],s=i[0],a=i[1];for(r=t;++r<e.length;){var o=e[r],u=o[1],l=u[0],c=u[1];s==l&&a==c&&(N(o[0])?n[0]=P(n[0],o[0][0]):n[0]=B(n[0],o[0][0],o[0][1]-1),e.splice(r,1),--r)}}return e},$=function(e){if(!e.length)return[];for(var t,r,n,i,s,a,o=0,u=[],l=e.length;o<l;){t=e[o],r=e[o+1]-1,n=U(t),i=V(t),s=U(r),a=V(r);var c=i==d,f=a==h,p=!1;n==s||c&&f?(u.push([[n,s+1],[i,a+1]]),p=!0):u.push([[n,n+1],[i,h+1]]),!p&&n+1<s&&(f?(u.push([[n+1,s+1],[d,a+1]]),p=!0):u.push([[n+1,s],[d,h+1]])),p||u.push([[s,s+1],[d,a+1]]),o+=2}return X(u)},Q=function(e){var t=[];return b(e,function(e){var r=e[0],n=e[1];t.push(K(r)+K(n))}),t.join("|")},Z=function(e,t,r){if(r)return H(e);var n=[],i=J(e),s=i.loneHighSurrogates,a=i.loneLowSurrogates,o=i.bmp,u=i.astral,l=!M(s),c=!M(a),f=$(u);return t&&(o=T(o,s),l=!1,o=T(o,a),c=!1),M(o)||n.push(K(o)),f.length&&n.push(Q(f)),l&&n.push(K(s)+"(?![\\uDC00-\\uDFFF])"),c&&n.push("(?:[^\\uD800-\\uDBFF]|^)"+K(a)),n.join("|")},ee=function e(t){return arguments.length>1&&(t=C.call(arguments)),this instanceof e?(this.data=[],t?this.add(t):this):(new e).add(t)};ee.version="1.3.2";var te=ee.prototype;g(te,{add:function(e){var t=this;return null==e?t:e instanceof ee?(t.data=T(t.data,e.data),t):(arguments.length>1&&(e=C.call(arguments)),x(e)?(b(e,function(e){t.add(e)}),t):(t.data=P(t.data,A(e)?e:q(e)),t))},remove:function(e){var t=this;return null==e?t:e instanceof ee?(t.data=O(t.data,e.data),t):(arguments.length>1&&(e=C.call(arguments)),x(e)?(b(e,function(e){t.remove(e)}),t):(t.data=F(t.data,A(e)?e:q(e)),t))},addRange:function(e,t){var r=this;return r.data=B(r.data,A(e)?e:q(e),A(t)?t:q(t)),r},removeRange:function(e,t){var r=this,n=A(e)?e:q(e),i=A(t)?t:q(t);return r.data=k(r.data,n,i),r},intersection:function(e){var t=this,r=e instanceof ee?L(e.data):e;return t.data=I(t.data,r),t},contains:function(e){return R(this.data,A(e)?e:q(e))},clone:function(){var e=new ee;return e.data=this.data.slice(0),e},toString:function(e){var t=Z(this.data,!!e&&e.bmpOnly,!!e&&e.hasUnicodeFlag);return t?t.replace(m,"\\0$1"):"[]"},toRegExp:function(e){var t=this.toString(e&&e.indexOf("u")!=-1?{hasUnicodeFlag:!0}:null);return RegExp(t,e||"")},valueOf:function(){return L(this.data)}}),te.toArray=te.valueOf,"object"==s(r(48))&&r(48)?(n=function(){return ee}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))):o&&!o.nodeType?u?u.exports=ee:o.regenerate=ee:a.regenerate=ee}(void 0)}).call(t,r(39)(e),function(){return this}())},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){h.default.ok(this instanceof s),v.assertIdentifier(e),this.nextTempId=0,this.contextId=e,this.listing=[],this.marked=[!0],this.finalLoc=a(),this.tryEntries=[],this.leapManager=new g.LeapManager(this)}function a(){return v.numericLiteral(-1)}function o(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+(0,p.default)(e))}function u(e){var t=e.type;return"normal"===t?!S.call(e,"target"):"break"===t||"continue"===t?!S.call(e,"value")&&v.isLiteral(e.target):("return"===t||"throw"===t)&&(S.call(e,"value")&&!S.call(e,"target"))}var l=r(7),c=i(l),f=r(34),p=i(f),d=r(64),h=i(d),m=r(1),v=n(m),y=r(603),g=n(y),b=r(604),E=n(b),x=r(282),A=n(x),S=Object.prototype.hasOwnProperty,_=s.prototype;t.Emitter=s,_.mark=function(e){v.assertLiteral(e);var t=this.listing.length;return e.value===-1?e.value=t:h.default.strictEqual(e.value,t),this.marked[t]=!0,e},_.emit=function(e){v.isExpression(e)&&(e=v.expressionStatement(e)),v.assertStatement(e),this.listing.push(e)},_.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},_.assign=function(e,t){return v.expressionStatement(v.assignmentExpression("=",e,t))},_.contextProperty=function(e,t){return v.memberExpression(this.contextId,t?v.stringLiteral(e):v.identifier(e),!!t)},_.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},_.setReturnValue=function(e){v.assertExpression(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},_.clearPendingException=function(e,t){v.assertLiteral(e);var r=v.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,r):this.emit(r)},_.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(v.breakStatement())},_.jumpIf=function(e,t){v.assertExpression(e),v.assertLiteral(t),this.emit(v.ifStatement(e,v.blockStatement([this.assign(this.contextProperty("next"),t),v.breakStatement()])))},_.jumpIfNot=function(e,t){v.assertExpression(e),v.assertLiteral(t);var r=void 0;r=v.isUnaryExpression(e)&&"!"===e.operator?e.argument:v.unaryExpression("!",e),this.emit(v.ifStatement(r,v.blockStatement([this.assign(this.contextProperty("next"),t),v.breakStatement()])))},_.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)},_.getContextFunction=function(e){return v.functionExpression(e||null,[this.contextId],v.blockStatement([this.getDispatchLoop()]),!1,!1)},_.getDispatchLoop=function(){var e=this,t=[],r=void 0,n=!1;return e.listing.forEach(function(i,s){e.marked.hasOwnProperty(s)&&(t.push(v.switchCase(v.numericLiteral(s),r=[])),n=!1),n||(r.push(i),v.isCompletionStatement(i)&&(n=!0))}),this.finalLoc.value=this.listing.length,t.push(v.switchCase(this.finalLoc,[]),v.switchCase(v.stringLiteral("end"),[v.returnStatement(v.callExpression(this.contextProperty("stop"),[]))])),v.whileStatement(v.numericLiteral(1),v.switchStatement(v.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),t))},_.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return v.arrayExpression(this.tryEntries.map(function(t){var r=t.firstLoc.value;h.default.ok(r>=e,"try entries out of order"),e=r;var n=t.catchEntry,i=t.finallyEntry,s=[t.firstLoc,n?n.firstLoc:null];return i&&(s[2]=i.firstLoc,s[3]=i.afterLoc),v.arrayExpression(s)}))},_.explode=function(e,t){var r=e.node,n=this;if(v.assertNode(r),v.isDeclaration(r))throw o(r);if(v.isStatement(r))return n.explodeStatement(e);if(v.isExpression(r))return n.explodeExpression(e,t);switch(r.type){case"Program":return e.get("body").map(n.explodeStatement,n);case"VariableDeclarator":throw o(r);case"Property":case"SwitchCase":case"CatchClause":throw new Error(r.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+(0,p.default)(r.type))}},_.explodeStatement=function(e,t){var r=e.node,n=this,i=void 0,s=void 0,o=void 0;if(v.assertStatement(r),t?v.assertIdentifier(t):t=null,v.isBlockStatement(r))return void e.get("body").forEach(function(e){n.explodeStatement(e)});if(!E.containsLeap(r))return void n.emit(r);var u=function(){switch(r.type){case"ExpressionStatement":n.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":s=a(),n.leapManager.withEntry(new g.LabeledEntry(s,r.label),function(){n.explodeStatement(e.get("body"),r.label)}),n.mark(s);break;case"WhileStatement":i=a(),s=a(),n.mark(i),n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new g.LoopEntry(s,i,t),function(){n.explodeStatement(e.get("body"))}),n.jump(i),n.mark(s);break;case"DoWhileStatement":var u=a(),l=a();s=a(),n.mark(u),n.leapManager.withEntry(new g.LoopEntry(s,l,t),function(){n.explode(e.get("body"))}),n.mark(l),n.jumpIf(n.explodeExpression(e.get("test")),u),n.mark(s);break;case"ForStatement":o=a();var c=a();s=a(),r.init&&n.explode(e.get("init"),!0),n.mark(o),r.test&&n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new g.LoopEntry(s,c,t),function(){n.explodeStatement(e.get("body"))}),n.mark(c),r.update&&n.explode(e.get("update"),!0),n.jump(o),n.mark(s);break;case"TypeCastExpression":return{v:n.explodeExpression(e.get("expression"))};case"ForInStatement":o=a(),s=a();var f=n.makeTempVar();n.emitAssign(f,v.callExpression(A.runtimeProperty("keys"),[n.explodeExpression(e.get("right"))])),n.mark(o);var d=n.makeTempVar();n.jumpIf(v.memberExpression(v.assignmentExpression("=",d,v.callExpression(f,[])),v.identifier("done"),!1),s),n.emitAssign(r.left,v.memberExpression(d,v.identifier("value"),!1)),n.leapManager.withEntry(new g.LoopEntry(s,o,t),function(){n.explodeStatement(e.get("body"))}),n.jump(o),n.mark(s);break;case"BreakStatement":n.emitAbruptCompletion({type:"break",target:n.leapManager.getBreakLoc(r.label)});break;case"ContinueStatement":n.emitAbruptCompletion({type:"continue",target:n.leapManager.getContinueLoc(r.label)});break;case"SwitchStatement":var m=n.emitAssign(n.makeTempVar(),n.explodeExpression(e.get("discriminant")));s=a();for(var y=a(),b=y,E=[],x=r.cases||[],S=x.length-1;S>=0;--S){var _=x[S];v.assertSwitchCase(_),_.test?b=v.conditionalExpression(v.binaryExpression("===",m,_.test),E[S]=a(),b):E[S]=y}var C=e.get("discriminant");C.replaceWith(b),n.jump(n.explodeExpression(C)),n.leapManager.withEntry(new g.SwitchEntry(s),function(){e.get("cases").forEach(function(e){var t=e.key;n.mark(E[t]),e.get("consequent").forEach(function(e){n.explodeStatement(e)})})}),n.mark(s),y.value===-1&&(n.mark(y),h.default.strictEqual(s.value,y.value));break;case"IfStatement":var w=r.alternate&&a();s=a(),n.jumpIfNot(n.explodeExpression(e.get("test")),w||s),n.explodeStatement(e.get("consequent")),w&&(n.jump(s),n.mark(w),n.explodeStatement(e.get("alternate"))),n.mark(s);break;case"ReturnStatement":n.emitAbruptCompletion({type:"return",value:n.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":s=a();var F=r.handler,k=F&&a(),P=k&&new g.CatchEntry(k,F.param),T=r.finalizer&&a(),O=T&&new g.FinallyEntry(T,s),B=new g.TryEntry(n.getUnmarkedCurrentLoc(),P,O);n.tryEntries.push(B),n.updateContextPrevLoc(B.firstLoc),n.leapManager.withEntry(B,function(){n.explodeStatement(e.get("block")),k&&!function(){T?n.jump(T):n.jump(s),n.updateContextPrevLoc(n.mark(k));var t=e.get("handler.body"),r=n.makeTempVar();n.clearPendingException(B.firstLoc,r),t.traverse(D,{safeParam:r,catchParamName:F.param.name}),n.leapManager.withEntry(P,function(){n.explodeStatement(t)})}(),T&&(n.updateContextPrevLoc(n.mark(T)),n.leapManager.withEntry(O,function(){n.explodeStatement(e.get("finalizer"))}),n.emit(v.returnStatement(v.callExpression(n.contextProperty("finish"),[O.firstLoc]))))}),n.mark(s);break;case"ThrowStatement":n.emit(v.throwStatement(n.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+(0,p.default)(r.type))}}();return"object"===("undefined"==typeof u?"undefined":(0,c.default)(u))?u.v:void 0};var D={Identifier:function(e,t){e.node.name===t.catchParamName&&A.isReference(e)&&e.replaceWith(t.safeParam)},Scope:function(e,t){e.scope.hasOwnBinding(t.catchParamName)&&e.skip()}};_.emitAbruptCompletion=function(e){u(e)||h.default.ok(!1,"invalid completion record: "+(0,p.default)(e)),h.default.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=[v.stringLiteral(e.type)];"break"===e.type||"continue"===e.type?(v.assertLiteral(e.target),t[1]=e.target):"return"!==e.type&&"throw"!==e.type||e.value&&(v.assertExpression(e.value),t[1]=e.value),this.emit(v.returnStatement(v.callExpression(this.contextProperty("abrupt"),t)))},_.getUnmarkedCurrentLoc=function(){return v.numericLiteral(this.listing.length)},_.updateContextPrevLoc=function(e){e?(v.assertLiteral(e),e.value===-1?e.value=this.listing.length:h.default.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},_.explodeExpression=function(e,t){function r(e){return v.assertExpression(e),t?void s.emit(e):e}function n(e,t,r){h.default.ok(!r||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var n=s.explodeExpression(t,r);return r||(e||l&&!v.isLiteral(n))&&(n=s.emitAssign(e||s.makeTempVar(),n)),n}var i=e.node;if(!i)return i;v.assertExpression(i);var s=this,o=void 0,u=void 0;if(!E.containsLeap(i))return r(i);var l=E.containsLeap.onlyChildren(i),f=function(){switch(i.type){case"MemberExpression":return{v:r(v.memberExpression(s.explodeExpression(e.get("object")),i.computed?n(null,e.get("property")):i.property,i.computed))};case"CallExpression":var l=e.get("callee"),c=e.get("arguments"),f=void 0,d=[],m=!1;if(c.forEach(function(e){m=m||E.containsLeap(e.node)}),v.isMemberExpression(l.node))if(m){var y=n(s.makeTempVar(),l.get("object")),g=l.node.computed?n(null,l.get("property")):l.node.property;d.unshift(y),f=v.memberExpression(v.memberExpression(y,g,l.node.computed),v.identifier("call"),!1)}else f=s.explodeExpression(l);else f=n(null,l),v.isMemberExpression(f)&&(f=v.sequenceExpression([v.numericLiteral(0),f]));return c.forEach(function(e){d.push(n(null,e))}),{v:r(v.callExpression(f,d))};case"NewExpression":return{v:r(v.newExpression(n(null,e.get("callee")),e.get("arguments").map(function(e){return n(null,e)})))};case"ObjectExpression":return{v:r(v.objectExpression(e.get("properties").map(function(e){return e.isObjectProperty()?v.objectProperty(e.node.key,n(null,e.get("value")),e.node.computed):e.node})))};case"ArrayExpression":return{v:r(v.arrayExpression(e.get("elements").map(function(e){return n(null,e)})))};case"SequenceExpression":var b=i.expressions.length-1;return e.get("expressions").forEach(function(e){e.key===b?o=s.explodeExpression(e,t):s.explodeExpression(e,!0)}),{v:o};case"LogicalExpression":u=a(),t||(o=s.makeTempVar());var x=n(o,e.get("left"));return"&&"===i.operator?s.jumpIfNot(x,u):(h.default.strictEqual(i.operator,"||"),s.jumpIf(x,u)),n(o,e.get("right"),t),s.mark(u),{v:o};case"ConditionalExpression":var A=a();u=a();var S=s.explodeExpression(e.get("test"));return s.jumpIfNot(S,A),t||(o=s.makeTempVar()),n(o,e.get("consequent"),t),s.jump(u),s.mark(A),n(o,e.get("alternate"),t),s.mark(u),{v:o};case"UnaryExpression":return{v:r(v.unaryExpression(i.operator,s.explodeExpression(e.get("argument")),!!i.prefix))};case"BinaryExpression":return{v:r(v.binaryExpression(i.operator,n(null,e.get("left")),n(null,e.get("right"))))};case"AssignmentExpression":return{v:r(v.assignmentExpression(i.operator,s.explodeExpression(e.get("left")),s.explodeExpression(e.get("right"))))};case"UpdateExpression":return{v:r(v.updateExpression(i.operator,s.explodeExpression(e.get("argument")),i.prefix))};case"YieldExpression":u=a();var _=i.argument&&s.explodeExpression(e.get("argument"));if(_&&i.delegate){var D=s.makeTempVar();return s.emit(v.returnStatement(v.callExpression(s.contextProperty("delegateYield"),[_,v.stringLiteral(D.property.name),u]))),s.mark(u),{v:D}}return s.emitAssign(s.contextProperty("next"),u),s.emit(v.returnStatement(_||null)),s.mark(u),{v:s.contextProperty("sent")};default:throw new Error("unknown Expression of type "+(0,p.default)(i.type))}}();return"object"===("undefined"==typeof f?"undefined":(0,c.default)(f))?f.v:void 0}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return o.memberExpression(o.identifier("regeneratorRuntime"),o.identifier(e),!1)}function s(e){return e.isReferenced()||e.parentPath.isAssignmentExpression({left:e.node})}t.__esModule=!0,t.runtimeProperty=i,t.isReference=s;var a=r(1),o=n(a)},function(e,t){"use strict";e.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},function(e,t,r){"use strict";function n(){this._array=[],this._set=Object.create(null)}var i=r(63),s=Object.prototype.hasOwnProperty;n.fromArray=function(e,t){for(var r=new n,i=0,s=e.length;i<s;i++)r.add(e[i],t);return r},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(e,t){var r=i.toSetString(e),n=s.call(this._set,r),a=this._array.length;n&&!t||this._array.push(e),n||(this._set[r]=a)},n.prototype.has=function(e){var t=i.toSetString(e);return s.call(this._set,t)},n.prototype.indexOf=function(e){var t=i.toSetString(e);if(s.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},t.ArraySet=n},function(e,t,r){"use strict";function n(e){return e<0?(-e<<1)+1:(e<<1)+0}function i(e){var t=1===(1&e),r=e>>1;return t?-r:r}var s=r(611),a=5,o=1<<a,u=o-1,l=o;t.encode=function(e){var t,r="",i=n(e);do t=i&u,i>>>=a,i>0&&(t|=l),r+=s.encode(t);while(i>0);return r},t.decode=function(e,t,r){var n,o,c=e.length,f=0,p=0;do{if(t>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(o=s.decode(e.charCodeAt(t++)),o===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(o&l),o&=u,f+=o<<p,p+=a}while(n);r.value=i(f),r.rest=t}},function(e,t,r){"use strict";function n(e){e||(e={}),this._file=s.getArg(e,"file",null),this._sourceRoot=s.getArg(e,"sourceRoot",null),this._skipValidation=s.getArg(e,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}var i=r(285),s=r(63),a=r(284).ArraySet,o=r(613).MappingList;n.prototype._version=3,n.fromSourceMap=function(e){var t=e.sourceRoot,r=new n({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=s.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},n.prototype.addMapping=function(e){var t=s.getArg(e,"generated"),r=s.getArg(e,"original",null),n=s.getArg(e,"source",null),i=s.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},n.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=s.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var i=this._sourceRoot;null!=i&&(n=s.relative(i,n));var o=new a,u=new a;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=r&&(t.source=s.join(r,t.source)),null!=i&&(t.source=s.relative(i,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var l=t.source;null==l||o.has(l)||o.add(l);var c=t.name;null==c||u.has(c)||u.add(c)},this),this._sources=o,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=s.join(r,t)),null!=i&&(t=s.relative(i,t)),this.setSourceContent(t,n))},this)},n.prototype._validateMapping=function(e,t,r,n){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,f=0,p="",d=this._mappings.toArray(),h=0,m=d.length;h<m;h++){if(t=d[h],e="",t.generatedLine!==o)for(a=0;t.generatedLine!==o;)e+=";",o++;else if(h>0){if(!s.compareByGeneratedPositionsInflated(t,d[h-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-f),f=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),p+=e}return p},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=n},function(e,t,r){"use strict";t.SourceMapGenerator=r(286).SourceMapGenerator,t.SourceMapConsumer=r(615).SourceMapConsumer,
+t.SourceNode=r(616).SourceNode},function(e,t,r){(function(e){"use strict";function t(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}Object.defineProperty(e,"exports",{enumerable:!0,get:t})}).call(t,r(39)(e))},function(e,t,r){"use strict";e.exports=r(182)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e,t){if(e&&t)return(0,o.default)(e,t,function(e,t){if(t&&Array.isArray(e)){for(var r=t.slice(0),n=e,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var a=r(585),o=n(a);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.default=function(e,t,r){if(e){if("Program"===e.type)return s.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var i=r(1),s=n(i);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=E.functionExpression(null,[E.identifier("global")],E.blockStatement(r)),i=E.program([E.expressionStatement(E.callExpression(n,[c.get("selfGlobal")]))]);return r.push(E.variableDeclaration("var",[E.variableDeclarator(e,E.assignmentExpression("=",E.memberExpression(E.identifier("global"),e),E.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(E.variableDeclaration("var",[E.variableDeclarator(e,E.identifier("global"))])),t(r),E.program([x({FACTORY_PARAMETERS:E.identifier("global"),BROWSER_ARGUMENTS:E.assignmentExpression("=",E.memberExpression(E.identifier("root"),e),E.objectExpression([])),COMMON_ARGUMENTS:E.identifier("exports"),AMD_ARGUMENTS:E.arrayExpression([E.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:E.identifier("this")})])}function o(e,t){var r=[];return r.push(E.variableDeclaration("var",[E.variableDeclarator(e,E.objectExpression([]))])),t(r),r.push(E.expressionStatement(e)),E.program(r)}function u(e,t,r){(0,g.default)(c.list,function(n){if(!(r&&r.indexOf(n)<0)){var i=E.identifier(n);e.push(E.expressionStatement(E.assignmentExpression("=",E.memberExpression(t,i),c.get(n))))}})}t.__esModule=!0,t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=E.identifier("babelHelpers"),n=function(t){return u(t,r,e)},i=void 0,l={global:s,umd:a,var:o}[t];if(!l)throw new Error(h.get("unsupportedOutputType",t));return i=l(r,n),(0,p.default)(i).code};var l=r(192),c=i(l),f=r(183),p=n(f),d=r(19),h=i(d),m=r(4),v=n(m),y=r(112),g=n(y),b=r(1),E=i(b),x=(0,v.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(65),s=n(i),a=r(589),o=n(a);t.default=new s.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n<t.body.length;n++){var i=t.body[n];if(i&&null!=i._blockHoist){r=!0;break}}r&&(t.body=(0,o.default)(t.body,function(e){var t=e&&e._blockHoist;return null==t&&(t=1),t===!0&&(t=2),-1*t}))}}}}),e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return!!e.is("_forceShadow")||t}function a(e,t){var r=e.inShadow(t);if(s(e,r)){var n=e.node._shadowedFunctionLiteral,i=void 0,a=!1,o=e.find(function(t){if(t.parentPath&&t.parentPath.isClassProperty()&&"value"===t.key)return!0;if(e===t)return!1;if((t.isProgram()||t.isFunction())&&(i=i||t),t.isProgram())return a=!0,!0;if(t.isFunction()&&!t.isArrowFunctionExpression()){if(n){if(t===n||t.node===n.node)return!0}else if(!t.is("shadow"))return!0;return a=!0,!1}return!1});if(n&&o.isProgram()&&!n.isProgram()&&(o=e.findParent(function(e){return e.isProgram()||e.isFunction()})),o!==i&&a){var u=o.getData(t);if(u)return e.replaceWith(u);var l=e.scope.generateUidIdentifier(t);o.setData(t,l);var c=o.findParent(function(e){return e.isClass()}),f=!!(c&&c.node&&c.node.superClass);if("this"===t&&o.isMethod({kind:"constructor"})&&f)o.scope.push({id:l}),o.traverse(h,{id:l});else{var d="this"===t?p.thisExpression():p.identifier(t);n&&(d._shadowedFunctionLiteral=n),o.scope.push({id:l,init:d})}return e.replaceWith(l)}}}t.__esModule=!0;var o=r(10),u=i(o),l=r(65),c=i(l),f=r(1),p=n(f),d=(0,u.default)("super this bound"),h={CallExpression:function(e){if(e.get("callee").isSuper()){var t=e.node;t[d]||(t[d]=!0,e.replaceWith(p.assignmentExpression("=",this.id,t)))}}};t.default=new c.default({name:"internal.shadowFunctions",visitor:{ThisExpression:function(e){a(e,"this")},ReferencedIdentifier:function(e){"arguments"===e.node.name&&a(e,"arguments")}}}),e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(291),o=n(a),u=r(65),l=n(u),c=r(49),f=n(c),p=function(){function e(){(0,s.default)(this,e)}return e.prototype.lint=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new f.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new f.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new l.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,o.default)(e);var n=new f.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();t.default=p,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(42),o=n(a),u=r(41),l=n(u),c=r(120),f=n(c),p=r(49),d=(n(p),function(e){function t(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,s.default)(this,t);var a=(0,o.default)(this,e.call(this));return a.plugin=n,a.key=n.key,a.file=r,a.opts=i,a}return(0,l.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(f.default));t.default=d,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(595),o=n(a),u=/^[ \t]+$/,l=function(){function e(t){(0,s.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,o.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&u.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s<e.length;s++)"\n"===e[s]?(this._position.line++,this._position.column=0):this._position.column++},e.prototype.removeTrailingNewline=function(){this._queue.length>0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return t===-1?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r<e.length;r++)"\n"===e[r]&&t++;return this._position.line+t},e}();t.default=l,e.exports=t.default},function(e,t,r){"use strict";function n(e){this.print(e.program,e)}function i(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline(),this.printSequence(e.body,e)}function s(e){this.token("{"),this.printInnerComments(e);var t=e.directives&&e.directives.length;e.body.length||t?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),t&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source("end",e.loc),this.endsWith("\n")||this.newline(),this.rightBrace()):(this.source("end",e.loc),this.token("}"))}function a(){}function o(e){this.print(e.value,e),this.semicolon()}t.__esModule=!0,t.File=n,t.Program=i,t.BlockStatement=s,t.Noop=a,t.Directive=o;var u=r(124);Object.defineProperty(t,"DirectiveLiteral",{enumerable:!0,get:function(){return u.StringLiteral}})},function(e,t){"use strict";function r(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function n(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())}function i(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e)),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()}function s(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)}t.__esModule=!0,t.ClassDeclaration=r,t.ClassBody=n,t.ClassProperty=i,t.ClassMethod=s,t.ClassExpression=r},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)}function a(e){this.word("do"),this.space(),this.print(e.body,e)}function o(e){this.token("("),this.print(e.expression,e),this.token(")")}function u(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))}function l(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)}function c(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||k.isCallExpression(t,{callee:e})||k.isMemberExpression(t)||k.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))}function f(e){this.printList(e.expressions,e)}function p(){this.word("this")}function d(){this.word("super")}function h(e){this.token("@"),this.print(e.expression,e),this.newline()}function m(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function v(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=m,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")}function y(){this.word("import")}function g(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function b(){this.semicolon(!0)}function E(e){this.print(e.expression,e),this.semicolon()}function x(e){this.print(e.left,e),e.left.optional&&this.token("?"),this.print(e.left.typeAnnotation,e),this.space(),this.token("="),this.space(),this.print(e.right,e)}function A(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!T.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}function S(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)}function _(e){if(this.print(e.object,e),!e.computed&&k.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;k.isLiteral(e.property)&&(0,w.default)(e.property.value)&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))}function D(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)}t.__esModule=!0,t.LogicalExpression=t.BinaryExpression=t.AwaitExpression=t.YieldExpression=void 0,t.UnaryExpression=s,t.DoExpression=a,t.ParenthesizedExpression=o,t.UpdateExpression=u,t.ConditionalExpression=l,t.NewExpression=c,t.SequenceExpression=f,t.ThisExpression=p,t.Super=d,t.Decorator=h,t.CallExpression=v,t.Import=y,t.EmptyStatement=b,t.ExpressionStatement=E,t.AssignmentPattern=x,t.AssignmentExpression=A,t.BindExpression=S,t.MemberExpression=_,t.MetaProperty=D;var C=r(272),w=i(C),F=r(1),k=n(F),P=r(184),T=n(P);t.YieldExpression=g("yield"),t.AwaitExpression=g("await");t.BinaryExpression=A,t.LogicalExpression=A},function(e,t,r){"use strict";function n(){this.word("any")}function i(e){this.print(e.elementType,e),this.token("["),this.token("]")}function s(){this.word("boolean")}function a(e){this.word(e.value?"true":"false")}function o(){this.word("null")}function u(e){this.word("declare"),this.space(),this.word("class"),this.space(),this._interfaceish(e)}function l(e){this.word("declare"),this.space(),this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),this.semicolon()}function c(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)}function f(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)}function p(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)}function d(e){this.word("declare"),this.space(),this.TypeAlias(e)}function h(e){this.word("declare"),this.space(),this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()}function m(){this.token("*")}function v(e,t){this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e)),this.token(")"),"ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type?this.token(":"):(this.space(),this.token("=>")),this.space(),this.print(e.returnType,e)}function y(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)}function g(e){this.print(e.id,e),this.print(e.typeParameters,e)}function b(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)}function E(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")}function x(e){this.word("interface"),this.space(),this._interfaceish(e)}function A(){this.space(),this.token("&"),this.space()}function S(e){this.printJoin(e.types,e,{separator:A})}function _(){this.word("mixed")}function D(){this.word("empty")}function C(e){this.token("?"),this.print(e.typeAnnotation,e)}function w(){this.word("number")}function F(){this.word("string")}function k(){this.word("this")}function P(e){this.token("["),this.printList(e.types,e),this.token("]")}function T(e){this.word("typeof"),this.space(),this.print(e.argument,e)}function O(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()}function B(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)}function R(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))}function I(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")}function M(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")}function N(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)}function L(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)}function j(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)}function U(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)}function V(){this.space(),this.token("|"),this.space()}function G(e){this.printJoin(e.types,e,{separator:V})}function W(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")}function Y(){this.word("void")}t.__esModule=!0,t.AnyTypeAnnotation=n,t.ArrayTypeAnnotation=i,t.BooleanTypeAnnotation=s,t.BooleanLiteralTypeAnnotation=a,t.NullLiteralTypeAnnotation=o,t.DeclareClass=u,t.DeclareFunction=l,t.DeclareInterface=c,t.DeclareModule=f,t.DeclareModuleExports=p,t.DeclareTypeAlias=d,t.DeclareVariable=h,t.ExistentialTypeParam=m,t.FunctionTypeAnnotation=v,t.FunctionTypeParam=y,t.InterfaceExtends=g,t._interfaceish=b,t._variance=E,t.InterfaceDeclaration=x,t.IntersectionTypeAnnotation=S,t.MixedTypeAnnotation=_,t.EmptyTypeAnnotation=D,t.NullableTypeAnnotation=C;var q=r(124);Object.defineProperty(t,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return q.NumericLiteral}}),Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return q.StringLiteral}}),t.NumberTypeAnnotation=w,t.StringTypeAnnotation=F,t.ThisTypeAnnotation=k,t.TupleTypeAnnotation=P,t.TypeofTypeAnnotation=T,t.TypeAlias=O,t.TypeAnnotation=B,t.TypeParameter=R,t.TypeParameterInstantiation=I,t.ObjectTypeAnnotation=M,t.ObjectTypeCallProperty=N,t.ObjectTypeIndexer=L,t.ObjectTypeProperty=j,t.QualifiedTypeIdentifier=U,t.UnionTypeAnnotation=G,t.TypeCastExpression=W,t.VoidTypeAnnotation=Y,t.ClassImplements=g,t.GenericTypeAnnotation=g,t.TypeParameterDeclaration=I},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))}function s(e){this.word(e.name)}function a(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)}function o(e){this.print(e.object,e),this.token("."),this.print(e.property,e)}function u(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")}function l(e){this.token("{"),this.print(e.expression,e),this.token("}")}function c(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")}function f(e){this.token(e.value)}function p(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();for(var r=e.children,n=Array.isArray(r),i=0,r=n?r:(0,g.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.print(a,e)}this.dedent(),this.print(e.closingElement,e)}}function d(){this.space()}function h(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:d})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")}function m(e){this.token("</"),this.print(e.name,e),this.token(">")}function v(){}t.__esModule=!0;var y=r(2),g=n(y);t.JSXAttribute=i,t.JSXIdentifier=s,t.JSXNamespacedName=a,t.JSXMemberExpression=o,t.JSXSpreadAttribute=u,t.JSXExpressionContainer=l,t.JSXSpreadChild=c,t.JSXText=f,t.JSXElement=p,t.JSXOpeningElement=h,t.JSXClosingElement=m,t.JSXEmptyExpression=v},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)}function s(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)}function a(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}function o(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&c.isIdentifier(t)&&!u(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)}function u(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}t.__esModule=!0,t.FunctionDeclaration=void 0,t._params=i,t._method=s,t.FunctionExpression=a,t.ArrowFunctionExpression=o;var l=r(1),c=n(l);t.FunctionDeclaration=a},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))}function s(e){this.print(e.local,e)}function a(e){this.print(e.exported,e)}function o(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))}function u(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)}function l(e){this.word("export"),this.space(),this.token("*"),e.exported&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e)),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()}function c(){this.word("export"),this.space(),p.apply(this,arguments)}function f(){this.word("export"),this.space(),this.word("default"),this.space(),p.apply(this,arguments)}function p(e){if(e.declaration){var t=e.declaration;this.print(t,e),v.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var i=r[0];if(!v.isExportDefaultSpecifier(i)&&!v.isExportNamespaceSpecifier(i))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}function d(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!v.isImportDefaultSpecifier(r)&&!v.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()}function h(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)}t.__esModule=!0,t.ImportSpecifier=i,t.ImportDefaultSpecifier=s,t.ExportDefaultSpecifier=a,t.ExportSpecifier=o,t.ExportNamespaceSpecifier=u,t.ExportAllDeclaration=l,t.ExportNamedDeclaration=c,t.ExportDefaultDeclaration=f,t.ImportDeclaration=d,t.ImportNamespaceSpecifier=h;var m=r(1),v=n(m)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)}function a(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&D.isIfStatement(o(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))}function o(e){return D.isStatement(e.body)?o(e.body):e}function u(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)}function l(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)}function c(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}function p(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)}function d(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))}function h(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)}function m(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")}function v(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))}function y(){this.word("debugger"),this.semicolon()}function g(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}function b(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}function E(e,t){this.word(e.kind),this.space();var r=!1;if(!D.isFor(t))for(var n=e.declarations,i=Array.isArray(n),s=0,n=i?n:(0,S.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;o.init&&(r=!0)}var u=void 0;r&&(u="const"===e.kind?b:g),this.printList(e.declarations,e,{separator:u}),(!D.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()}function x(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))}t.__esModule=!0,t.ThrowStatement=t.BreakStatement=t.ReturnStatement=t.ContinueStatement=t.ForAwaitStatement=t.ForOfStatement=t.ForInStatement=void 0;var A=r(2),S=i(A);t.WithStatement=s,t.IfStatement=a,t.ForStatement=u,t.WhileStatement=l,t.DoWhileStatement=c,t.LabeledStatement=p,t.TryStatement=d,t.CatchClause=h,t.SwitchStatement=m,t.SwitchCase=v,t.DebuggerStatement=y,t.VariableDeclaration=E,t.VariableDeclarator=x;var _=r(1),D=n(_),C=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space(),e="of"),this.token("("),this.print(t.left,t),this.space(),this.word(e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};t.ForInStatement=C("in"),t.ForOfStatement=C("of"),t.ForAwaitStatement=C("await"),t.ContinueStatement=f("continue"),t.ReturnStatement=f("return","argument"),t.BreakStatement=f("break"),t.ThrowStatement=f("throw","argument")},function(e,t){"use strict";function r(e){this.print(e.tag,e),this.print(e.quasi,e)}function n(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");
+r||this.space(),this.token(i),n||this.space()}function i(e){for(var t=e.quasis,r=0;r<t.length;r++)this.print(t[r],e),r+1<t.length&&this.print(e.expressions[r],e)}t.__esModule=!0,t.TaggedTemplateExpression=r,t.TemplateElement=n,t.TemplateLiteral=i},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e,t){return b.isArrayTypeAnnotation(t)}function s(e,t){return!(!b.isMemberExpression(t)||t.object!==e)}function a(e,t,r){return y(r,{considerArrow:!0})}function o(e,t){if((b.isCallExpression(t)||b.isNewExpression(t))&&t.callee===e)return!0;if(b.isUnaryLike(t))return!0;if(b.isMemberExpression(t)&&t.object===e)return!0;if(b.isBinary(t)){var r=t.operator,n=E[r],i=e.operator,s=E[i];if(n>s)return!0;if(n===s&&t.right===e&&!b.isLogicalExpression(t))return!0}return!1}function u(e,t){if("in"===e.operator){if(b.isVariableDeclarator(t))return!0;if(b.isFor(t))return!0}return!1}function l(e,t){return!b.isForStatement(t)&&((!b.isExpressionStatement(t)||t.expression!==e)&&(!b.isReturnStatement(t)&&(!b.isThrowStatement(t)&&((!b.isSwitchStatement(t)||t.discriminant!==e)&&((!b.isWhileStatement(t)||t.test!==e)&&((!b.isIfStatement(t)||t.test!==e)&&(!b.isForInStatement(t)||t.right!==e)))))))}function c(e,t){return b.isBinary(t)||b.isUnaryLike(t)||b.isCallExpression(t)||b.isMemberExpression(t)||b.isNewExpression(t)||b.isConditionalExpression(t)&&e===t.test}function f(e,t,r){return y(r,{considerDefaultExports:!0})}function p(e,t){return!!b.isMemberExpression(t,{object:e})||!(!b.isCallExpression(t,{callee:e})&&!b.isNewExpression(t,{callee:e}))}function d(e,t,r){return y(r,{considerDefaultExports:!0})}function h(e,t){return!!b.isExportDeclaration(t)||(!(!b.isBinaryExpression(t)&&!b.isLogicalExpression(t))||(!!b.isUnaryExpression(t)||p(e,t)))}function m(e,t){return!!b.isUnaryLike(t)||(!!b.isBinary(t)||(!!b.isConditionalExpression(t,{test:e})||p(e,t)))}function v(e){return!!b.isObjectPattern(e.left)||m.apply(void 0,arguments)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a];a--;for(var u=e[a];a>0;){if(b.isExpressionStatement(u,{expression:o}))return!0;if(s&&b.isExportDefaultDeclaration(u,{declaration:o}))return!0;if(n&&b.isArrowFunctionExpression(u,{body:o}))return!0;if(!(b.isCallExpression(u,{callee:o})||b.isSequenceExpression(u)&&u.expressions[0]===o||b.isMemberExpression(u,{object:o})||b.isConditional(u,{test:o})||b.isBinary(u,{left:o})||b.isAssignmentExpression(u,{left:o})))return!1;o=u,a--,u=e[a]}return!1}t.__esModule=!0,t.AwaitExpression=t.FunctionTypeAnnotation=void 0,t.NullableTypeAnnotation=i,t.UpdateExpression=s,t.ObjectExpression=a,t.Binary=o,t.BinaryExpression=u,t.SequenceExpression=l,t.YieldExpression=c,t.ClassExpression=f,t.UnaryLike=p,t.FunctionExpression=d,t.ArrowFunctionExpression=h,t.ConditionalExpression=m,t.AssignmentExpression=v;var g=r(1),b=n(g),E={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};t.FunctionTypeAnnotation=i,t.AwaitExpression=c},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return m.isMemberExpression(e)?(s(e.object,t),e.computed&&s(e.property,t)):m.isBinary(e)||m.isAssignmentExpression(e)?(s(e.left,t),s(e.right,t)):m.isCallExpression(e)?(t.hasCall=!0,s(e.callee,t)):m.isFunction(e)?t.hasFunction=!0:m.isIdentifier(e)&&(t.hasHelper=t.hasHelper||a(e.callee)),t}function a(e){return m.isMemberExpression(e)?a(e.object)||a(e.property):m.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:m.isCallExpression(e)?a(e.callee):!(!m.isBinary(e)&&!m.isAssignmentExpression(e))&&(m.isIdentifier(e.left)&&a(e.left)||a(e.right))}function o(e){return m.isLiteral(e)||m.isObjectExpression(e)||m.isArrayExpression(e)||m.isIdentifier(e)||m.isMemberExpression(e)}var u=r(271),l=i(u),c=r(112),f=i(c),p=r(583),d=i(p),h=r(1),m=n(h);t.nodes={AssignmentExpression:function(e){var t=s(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(m.isFunction(e.left)||m.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(m.isFunction(e.callee)||a(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t<e.declarations.length;t++){var r=e.declarations[t],n=a(r.id)&&!o(r.init);if(!n){var i=s(r.init);n=a(r.init)&&i.hasCall||i.hasFunction}if(n)return{before:!0,after:!0}}},IfStatement:function(e){if(m.isBlockStatement(e.consequent))return{before:!0,after:!0}}},t.nodes.ObjectProperty=t.nodes.ObjectTypeProperty=t.nodes.ObjectMethod=t.nodes.SpreadProperty=function(e,t){if(t.properties[0]===e)return{before:!0}},t.list={VariableDeclaration:function(e){return(0,d.default)(e.declarations,"init")},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties}},(0,f.default)({Function:!0,Class:!0,Loop:!0,LabeledStatement:!0,SwitchStatement:!0,TryStatement:!0},function(e,r){(0,l.default)(e)&&(e={after:e,before:e}),(0,f.default)([r].concat(m.FLIPPED_ALIAS_KEYS[r]||[]),function(r){t.nodes[r]=function(){return e}})})},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){this.token(","),this.space()}t.__esModule=!0;var a=r(88),o=i(a),u=r(2),l=i(u),c=r(34),f=i(c),p=r(358),d=i(p),h=r(3),m=i(h),v=r(574),y=i(v),g=r(576),b=i(g),E=r(582),x=i(E),A=r(276),S=i(A),_=r(297),D=i(_),C=r(184),w=n(C),F=r(311),k=i(F),P=r(1),T=n(P),O=/e/i,B=/\.0+$/,R=/^0[box]/,I=function(){function e(t,r,n){(0,m.default)(this,e),this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._printedCommentStarts={},this._parenPushNewlineState=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new d.default,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=t||{},this._buf=new D.default(r),this._whitespace=n.length>0?new k.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,x.default)(+e)&&!R.test(e)&&!O.test(e)&&!B.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t<e;t++)this._newline()}},e.prototype.endsWith=function(e){return this._buf.endsWith(e)},e.prototype.removeTrailingNewline=function(){this._buf.removeTrailingNewline()},e.prototype.source=function(e,t){this._catchUp(e,t),this._buf.source(e,t)},e.prototype.withSource=function(e,t,r){this._catchUp(e,t),this._buf.withSource(e,t,r)},e.prototype._space=function(){this._append(" ",!0)},e.prototype._newline=function(){this._append("\n",!0)},e.prototype._append=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r<e.length&&" "===e[r];r++);if(r!==e.length){var n=e[r];"\n"!==n&&"/"!==n||(this.token("("),this.indent(),t.printed=!0)}}},e.prototype._catchUp=function(e,t){if(this.format.retainLines){var r=t?t[e]:null;if(r&&null!==r.line)for(var n=r.line-this._buf.getCurrentLine(),i=0;i<n;i++)this._newline()}},e.prototype._getIndent=function(){return(0,S.default)(this.format.indent.style,this._indent)},e.prototype.startTerminatorless=function(){return this._parenPushNewlineState={printed:!1}},e.prototype.endTerminatorless=function(e){e.printed&&(this.dedent(),this.newline(),this.token(")"))},e.prototype.print=function(e,t){var r=this;if(e){var n=this.format.concise;e._compact&&(this.format.concise=!0);var i=this[e.type];if(!i)throw new ReferenceError("unknown node of type "+(0,f.default)(e.type)+" with constructor "+(0,f.default)(e&&e.constructor.name));this._printStack.push(e);var s=this._insideAux;this._insideAux=!e.loc,this._maybeAddAuxComment(this._insideAux&&!s);var a=w.needsParens(e,t,this._printStack);this.format.retainFunctionParens&&"FunctionExpression"===e.type&&e.extra&&e.extra.parenthesized&&(a=!0),a&&this.token("("),this._printLeadingComments(e,t);var o=T.isProgram(e)||T.isFile(e)?null:e.loc;this.withSource("start",o,function(){r[e.type](e,t)}),this._printTrailingComments(e,t),a&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=s}},e.prototype._maybeAddAuxComment=function(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()},e.prototype._printAuxBeforeComment=function(){if(!this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!0;var e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype._printAuxAfterComment=function(){if(this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!1;var e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype.getPossibleRaw=function(e){var t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw},e.prototype.printJoin=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i<e.length;i++){var s=e[i];s&&(r.statement&&this._printNewline(!0,s,t,n),this.print(s,t),r.iterator&&r.iterator(s,i),r.separator&&i<e.length-1&&r.separator.call(this),r.statement&&this._printNewline(!1,s,t,n))}r.indent&&this.dedent()}},e.prototype.printAndIndentOnComments=function(e,t){var r=!!e.leadingComments;r&&this.indent(),this.print(e,t),r&&this.dedent()},e.prototype.printBlock=function(e){var t=e.body;T.isEmptyStatement(t)||this.space(),this.print(t,e)},e.prototype._printTrailingComments=function(e,t){this._printComments(this._getComments(!1,e,t))},e.prototype._printLeadingComments=function(e,t){this._printComments(this._getComments(!0,e,t))},e.prototype.printInnerComments=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,y.default)(a,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,b.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=w.needsWhitespaceAfter;e&&(c=w.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,S.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this._printComment(s)}},e}();t.default=I;for(var M=[r(306),r(300),r(305),r(299),r(303),r(304),r(124),r(301),r(298),r(302)],N=0;N<M.length;N++){var L=M[N];(0,o.default)(I.prototype,L)}e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(20),s=n(i),a=r(7),o=n(a),u=r(3),l=n(u),c=r(287),f=n(c),p=function(){function e(t,r){(0,l.default)(this,e),this._cachedMap=null,this._code=r,this._opts=t,this._rawMappings=[]}return e.prototype.get=function(){var e=this;return this._cachedMap||!function(){var t=e._cachedMap=new f.default.SourceMapGenerator({file:e._opts.sourceMapTarget,sourceRoot:e._opts.sourceRoot}),r=e._code;"string"==typeof r?t.setSourceContent(e._opts.sourceFileName,r):"object"===("undefined"==typeof r?"undefined":(0,o.default)(r))&&(0,s.default)(r).forEach(function(e){t.setSourceContent(e,r[e])}),e._rawMappings.forEach(t.addMapping,t)}(),this._cachedMap.toJSON()},e.prototype.getRawMappings=function(){return this._rawMappings.slice()},e.prototype.mark=function(e,t,r,n,i,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===n||(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=n,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==r?void 0:s||this._opts.sourceFileName,original:null==r?void 0:{line:r,column:n}}))},e}();t.default=p,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=function(){function e(t){(0,s.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.start-e.start},0,n.length);if(i>=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],r=n[i+1],","===r.type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s<n;s++)"undefined"==typeof this.used[s]&&(this.used[s]=!0,i++);return i},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();t.default=a,e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,o.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=s.node,u=a.expression;if(l.isMemberExpression(u)){var c=s.scope.maybeGenerateMemoised(u.object),f=void 0,p=[];c?(f=c,p.push(l.assignmentExpression("=",c,u.object))):f=u.object,p.push(l.callExpression(l.memberExpression(l.memberExpression(f,u.property,u.computed),l.identifier("bind")),[f])),1===p.length?a.expression=p[0]:a.expression=l.sequenceExpression(p)}}}t.__esModule=!0;var a=r(2),o=i(a);t.default=s;var u=r(1),l=n(u);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){function t(t){return t&&t.operator===e.operator+"="}function r(e,t){return u.assignmentExpression("=",e,t)}var n={};return n.ExpressionStatement=function(n,i){if(!n.isCompletionRecord()){var s=n.node.expression;if(t(s)){var o=[],l=(0,a.default)(s.left,o,i,n.scope,!0);o.push(u.expressionStatement(r(l.ref,e.build(l.uid,s.right)))),n.replaceWithMultiple(o)}}},n.AssignmentExpression=function(n,i){var s=n.node,o=n.scope;if(t(s)){var u=[],l=(0,a.default)(s.left,u,i,o);u.push(r(l.ref,e.build(l.uid,s.right))),n.replaceWithMultiple(u)}},n.BinaryExpression=function(t){var r=t.node;r.operator===e.operator&&t.replaceWith(e.build(r.left,r.right))},n};var s=r(315),a=i(s),o=r(1),u=n(o);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.scope,r=e.node,n=u.functionExpression(null,[],r.body,r.generator,r.async),i=n,s=[];(0,a.default)(e,function(e){return t.push({id:e})});var o={foundThis:!1,foundArguments:!1};e.traverse(l,o),o.foundArguments&&(i=u.memberExpression(n,u.identifier("apply")),s=[],o.foundThis&&s.push(u.thisExpression()),o.foundArguments&&(o.foundThis||s.push(u.nullLiteral()),s.push(u.identifier("arguments"))));var c=u.callExpression(i,s);return r.generator&&(c=u.yieldExpression(c,!0)),u.returnStatement(c)};var s=r(188),a=i(s),o=r(1),u=n(o),l={enter:function(e,t){e.isThisExpression()&&(t.foundThis=!0),e.isReferencedIdentifier({name:"arguments"})&&(t.foundArguments=!0)},Function:function(e){e.skip()}};e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e,t,r,n){var i=void 0;if(o.isSuper(e))return e;if(o.isIdentifier(e)){if(n.hasBinding(e.name))return e;i=e}else{if(!o.isMemberExpression(e))throw new Error("We can't explode this node type "+e.type);if(i=e.object,o.isSuper(i)||o.isIdentifier(i)&&n.hasBinding(i.name))return i}var s=n.generateUidIdentifierBasedOnNode(i);return t.push(o.variableDeclaration("var",[o.variableDeclarator(s,i)])),s}function s(e,t,r,n){var i=e.property,s=o.toComputedKey(e,i);if(o.isLiteral(s)&&o.isPureish(s))return s;var a=n.generateUidIdentifierBasedOnNode(i);return t.push(o.variableDeclaration("var",[o.variableDeclarator(a,i)])),a}t.__esModule=!0,t.default=function(e,t,r,n,a){var u=void 0;u=o.isIdentifier(e)&&a?e:i(e,t,r,n);var l=void 0,c=void 0;if(o.isIdentifier(e))l=e,c=u;else{var f=s(e,t,r,n),p=e.computed||o.isLiteral(f);c=l=o.memberExpression(u,f,p)}return{uid:c,ref:l}};var a=r(1),o=n(a);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s);t.default=function(e){function t(t){if(t.node&&!t.isPure()){var r=e.scope.generateDeclaredUidIdentifier();n.push(c.assignmentExpression("=",r,t.node)),t.replaceWith(r)}}function r(e){if(Array.isArray(e)&&e.length){e=e.reverse(),(0,u.default)(e);for(var r=e,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s;t(o)}}}e.assertClass();var n=[];t(e.get("superClass")),r(e.get("decorators"),!0);for(var i=e.get("body.body"),s=i,o=Array.isArray(s),l=0,s=o?s:(0,a.default)(s);;){var f;if(o){if(l>=s.length)break;f=s[l++]}else{if(l=s.next(),l.done)break;f=l.value}var p=f;p.is("computed")&&t(p.get("key")),p.has("decorators")&&r(e.get("decorators"))}n&&e.insertBefore(n.map(function(e){return c.expressionStatement(e)}))};var o=r(312),u=i(o),l=r(1),c=n(l);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.default=function(e,t){var r=e.node,n=e.scope,i=e.parent,s=n.generateUidIdentifier("step"),o=n.generateUidIdentifier("value"),u=r.left,l=void 0;a.isIdentifier(u)||a.isPattern(u)||a.isMemberExpression(u)?l=a.expressionStatement(a.assignmentExpression("=",u,o)):a.isVariableDeclaration(u)&&(l=a.variableDeclaration(u.kind,[a.variableDeclarator(u.declarations[0].id,o)]));var d=f();(0,c.default)(d,p,null,{ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:n.generateUidIdentifier("iterator"),GET_ITERATOR:t.getAsyncIterator,OBJECT:r.right,STEP_VALUE:o,STEP_KEY:s,AWAIT:t.wrapAwait}),d=d.body.body;var h=a.isLabeledStatement(i),m=d[3].block.body,v=m[0];return h&&(m[0]=a.labeledStatement(i.label,v)),{replaceParent:h,node:d,declar:l,loop:v}};var s=r(1),a=i(s),o=r(4),u=n(o),l=r(8),c=n(l),f=(0,u.default)("\n function* wrapper() {\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY, STEP_VALUE;\n (\n STEP_KEY = yield AWAIT(ITERATOR_KEY.next()),\n ITERATOR_COMPLETION = STEP_KEY.done,\n STEP_VALUE = yield AWAIT(STEP_KEY.value),\n !ITERATOR_COMPLETION\n );\n ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n yield AWAIT(ITERATOR_KEY.return());\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n"),p={noScope:!0,Identifier:function(e,t){e.node.name in t&&e.replaceInline(t[e.node.name])},CallExpression:function(e,t){var r=e.node.callee;a.isIdentifier(r)&&"AWAIT"===r.name&&!t.AWAIT&&e.replaceWith(e.node.arguments[0])}};e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(4),s=n(i),a={};t.default=a,a.typeof=(0,s.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),a.jsx=(0,s.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),a.asyncIterator=(0,s.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),a.asyncGenerator=(0,s.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),a.asyncGeneratorDelegate=(0,s.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),a.asyncToGenerator=(0,s.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),a.classCallCheck=(0,s.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),a.createClass=(0,s.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),a.defineEnumerableProperties=(0,s.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),
+a.defaults=(0,s.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),a.defineProperty=(0,s.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),a.extends=(0,s.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),a.get=(0,s.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),a.inherits=(0,s.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),a.instanceof=(0,s.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),a.interopRequireDefault=(0,s.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),a.interopRequireWildcard=(0,s.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),a.newArrowCheck=(0,s.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),a.objectDestructuringEmpty=(0,s.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),a.objectWithoutProperties=(0,s.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),a.possibleConstructorReturn=(0,s.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),a.selfGlobal=(0,s.default)('\n typeof global === "undefined" ? self : global\n'),a.set=(0,s.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),a.slicedToArray=(0,s.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),a.slicedToArrayLoose=(0,s.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),a.taggedTemplateLiteral=(0,s.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),a.taggedTemplateLiteralLoose=(0,s.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),a.temporalRef=(0,s.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),a.temporalUndefined=(0,s.default)("\n ({})\n"),a.toArray=(0,s.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),a.toConsumableArray=(0,s.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{pre:function(e){e.set("helpersNamespace",t.identifier("babelHelpers"))}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("dynamicImport")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("functionSent")}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(67)}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){var t=e.types,n={Function:function(e){e.skip()},YieldExpression:function(e,r){var n=e.node;if(n.delegate){var i=r.addHelper("asyncGeneratorDelegate");n.argument=t.callExpression(i,[t.callExpression(r.addHelper("asyncIterator"),[n.argument]),t.memberExpression(r.addHelper("asyncGenerator"),t.identifier("await"))])}}};return{inherits:r(193),visitor:{Function:function(e,r){e.node.async&&e.node.generator&&(e.traverse(n,r),(0,s.default)(e,r.file,{wrapAsync:t.memberExpression(r.addHelper("asyncGenerator"),t.identifier("wrap")),wrapAwait:t.memberExpression(r.addHelper("asyncGenerator"),t.identifier("await"))}))}}}};var i=r(125),s=n(i);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(){return{inherits:r(67),visitor:{Function:function(e,t){e.node.async&&!e.node.generator&&(0,s.default)(e,t.file,{wrapAsync:t.addImport(t.opts.module,t.opts.method)})}}}};var i=r(125),s=n(i);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e,t){if(!t.applyDecoratedDescriptor){t.applyDecoratedDescriptor=e.scope.generateUidIdentifier("applyDecoratedDescriptor");var r=p({NAME:t.applyDecoratedDescriptor});e.scope.getProgramParent().path.unshiftContainer("body",r)}return t.applyDecoratedDescriptor}function n(e,t){if(!t.initializerDefineProp){t.initializerDefineProp=e.scope.generateUidIdentifier("initDefineProp");var r=f({NAME:t.initializerDefineProp});e.scope.getProgramParent().path.unshiftContainer("body",r)}return t.initializerDefineProp}function i(e,t){if(!t.initializerWarningHelper){t.initializerWarningHelper=e.scope.generateUidIdentifier("initializerWarningHelper");var r=c({NAME:t.initializerWarningHelper});e.scope.getProgramParent().path.unshiftContainer("body",r)}return t.initializerWarningHelper}function s(e){var t=(e.isClass()?[e].concat(e.get("body.body")):e.get("properties")).reduce(function(e,t){return e.concat(t.node.decorators||[])},[]),r=t.filter(function(e){return!y.isIdentifier(e.expression)});if(0!==r.length)return y.sequenceExpression(r.map(function(t){var r=t.expression,n=t.expression=e.scope.generateDeclaredUidIdentifier("dec");return y.assignmentExpression("=",n,r)}).concat([e.node]))}function d(e,t){var r=e.node.decorators||[];if(e.node.decorators=null,0!==r.length){var n=e.scope.generateDeclaredUidIdentifier("class");return r.map(function(e){return e.expression}).reverse().reduce(function(e,t){return a({CLASS_REF:n,DECORATOR:t,INNER:e}).expression},e.node)}}function h(e,t){var r=e.node.body.body.some(function(e){return(e.decorators||[]).length>0});if(r)return v(e,t,e.node.body.body)}function m(e,t){var r=e.node.properties.some(function(e){return(e.decorators||[]).length>0});if(r)return v(e,t,e.node.properties)}function v(e,r,n){var s=(e.scope.generateDeclaredUidIdentifier("desc"),e.scope.generateDeclaredUidIdentifier("value"),e.scope.generateDeclaredUidIdentifier(e.isClass()?"class":"obj")),a=n.reduce(function(n,a){var c=a.decorators||[];if(a.decorators=null,0===c.length)return n;if(a.computed)throw e.buildCodeFrameError("Computed method/property decorators are not yet supported.");var f=y.isLiteral(a.key)?a.key:y.stringLiteral(a.key.name),p=e.isClass()&&!a.static?o({CLASS_REF:s}).expression:s;if(y.isClassProperty(a,{static:!1})){var d=e.scope.generateDeclaredUidIdentifier("descriptor"),h=a.value?y.functionExpression(null,[],y.blockStatement([y.returnStatement(a.value)])):y.nullLiteral();a.value=y.callExpression(i(e,r),[d,y.thisExpression()]),n=n.concat([y.assignmentExpression("=",d,y.callExpression(t(e,r),[p,f,y.arrayExpression(c.map(function(e){return e.expression})),y.objectExpression([y.objectProperty(y.identifier("enumerable"),y.booleanLiteral(!0)),y.objectProperty(y.identifier("initializer"),h)])]))])}else n=n.concat(y.callExpression(t(e,r),[p,f,y.arrayExpression(c.map(function(e){return e.expression})),y.isObjectProperty(a)||y.isClassProperty(a,{static:!0})?l({TEMP:e.scope.generateDeclaredUidIdentifier("init"),TARGET:p,PROPERTY:f}).expression:u({TARGET:p,PROPERTY:f}).expression,p]));return n},[]);return y.sequenceExpression([y.assignmentExpression("=",s,e.node),y.sequenceExpression(a),s])}var y=e.types;return{inherits:r(126),visitor:{ExportDefaultDeclaration:function(e){if(e.get("declaration").isClassDeclaration()){var t=e.node,r=t.declaration.id||e.scope.generateUidIdentifier("default");t.declaration.id=r,e.replaceWith(t.declaration),e.insertAfter(y.exportNamedDeclaration(null,[y.exportSpecifier(r,y.identifier("default"))]))}},ClassDeclaration:function(e){var t=e.node,r=t.id||e.scope.generateUidIdentifier("class");e.replaceWith(y.variableDeclaration("let",[y.variableDeclarator(r,y.toExpression(t))]))},ClassExpression:function(e,t){var r=s(e)||d(e,t)||h(e,t);r&&e.replaceWith(r)},ObjectExpression:function(e,t){var r=s(e)||m(e,t);r&&e.replaceWith(r)},AssignmentExpression:function(e,t){t.initializerWarningHelper&&e.get("left").isMemberExpression()&&e.get("left.property").isIdentifier()&&e.get("right").isCallExpression()&&e.get("right.callee").isIdentifier({name:t.initializerWarningHelper.name})&&e.replaceWith(y.callExpression(n(e,t),[e.get("left.object").node,y.stringLiteral(e.get("left.property").node.name),e.get("right.arguments")[0].node,e.get("right.arguments")[1].node]))}}}};var i=r(4),s=n(i),a=(0,s.default)("\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n"),o=(0,s.default)("\n CLASS_REF.prototype;\n"),u=(0,s.default)("\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n"),l=(0,s.default)("\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n"),c=(0,s.default)("\n function NAME(descriptor, context){\n throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');\n }\n"),f=(0,s.default)("\n function NAME(target, property, descriptor, context){\n if (!descriptor) return;\n\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,\n });\n }\n"),p=(0,s.default)("\n function NAME(target, property, decorators, descriptor, context){\n var desc = {};\n Object['ke' + 'ys'](descriptor).forEach(function(key){\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if ('value' in desc || desc.initializer){\n desc.writable = true;\n }\n\n desc = decorators.slice().reverse().reduce(function(desc, decorator){\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0){\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0){\n // This is a hack to avoid this being processed by 'transform-runtime'.\n // See issue #9.\n Object['define' + 'Property'](target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e,t){var r=t._guessExecutionStatusRelativeTo(e);return"before"===r?"inside":"after"===r?"outside":"maybe"}function s(e,t){return u.callExpression(t.addHelper("temporalRef"),[e,u.stringLiteral(e.name),t.addHelper("temporalUndefined")])}function a(e,t,r){var n=r.letReferences[e.name];return!!n&&t.getBindingIdentifier(e.name)===n}t.__esModule=!0,t.visitor=void 0;var o=r(1),u=n(o);t.visitor={ReferencedIdentifier:function(e,t){if(this.file.opts.tdz){var r=e.node,n=e.parent,o=e.scope;if(!e.parentPath.isFor({left:r})&&a(r,o,t)){var l=o.getBinding(r.name).path,c=i(e,l);if("inside"!==c)if("maybe"===c){var f=s(r,t.file);if(l.parent._tdzThis=!0,e.skip(),e.parentPath.isUpdateExpression()){if(n._ignoreBlockScopingTDZ)return;e.parentPath.replaceWith(u.sequenceExpression([f,n]))}else e.replaceWith(f)}else"outside"===c&&e.replaceWith(u.throwStatement(u.inherits(u.newExpression(u.identifier("ReferenceError"),[u.stringLiteral(r.name+" is not defined - temporal dead zone")]),r)))}}},AssignmentExpression:{exit:function(e,t){if(this.file.opts.tdz){var r=e.node;if(!r._ignoreBlockScopingTDZ){var n=[],i=e.getBindingIdentifiers();for(var o in i){var l=i[o];a(l,e.scope,t)&&n.push(s(l,t.file))}n.length&&(r._ignoreBlockScopingTDZ=!0,n.push(r),e.replaceWithMultiple(n.map(u.expressionStatement)))}}}}}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(3),a=i(s),o=r(42),u=i(o),l=r(41),c=i(l),f=r(40),p=i(f),d=r(205),h=i(d),m=r(1),v=n(m),y=function(e){function t(){(0,a.default)(this,t);var r=(0,u.default)(this,e.apply(this,arguments));return r.isLoose=!0,r}return(0,c.default)(t,e),t.prototype._processMethod=function(e,t){if(!e.decorators){var r=this.classRef;e.static||(r=v.memberExpression(r,v.identifier("prototype")));var n=v.memberExpression(r,e.key,e.computed||v.isLiteral(e.key)),i=v.functionExpression(null,e.params,e.body,e.generator,e.async);i.returnType=e.returnType;var s=v.toComputedKey(e,e.key);v.isStringLiteral(s)&&(i=(0,p.default)({node:i,id:s,scope:t}));var a=v.expressionStatement(v.assignmentExpression("=",n,i));return v.inheritsComments(a,e),this.body.push(a),!0}},t}(h.default);t.default=y,e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{BinaryExpression:function(e){var r=e.node;"instanceof"===r.operator&&e.replaceWith(t.callExpression(this.addHelper("instanceof"),[r.left,r.right]))}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){for(var t=e.params,r=Array.isArray(t),n=0,t=r?t:(0,u.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(!v.isIdentifier(s))return!0}return!1}function a(e,t){if(!e.hasOwnBinding(t.name))return!0;var r=e.getOwnBinding(t.name),n=r.kind;return"param"===n||"local"===n}t.__esModule=!0,t.visitor=void 0;var o=r(2),u=i(o),l=r(187),c=i(l),f=r(314),p=i(f),d=r(4),h=i(d),m=r(1),v=n(m),y=(0,h.default)("\n let VARIABLE_NAME =\n ARGUMENTS.length > ARGUMENT_KEY && ARGUMENTS[ARGUMENT_KEY] !== undefined ?\n ARGUMENTS[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n"),g=(0,h.default)("\n let $0 = $1[$2];\n"),b={ReferencedIdentifier:function(e,t){var r=e.scope,n=e.node;"eval"!==n.name&&a(r,n)||(t.iife=!0,e.stop())},Scope:function(e){e.skip()}};t.visitor={Function:function(e){function t(e,t,n){var i=y({VARIABLE_NAME:e,DEFAULT_VALUE:t,ARGUMENT_KEY:v.numericLiteral(n),ARGUMENTS:u});i._blockHoist=r.params.length-n,o.push(i)}var r=e.node,n=e.scope;if(s(r)){e.ensureBlock();var i={iife:!1,scope:n},o=[],u=v.identifier("arguments");u._shadowedFunctionLiteral=e;for(var l=(0,c.default)(r),f=e.get("params"),d=0;d<f.length;d++){var h=f[d];if(h.isAssignmentPattern()){var m=h.get("left"),E=h.get("right");if(d>=l||m.isPattern()){var x=n.generateUidIdentifier("x");x._isDefaultPlaceholder=!0,r.params[d]=x}else r.params[d]=m.node;i.iife||(E.isIdentifier()&&!a(n,E.node)?i.iife=!0:E.traverse(b,i)),t(m.node,E.node,d)}else i.iife||h.isIdentifier()||h.traverse(b,i)}for(var A=l+1;A<r.params.length;A++){var S=r.params[A];if(!S._isDefaultPlaceholder){var _=g(S,u,v.numericLiteral(A));_._blockHoist=r.params.length-A,o.push(_)}}r.params=r.params.slice(0,l),i.iife?(o.push((0,p.default)(e,n)),e.set("body",v.blockStatement(o))):e.get("body").unshiftContainer("body",o)}}}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.visitor=void 0;var i=r(1),s=n(i);t.visitor={Function:function(e){for(var t=e.get("params"),r=s.isRestElement(t[t.length-1])?1:0,n=t.length-r,i=0;i<n;i++){var a=t[i];if(a.isArrayPattern()||a.isObjectPattern()){var o=e.scope.generateUidIdentifier("ref"),u=s.variableDeclaration("let",[s.variableDeclarator(a.node,o)]);u._blockHoist=n-i,e.ensureBlock(),e.get("body").unshiftContainer("body",u),a.replaceWith(o)}}}}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){return d.isRestElement(e.params[e.params.length-1])}function a(e,t,r){var n=void 0;n=d.isNumericLiteral(e.parent.property)?d.numericLiteral(e.parent.property.value+r):0===r?e.parent.property:d.binaryExpression("+",e.parent.property,d.numericLiteral(r));var i=e.scope;if(i.isPure(n))e.parentPath.replaceWith(m({ARGUMENTS:t,INDEX:n}));else{var s=i.generateUidIdentifierBasedOnNode(n);i.push({id:s,kind:"var"}),e.parentPath.replaceWith(v({ARGUMENTS:t,INDEX:n,REF:s}))}}function o(e,t,r){r?e.parentPath.replaceWith(y({ARGUMENTS:t,OFFSET:d.numericLiteral(r)})):e.replaceWith(t)}t.__esModule=!0,t.visitor=void 0;var u=r(2),l=i(u),c=r(4),f=i(c),p=r(1),d=n(p),h=(0,f.default)("\n for (var LEN = ARGUMENTS.length,\n ARRAY = Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n"),m=(0,f.default)("\n ARGUMENTS.length <= INDEX ? undefined : ARGUMENTS[INDEX]\n"),v=(0,f.default)("\n REF = INDEX, ARGUMENTS.length <= REF ? undefined : ARGUMENTS[REF]\n"),y=(0,f.default)("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n"),g={Scope:function(e,t){e.scope.bindingIdentifierEquals(t.name,t.outerBinding)||e.skip()},Flow:function(e){e.isTypeCastExpression()||e.skip()},"Function|ClassProperty":function(e,t){var r=t.noOptimise;t.noOptimise=!0,e.traverse(g,t),t.noOptimise=r,e.skip()},ReferencedIdentifier:function(e,t){var r=e.node;if("arguments"===r.name&&(t.deopted=!0),r.name===t.name)if(t.noOptimise)t.deopted=!0;else{var n=e.parentPath;if("params"===n.listKey&&n.key<t.offset)return;if(n.isMemberExpression({object:r})){var i=n.parentPath,s=!t.deopted&&!(i.isAssignmentExpression()&&n.node===i.node.left||i.isLVal()||i.isForXStatement()||i.isUpdateExpression()||i.isUnaryExpression({operator:"delete"})||(i.isCallExpression()||i.isNewExpression())&&n.node===i.node.callee);if(s)if(n.node.computed){if(n.get("property").isBaseType("number"))return void t.candidates.push({cause:"indexGetter",path:e})}else if("length"===n.node.property.name)return void t.candidates.push({cause:"lengthGetter",path:e})}if(0===t.offset&&n.isSpreadElement()){var a=n.parentPath;if(a.isCallExpression()&&1===a.node.arguments.length)return void t.candidates.push({cause:"argSpread",path:e})}t.references.push(e)}},BindingIdentifier:function(e,t){var r=e.node;r.name===t.name&&(t.deopted=!0)}};t.visitor={Function:function(e){var t=e.node,r=e.scope;if(s(t)){var n=t.params.pop().argument,i=d.identifier("arguments");i._shadowedFunctionLiteral=e;var u={references:[],offset:t.params.length,argumentsNode:i,outerBinding:r.getBindingIdentifier(n.name),candidates:[],name:n.name,deopted:!1};if(e.traverse(g,u),u.deopted||u.references.length){u.references=u.references.concat(u.candidates.map(function(e){var t=e.path;return t})),u.deopted=u.deopted||!!t.shadow;var c=d.numericLiteral(t.params.length),f=r.generateUidIdentifier("key"),p=r.generateUidIdentifier("len"),m=f,v=p;t.params.length&&(m=d.binaryExpression("-",f,c),v=d.conditionalExpression(d.binaryExpression(">",p,c),d.binaryExpression("-",p,c),d.numericLiteral(0)));var y=h({ARGUMENTS:i,ARRAY_KEY:m,ARRAY_LEN:v,START:c,ARRAY:n,KEY:f,LEN:p});if(u.deopted)y._blockHoist=t.params.length+1,t.body.body.unshift(y);else{y._blockHoist=1;var b=e.getEarliestCommonAncestorFrom(u.references).getStatementParent();b.findParent(function(e){return e.isLoop()?void(b=e):e.isFunction()}),b.insertBefore(y)}}else for(var E=u.candidates,x=Array.isArray(E),A=0,E=x?E:(0,l.default)(E);;){var S;if(x){if(A>=E.length)break;S=E[A++]}else{if(A=E.next(),A.done)break;S=A.value}var _=S,D=_.path,C=_.cause;switch(C){case"indexGetter":a(D,i,u.offset);break;case"lengthGetter":o(D,i,u.offset);break;default:D.replaceWith(i)}}}}}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{MemberExpression:{exit:function(e){var r=e.node,n=r.property;r.computed||!t.isIdentifier(n)||t.isValidIdentifier(n.name)||(r.property=t.stringLiteral(n.name),r.computed=!0)}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{ObjectProperty:{exit:function(e){var r=e.node,n=r.key;r.computed||!t.isIdentifier(n)||t.isValidIdentifier(n.name)||(r.key=t.stringLiteral(n.name))}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s);t.default=function(e){var t=e.types;return{visitor:{ObjectExpression:function(e,r){for(var n=e.node,i=!1,s=n.properties,o=Array.isArray(s),l=0,s=o?s:(0,a.default)(s);;){var c;if(o){if(l>=s.length)break;c=s[l++]}else{if(l=s.next(),l.done)break;c=l.value}var f=c;if("get"===f.kind||"set"===f.kind){i=!0;break}}if(i){var p={};n.properties=n.properties.filter(function(e){return!!(e.computed||"get"!==e.kind&&"set"!==e.kind)||(u.push(p,e,null,r),!1)}),e.replaceWith(t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("defineProperties")),[n,u.toDefineObject(p)]))}}}}};var o=r(186),u=n(o);e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.parse,r=e.traverse;return{visitor:{CallExpression:function(e){if(e.get("callee").isIdentifier({name:"eval"})&&1===e.node.arguments.length){var n=e.get("arguments")[0].evaluate();if(!n.confident)return;var i=n.value;if("string"!=typeof i)return;var s=t(i);return r.removeProperties(s),s.program}}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e,t){e.addComment("trailing",n(e,t)),e.replaceWith(i.noop())}function n(e,t){var r=e.getSource().replace(/\*-\//g,"*-ESCAPED/").replace(/\*\//g,"*-/");return t&&t.optional&&(r="?"+r),":"!==r[0]&&(r=":: "+r),r}var i=e.types;return{inherits:r(68),visitor:{TypeCastExpression:function(e){var t=e.node;e.get("expression").addComment("trailing",n(e.get("typeAnnotation"))),e.replaceWith(i.parenthesizedExpression(t.expression))},Identifier:function(e){var t=e.node;t.optional&&!t.typeAnnotation&&e.addComment("trailing",":: ?")},AssignmentPattern:{exit:function(e){var t=e.node;t.left.optional=!1}},Function:{exit:function(e){var t=e.node;t.params.forEach(function(e){return e.optional=!1})}},ClassProperty:function(e){var r=e.node,n=e.parent;r.value||t(e,n)},"ExportNamedDeclaration|Flow":function(e){var r=e.node,n=e.parent;i.isExportNamedDeclaration(r)&&!i.isFlow(r.declaration)||t(e,n)},ImportDeclaration:function(e){var r=e.node,n=e.parent;i.isImportDeclaration(r)&&"type"!==r.importKind&&"typeof"!==r.importKind||t(e,n)}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{FunctionExpression:{exit:function(e){var r=e.node;r.id&&(r._ignoreUserWhitespace=!0,e.replaceWith(t.callExpression(t.functionExpression(null,[],t.blockStatement([t.toStatement(r),t.returnStatement(r.id)])),[])))}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.assign")&&(e.node.callee=t.addHelper("extends"))}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.setPrototypeOf")&&(e.node.callee=t.addHelper("defaults"))}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){function t(e){return i.isLiteral(i.toComputedKey(e,e.key),{value:"__proto__"})}function r(e){var t=e.left;return i.isMemberExpression(t)&&i.isLiteral(i.toComputedKey(t,t.property),{value:"__proto__"})}function n(e,t,r){return i.expressionStatement(i.callExpression(r.addHelper("defaults"),[t,e.right]))}var i=e.types;return{visitor:{AssignmentExpression:function(e,t){if(r(e.node)){var s=[],a=e.node.left.object,o=e.scope.maybeGenerateMemoised(a);o&&s.push(i.expressionStatement(i.assignmentExpression("=",o,a))),s.push(n(e.node,o||a,t)),o&&s.push(o),e.replaceWithMultiple(s)}},ExpressionStatement:function(e,t){var s=e.node.expression;i.isAssignmentExpression(s,{operator:"="})&&r(s)&&e.replaceWith(n(s,s.left.object,t))},ObjectExpression:function(e,r){for(var n=void 0,a=e.node,u=a.properties,l=Array.isArray(u),c=0,u=l?u:(0,s.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;t(p)&&(n=p.value,(0,o.default)(a.properties,p))}if(n){var d=[i.objectExpression([]),n];a.properties.length&&d.push(a),e.replaceWith(i.callExpression(r.addHelper("extends"),d))}}}}};var a=r(275),o=n(a);e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){var e={enter:function(e,t){var r=function(){t.isImmutable=!1,e.stop()};return e.isJSXClosingElement()?void e.skip():e.isJSXIdentifier({name:"ref"})&&e.parentPath.isJSXAttribute({name:e.node})?r():void(e.isJSXIdentifier()||e.isIdentifier()||e.isJSXMemberExpression()||e.isImmutable()||r())}};return{visitor:{JSXElement:function(t){if(!t.node._hoisted){var r={isImmutable:!0};t.traverse(e,r),r.isImmutable?t.hoist():t.node._hoisted=!0}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){function t(e){for(var t=0;t<e.length;t++){var n=e[t];if(i.isJSXSpreadAttribute(n))return!0;if(r(n,"ref"))return!0}return!1}function r(e,t){return i.isJSXAttribute(e)&&i.isJSXIdentifier(e.name,{name:t})}function n(e){var t=e.value;return t?(i.isJSXExpressionContainer(t)&&(t=t.expression),t):i.identifier("true")}var i=e.types;return{visitor:{JSXElement:function(e,a){function o(e,t,r){e.push(i.objectProperty(t,r))}var u=e.node,l=u.openingElement;if(!t(l.attributes)){var c=i.objectExpression([]),f=null,p=l.name;i.isJSXIdentifier(p)&&i.react.isCompatTag(p.name)&&(p=i.stringLiteral(p.name));
+for(var d=l.attributes,h=Array.isArray(d),m=0,d=h?d:(0,s.default)(d);;){var v;if(h){if(m>=d.length)break;v=d[m++]}else{if(m=d.next(),m.done)break;v=m.value}var y=v;if(r(y,"key"))f=n(y);else{var g=y.name.name,b=i.isValidIdentifier(g)?i.identifier(g):i.stringLiteral(g);o(c.properties,b,n(y))}}var E=[p,c];if(f||u.children.length){var x=i.react.buildChildren(u);E.push.apply(E,[f||i.unaryExpression("void",i.numericLiteral(0),!0)].concat(x))}var A=i.callExpression(a.addHelper("jsx"),E);e.replaceWith(A)}}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{manipulateOptions:function(e,t){t.plugins.push("jsx")},visitor:r(185)({pre:function(e){e.callee=e.tagExpr},post:function(e){t.react.isCompatTag(e.tagName)&&(e.call=t.callExpression(t.memberExpression(t.memberExpression(t.identifier("React"),t.identifier("DOM")),e.tagExpr,t.isLiteral(e.tagExpr)),e.args))}})}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types,n={JSXOpeningElement:function(e){var n=e.node,i=t.jSXIdentifier(r),s=t.thisExpression();n.attributes.push(t.jSXAttribute(i,t.jSXExpressionContainer(s)))}};return{visitor:n}};var r="__self";e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){function t(e,t){var r=null!=t?i.numericLiteral(t):i.nullLiteral(),n=i.objectProperty(i.identifier("fileName"),e),s=i.objectProperty(i.identifier("lineNumber"),r);return i.objectExpression([n,s])}var i=e.types,s={JSXOpeningElement:function(e,s){var a=i.jSXIdentifier(r),o=e.container.openingElement.loc;if(o){for(var u=e.container.openingElement.attributes,l=0;l<u.length;l++){var c=u[l].name;if(c&&c.name===r)return}if(!s.fileNameIdentifier){var f="unknown"!==s.file.log.filename?s.file.log.filename:null,p=e.scope.generateUidIdentifier(n);e.hub.file.scope.push({id:p,init:i.stringLiteral(f)}),s.fileNameIdentifier=p}var d=t(s.fileNameIdentifier,o.start.line);u.push(i.jSXAttribute(a,i.jSXExpressionContainer(d)))}}};return{visitor:s}};var r="__source",n="_jsxFileName";e.exports=t.default},function(e,t){"use strict";e.exports={builtins:{Symbol:"symbol",Promise:"promise",Map:"map",WeakMap:"weak-map",Set:"set",WeakSet:"weak-set",Observable:"observable",setImmediate:"set-immediate",clearImmediate:"clear-immediate",asap:"asap"},methods:{Array:{concat:"array/concat",copyWithin:"array/copy-within",entries:"array/entries",every:"array/every",fill:"array/fill",filter:"array/filter",findIndex:"array/find-index",find:"array/find",forEach:"array/for-each",from:"array/from",includes:"array/includes",indexOf:"array/index-of",join:"array/join",keys:"array/keys",lastIndexOf:"array/last-index-of",map:"array/map",of:"array/of",pop:"array/pop",push:"array/push",reduceRight:"array/reduce-right",reduce:"array/reduce",reverse:"array/reverse",shift:"array/shift",slice:"array/slice",some:"array/some",sort:"array/sort",splice:"array/splice",unshift:"array/unshift",values:"array/values"},JSON:{stringify:"json/stringify"},Object:{assign:"object/assign",create:"object/create",defineProperties:"object/define-properties",defineProperty:"object/define-property",entries:"object/entries",freeze:"object/freeze",getOwnPropertyDescriptor:"object/get-own-property-descriptor",getOwnPropertyDescriptors:"object/get-own-property-descriptors",getOwnPropertyNames:"object/get-own-property-names",getOwnPropertySymbols:"object/get-own-property-symbols",getPrototypeOf:"object/get-prototype-of",isExtensible:"object/is-extensible",isFrozen:"object/is-frozen",isSealed:"object/is-sealed",is:"object/is",keys:"object/keys",preventExtensions:"object/prevent-extensions",seal:"object/seal",setPrototypeOf:"object/set-prototype-of",values:"object/values"},RegExp:{escape:"regexp/escape"},Math:{acosh:"math/acosh",asinh:"math/asinh",atanh:"math/atanh",cbrt:"math/cbrt",clz32:"math/clz32",cosh:"math/cosh",expm1:"math/expm1",fround:"math/fround",hypot:"math/hypot",imul:"math/imul",log10:"math/log10",log1p:"math/log1p",log2:"math/log2",sign:"math/sign",sinh:"math/sinh",tanh:"math/tanh",trunc:"math/trunc",iaddh:"math/iaddh",isubh:"math/isubh",imulh:"math/imulh",umulh:"math/umulh"},Symbol:{asyncIterator:"symbol/async-iterator",for:"symbol/for",hasInstance:"symbol/has-instance",isConcatSpreadable:"symbol/is-concat-spreadable",iterator:"symbol/iterator",keyFor:"symbol/key-for",match:"symbol/match",observable:"symbol/observable",replace:"symbol/replace",search:"symbol/search",species:"symbol/species",split:"symbol/split",toPrimitive:"symbol/to-primitive",toStringTag:"symbol/to-string-tag",unscopables:"symbol/unscopables"},String:{at:"string/at",codePointAt:"string/code-point-at",endsWith:"string/ends-with",fromCodePoint:"string/from-code-point",includes:"string/includes",matchAll:"string/match-all",padLeft:"string/pad-left",padRight:"string/pad-right",padStart:"string/pad-start",padEnd:"string/pad-end",raw:"string/raw",repeat:"string/repeat",startsWith:"string/starts-with",trim:"string/trim",trimLeft:"string/trim-left",trimRight:"string/trim-right",trimStart:"string/trim-start",trimEnd:"string/trim-end"},Number:{EPSILON:"number/epsilon",isFinite:"number/is-finite",isInteger:"number/is-integer",isNaN:"number/is-nan",isSafeInteger:"number/is-safe-integer",MAX_SAFE_INTEGER:"number/max-safe-integer",MIN_SAFE_INTEGER:"number/min-safe-integer",parseFloat:"number/parse-float",parseInt:"number/parse-int"},Reflect:{apply:"reflect/apply",construct:"reflect/construct",defineProperty:"reflect/define-property",deleteProperty:"reflect/delete-property",enumerate:"reflect/enumerate",getOwnPropertyDescriptor:"reflect/get-own-property-descriptor",getPrototypeOf:"reflect/get-prototype-of",get:"reflect/get",has:"reflect/has",isExtensible:"reflect/is-extensible",ownKeys:"reflect/own-keys",preventExtensions:"reflect/prevent-extensions",setPrototypeOf:"reflect/set-prototype-of",set:"reflect/set",defineMetadata:"reflect/define-metadata",deleteMetadata:"reflect/delete-metadata",getMetadata:"reflect/get-metadata",getMetadataKeys:"reflect/get-metadata-keys",getOwnMetadata:"reflect/get-own-metadata",getOwnMetadataKeys:"reflect/get-own-metadata-keys",hasMetadata:"reflect/has-metadata",hasOwnMetadata:"reflect/has-own-metadata",metadata:"reflect/metadata"},System:{global:"system/global"},Error:{isError:"error/is-error"},Date:{},Function:{}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.definitions=void 0,t.default=function(e){function t(e){return e.moduleName||"babel-runtime"}function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var n=e.types,i=["interopRequireWildcard","interopRequireDefault"];return{pre:function(e){var r=t(this.opts);this.opts.helpers!==!1&&e.set("helperGenerator",function(t){if(i.indexOf(t)<0)return e.addImport(r+"/helpers/"+t,"default",t)}),this.setDynamic("regeneratorIdentifier",function(){return e.addImport(r+"/regenerator","default","regeneratorRuntime")})},visitor:{ReferencedIdentifier:function(e,i){var a=e.node,o=e.parent,u=e.scope;if("regeneratorRuntime"===a.name&&i.opts.regenerator!==!1)return void e.replaceWith(i.get("regeneratorIdentifier"));if(i.opts.polyfill!==!1&&!n.isMemberExpression(o)&&r(s.default.builtins,a.name)&&!u.getBindingIdentifier(a.name)){var l=t(i.opts);e.replaceWith(i.addImport(l+"/core-js/"+s.default.builtins[a.name],"default",a.name))}},CallExpression:function(e,r){if(r.opts.polyfill!==!1&&!e.node.arguments.length){var i=e.node.callee;if(n.isMemberExpression(i)&&i.computed&&e.get("callee.property").matchesPattern("Symbol.iterator")){var s=t(r.opts);e.replaceWith(n.callExpression(r.addImport(s+"/core-js/get-iterator","default","getIterator"),[i.object]))}}},BinaryExpression:function(e,r){if(r.opts.polyfill!==!1&&"in"===e.node.operator&&e.get("left").matchesPattern("Symbol.iterator")){var i=t(r.opts);e.replaceWith(n.callExpression(r.addImport(i+"/core-js/is-iterable","default","isIterable"),[e.node.right]))}},MemberExpression:{enter:function(e,i){if(i.opts.polyfill!==!1&&e.isReferenced()){var a=e.node,o=a.object,u=a.property;if(n.isReferenced(o,a)&&!a.computed&&r(s.default.methods,o.name)){var l=s.default.methods[o.name];if(r(l,u.name)&&!e.scope.getBindingIdentifier(o.name)){if("Object"===o.name&&"defineProperty"===u.name&&e.parentPath.isCallExpression()){var c=e.parentPath.node;if(3===c.arguments.length&&n.isLiteral(c.arguments[1]))return}var f=t(i.opts);e.replaceWith(i.addImport(f+"/core-js/"+l[u.name],"default",o.name+"$"+u.name))}}}},exit:function(e,i){if(i.opts.polyfill!==!1&&e.isReferenced()){var a=e.node,o=a.object;if(r(s.default.builtins,o.name)&&!e.scope.getBindingIdentifier(o.name)){var u=t(i.opts);e.replaceWith(n.memberExpression(i.addImport(u+"/core-js/"+s.default.builtins[o.name],"default",o.name),a.property,a.computed))}}}}}}};var i=r(346),s=n(i);t.definitions=s.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){var t=e.messages;return {visitor:{ReferencedIdentifier:function(e){var r=e.node,n=e.scope,i=n.getBinding(r.name);if(i&&"type"===i.kind&&!e.parentPath.isFlow())throw e.buildCodeFrameError(t.get("undeclaredVariableType",r.name),ReferenceError);if(!n.hasBinding(r.name)){var a=n.getAllBindings(),o=void 0,u=-1;for(var l in a){var c=(0,s.default)(r.name,l);c<=0||c>3||c<=u||(o=l,u=c)}var f=void 0;throw (f=o?t.get("undeclaredVariableSuggestion",r.name,o):t.get("undeclaredVariable",r.name), e.buildCodeFrameError(f,ReferenceError))}}}};};var i=r(459),s=n(i);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return{presets:[t.es2015!==!1&&[s.default.buildPreset,t.es2015],t.es2016!==!1&&o.default,t.es2017!==!1&&l.default].filter(Boolean)}};var i=r(215),s=n(i),a=r(216),o=n(a),u=r(217),l=n(u);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(213),s=n(i),a=r(209),o=n(a),u=r(68),l=n(u),c=r(127),f=n(c),p=r(212),d=n(p);t.default={plugins:[s.default,o.default,l.default,f.default,d.default],env:{development:{plugins:[]}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(218),s=n(i),a=r(204),o=n(a),u=r(210),l=n(u);t.default={presets:[s.default],plugins:[o.default,l.default]},e.exports=t.default},function(e,t,r){"use strict";e.exports={default:r(400),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(403),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(405),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(406),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(408),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(409),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(410),__esModule:!0}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s),o=r(3),u=i(o),l=r(35),c=i(l),f=r(1),p=n(f),d=!1,h=function(){function e(t,r,n,i){(0,u.default)(this,e),this.queue=null,this.parentPath=i,this.scope=t,this.state=n,this.opts=r}return e.prototype.shouldVisit=function(e){var t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;var r=p.VISITOR_KEYS[e.type];if(!r||!r.length)return!1;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,a.default)(n);;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{if(s=n.next(),s.done)break;o=s.value}var u=o;if(e[u])return!0}return!1},e.prototype.create=function(e,t,r,n){return c.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i<e.length;i++){var s=e[i];s&&this.shouldVisit(s)&&n.push(this.create(t,e,i,r))}return this.visitQueue(n)},e.prototype.visitSingle=function(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])},e.prototype.visitQueue=function(e){this.queue=e,this.priorityQueue=[];for(var t=[],r=!1,n=e,i=Array.isArray(n),s=0,n=i?n:(0,a.default)(n);;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{if(s=n.next(),s.done)break;o=s.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(d&&e.length>=1e4&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var l=e,c=Array.isArray(l),f=0,l=c?l:(0,a.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var h=p;h.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();t.default=h,e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function a(e){var t=this;do if(e(t))return t;while(t=t.parentPath);return null}function o(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function u(){var e=this;do if(Array.isArray(e.container))return e;while(e=e.parentPath)}function l(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var n=void 0,i=b.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,y.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,c=l[t+1];if(n)if(c.listKey&&n.listKey===c.listKey&&c.key<n.key)n=c;else{var f=i.indexOf(n.parentKey),p=i.indexOf(c.parentKey);f>p&&(n=c)}else n=c}return n})}function c(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,i=void 0,s=void 0,a=e.map(function(e){var t=[];do t.unshift(e);while((e=e.parentPath)&&e!==r);return t.length<n&&(n=t.length),t}),o=a[0];e:for(var u=0;u<n;u++){for(var l=o[u],c=a,f=Array.isArray(c),p=0,c=f?c:(0,y.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;if(h[u]!==l)break e}i=u,s=l}if(s)return t?t(s,i,a):s;throw new Error("Couldn't find intersection")}function f(){var e=this,t=[];do t.push(e);while(e=e.parentPath);return t}function p(e){return e.isDescendant(this)}function d(e){return!!this.findParent(function(t){return t===e})}function h(){for(var e=this;e;){for(var t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(e.node.type===s)return!0}e=e.parentPath}return!1}function m(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||r[e]!==!1))return t}else if(t.isArrowFunctionExpression())return t;return null}}t.__esModule=!0;var v=r(2),y=i(v);t.findParent=s,t.find=a,t.getFunctionParent=o,t.getStatementParent=u,t.getEarliestCommonAncestorFrom=l,t.getDeepestCommonAncestorFrom=c,t.getAncestry=f,t.isAncestor=p,t.isDescendant=d,t.inType=h,t.inShadow=m;var g=r(1),b=n(g),E=r(35);i(E)},function(e,t){"use strict";function r(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}}function n(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])}function i(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}t.__esModule=!0,t.shareCommentsWithSiblings=r,t.addComment=n,t.addComments=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])}function s(e){if(!e)return!1;for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,D.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(s){var a=this.node;if(!a)return!0;var o=s.call(this.state,this,this.state);if(o)throw new Error("Unexpected return value from visitor method "+s);if(this.node!==a)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1}function a(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1}function o(){return!!this.node&&(!this.isBlacklisted()&&((!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),w.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))))}function u(){this.shouldSkip=!0}function l(e){this.skipKeys[e]=!0}function c(){this.shouldStop=!0,this.shouldSkip=!0}function f(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}}function p(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this}function d(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())}function h(){this.parentPath&&(this.parent=this.parentPath.node)}function m(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(var t in this.container)if(this.container[t]===this.node)return this.setKey(t);this.key=null}}function v(){if(this.parent&&this.inList){var e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}}function y(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()}function g(){this.contexts.pop(),this.setContext(this.contexts[this.contexts.length-1])}function b(e){this.contexts.push(e),this.setContext(e)}function E(e,t,r,n){this.inList=!!r,this.listKey=r,this.parentKey=r||n,this.container=t,this.parentPath=e||this.parentPath,this.setKey(n)}function x(e){this.key=e,this.node=this.container[this.key],this.type=this.node&&this.node.type}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed)for(var t=this.contexts,r=t,n=Array.isArray(r),i=0,r=n?r:(0,D.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.maybeQueue(e)}}function S(){for(var e=this,t=this.contexts;!t.length;)e=e.parentPath,t=e.contexts;return t}t.__esModule=!0;var _=r(2),D=n(_);t.call=i,t._call=s,t.isBlacklisted=a,t.visit=o,t.skip=u,t.skipKey=l,t.stop=c,t.setScope=f,t.setContext=p,t.resync=d,t._resyncParent=h,t._resyncKey=m,t._resyncList=v,t._resyncRemoved=y,t.popContext=g,t.pushContext=b,t.setup=E,t.setKey=x,t.requeue=A,t._getQueueContexts=S;var C=r(8),w=n(C)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||u.isIdentifier(t)&&(t=u.stringLiteral(t.name)),t}function s(){return u.ensureBlock(this.node)}function a(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}}t.__esModule=!0,t.toComputedKey=i,t.ensureBlock=s,t.arrowFunctionToShadowed=a;var o=r(1),u=n(o)},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this.evaluate();if(e.confident)return!!e.value}function s(){function t(e){i&&(s=e,i=!1)}function r(e){var r=e.node;if(a.has(r)){var s=a.get(r);return s.resolved?s.value:void t(e)}var o={resolved:!1};a.set(r,o);var u=n(e);return i&&(o.resolved=!0,o.value=u),u}function n(n){if(i){var s=n.node;if(n.isSequenceExpression()){var a=n.get("expressions");return r(a[a.length-1])}if(n.isStringLiteral()||n.isNumericLiteral()||n.isBooleanLiteral())return s.value;if(n.isNullLiteral())return null;if(n.isTemplateLiteral()){for(var u="",c=0,f=n.get("expressions"),h=s.quasis,m=Array.isArray(h),v=0,h=m?h:(0,l.default)(h);;){var y;if(m){if(v>=h.length)break;y=h[v++]}else{if(v=h.next(),v.done)break;y=v.value}var g=y;if(!i)break;u+=g.value.cooked;var b=f[c++];b&&(u+=String(r(b)))}if(!i)return;return u}if(n.isConditionalExpression()){var E=r(n.get("test"));if(!i)return;return r(E?n.get("consequent"):n.get("alternate"))}if(n.isExpressionWrapper())return r(n.get("expression"));if(n.isMemberExpression()&&!n.parentPath.isCallExpression({callee:s})){var x=n.get("property"),A=n.get("object");if(A.isLiteral()&&x.isIdentifier()){var S=A.node.value,_="undefined"==typeof S?"undefined":(0,o.default)(S);if("number"===_||"string"===_)return S[x.node.name]}}if(n.isReferencedIdentifier()){var D=n.scope.getBinding(s.name);if(D&&D.constantViolations.length>0)return t(D.path);if(D&&n.node.start<D.path.node.end)return t(D.path);if(D&&D.hasValue)return D.value;if("undefined"===s.name)return;if("Infinity"===s.name)return 1/0;if("NaN"===s.name)return NaN;var C=n.resolve();return C===n?t(n):r(C)}if(n.isUnaryExpression({prefix:!0})){if("void"===s.operator)return;var w=n.get("argument");if("typeof"===s.operator&&(w.isFunction()||w.isClass()))return"function";var F=r(w);if(!i)return;switch(s.operator){case"!":return!F;case"+":return+F;case"-":return-F;case"~":return~F;case"typeof":return"undefined"==typeof F?"undefined":(0,o.default)(F)}}if(n.isArrayExpression()){for(var k=[],P=n.get("elements"),T=P,O=Array.isArray(T),B=0,T=O?T:(0,l.default)(T);;){var R;if(O){if(B>=T.length)break;R=T[B++]}else{if(B=T.next(),B.done)break;R=B.value}var I=R;if(I=I.evaluate(),!I.confident)return t(I);k.push(I.value)}return k}if(n.isObjectExpression()){for(var M={},N=n.get("properties"),L=N,j=Array.isArray(L),U=0,L=j?L:(0,l.default)(L);;){var V;if(j){if(U>=L.length)break;V=L[U++]}else{if(U=L.next(),U.done)break;V=U.value}var G=V;if(G.isObjectMethod()||G.isSpreadProperty())return t(G);var W=G.get("key"),Y=W;if(G.node.computed){if(Y=Y.evaluate(),!Y.confident)return t(W);Y=Y.value}else Y=Y.isIdentifier()?Y.node.name:Y.node.value;var q=G.get("value"),K=q.evaluate();if(!K.confident)return t(q);K=K.value,M[Y]=K}return M}if(n.isLogicalExpression()){var H=i,J=r(n.get("left")),X=i;i=H;var z=r(n.get("right")),$=i;switch(i=X&&$,s.operator){case"||":if(J&&X)return i=!0,J;if(!i)return;return J||z;case"&&":if((!J&&X||!z&&$)&&(i=!0),!i)return;return J&&z}}if(n.isBinaryExpression()){var Q=r(n.get("left"));if(!i)return;var Z=r(n.get("right"));if(!i)return;switch(s.operator){case"-":return Q-Z;case"+":return Q+Z;case"/":return Q/Z;case"*":return Q*Z;case"%":return Q%Z;case"**":return Math.pow(Q,Z);case"<":return Q<Z;case">":return Q>Z;case"<=":return Q<=Z;case">=":return Q>=Z;case"==":return Q==Z;case"!=":return Q!=Z;case"===":return Q===Z;case"!==":return Q!==Z;case"|":return Q|Z;case"&":return Q&Z;case"^":return Q^Z;case"<<":return Q<<Z;case">>":return Q>>Z;case">>>":return Q>>>Z}}if(n.isCallExpression()){var ee=n.get("callee"),te=void 0,re=void 0;if(ee.isIdentifier()&&!n.scope.getBinding(ee.node.name,!0)&&p.indexOf(ee.node.name)>=0&&(re=e[s.callee.name]),ee.isMemberExpression()){var ne=ee.get("object"),ie=ee.get("property");if(ne.isIdentifier()&&ie.isIdentifier()&&p.indexOf(ne.node.name)>=0&&d.indexOf(ie.node.name)<0&&(te=e[ne.node.name],re=te[ie.node.name]),ne.isLiteral()&&ie.isIdentifier()){var se=(0,o.default)(ne.node.value);"string"!==se&&"number"!==se||(te=ne.node.value,re=te[ie.node.name])}}if(re){var ae=n.get("arguments").map(r);if(!i)return;return re.apply(te,ae)}}t(n)}}var i=!0,s=void 0,a=new f.default,u=r(this);return i||(u=void 0),{confident:i,deopt:s,value:u}}t.__esModule=!0;var a=r(7),o=n(a),u=r(2),l=n(u),c=r(133),f=n(c);t.evaluateTruthy=i,t.evaluate=s;var p=["String","Number","Math"],d=["random"]}).call(t,function(){return this}())},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function a(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function o(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function u(e){return x.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function l(e,t){t===!0&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function c(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,a){return x.default.get({listKey:e,parentPath:r,parent:n,container:i,key:a}).setContext(t)}):x.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)}function f(e,t){for(var r=this,n=e,i=Array.isArray(n),s=0,n=i?n:(0,b.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function p(e){return S.getBindingIdentifiers(this.node,e)}function d(e){return S.getOuterBindingIdentifiers(this.node,e)}function h(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this,n=[].concat(r),i=(0,y.default)(null);n.length;){var s=n.shift();if(s&&s.node){var a=S.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())if(e){var o=i[s.node.name]=i[s.node.name]||[];o.push(s)}else i[s.node.name]=s;else if(s.isExportDeclaration()){var u=s.get("declaration");u.isDeclaration()&&n.push(u)}else{if(t){if(s.isFunctionDeclaration()){n.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var l=0;l<a.length;l++){var c=a[l],f=s.get(c);(Array.isArray(f)||f.node)&&(n=n.concat(f))}}}}return i}function m(e){return this.getBindingIdentifierPaths(e,!0)}t.__esModule=!0;var v=r(9),y=i(v),g=r(2),b=i(g);t.getStatementParent=s,t.getOpposite=a,t.getCompletionRecords=o,t.getSibling=u,t.get=l,t._getKey=c,t._getPattern=f,t.getBindingIdentifiers=p,t.getOuterBindingIdentifiers=d,t.getBindingIdentifierPaths=h,t.getOuterBindingIdentifierPaths=m;var E=r(35),x=i(E),A=r(1),S=n(A)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||y.anyTypeAnnotation();return y.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e}function a(){var e=this.node;{if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=m[e.type];return t?t.call(this,e):(t=m[this.parentPath.type],t&&t.validParent?this.parentPath.getTypeAnnotation():void 0)}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?y.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?y.anyTypeAnnotation():y.voidTypeAnnotation()}}}function o(e,t){return u(e,this.getTypeAnnotation(),t)}function u(e,t,r){if("string"===e)return y.isStringTypeAnnotation(t);if("number"===e)return y.isNumberTypeAnnotation(t);if("boolean"===e)return y.isBooleanTypeAnnotation(t);if("any"===e)return y.isAnyTypeAnnotation(t);if("mixed"===e)return y.isMixedTypeAnnotation(t);if("empty"===e)return y.isEmptyTypeAnnotation(t);if("void"===e)return y.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}function l(e){var t=this.getTypeAnnotation();if(y.isAnyTypeAnnotation(t))return!0;if(y.isUnionTypeAnnotation(t)){for(var r=t.types,n=Array.isArray(r),i=0,r=n?r:(0,d.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(y.isAnyTypeAnnotation(a)||u(e,a,!0))return!0}return!1}return u(e,t,!0)}function c(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!y.isAnyTypeAnnotation(t)&&y.isFlowBaseAnnotation(t))return e.type===t.type}function f(e){var t=this.getTypeAnnotation();return y.isGenericTypeAnnotation(t)&&y.isIdentifier(t.id,{name:e})}t.__esModule=!0;var p=r(2),d=i(p);t.getTypeAnnotation=s,t._getTypeAnnotation=a,t.isBaseType=o,t.couldBeBaseType=l,t.baseTypeStrictlyMatches=c,t.isGenericType=f;var h=r(369),m=n(h),v=r(1),y=n(v)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=e.scope.getBinding(t),n=[];e.typeAnnotation=d.unionTypeAnnotation(n);var i=[],s=a(r,e,i),o=l(e,t);if(o&&!function(){var e=a(r,o.ifStatement);s=s.filter(function(t){return e.indexOf(t)<0}),n.push(o.typeAnnotation)}(),s.length){s=s.concat(i);for(var u=s,c=Array.isArray(u),p=0,u=c?u:(0,f.default)(u);;){var h;if(c){if(p>=u.length)break;h=u[p++]}else{if(p=u.next(),p.done)break;h=p.value}var m=h;n.push(m.getTypeAnnotation())}}if(n.length)return d.createUnionTypeAnnotation(n)}function a(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){e=e.resolve();var n=e._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function o(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():d.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?d.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,o=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,o=i),(o||a)&&(o=o.resolve(),o.isLiteral())){var u=o.node.value;if("string"==typeof u&&a.get("argument").isIdentifier({name:e}))return d.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function u(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function l(e,t){var r=u(e);if(r){var n=r.get("test"),i=[n],s=[];do{var a=i.shift().resolve();if(a.isLogicalExpression()&&(i.push(a.get("left")),i.push(a.get("right"))),a.isBinaryExpression()){
+var c=o(t,a);c&&s.push(c)}}while(i.length);return s.length?{typeAnnotation:d.createUnionTypeAnnotation(s),ifStatement:r}:l(r,t)}}t.__esModule=!0;var c=r(2),f=i(c);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:s(this,e.name):"undefined"===e.name?d.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?d.numberTypeAnnotation():void("arguments"===e.name)}};var p=r(1),d=n(p);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){var e=this.get("id");return e.isIdentifier()?this.get("init").getTypeAnnotation():void 0}function a(e){return e.typeAnnotation}function o(e){if(this.get("callee").isIdentifier())return P.genericTypeAnnotation(e.callee)}function u(){return P.stringTypeAnnotation()}function l(e){var t=e.operator;return"void"===t?P.voidTypeAnnotation():P.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?P.numberTypeAnnotation():P.STRING_UNARY_OPERATORS.indexOf(t)>=0?P.stringTypeAnnotation():P.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?P.booleanTypeAnnotation():void 0}function c(e){var t=e.operator;if(P.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return P.numberTypeAnnotation();if(P.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return P.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?P.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?P.stringTypeAnnotation():P.unionTypeAnnotation([P.stringTypeAnnotation(),P.numberTypeAnnotation()])}}function f(){return P.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function p(){return P.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function d(){return this.get("expressions").pop().getTypeAnnotation()}function h(){return this.get("right").getTypeAnnotation()}function m(e){var t=e.operator;if("++"===t||"--"===t)return P.numberTypeAnnotation()}function v(){return P.stringTypeAnnotation()}function y(){return P.numberTypeAnnotation()}function g(){return P.booleanTypeAnnotation()}function b(){return P.nullLiteralTypeAnnotation()}function E(){return P.genericTypeAnnotation(P.identifier("RegExp"))}function x(){return P.genericTypeAnnotation(P.identifier("Object"))}function A(){return P.genericTypeAnnotation(P.identifier("Array"))}function S(){return A()}function _(){return P.genericTypeAnnotation(P.identifier("Function"))}function D(){return w(this.get("callee"))}function C(){return w(this.get("tag"))}function w(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?P.genericTypeAnnotation(P.identifier("AsyncIterator")):P.genericTypeAnnotation(P.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}t.__esModule=!0,t.ClassDeclaration=t.ClassExpression=t.FunctionDeclaration=t.ArrowFunctionExpression=t.FunctionExpression=t.Identifier=void 0;var F=r(368);Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return i(F).default}}),t.VariableDeclarator=s,t.TypeCastExpression=a,t.NewExpression=o,t.TemplateLiteral=u,t.UnaryExpression=l,t.BinaryExpression=c,t.LogicalExpression=f,t.ConditionalExpression=p,t.SequenceExpression=d,t.AssignmentExpression=h,t.UpdateExpression=m,t.StringLiteral=v,t.NumericLiteral=y,t.BooleanLiteral=g,t.NullLiteral=b,t.RegExpLiteral=E,t.ObjectExpression=x,t.ArrayExpression=A,t.RestElement=S,t.CallExpression=D,t.TaggedTemplateExpression=C;var k=r(1),P=n(k);a.validParent=!0,S.validParent=!0,t.FunctionExpression=_,t.ArrowFunctionExpression=_,t.FunctionDeclaration=_,t.ClassExpression=_,t.ClassDeclaration=_},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(k.isIdentifier(a)){if(!r(a.name))return!1}else if(k.isLiteral(a)){if(!r(a.value))return!1}else{if(k.isMemberExpression(a)){if(a.computed&&!k.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!k.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length}function a(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function o(){return this.scope.isStatic(this.node)}function u(e){return!this.has(e)}function l(e,t){return this.node[e]===t}function c(e){return k.isType(this.type,e)}function f(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function p(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?k.isBlockStatement(e):!!this.isBlockStatement()&&k.isExpression(e))}function d(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function h(){return!this.parentPath.isLabeledStatement()&&!k.isBlockStatement(this.container)&&(0,w.default)(k.STATEMENT_OR_BLOCK_KEYS,this.key)}function m(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!!i.isImportDeclaration()&&(i.node.source.value===e&&(!t||(!(!n.isImportDefaultSpecifier()||"default"!==t)||(!(!n.isImportNamespaceSpecifier()||"*"!==t)||!(!n.isImportSpecifier()||n.node.imported.name!==t)))))}function v(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function y(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u<s.length;u++){var l=s[u];if(o=i.indexOf(l),o>=0){a=l;break}}if(!a)return"before";var c=i[o-1],f=s[u-1];if(!c||!f)return"before";if(c.listKey&&c.container===f.container)return c.key>f.key?"before":"after";var p=k.VISITOR_KEYS[c.type].indexOf(c.key),d=k.VISITOR_KEYS[f.type].indexOf(f.key);return p>d?"before":"after"}function b(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var n=r.referencePaths,i=n,s=Array.isArray(i),a=0,i=s?i:(0,D.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,c=n,f=Array.isArray(c),p=0,c=f?c:(0,D.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d,m=!!h.find(function(e){return e.node===t.node});if(!m){var v=this._guessExecutionStatusRelativeTo(h);if(l){if(l!==v)return}else l=v}}return l}}function E(e,t){return this._resolve(e,t)||this}function x(e,t){var r=this;if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this){var i=function(){var i=n.path.resolve(e,t);return r.find(function(e){return e.node===i.node})?{v:void 0}:{v:i}}();if("object"===("undefined"==typeof i?"undefined":(0,S.default)(i)))return i.v}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var s=this.toComputedKey();if(!k.isLiteral(s))return;var a=s.value,o=this.get("object").resolve(e,t);if(o.isObjectExpression())for(var u=o.get("properties"),l=u,c=Array.isArray(l),f=0,l=c?l:(0,D.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;if(d.isProperty()){var h=d.get("key"),m=d.isnt("computed")&&h.isIdentifier({name:a});if(m=m||h.isLiteral({value:a}))return d.get("value").resolve(e,t)}}else if(o.isArrayExpression()&&!isNaN(+a)){var v=o.get("elements"),y=v[a];if(y)return y.resolve(e,t)}}}}t.__esModule=!0,t.is=void 0;var A=r(7),S=i(A),_=r(2),D=i(_);t.matchesPattern=s,t.has=a,t.isStatic=o,t.isnt=u,t.equals=l,t.isNodeType=c,t.canHaveVariableDeclarationOrExpression=f,t.canSwapBetweenExpressionAndStatement=p,t.isCompletionRecord=d,t.isStatementOrBlock=h,t.referencesImport=m,t.getSource=v,t.willIMaybeExecuteBefore=y,t._guessExecutionStatusRelativeTo=g,t._guessExecutionStatusRelativeToDifferentFunctions=b,t.resolve=E,t._resolve=x;var C=r(113),w=i(C),F=r(1),k=n(F);t.is=a},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(3),a=i(s),o=r(2),u=i(o),l=r(1),c=n(l),f={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!l.react.isCompatTag(e.node.name)){var r=e.scope.getBinding(e.node.name);if(r&&r===t.scope.getBinding(e.node.name))if(r.constant)t.bindings[e.node.name]=r;else for(var n=r.constantViolations,i=Array.isArray(n),s=0,n=i?n:(0,u.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;t.breakOnScopePaths=t.breakOnScopePaths.concat(o.getAncestry())}}}},p=function(){function e(t,r){(0,a.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key)return}return e}},e.prototype._getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return t.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&e.parentPath.node.declarations.length>1)return e;while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(f,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=c.variableDeclarator(r,this.path.node);t.insertBefore([t.isVariableDeclarator()?n:c.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=c.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();t.default=p,e.exports=t.default},function(e,t){"use strict";t.__esModule=!0;t.hooks=[function(e,t){if("body"===e.key&&t.isArrowFunctionExpression())return e.replaceWith(e.scope.buildUndefinedNode()),!0},function(e,t){var r=!1;if(r=r||"test"===e.key&&(t.isWhile()||t.isSwitchCase()),r=r||"declaration"===e.key&&t.isExportDeclaration(),r=r||"body"===e.key&&t.isLabeledStatement(),r=r||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length,r=r||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||t.isLoop()&&"body"===e.key)return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(C.blockStatement(e))}return[this]}function a(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n<t.length;n++){var i=e+n,s=t[n];if(this.container.splice(i,0,s),this.context){var a=this.context.create(this.parent,this.container,i,this.listKey);this.context.queue&&a.pushContext(this.context),r.push(a)}else r.push(_.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:i}))}for(var o=this._getQueueContexts(),u=r,l=Array.isArray(u),c=0,u=l?u:(0,b.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;p.setScope(),p.debug(function(){return"Inserted."});for(var d=o,h=Array.isArray(d),m=0,d=h?d:(0,b.default)(d);;){var v;if(h){if(m>=d.length)break;v=d[m++]}else{if(m=d.next(),m.done)break;v=m.value}var y=v;y.maybeQueue(p,!0)}}return r}function o(e){return this._containerInsert(this.key,e)}function u(e){return this._containerInsert(this.key+1,e)}function l(e){var t=e[e.length-1],r=C.isIdentifier(t)||C.isExpressionStatement(t)&&C.isIdentifier(t.expression);r&&!this.isCompletionRecord()&&e.pop()}function c(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(C.expressionStatement(C.assignmentExpression("=",t,this.node))),e.push(C.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(C.blockStatement(e))}return[this]}function f(e,t){if(this.parent)for(var r=E.path.get(this.parent),n=0;n<r.length;n++){var i=r[n];i.key>=e&&(i.key+=t)}}function p(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t<e.length;t++){var r=e[t],n=void 0;if(r?"object"!==("undefined"==typeof r?"undefined":(0,y.default)(r))?n="contains a non-object node":r.type?r instanceof _.default&&(n="has a NodePath when it expected a raw object"):n="without a type":n="has falsy node",n){var i=Array.isArray(r)?"array":"undefined"==typeof r?"undefined":(0,y.default)(r);throw new Error("Node list "+n+" with the index of "+t+" and type of "+i)}}return e}function d(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);var r=_.default.get({parentPath:this,parent:this.node,container:this.node[e],listKey:e,key:0});return r.insertBefore(t)}function h(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);var r=this.node[e],n=_.default.get({parentPath:this,parent:this.node,container:r,listKey:e,key:r.length});return n.replaceWithMultiple(t)}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.scope,t=new A.default(this,e);return t.run()}t.__esModule=!0;var v=r(7),y=i(v),g=r(2),b=i(g);t.insertBefore=s,t._containerInsert=a,t._containerInsertBefore=o,t._containerInsertAfter=u,t._maybePopFromStatements=l,t.insertAfter=c,t.updateSiblingKeys=f,t._verifyNodeList=p,t.unshiftContainer=d,t.pushContainer=h,t.hoist=m;var E=r(89),x=r(371),A=i(x),S=r(35),_=i(S),D=r(1),C=n(D)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return this._assertUnremoved(),this.resync(),this._callRemovalHooks()?void this._markRemoved():(this.shareCommentsWithSiblings(),this._remove(),void this._markRemoved())}function s(){for(var e=f.hooks,t=Array.isArray(e),r=0,e=t?e:(0,c.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if(r=e.next(),r.done)break;n=r.value}var i=n;if(i(this,this.parentPath))return!0}}function a(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)}function o(){this.shouldSkip=!0,this.removed=!0,this.node=null}function u(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}t.__esModule=!0;var l=r(2),c=n(l);t.remove=i,t._callRemovalHooks=s,t._remove=a,t._markRemoved=o,t._assertUnremoved=u;var f=r(372)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){this.resync(),e=this._verifyNodeList(e),x.inheritLeadingComments(e[0],this.node),x.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()}function a(e){this.resync();try{e="("+e+")",e=(0,b.parse)(e)}catch(r){var t=r.loc;throw (t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,h.default)(e,t.line,t.column+1)), r)}return e=e.program.body[0].expression,v.default.removeProperties(e),this.replaceWith(e)}function o(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof g.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!x.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&x.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||(e=x.expressionStatement(e))),this.isNodeType("Expression")&&x.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(x.inheritsComments(e,t),x.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}}function u(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?x.validate(this.parent,this.key,[e]):x.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e}function l(e){this.resync();var t=x.toSequenceExpression(e,this.scope);if(x.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=x.functionExpression(null,[],x.blockStatement(e));n.shadow=!0,this.replaceWith(x.callExpression(n,[])),this.traverse(A);for(var i=this.get("callee").getCompletionRecords(),s=i,a=Array.isArray(s),o=0,s=a?s:(0,p.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.isExpressionStatement()){var c=l.findParent(function(e){return e.isLoop()});if(c){var f=this.get("callee"),d=f.scope.generateDeclaredUidIdentifier("ret");f.get("body").pushContainer("body",x.returnStatement(d)),l.get("expression").replaceWith(x.assignmentExpression("=",d,l.node.expression))}else l.replaceWith(x.returnStatement(l.node.expression))}}return this.node}this.replaceWith(t)}}function c(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)}t.__esModule=!0;var f=r(2),p=i(f);t.replaceWithMultiple=s,t.replaceWithSourceString=a,t.replaceWith=o,t._replaceWith=u,t.replaceExpressionWithStatements=l,t.replaceInline=c;var d=r(181),h=i(d),m=r(8),v=i(m),y=r(35),g=i(y),b=r(136),E=r(1),x=n(E),A={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});for(var n=[],i=e.node.declarations,s=Array.isArray(i),a=0,i=s?i:(0,p.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;u.init&&n.push(x.expressionStatement(x.assignmentExpression("=",u.id,u.init)))}e.replaceWithMultiple(n)}}}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(3),a=i(s),o=r(223),u=(i(o),r(1)),l=n(u),c={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},f=function(){function e(t,r,n){(0,a.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var s in n){var a=s===this.oldName?this.newName:s,o=r?"default":s;i.push(l.exportSpecifier(l.identifier(a),l.identifier(o)))}if(i.length){var u=l.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(u._blockHoist=3),t.insertAfter(u),t.replaceWith(e.node)}}},e.prototype.maybeConvertFromClassFunctionDeclaration=function(e){},e.prototype.maybeConvertFromClassFunctionExpression=function(e){},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path,a=s.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});a&&this.maybeConvertFromExportDeclaration(a),i.traverse(e||i.block,c,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),"hoisted"===t.type,a&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))},e}();t.default=f,e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!d(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];for(var i=r,s=Array.isArray(i),o=0,i=s?i:(0,E.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;e[l]=n}}}a(e),delete e.__esModule,c(e),f(e);for(var m=(0,g.default)(e),v=Array.isArray(m),y=0,m=v?m:(0,E.default)(m);;){var b;if(v){if(y>=m.length)break;b=m[y++]}else{if(y=m.next(),y.done)break;b=y.value}var x=b;if(!d(x)){var S=A[x];if(S){var _=e[x];for(var D in _)_[D]=p(S,_[D]);if(delete e[x],S.types)for(var w=S.types,k=Array.isArray(w),P=0,w=k?w:(0,E.default)(w);;){var T;if(k){if(P>=w.length)break;T=w[P++]}else{if(P=w.next(),P.done)break;T=P.value}var O=T;e[O]?h(e[O],_):e[O]=_}else h(e,_)}}}for(var B in e)if(!d(B)){var R=e[B],I=C.FLIPPED_ALIAS_KEYS[B],M=C.DEPRECATED_KEYS[B];if(M&&(console.trace("Visitor defined for "+B+" but it has been renamed to "+M),I=[M]),I){delete e[B];for(var N=I,L=Array.isArray(N),j=0,N=L?N:(0,E.default)(N);;){var U;if(L){if(j>=N.length)break;U=N[j++]}else{if(j=N.next(),j.done)break;U=j.value}var V=U,G=e[V];G?h(G,R):e[V]=(0,F.default)(R)}}}for(var W in e)d(W)||f(e[W]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(_.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!d(t)){if(C.TYPES.indexOf(t)<0)throw new Error(_.get("traverseVerifyNodeType",t));var r=e[t];if("object"===("undefined"==typeof r?"undefined":(0,v.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(_.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){for(var r=[].concat(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,E.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if("function"!=typeof o)throw new TypeError("Non-function found defined in "+e+" with type "+("undefined"==typeof o?"undefined":(0,v.default)(o)))}}function u(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i<e.length;i++){var a=e[i],o=t[i];s(a);for(var u in a){var c=a[u];(o||r)&&(c=l(c,o,r));var f=n[u]=n[u]||{};h(f,c)}}return n}function l(e,t,r){var n={},i=function(i){var s=e[i];return Array.isArray(s)?(s=s.map(function(e){var n=e;return t&&(n=function(r){return e.call(t,r,t)}),r&&(n=r(t.key,i,n)),n}),void(n[i]=s)):"continue"};for(var s in e){i(s)}return n}function c(e){for(var t in e)if(!d(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}function f(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function p(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}function d(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function h(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}t.__esModule=!0;var m=r(7),v=i(m),y=r(20),g=i(y),b=r(2),E=i(b);t.explode=s,t.verify=a,t.merge=u;var x=r(222),A=n(x),S=r(19),_=n(S),D=r(1),C=n(D),w=r(111),F=i(w)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||k.isIdentifier(t)&&(t=k.stringLiteral(t.name)),t}function a(e,t){function r(e){for(var s=!1,a=[],o=e,u=Array.isArray(o),l=0,o=u?o:(0,b.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var f=c;if(k.isExpression(f))a.push(f);else if(k.isExpressionStatement(f))a.push(f.expression);else{if(k.isVariableDeclaration(f)){if("var"!==f.kind)return i=!0;for(var p=f.declarations,d=Array.isArray(p),h=0,p=d?p:(0,b.default)(p);;){var m;if(d){if(h>=p.length)break;m=p[h++]}else{if(h=p.next(),h.done)break;m=h.value}var v=m,y=k.getBindingIdentifiers(v);for(var g in y)n.push({kind:f.kind,id:y[g]});v.init&&a.push(k.assignmentExpression("=",v.id,v.init))}s=!0;continue}if(k.isIfStatement(f)){var E=f.consequent?r([f.consequent]):t.buildUndefinedNode(),x=f.alternate?r([f.alternate]):t.buildUndefinedNode();if(!E||!x)return i=!0;a.push(k.conditionalExpression(f.test,E,x))}else{if(!k.isBlockStatement(f)){if(k.isEmptyStatement(f)){s=!0;continue}return i=!0}a.push(r(f.body))}}s=!1}return(s||0===a.length)&&a.push(t.buildUndefinedNode()),1===a.length?a[0]:k.sequenceExpression(a)}if(e&&e.length){var n=[],i=!1,s=r(e);if(!i){for(var a=0;a<n.length;a++)t.push(n[a]);return s}}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?o.increment()+"":(r=k.isIdentifier(t)?t.name:k.isStringLiteral(t)?(0,y.default)(t.value):(0,y.default)(k.removePropertiesDeep(k.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function u(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),k.isValidIdentifier(e)||(e="_"+e),e||"_"}function l(e){return e=u(e),"eval"!==e&&"arguments"!==e||(e="_"+e),e}function c(e,t){if(k.isStatement(e))return e;var r=!1,n=void 0;if(k.isClass(e))r=!0,n="ClassDeclaration";else if(k.isFunction(e))r=!0,n="FunctionDeclaration";else if(k.isAssignmentExpression(e))return k.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e}function f(e){if(k.isExpressionStatement(e)&&(e=e.expression),k.isExpression(e))return e;if(k.isClass(e)?e.type="ClassExpression":k.isFunction(e)&&(e.type="FunctionExpression"),!k.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e}function p(e,t){return k.isBlockStatement(e)?e:(k.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(k.isStatement(e)||(e=k.isFunction(t)?k.returnStatement(e):k.expressionStatement(e)),e=[e]),k.blockStatement(e))}function d(e){if(void 0===e)return k.identifier("undefined");if(e===!0||e===!1)return k.booleanLiteral(e);if(null===e)return k.nullLiteral();if((0,w.default)(e))return k.stringLiteral(e);if((0,S.default)(e))return k.numericLiteral(e);if((0,D.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return k.regExpLiteral(t,r)}if(Array.isArray(e))return k.arrayExpression(e.map(k.valueToNode));if((0,x.default)(e)){var n=[];for(var i in e){var s=void 0;s=k.isValidIdentifier(i)?k.identifier(i):k.stringLiteral(i),n.push(k.objectProperty(s,k.valueToNode(e[i])))}return k.objectExpression(n)}throw new Error("don't know how to turn this value into a node")}t.__esModule=!0;var h=r(352),m=i(h),v=r(34),y=i(v),g=r(2),b=i(g);t.toComputedKey=s,t.toSequenceExpression=a,t.toKeyAlias=o,t.toIdentifier=u,t.toBindingIdentifierName=l,t.toStatement=c,t.toExpression=f,t.toBlock=p,t.valueToNode=d;var E=r(273),x=i(E),A=r(272),S=i(A),_=r(274),D=i(_),C=r(176),w=i(C),F=r(1),k=n(F);o.uid=0,o.increment=function(){return o.uid>=m.default?o.uid=0:o.uid++}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var s=r(1),a=i(s),o=r(135),u=r(28),l=n(u);(0,l.default)("ArrayExpression",{fields:{elements:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,l.default)("AssignmentExpression",{
+fields:{operator:{validate:(0,u.assertValueType)("string")},left:{validate:(0,u.assertNodeType)("LVal")},right:{validate:(0,u.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,l.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:u.assertOneOf.apply(void 0,o.BINARY_OPERATORS)},left:{validate:(0,u.assertNodeType)("Expression")},right:{validate:(0,u.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,l.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,u.assertNodeType)("DirectiveLiteral")}}}),(0,l.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,u.assertValueType)("string")}}}),(0,l.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Directive"))),default:[]},body:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,l.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,u.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,l.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,u.assertNodeType)("Expression")},arguments:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,l.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,u.assertNodeType)("Identifier")},body:{validate:(0,u.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,l.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,u.assertNodeType)("Expression")},consequent:{validate:(0,u.assertNodeType)("Expression")},alternate:{validate:(0,u.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,l.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,u.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,l.default)("DebuggerStatement",{aliases:["Statement"]}),(0,l.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,u.assertNodeType)("Expression")},body:{validate:(0,u.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,l.default)("EmptyStatement",{aliases:["Statement"]}),(0,l.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,u.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,l.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,u.assertNodeType)("Program")}}}),(0,l.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,u.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,u.assertNodeType)("Expression")},body:{validate:(0,u.assertNodeType)("Statement")}}}),(0,l.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,u.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,u.assertNodeType)("Expression"),optional:!0},update:{validate:(0,u.assertNodeType)("Expression"),optional:!0},body:{validate:(0,u.assertNodeType)("Statement")}}}),(0,l.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,u.assertNodeType)("Identifier")},params:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("LVal")))},body:{validate:(0,u.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,u.assertValueType)("boolean")},async:{default:!1,validate:(0,u.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,l.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,u.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("LVal")))},body:{validate:(0,u.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,u.assertValueType)("boolean")},async:{default:!1,validate:(0,u.assertValueType)("boolean")}}}),(0,l.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){!a.isValidIdentifier(r)}},decorators:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Decorator")))}}}),(0,l.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,u.assertNodeType)("Expression")},consequent:{validate:(0,u.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,u.assertNodeType)("Statement")}}}),(0,l.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,u.assertNodeType)("Identifier")},body:{validate:(0,u.assertNodeType)("Statement")}}}),(0,l.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,u.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,l.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,u.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,l.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,l.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,u.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,l.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,u.assertValueType)("string")},flags:{validate:(0,u.assertValueType)("string"),default:""}}}),(0,l.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:u.assertOneOf.apply(void 0,o.LOGICAL_OPERATORS)},left:{validate:(0,u.assertNodeType)("Expression")},right:{validate:(0,u.assertNodeType)("Expression")}}}),(0,l.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,u.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,u.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,l.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,u.assertNodeType)("Expression")},arguments:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Expression","SpreadElement")))}}}),(0,l.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Directive"))),default:[]},body:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,l.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,l.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,u.chain)((0,u.assertValueType)("string"),(0,u.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,u.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];u.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Decorator")))},body:{validate:(0,u.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,u.assertValueType)("boolean")},async:{default:!1,validate:(0,u.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,l.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,u.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];u.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,u.assertNodeType)("Expression")},shorthand:{validate:(0,u.assertValueType)("boolean"),default:!1},decorators:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,l.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,u.assertNodeType)("LVal")},decorators:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Decorator")))}}}),(0,l.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,u.assertNodeType)("Expression"),optional:!0}}}),(0,l.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,l.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,u.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("Statement")))}}}),(0,l.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,u.assertNodeType)("Expression")},cases:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("SwitchCase")))}}}),(0,l.default)("ThisExpression",{aliases:["Expression"]}),(0,l.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,u.assertNodeType)("Expression")}}}),(0,l.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,u.assertNodeType)("BlockStatement")},handler:{optional:!0,handler:(0,u.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,u.assertNodeType)("BlockStatement")}}}),(0,l.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,u.assertNodeType)("Expression")},operator:{validate:u.assertOneOf.apply(void 0,o.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,l.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,u.assertNodeType)("Expression")},operator:{validate:u.assertOneOf.apply(void 0,o.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,l.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,u.chain)((0,u.assertValueType)("string"),(0,u.assertOneOf)("var","let","const"))},declarations:{validate:(0,u.chain)((0,u.assertValueType)("array"),(0,u.assertEach)((0,u.assertNodeType)("VariableDeclarator")))}}}),(0,l.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,u.assertNodeType)("LVal")},init:{optional:!0,validate:(0,u.assertNodeType)("Expression")}}}),(0,l.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,u.assertNodeType)("Expression")},body:{validate:(0,u.assertNodeType)("BlockStatement","Statement")}}}),(0,l.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,u.assertNodeType)("Expression")},body:{validate:(0,u.assertNodeType)("BlockStatement","Statement")}}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i=r(28),s=n(i);(0,s.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,i.assertNodeType)("Identifier")},right:{validate:(0,i.assertNodeType)("Expression")},decorators:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("Decorator")))}}}),(0,s.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("Expression")))},decorators:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("Decorator")))}}}),(0,s.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("LVal")))},body:{validate:(0,i.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,i.assertValueType)("boolean"),default:!1}}}),(0,s.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,s.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,i.assertNodeType)("Identifier")},body:{validate:(0,i.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,i.assertNodeType)("Expression")},decorators:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("Decorator")))}}}),(0,s.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,i.assertNodeType)("Identifier")},body:{validate:(0,i.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,i.assertNodeType)("Expression")},decorators:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("Decorator")))}}}),(0,s.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,i.assertNodeType)("StringLiteral")}}}),(0,s.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,i.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,s.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,i.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("ExportSpecifier")))},source:{validate:(0,i.assertNodeType)("StringLiteral"),optional:!0}}}),(0,s.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,i.assertNodeType)("Identifier")},exported:{validate:(0,i.assertNodeType)("Identifier")}}}),(0,s.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,i.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,i.assertNodeType)("Expression")},body:{validate:(0,i.assertNodeType)("Statement")}}}),(0,s.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,i.assertNodeType)("StringLiteral")}}}),(0,s.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,i.assertNodeType)("Identifier")}}}),(0,s.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,i.assertNodeType)("Identifier")}}}),(0,s.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,i.assertNodeType)("Identifier")},imported:{validate:(0,i.assertNodeType)("Identifier")}}}),(0,s.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,i.assertValueType)("string")},property:{validate:(0,i.assertValueType)("string")}}}),(0,s.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,i.chain)((0,i.assertValueType)("string"),(0,i.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,i.assertValueType)("boolean")},static:{default:!1,validate:(0,i.assertValueType)("boolean")},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];i.assertNodeType.apply(void 0,n)(e,t,r)}},params:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("LVal")))},body:{validate:(0,i.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,i.assertValueType)("boolean")},async:{default:!1,validate:(0,i.assertValueType)("boolean")}}}),(0,s.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("Decorator")))}}}),(0,s.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,i.assertNodeType)("Expression")}}}),(0,s.default)("Super",{aliases:["Expression"]}),(0,s.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,i.assertNodeType)("Expression")},quasi:{validate:(0,i.assertNodeType)("TemplateLiteral")}}}),(0,s.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,i.assertValueType)("boolean"),default:!1}}}),(0,s.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("TemplateElement")))},expressions:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("Expression")))}}}),(0,s.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,i.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,i.assertNodeType)("Expression")}}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i=r(28),s=n(i);(0,s.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,i.assertNodeType)("Expression")}}}),(0,s.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,i.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,i.assertNodeType)("Expression")},body:{validate:(0,i.assertNodeType)("Statement")}}}),(0,s.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,s.default)("Import",{aliases:["Expression"]}),(0,s.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,i.assertNodeType)("Expression")}}}),(0,s.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,i.assertNodeType)("BlockStatement")}}}),(0,s.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,i.assertNodeType)("Identifier")}}}),(0,s.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,i.assertNodeType)("Identifier")}}}),(0,s.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,i.assertNodeType)("LVal")}}}),(0,s.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,i.assertNodeType)("Expression")}}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i=r(28),s=n(i);(0,s.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,s.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,s.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,s.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,s.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,s.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,s.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,i.assertValueType)("boolean"),default:!1}}}),(0,s.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,s.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,s.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,s.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,s.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,s.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,s.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,s.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,s.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,s.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,s.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,s.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,s.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,s.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,s.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,s.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,s.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,s.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,s.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,s.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,s.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,s.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,s.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,s.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,s.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,s.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,s.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,s.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,s.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,s.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,s.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,s.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,s.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,s.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,s.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,s.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,s.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},function(e,t,r){"use strict";r(28),r(379),r(380),r(382),r(384),r(385),r(381)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i=r(28),s=n(i);(0,s.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,i.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,i.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,s.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,i.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,s.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,i.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,i.assertNodeType)("JSXClosingElement")},children:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,s.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,s.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,i.assertNodeType)("Expression")}}}),(0,s.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,i.assertNodeType)("Expression")}}}),(0,s.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,i.assertValueType)("string")}}}),(0,s.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,i.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,i.assertNodeType)("JSXIdentifier")}}}),(0,s.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,i.assertNodeType)("JSXIdentifier")},name:{validate:(0,i.assertNodeType)("JSXIdentifier")}}}),(0,s.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,i.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,i.assertValueType)("boolean")},attributes:{validate:(0,i.chain)((0,i.assertValueType)("array"),(0,i.assertEach)((0,i.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,s.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,i.assertNodeType)("Expression")}}}),(0,s.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,i.assertValueType)("string")}}})},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i=r(28),s=n(i);(0,s.default)("Noop",{visitor:[]}),(0,s.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,i.assertNodeType)("Expression")}}})},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){var t=s(e);return 1===t.length?t[0]:u.unionTypeAnnotation(t)}function s(e){for(var t={},r={},n=[],i=[],a=0;a<e.length;a++){var o=e[a];if(o&&!(i.indexOf(o)>=0)){if(u.isAnyTypeAnnotation(o))return[o];if(u.isFlowBaseAnnotation(o))r[o.type]=o;else if(u.isUnionTypeAnnotation(o))n.indexOf(o.types)<0&&(e=e.concat(o.types),n.push(o.types));else if(u.isGenericTypeAnnotation(o)){var l=o.id.name;if(t[l]){var c=t[l];c.typeParameters?o.typeParameters&&(c.typeParameters.params=s(c.typeParameters.params.concat(o.typeParameters.params))):c=o.typeParameters}else t[l]=o}else i.push(o)}}for(var f in r)i.push(r[f]);for(var p in t)i.push(t[p]);return i}function a(e){if("string"===e)return u.stringTypeAnnotation();if("number"===e)return u.numberTypeAnnotation();if("undefined"===e)return u.voidTypeAnnotation();if("boolean"===e)return u.booleanTypeAnnotation();if("function"===e)return u.genericTypeAnnotation(u.identifier("Function"));if("object"===e)return u.genericTypeAnnotation(u.identifier("Object"));if("symbol"===e)return u.genericTypeAnnotation(u.identifier("Symbol"));throw new Error("Invalid typeof value")}t.__esModule=!0,t.createUnionTypeAnnotation=i,t.removeTypeDuplicates=s,t.createTypeAnnotationBasedOnTypeof=a;var o=r(1),u=n(o)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return!!e&&/^[a-z]|\-/.test(e)}function s(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,i=0;i<r.length;i++)r[i].match(/[^ \t]/)&&(n=i);for(var s="",a=0;a<r.length;a++){var o=r[a],l=0===a,c=a===r.length-1,f=a===n,p=o.replace(/\t/g," ");l||(p=p.replace(/^[ ]+/,"")),c||(p=p.replace(/[ ]+$/,"")),p&&(f||(p+=" "),s+=p)}s&&t.push(u.stringLiteral(s))}function a(e){for(var t=[],r=0;r<e.children.length;r++){var n=e.children[r];u.isJSXText(n)?s(n,t):(u.isJSXExpressionContainer(n)&&(n=n.expression),u.isJSXEmptyExpression(n)||t.push(n))}return t}t.__esModule=!0,t.isReactComponent=void 0,t.isCompatTag=i,t.buildChildren=a;var o=r(1),u=n(o);t.isReactComponent=u.buildMatchMemberExpression("React.Component")},function(e,t,r){"use strict";
+function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=x.getBindingIdentifiers.keys[t.type];if(r)for(var n=0;n<r.length;n++){var i=r[n],s=t[i];if(Array.isArray(s)){if(s.indexOf(e)>=0)return!0}else if(s===e)return!0}return!1}function a(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var r=t.params,n=Array.isArray(r),i=0,r=n?r:(0,E.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(a===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":return t.right===e;case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0}function o(e){return"string"==typeof e&&!S.default.keyword.isReservedWordES6(e,!0)&&S.default.keyword.isIdentifierNameES6(e)}function u(e){return D.isVariableDeclaration(e)&&("var"!==e.kind||e[C.BLOCK_SCOPED_SYMBOL])}function l(e){return D.isFunctionDeclaration(e)||D.isClassDeclaration(e)||D.isLet(e)}function c(e){return D.isVariableDeclaration(e,{kind:"var"})&&!e[C.BLOCK_SCOPED_SYMBOL]}function f(e){return D.isImportDefaultSpecifier(e)||D.isIdentifier(e.imported||e.exported,{name:"default"})}function p(e,t){return(!D.isBlockStatement(e)||!D.isFunction(t,{body:e}))&&D.isScopable(e)}function d(e){return!!D.isType(e.type,"Immutable")||!!D.isIdentifier(e)&&"undefined"===e.name}function h(e,t){if("object"!==("undefined"==typeof e?"undefined":(0,g.default)(e))||"object"!==("undefined"==typeof e?"undefined":(0,g.default)(e))||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=(0,v.default)(D.NODE_FIELDS[e.type]||e.type),n=r,i=Array.isArray(n),s=0,n=i?n:(0,E.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if((0,g.default)(e[o])!==(0,g.default)(t[o]))return!1;if(Array.isArray(e[o])){if(!Array.isArray(t[o]))return!1;if(e[o].length!==t[o].length)return!1;for(var u=0;u<e[o].length;u++)if(!h(e[o][u],t[o][u]))return!1}else if(!h(e[o],t[o]))return!1}return!0}t.__esModule=!0;var m=r(20),v=i(m),y=r(7),g=i(y),b=r(2),E=i(b);t.isBinding=s,t.isReferenced=a,t.isValidIdentifier=o,t.isLet=u,t.isBlockScoped=l,t.isVar=c,t.isSpecifierDefault=f,t.isScope=p,t.isImmutable=d,t.isNodesEquivalent=h;var x=r(224),A=r(157),S=i(A),_=r(1),D=n(_),C=r(135)},function(e,t){"use strict";function r(e,t,r){e instanceof RegExp&&(e=n(e,r)),t instanceof RegExp&&(t=n(t,r));var s=i(e,t,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+e.length,s[1]),post:r.slice(s[1]+t.length)}}function n(e,t){var r=t.match(e);return r?r[0]:null}function i(e,t,r){var n,i,s,a,o,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c),u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:(i=n.pop(),i<s&&(s=i,a=l),l=r.indexOf(t,c+1)),c=u<l&&u>=0?u:l;n.length&&(o=[s,a])}return o}e.exports=r,r.range=i},function(e,t){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function n(e){return 3*e.length/4-r(e)}function i(e){var t,n,i,s,a,o,u=e.length;a=r(e),o=new c(3*u/4-a),i=a>0?u-4:u;var f=0;for(t=0,n=0;t<i;t+=4,n+=3)s=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],o[f++]=s>>16&255,o[f++]=s>>8&255,o[f++]=255&s;return 2===a?(s=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,o[f++]=255&s):1===a&&(s=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,o[f++]=s>>8&255,o[f++]=255&s),o}function s(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function a(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(s(n));return i.join("")}function o(e){for(var t,r=e.length,n=r%3,i="",s=[],o=16383,l=0,c=r-n;l<c;l+=o)s.push(a(e,l,l+o>c?c:l+o));return 1===n?(t=e[r-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),s.push(i),s.join("")}t.byteLength=n,t.toByteArray=i,t.fromByteArray=o;for(var u=[],l=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=f.length;p<d;++p)u[p]=f[p],l[f.charCodeAt(p)]=p;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},function(e,t,r){"use strict";function n(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function i(e){return e.split("\\\\").join(m).split("\\{").join(v).split("\\}").join(y).split("\\,").join(g).split("\\.").join(b)}function s(e){return e.split(m).join("\\").split(v).join("{").split(y).join("}").split(g).join(",").split(b).join(".")}function a(e){if(!e)return[""];var t=[],r=h("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,s=r.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var u=a(s);return s.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),t.push.apply(t,o),t}function o(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),p(i(e),!0).map(s)):[]}function u(e){return"{"+e+"}"}function l(e){return/^-?0\d/.test(e)}function c(e,t){return e<=t}function f(e,t){return e>=t}function p(e,t){var r=[],i=h("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=s||o,v=/^(.*,)+(.+)?$/.test(i.body);if(!m&&!v)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+y+i.post,p(e)):[e];var g;if(m)g=i.body.split(/\.\./);else if(g=a(i.body),1===g.length&&(g=p(g[0],!1).map(u),1===g.length)){var b=i.post.length?p(i.post,!1):[""];return b.map(function(e){return i.pre+g[0]+e})}var E,x=i.pre,b=i.post.length?p(i.post,!1):[""];if(m){var A=n(g[0]),S=n(g[1]),_=Math.max(g[0].length,g[1].length),D=3==g.length?Math.abs(n(g[2])):1,C=c,w=S<A;w&&(D*=-1,C=f);var F=g.some(l);E=[];for(var k=A;C(k,S);k+=D){var P;if(o)P=String.fromCharCode(k),"\\"===P&&(P="");else if(P=String(k),F){var T=_-P.length;if(T>0){var O=new Array(T+1).join("0");P=k<0?"-"+O+P.slice(1):O+P}}E.push(P)}}else E=d(g,function(e){return p(e,!1)});for(var B=0;B<E.length;B++)for(var R=0;R<b.length;R++){var I=x+E[B]+b[R];(!t||m||I)&&r.push(I)}return r}var d=r(395),h=r(389);e.exports=o;var m="\0SLASH"+Math.random()+"\0",v="\0OPEN"+Math.random()+"\0",y="\0CLOSE"+Math.random()+"\0",g="\0COMMA"+Math.random()+"\0",b="\0PERIOD"+Math.random()+"\0"},function(e,t,r){(function(e){"use strict";function n(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,r){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return o(this,e,t,r)}function o(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?d(e,t,r,n):"string"==typeof t?f(e,t,r):h(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t,r,n){return u(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}function c(e,t){if(u(t),e=s(e,t<0?0:0|m(t)),!a.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function f(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!a.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(t,r);e=s(e,n);var i=e.write(t,r);return i!==n&&(e=e.slice(0,i)),e}function p(e,t){var r=t.length<0?0:0|m(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=p(e,t),e}function h(e,t){if(a.isBuffer(t)){var r=0|m(t.length);return e=s(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||z(t.length)?s(e,0):p(e,t);if("Buffer"===t.type&&Z(t.data))return p(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function m(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),a.alloc(+e)}function y(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(n)return q(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return F(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function E(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:x(e,t,r,n,i);if("number"==typeof t)return t=255&t,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):x(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;l<o;l++)if(s(e,l)===s(t,c===-1?0:l-c)){if(c===-1&&(c=l),l-c+1===u)return c*a}else c!==-1&&(l-=l-c),c=-1}else for(r+u>o&&(r=o-u),l=r;l>=0;l--){for(var f=!0,p=0;p<u;p++)if(s(e,l+p)!==s(t,p)){f=!1;break}if(f)return l}return-1}function A(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(isNaN(o))return a;e[r+a]=o}return a}function S(e,t,r,n){return X(q(t,e.length-r),e,r,n)}function _(e,t,r,n){return X(K(t),e,r,n)}function D(e,t,r,n){return _(e,t,r,n)}function C(e,t,r,n){return X(J(t),e,r,n)}function w(e,t,r,n){return X(H(t,e.length-r),e,r,n)}function F(e,t,r){return 0===t&&r===e.length?$.fromByteArray(e):$.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s=e[i],a=null,o=s>239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,f;switch(o){case 1:s<128&&(a=s);break;case 2:u=e[i+1],128===(192&u)&&(f=(31&s)<<6|63&u,f>127&&(a=f));break;case 3:u=e[i+1],l=e[i+2],128===(192&u)&&128===(192&l)&&(f=(15&s)<<12|(63&u)<<6|63&l,f>2047&&(f<55296||f>57343)&&(a=f));break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128===(192&u)&&128===(192&l)&&128===(192&c)&&(f=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c,f>65535&&f<1114112&&(a=f))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return P(n)}function P(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=ee));return r}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function O(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function B(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=Y(e[s]);return i}function R(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function I(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,s){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-r,2);i<s;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-r,4);i<s;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function j(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,i){return i||j(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,r,n,23,4),r+4}function V(e,t,r,n,i){return i||j(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,r,n,52,8),r+8}function G(e){if(e=W(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function W(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function K(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function H(e,t){for(var r,n,i,s=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function J(e){return $.toByteArray(G(e))}function X(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function z(e){return e!==e}var $=r(390),Q=r(453),Z=r(393);t.Buffer=a,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),t.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,r){return o(null,e,t,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,r){return l(null,e,t,r)},a.allocUnsafe=function(e){return c(null,e)},a.allocUnsafeSlow=function(e){return c(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!a.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},a.byteLength=y,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):g.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,r,n,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,o=r-t,u=Math.min(s,o),l=this.slice(n,i),c=e.slice(t,r),f=0;f<u;++f)if(l[f]!==c[f]){s=l[f],o=c[f];break}return s<o?-1:o<s?1:0},a.prototype.includes=function(e,t,r){return this.indexOf(e,t,r)!==-1},a.prototype.indexOf=function(e,t,r){return E(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return E(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return A(this,e,t,r);case"utf8":case"utf-8":return S(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return D(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t<e&&(t=e);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=a.prototype;else{var i=t-e;n=new a(i,(void 0));for(var s=0;s<i;++s)n[s]=this[s+e]}return n},a.prototype.readUIntLE=function(e,t,r){e=0|e,t=0|t,r||I(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},a.prototype.readUIntBE=function(e,t,r){e=0|e,t=0|t,r||I(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e=0|e,t=0|t,r||I(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e=0|e,t=0|t,r||I(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},a.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),Q.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),Q.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),Q.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),Q.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=0|t,r=0|r,!n){var i=Math.pow(2,8*r)-1;M(this,e,t,r,i,0)}var s=1,a=0;for(this[t]=255&e;++a<r&&(s*=256);)this[t+a]=e/s&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t=0|t,r=0|r,!n){var i=Math.pow(2,8*r)-1;M(this,e,t,r,i,0)}var s=r-1,a=1;for(this[t+s]=255&e;--s>=0&&(a*=256);)this[t+s]=e/a&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t=0|t,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return V(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return V(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,s=n-r;if(this===e&&r<t&&t<n)for(i=s-1;i>=0;--i)e[i+t]=this[i+r];else if(s<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+s),t);return s},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e=255&e);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var o=a.isBuffer(e)?e:q(new a(e,n).toString()),u=o.length;for(s=0;s<r-t;++s)this[s+t]=o[s%u]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(t,function(){return this}())},function(e,t){"use strict";var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(t){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:f}function i(e){var t=function e(){return s.apply(e,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=m,t}function s(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;n<t;n++)r+=" "+e[n];if(!this.enabled||!r)return r;var i=this._styles,s=i.length,a=u.dim.open;for(!d||i.indexOf("gray")===-1&&i.indexOf("grey")===-1||(u.dim.open="");s--;){var o=u[i[s]];r=o.open+r.replace(o.closeRe,o.open)+o.close}return u.dim.open=a,r}function a(){var e={};return Object.keys(h).forEach(function(t){e[t]={get:function(){return i.call(this,[t])}}}),e}var o=r(448),u=r(288),l=r(617),c=r(452),f=r(618),p=Object.defineProperties,d="win32"===t.platform&&!/^xterm/i.test(t.env.TERM);d&&(u.blue.open="");var h=function(){var e={};return Object.keys(u).forEach(function(t){u[t].closeRe=new RegExp(o(u[t].close),"g"),e[t]={get:function(){return i.call(this,this._styles.concat(t))}}}),e}(),m=p(function(){},h);p(n.prototype,a()),e.exports=new n,e.exports.styles=u,e.exports.hasColor=c,e.exports.stripColor=l,e.exports.supportsColor=f}).call(t,r(18))},function(e,t){"use strict";e.exports=function(e,t){for(var n=[],i=0;i<e.length;i++){var s=t(e[i],i);r(s)?n.push.apply(n,s):n.push(s)}return n};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){(function(e){"use strict";function n(t){return new e(t,"base64").toString()}function i(e){return e.split(",").pop()}function s(e,t){var r=f.exec(e);f.lastIndex=0;var n=r[1]||r[2],i=l.resolve(t,n);try{return u.readFileSync(i,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+i+"\n"+e)}}function a(e,t){t=t||{},t.isFileComment&&(e=s(e,t.commentFileDir)),t.hasComment&&(e=i(e)),t.isEncoded&&(e=n(e)),(t.isJSON||t.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}function o(e){for(var r,n=e.split("\n"),i=n.length-1;i>0;i--)if(r=n[i],~r.indexOf("sourceMappingURL=data:"))return t.fromComment(r)}var u=r(117),l=r(17),c=/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/gm,f=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm;a.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},a.prototype.toBase64=function(){var t=this.toJSON();return new e(t).toString("base64")},a.prototype.toComment=function(e){var t=this.toBase64(),r="sourceMappingURL=data:application/json;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)},a.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},a.prototype.getProperty=function(e){return this.sourcemap[e]},t.fromObject=function(e){return new a(e)},t.fromJSON=function(e){return new a(e,{isJSON:!0})},t.fromBase64=function(e){return new a(e,{isEncoded:!0})},t.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new a(e,{isEncoded:!0,hasComment:!0})},t.fromMapFileComment=function(e,t){return new a(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},t.fromSource=function(e,r){if(r){var n=o(e);return n?n:null}var i=e.match(c);return c.lastIndex=0,i?t.fromComment(i.pop()):null},t.fromMapFileSource=function(e,r){var n=e.match(f);return f.lastIndex=0,n?t.fromMapFileComment(n.pop(),r):null},t.removeComments=function(e){return c.lastIndex=0,e.replace(c,"")},t.removeMapFileComments=function(e){return f.lastIndex=0,e.replace(f,"")},t.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r},Object.defineProperty(t,"commentRegex",{get:function(){return c.lastIndex=0,c}}),Object.defineProperty(t,"mapFileCommentRegex",{get:function(){return f.lastIndex=0,f}})}).call(t,r(392).Buffer)},function(e,t,r){"use strict";r(57),r(155),e.exports=r(433)},function(e,t,r){"use strict";var n=r(5),i=n.JSON||(n.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},function(e,t,r){"use strict";r(98),r(155),r(57),r(435),r(443),e.exports=r(5).Map},function(e,t,r){"use strict";r(436),e.exports=9007199254740991},function(e,t,r){"use strict";r(437),e.exports=r(5).Object.assign},function(e,t,r){"use strict";r(438);var n=r(5).Object;e.exports=function(e,t){return n.create(e,t)}},function(e,t,r){"use strict";r(156),e.exports=r(5).Object.getOwnPropertySymbols;
+},function(e,t,r){"use strict";r(439),e.exports=r(5).Object.keys},function(e,t,r){"use strict";r(440),e.exports=r(5).Object.setPrototypeOf},function(e,t,r){"use strict";r(156),e.exports=r(5).Symbol.for},function(e,t,r){"use strict";r(156),r(98),r(444),r(445),e.exports=r(5).Symbol},function(e,t,r){"use strict";r(155),r(57),e.exports=r(154).f("iterator")},function(e,t,r){"use strict";r(98),r(57),r(441),e.exports=r(5).WeakMap},function(e,t,r){"use strict";r(98),r(57),r(442),e.exports=r(5).WeakSet},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(91);e.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},function(e,t,r){"use strict";var n=r(37),i=r(151),s=r(432);e.exports=function(e){return function(t,r,a){var o,u=n(t),l=i(u.length),c=s(a,l);if(e&&r!=r){for(;l>c;)if(o=u[c++],o!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},function(e,t,r){"use strict";var n=r(24),i=r(229),s=r(11)("species");e.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&(t=t[s],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,r){"use strict";var n=r(415);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,r){"use strict";var n=r(25).f,i=r(92),s=r(146),a=r(54),o=r(137),u=r(90),l=r(91),c=r(143),f=r(230),p=r(430),d=r(22),h=r(56).fastKey,m=d?"_s":"size",v=function(e,t){var r,n=h(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};e.exports={getConstructor:function(e,t,r,c){var f=e(function(e,n){o(e,f,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&l(n,r,e[c],e)});return s(f.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,r=v(t,e);if(r){var n=r.n,i=r.p;delete t._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),t._f==r&&(t._f=n),t._l==r&&(t._l=i),t[m]--}return!!r},forEach:function(e){o(this,f,"forEach");for(var t,r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!v(this,e)}}),d&&n(f.prototype,"size",{get:function(){return u(this[m])}}),f},def:function(e,t,r){var n,i,s=v(e,t);return s?s.v=r:(e._l=s={i:i=h(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:v,setStrong:function(e,t,r){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?f(0,r.k):"values"==t?f(0,r.v):f(0,[r.k,r.v]):(e._t=void 0,f(1))},r?"entries":"values",!r,!0),p(t)}}},function(e,t,r){"use strict";var n=r(225),i=r(413);e.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,r){"use strict";var n=r(43),i=r(145),s=r(93);e.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},function(e,t,r){"use strict";e.exports=r(14).document&&document.documentElement},function(e,t,r){"use strict";var n=r(55),i=r(11)("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},function(e,t,r){"use strict";var n=r(21);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw (void 0!==s&&n(s.call(e)), t)}}},function(e,t,r){"use strict";var n=r(92),i=r(94),s=r(95),a={};r(30)(a,r(11)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},function(e,t,r){"use strict";var n=r(43),i=r(37);e.exports=function(e,t){for(var r,s=i(e),a=n(s),o=a.length,u=0;o>u;)if(s[r=a[u++]]===t)return r}},function(e,t,r){"use strict";var n=r(25),i=r(21),s=r(43);e.exports=r(22)?Object.defineProperties:function(e,t){i(e);for(var r,a=s(t),o=a.length,u=0;o>u;)n.f(e,r=a[u++],t[r]);return e}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(37),s=r(233).f,a={}.toString,o="object"==("undefined"==typeof window?"undefined":n(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return s(e)}catch(e){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?u(e):s(i(e))}},function(e,t,r){"use strict";var n=r(29),i=r(96),s=r(148)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,r){"use strict";var n=r(23),i=r(5),s=r(36);e.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*s(function(){r(1)}),"Object",a)}},function(e,t,r){"use strict";var n=r(24),i=r(21),s=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{n=r(54)(Function.call,r(232).f(Object.prototype,"__proto__").set,2),n(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return s(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:s}},function(e,t,r){"use strict";var n=r(14),i=r(5),s=r(25),a=r(22),o=r(11)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:n[e];a&&t&&!t[o]&&s.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,r){"use strict";var n=r(150),i=r(90);e.exports=function(e){return function(t,r){var s,a,o=String(i(t)),u=n(r),l=o.length;return u<0||u>=l?e?"":void 0:(s=o.charCodeAt(u),s<55296||s>56319||u+1===l||(a=o.charCodeAt(u+1))<56320||a>57343?e?o.charAt(u):s:e?o.slice(u,u+2):(s-55296<<10)+(a-56320)+65536)}}},function(e,t,r){"use strict";var n=r(150),i=Math.max,s=Math.min;e.exports=function(e,t){return e=n(e),e<0?i(e+t,0):s(e,t)}},function(e,t,r){"use strict";var n=r(21),i=r(235);e.exports=r(5).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},function(e,t,r){"use strict";var n=r(412),i=r(230),s=r(55),a=r(37);e.exports=r(143)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},function(e,t,r){"use strict";var n=r(417);e.exports=r(140)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(this,e);return t&&t.v},set:function(e,t){return n.def(this,0===e?0:e,t)}},n,!0)},function(e,t,r){"use strict";var n=r(23);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,r){"use strict";var n=r(23);n(n.S+n.F,"Object",{assign:r(231)})},function(e,t,r){"use strict";var n=r(23);n(n.S,"Object",{create:r(92)})},function(e,t,r){"use strict";var n=r(96),i=r(43);r(428)("keys",function(){return function(e){return i(n(e))}})},function(e,t,r){"use strict";var n=r(23);n(n.S,"Object",{setPrototypeOf:r(429).set})},function(e,t,r){"use strict";var n,i=r(138)(0),s=r(147),a=r(56),o=r(231),u=r(226),l=r(24),c=a.getWeak,f=Object.isExtensible,p=u.ufstore,d={},h=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(l(e)){var t=c(e);return t===!0?p(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(this,e,t)}},v=e.exports=r(140)("WeakMap",h,m,u,!0,!0);7!=(new v).set((Object.freeze||Object)(d),7).get(d)&&(n=u.getConstructor(h),o(n.prototype,m),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=v.prototype,r=t[e];s(t,e,function(t,i){if(l(t)&&!f(t)){this._f||(this._f=new n);var s=this._f[e](t,i);return"set"==e?this:s}return r.call(this,t,i)})}))},function(e,t,r){"use strict";var n=r(226);r(140)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e,!0)}},n,!1,!0)},function(e,t,r){"use strict";var n=r(23);n(n.P+n.R,"Map",{toJSON:r(418)("Map")})},function(e,t,r){"use strict";r(153)("asyncIterator")},function(e,t,r){"use strict";r(153)("observable")},function(e,t,r){"use strict";function n(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function i(e){function r(){if(r.enabled){var e=r,n=+new Date,i=n-(l||n);e.diff=i,e.prev=l,e.curr=n,l=n;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var o=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;o++;var i=t.formatters[n];if("function"==typeof i){var a=s[o];r=i.call(e,a),s.splice(o,1),o--}return r}),t.formatArgs.call(e,s);var u=r.log||t.log||console.log.bind(console);u.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=n(e),"function"==typeof t.init&&t.init(r),r}function s(e){t.save(e);for(var r=(e||"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&(e=r[i].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function a(){t.enable("")}function o(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=u,t.disable=a,t.enable=s,t.enabled=o,t.humanize=r(598),t.names=[],t.skips=[],t.formatters={};var l},function(e,t,r){"use strict";function n(e){var t=0,r=0,n=0;for(var i in e){var s=e[i],a=s[0],o=s[1];(a>r||a===r&&o>n)&&(r=a,n=o,t=Number(i))}return t}var i=r(610),s=/^(?:( )+|\t+)/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t,r,a=0,o=0,u=0,l={};e.split(/\n/g).forEach(function(e){if(e){var n,i=e.match(s);i?(n=i[0].length,i[1]?o++:a++):n=0;var c=n-u;u=n,c?(r=c>0,t=l[r?c:-c],t?t[0]++:t=l[c]=[1,0]):t&&(t[1]+=Number(r))}});var c,f,p=n(l);return p?o>=a?(c="space",f=i(" ",p)):(c="tab",f=i("\t",p)):(c=null,f=""),{amount:p,type:c,indent:f}}},function(e,t){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},function(e,t){"use strict";!function(){function t(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return n(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}e.exports={isExpression:t,isStatement:n,isIterationStatement:r,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:s}}()},function(e,t,r){"use strict";!function(){function t(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function n(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,r){if(r&&t(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function o(e){return"eval"===e||"arguments"===e}function u(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!d.isIdentifierStartES5(n))return!1;for(t=1,r=e.length;t<r;++t)if(n=e.charCodeAt(t),!d.isIdentifierPartES5(n))return!1;return!0}function l(e,t){return 1024*(e-55296)+(t-56320)+65536}function c(e){var t,r,n,i,s;if(0===e.length)return!1;for(s=d.isIdentifierStartES6,t=0,r=e.length;t<r;++t){if(n=e.charCodeAt(t),55296<=n&&n<=56319){if(++t,t>=r)return!1;if(i=e.charCodeAt(t),!(56320<=i&&i<=57343))return!1;n=l(n,i)}if(!s(n))return!1;s=d.isIdentifierPartES6}return!0}function f(e,t){return u(e)&&!s(e,t)}function p(e,t){return c(e)&&!a(e,t)}var d=r(237);e.exports={isKeywordES5:n,isKeywordES6:i,isReservedWordES5:s,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:u,isIdentifierNameES6:c,isIdentifierES5:f,isIdentifierES6:p}}()},function(e,t,r){"use strict";e.exports=r(624)},function(e,t,r){"use strict";var n=r(180),i=new RegExp(n().source);e.exports=i.test.bind(i)},function(e,t){"use strict";t.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,l=u>>1,c=-7,f=r?i-1:0,p=r?-1:1,d=e[t+f];for(f+=p,s=d&(1<<-c)-1,d>>=-c,c+=o;c>0;s=256*s+e[t+f],f+=p,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=p,c-=8);if(0===s)s=1-l;else{if(s===u)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,n),s-=l}return(d?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var a,o,u,l=8*s-i-1,c=(1<<l)-1,f=c>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?p/u:p*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=c?(o=0,a=c):a+f>=1?(o=(t*u-1)*Math.pow(2,i),a+=f):(o=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&o,d+=h,o/=256,i-=8);for(a=a<<i|o,l+=i;l>0;e[r+d]=255&a,d+=h,a/=256,l-=8);e[r+d-h]|=128*m}},function(e,t,r){"use strict";var n=function(e,t,r,n,i,s,a,o){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,i,s,a,o],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw (u.framesToPop=1, u)}};e.exports=n},function(e,t,r){"use strict";var n=r(599);e.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-(1/0))}},function(e,t){"use strict";e.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,e.exports.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},function(e,t,r){var n;(function(e,i){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a){var o="object"==s(t)&&t,u="object"==s(e)&&e&&e.exports==o&&e,l="object"==("undefined"==typeof i?"undefined":s(i))&&i;l.global!==l&&l.window!==l||(a=l);var c={},f=c.hasOwnProperty,p=function(e,t){var r;for(r in e)f.call(e,r)&&t(r,e[r])},d=function(e,t){return t?(p(t,function(t,r){e[t]=r}),e):e},h=function(e,t){for(var r=e.length,n=-1;++n<r;)t(e[n])},m=c.toString,v=function(e){return"[object Array]"==m.call(e)},y=function(e){return"[object Object]"==m.call(e)},g=function(e){return"string"==typeof e||"[object String]"==m.call(e)},b=function(e){return"number"==typeof e||"[object Number]"==m.call(e)},E=function(e){return"function"==typeof e||"[object Function]"==m.call(e)},x=function(e){return"[object Map]"==m.call(e)},A=function(e){return"[object Set]"==m.call(e)},S={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},_=/["'\\\b\f\n\r\t]/,D=/[0-9]/,C=/[ !#-&\(-\[\]-~]/,w=function e(t,r){var n={escapeEverything:!1,escapeEtago:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",__indent__:"",__inline1__:!1,__inline2__:!1},i=r&&r.json;i&&(n.quotes="double",n.wrap=!0),r=d(n,r),"single"!=r.quotes&&"double"!=r.quotes&&(r.quotes="single");var s,a="double"==r.quotes?'"':"'",o=r.compact,u=r.indent,l=r.lowercaseHex,c="",f=r.__inline1__,m=r.__inline2__,w=o?"":"\n",F=!0,k="binary"==r.numbers,P="octal"==r.numbers,T="decimal"==r.numbers,O="hexadecimal"==r.numbers;if(i&&t&&E(t.toJSON)&&(t=t.toJSON()),!g(t)){if(x(t))return 0==t.size?"new Map()":(o||(r.__inline1__=!0),"new Map("+e(Array.from(t),r)+")");if(A(t))return 0==t.size?"new Set()":"new Set("+e(Array.from(t),r)+")";if(v(t))return s=[],r.wrap=!0,f?(r.__inline1__=!1,r.__inline2__=!0):(c=r.__indent__,u+=c,r.__indent__=u),h(t,function(t){F=!1,m&&(r.__inline2__=!1),s.push((o||m?"":u)+e(t,r))}),F?"[]":m?"["+s.join(", ")+"]":"["+w+s.join(","+w)+w+(o?"":c)+"]";if(!b(t))return y(t)?(s=[],r.wrap=!0,c=r.__indent__,u+=c,r.__indent__=u,p(t,function(t,n){F=!1,s.push((o?"":u)+e(t,r)+":"+(o?"":" ")+e(n,r))}),F?"{}":"{"+w+s.join(","+w)+w+(o?"":c)+"}"):i?JSON.stringify(t)||"null":String(t);if(i)return JSON.stringify(t);if(T)return String(t);if(O){var B=t.toString(16);return l||(B=B.toUpperCase()),"0x"+B}if(k)return"0b"+t.toString(2);if(P)return"0o"+t.toString(8)}var R,I,M,N=t,L=-1,j=N.length;for(s="";++L<j;){var U=N.charAt(L);if(r.es6&&(R=N.charCodeAt(L),R>=55296&&R<=56319&&j>L+1&&(I=N.charCodeAt(L+1),I>=56320&&I<=57343))){M=1024*(R-55296)+I-56320+65536;var V=M.toString(16);l||(V=V.toUpperCase()),s+="\\u{"+V+"}",L++}else{if(!r.escapeEverything){if(C.test(U)){s+=U;continue}if('"'==U){s+=a==U?'\\"':U;continue}if("'"==U){s+=a==U?"\\'":U;continue}}if("\0"!=U||i||D.test(N.charAt(L+1)))if(_.test(U))s+=S[U];else{var G=U.charCodeAt(0),V=G.toString(16);l||(V=V.toUpperCase());var W=V.length>2||i,Y="\\"+(W?"u":"x")+("0000"+V).slice(W?-4:-2);s+=Y}else s+="\\0"}}return r.wrap&&(s=a+s+a),r.escapeEtago?s.replace(/<\/(script|style)/gi,"<\\/$1"):s};w.version="1.3.0","object"==s(r(48))&&r(48)?(n=function(){return w}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))):o&&!o.nodeType?u?u.exports=w:o.jsesc=w:a.jsesc=w}(void 0)}).call(t,r(39)(e),function(){return this}())},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i="object"===n(t)?t:{};i.parse=function(){var e,t,r,i,s,a,o={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},u=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],l=function(e){return""===e?"EOF":"'"+e+"'"},c=function n(i){var n=new SyntaxError;throw (n.message=i+" at line "+t+" column "+r+" of the JSON5 data. Still to read: "+JSON.stringify(s.substring(e-1,e+19)), n.at=e, n.lineNumber=t, n.columnNumber=r, n)},f=function(n){return n&&n!==i&&c("Expected "+l(n)+" instead of "+l(i)),i=s.charAt(e),e++,r++,("\n"===i||"\r"===i&&"\n"!==p())&&(t++,r=0),i},p=function(){return s.charAt(e)},d=function(){var e=i;for("_"!==i&&"$"!==i&&(i<"a"||i>"z")&&(i<"A"||i>"Z")&&c("Bad identifier as unquoted key");f()&&("_"===i||"$"===i||i>="a"&&i<="z"||i>="A"&&i<="Z"||i>="0"&&i<="9");)e+=i;return e},h=function e(){var e,t="",r="",n=10;if("-"!==i&&"+"!==i||(t=i,f(i)),"I"===i)return e=E(),("number"!=typeof e||isNaN(e))&&c("Unexpected word for number"),"-"===t?-e:e;if("N"===i)return e=E(),isNaN(e)||c("expected word to be NaN"),e;switch("0"===i&&(r+=i,f(),"x"===i||"X"===i?(r+=i,f(),n=16):i>="0"&&i<="9"&&c("Octal literal")),n){case 10:for(;i>="0"&&i<="9";)r+=i,f();if("."===i)for(r+=".";f()&&i>="0"&&i<="9";)r+=i;if("e"===i||"E"===i)for(r+=i,f(),"-"!==i&&"+"!==i||(r+=i,f());i>="0"&&i<="9";)r+=i,f();break;case 16:for(;i>="0"&&i<="9"||i>="A"&&i<="F"||i>="a"&&i<="f";)r+=i,f()}return e="-"===t?-r:+r,isFinite(e)?e:void c("Bad number")},m=function e(){var t,r,n,s,e="";if('"'===i||"'"===i)for(n=i;f();){if(i===n)return f(),e;if("\\"===i)if(f(),"u"===i){for(s=0,r=0;r<4&&(t=parseInt(f(),16),isFinite(t));r+=1)s=16*s+t;e+=String.fromCharCode(s)}else if("\r"===i)"\n"===p()&&f();else{if("string"!=typeof o[i])break;e+=o[i]}else{if("\n"===i)break;e+=i}}c("Bad string")},v=function(){"/"!==i&&c("Not an inline comment");do if(f(),"\n"===i||"\r"===i)return void f();while(i)},y=function(){"*"!==i&&c("Not a block comment");do for(f();"*"===i;)if(f("*"),"/"===i)return void f("/");while(i);c("Unterminated block comment")},g=function(){"/"!==i&&c("Not a comment"),f("/"),"/"===i?v():"*"===i?y():c("Unrecognized comment")},b=function(){for(;i;)if("/"===i)g();else{if(!(u.indexOf(i)>=0))return;f()}},E=function(){switch(i){case"t":return f("t"),f("r"),f("u"),f("e"),!0;case"f":return f("f"),f("a"),f("l"),f("s"),f("e"),!1;case"n":return f("n"),f("u"),f("l"),f("l"),null;case"I":return f("I"),f("n"),f("f"),f("i"),f("n"),f("i"),f("t"),f("y"),1/0;case"N":return f("N"),f("a"),f("N"),NaN}c("Unexpected "+l(i))},x=function e(){var e=[];if("["===i)for(f("["),b();i;){if("]"===i)return f("]"),e;if(","===i?c("Missing array element"):e.push(a()),b(),","!==i)return f("]"),e;f(","),b()}c("Bad array")},A=function e(){var t,e={};if("{"===i)for(f("{"),b();i;){if("}"===i)return f("}"),e;if(t='"'===i||"'"===i?m():d(),b(),f(":"),e[t]=a(),b(),","!==i)return f("}"),e;f(","),b()}c("Bad object")};return a=function(){switch(b(),i){case"{":return A();case"[":return x();case'"':case"'":return m();case"-":case"+":case".":return h();default:return i>="0"&&i<="9"?h():E()}},function(o,u){var l;return s=String(o),e=0,t=1,r=1,i=" ",l=a(),b(),i&&c("Syntax error"),"function"==typeof u?function e(t,r){var i,s,a=t[r];if(a&&"object"===("undefined"==typeof a?"undefined":n(a)))for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(s=e(a,i),void 0!==s?a[i]=s:delete a[i]);return u.call(t,r,a)}({"":l},""):l}}(),i.stringify=function(e,t,r){function s(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e}function a(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e}function o(e){if("string"!=typeof e)return!1;if(!a(e[0]))return!1;for(var t=1,r=e.length;t<r;){if(!s(e[t]))return!1;t++}return!0}function u(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function l(e){return"[object Date]"===Object.prototype.toString.call(e)}function c(e){for(var t=0;t<v.length;t++)if(v[t]===e)throw new TypeError("Converting circular structure to JSON")}function f(e,t,r){if(!e)return"";e.length>10&&(e=e.substring(0,10));for(var n=r?"":"\n",i=0;i<t;i++)n+=e;return n}function p(e){return y.lastIndex=0,y.test(e)?'"'+e.replace(y,function(e){var t=g[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function d(e,t,r){var i,s,a=h(e,t,r);switch(a&&!l(a)&&(a=a.valueOf()),"undefined"==typeof a?"undefined":n(a)){case"boolean":return a.toString();case"number":return isNaN(a)||!isFinite(a)?"null":a.toString();case"string":return p(a.toString());case"object":if(null===a)return"null";if(u(a)){c(a),i="[",v.push(a);for(var y=0;y<a.length;y++)s=d(a,y,!1),i+=f(m,v.length),i+=null===s||"undefined"==typeof s?"null":s,y<a.length-1?i+=",":m&&(i+="\n");v.pop(),a.length&&(i+=f(m,v.length,!0)),i+="]"}else{c(a),i="{";var g=!1;v.push(a);for(var b in a)if(a.hasOwnProperty(b)){var E=d(a,b,!1);r=!1,"undefined"!=typeof E&&null!==E&&(i+=f(m,v.length),g=!0,t=o(b)?b:p(b),i+=t+":"+(m?" ":"")+E+",")}v.pop(),i=g?i.substring(0,i.length-1)+f(m,v.length)+"}":"{}"}return i;default:return}}if(t&&"function"!=typeof t&&!u(t))throw new Error("Replacer must be a function or an array");var h=function(e,r,n){var i=e[r];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof t?t.call(e,r,i):t?n||u(e)||t.indexOf(r)>=0?i:void 0:i};i.isWord=o;var m,v=[];r&&("string"==typeof r?m=r:"number"==typeof r&&r>=0&&(m=f(" ",r,!0)));var y=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},b={"":e};return void 0===e?h(b,"",!0):d(b,"",!0)}},function(e,t){"use strict";var r=[],n=[];e.exports=function(e,t){if(e===t)return 0;var i=e.length,s=t.length;if(0===i)return s;if(0===s)return i;for(var a,o,u,l,c=0,f=0;c<i;)n[c]=e.charCodeAt(c),r[c]=++c;for(;f<s;)for(a=t.charCodeAt(f),u=f++,o=f,c=0;c<i;c++)l=a===n[c]?u:u+1,u=r[c],o=r[c]=u>o?l>o?o+1:l:l>u?u+1:l;return o}},function(e,t,r){"use strict";var n=r(38),i=r(16),s=n(i,"DataView");e.exports=s},function(e,t,r){"use strict";function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=r(528),s=r(529),a=r(530),o=r(531),u=r(532);n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,e.exports=n},function(e,t,r){"use strict";var n=r(38),i=r(16),s=n(i,"Promise");e.exports=s},function(e,t,r){"use strict";var n=r(38),i=r(16),s=n(i,"WeakMap");e.exports=s},function(e,t){"use strict";function r(e,t){return e.set(t[0],t[1]),e}e.exports=r},function(e,t){"use strict";function r(e,t){return e.add(t),e}e.exports=r},function(e,t,r){"use strict";function n(e,t){var r=null==e?0:e.length;return!!r&&i(e,t,0)>-1}var i=r(102);e.exports=n},function(e,t){"use strict";function r(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}e.exports=r},function(e,t){"use strict";function r(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}e.exports=r},function(e,t){"use strict";function r(e){return e.split("")}e.exports=r},function(e,t,r){"use strict";function n(e,t,r,n){return void 0===e||i(e,s[r])&&!a.call(n,r)?t:e}var i=r(45),s=Object.prototype,a=s.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e,t){return e&&i(t,s(t),e)}var i=r(31),s=r(27);e.exports=n},function(e,t,r){"use strict";function n(e,t){return e&&i(t,s(t),e)}var i=r(31),s=r(46);e.exports=n},function(e,t){"use strict";function r(e,t,r){return e===e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}e.exports=r},function(e,t,r){"use strict";var n=r(12),i=Object.create,s=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=s},function(e,t,r){"use strict";function n(e,t,r,a,o){var u=-1,l=e.length;for(r||(r=s),o||(o=[]);++u<l;){var c=e[u];t>0&&r(c)?t>1?n(c,t-1,r,a,o):i(o,c):a||(o[o.length]=c)}return o}var i=r(160),s=r(535);e.exports=n},function(e,t,r){"use strict";function n(e,t){return e&&i(e,t,s)}var i=r(247),s=r(27);e.exports=n},function(e,t){"use strict";function r(e,t){return null!=e&&i.call(e,t)}var n=Object.prototype,i=n.hasOwnProperty;e.exports=r},function(e,t){"use strict";function r(e,t){return null!=e&&t in Object(e)}e.exports=r},function(e,t){"use strict";function r(e,t,r,n){for(var i=r-1,s=e.length;++i<s;)if(n(e[i],t))return i;return-1}e.exports=r},function(e,t,r){"use strict";function n(e){return s(e)&&i(e)==a}var i=r(15),s=r(13),a="[object Arguments]";e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n,v,g){var b=l(e),E=l(t),x=h,A=h;b||(x=u(e),x=x==d?m:x),E||(A=u(t),A=A==d?m:A);var S=x==m,_=A==m,D=x==A;if(D&&c(e)){if(!c(t))return!1;b=!0,S=!1}if(D&&!S)return g||(g=new i),b||f(e)?s(e,t,r,n,v,g):a(e,t,x,r,n,v,g);if(!(r&p)){var C=S&&y.call(e,"__wrapped__"),w=_&&y.call(t,"__wrapped__");if(C||w){var F=C?e.value():e,k=w?t.value():t;return g||(g=new i),v(F,k,r,n,g)}}return!!D&&(g||(g=new i),o(e,t,r,n,v,g))}var i=r(100),s=r(258),a=r(520),o=r(521),u=r(261),l=r(6),c=r(115),f=r(177),p=1,d="[object Arguments]",h="[object Array]",m="[object Object]",v=Object.prototype,y=v.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n){var u=r.length,l=u,c=!n;if(null==e)return!l;for(e=Object(e);u--;){var f=r[u];if(c&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++u<l;){f=r[u];var p=f[0],d=e[p],h=f[1];if(c&&f[2]){if(void 0===d&&!(p in e))return!1}else{var m=new i;if(n)var v=n(d,h,p,e,t,m);if(!(void 0===v?s(h,d,a|o,n,m):v))return!1}}return!0}var i=r(100),s=r(250),a=1,o=2;e.exports=n},function(e,t){"use strict";function r(e){return e!==e}e.exports=r},function(e,t,r){"use strict";function n(e){if(!a(e)||s(e))return!1;var t=i(e)?h:l;return t.test(o(e))}var i=r(116),s=r(537),a=r(12),o=r(268),u=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,p=c.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=n},function(e,t,r){"use strict";function n(e){return s(e)&&i(e)==a}var i=r(15),s=r(13),a="[object RegExp]";e.exports=n},function(e,t,r){"use strict";function n(e){return a(e)&&s(e.length)&&!!T[i(e)]}var i=r(15),s=r(175),a=r(13),o="[object Arguments]",u="[object Array]",l="[object Boolean]",c="[object Date]",f="[object Error]",p="[object Function]",d="[object Map]",h="[object Number]",m="[object Object]",v="[object RegExp]",y="[object Set]",g="[object String]",b="[object WeakMap]",E="[object ArrayBuffer]",x="[object DataView]",A="[object Float32Array]",S="[object Float64Array]",_="[object Int8Array]",D="[object Int16Array]",C="[object Int32Array]",w="[object Uint8Array]",F="[object Uint8ClampedArray]",k="[object Uint16Array]",P="[object Uint32Array]",T={};T[A]=T[S]=T[_]=T[D]=T[C]=T[w]=T[F]=T[k]=T[P]=!0,T[o]=T[u]=T[E]=T[l]=T[x]=T[c]=T[f]=T[p]=T[d]=T[h]=T[m]=T[v]=T[y]=T[g]=T[b]=!1,e.exports=n},function(e,t,r){"use strict";function n(e){if(!i(e))return s(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}var i=r(107),s=r(549),a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e){if(!i(e))return a(e);var t=s(e),r=[];for(var n in e)("constructor"!=n||!t&&u.call(e,n))&&r.push(n);return r}var i=r(12),s=r(107),a=r(550),o=Object.prototype,u=o.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e){var t=s(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(r){return r===e||i(r,e,t)}}var i=r(482),s=r(524),a=r(266);e.exports=n},function(e,t,r){"use strict";function n(e,t){
+return o(e)&&u(t)?l(c(e),t):function(r){var n=s(r,e);return void 0===n&&n===t?a(r,e):i(t,n,f|p)}}var i=r(250),s=r(579),a=r(580),o=r(172),u=r(264),l=r(266),c=r(110),f=1,p=2;e.exports=n},function(e,t,r){"use strict";function n(e,t,r,c,f){e!==t&&a(t,function(a,l){if(u(a))f||(f=new i),o(e,t,l,r,n,c,f);else{var p=c?c(e[l],a,l+"",e,t,f):void 0;void 0===p&&(p=a),s(e,l,p)}},l)}var i=r(100),s=r(245),a=r(247),o=r(492),u=r(12),l=r(46);e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n,g,b,E){var x=e[r],A=t[r],S=E.get(A);if(S)return void i(e,r,S);var _=b?b(x,A,r+"",e,t,E):void 0,D=void 0===_;if(D){var C=c(A),w=!C&&p(A),F=!C&&!w&&v(A);_=A,C||w||F?c(x)?_=x:f(x)?_=o(x):w?(D=!1,_=s(A,!0)):F?(D=!1,_=a(A,!0)):_=[]:m(A)||l(A)?(_=x,l(x)?_=y(x):(!h(x)||n&&d(x))&&(_=u(A))):D=!1}D&&(E.set(A,_),g(_,A,n,b,E),E.delete(A)),i(e,r,_)}var i=r(245),s=r(254),a=r(255),o=r(167),u=r(263),l=r(114),c=r(6),f=r(581),p=r(115),d=r(116),h=r(12),m=r(273),v=r(177),y=r(594);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){var n=-1;t=i(t.length?t:[c],u(s));var f=a(e,function(e,r,s){var a=i(t,function(t){return t(e)});return{criteria:a,index:++n,value:e}});return o(f,function(e,t){return l(e,t,r)})}var i=r(58),s=r(59),a=r(251),o=r(500),u=r(104),l=r(513),c=r(60);e.exports=n},function(e,t){"use strict";function r(e){return function(t){return null==t?void 0:t[e]}}e.exports=r},function(e,t,r){"use strict";function n(e){return function(t){return i(t,e)}}var i=r(248);e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n){var l=n?a:s,f=-1,p=t.length,d=e;for(e===t&&(t=u(t)),r&&(d=i(e,o(r)));++f<p;)for(var h=0,m=t[f],v=r?r(m):m;(h=l(d,v,h,n))>-1;)d!==e&&c.call(d,h,1),c.call(e,h,1);return e}var i=r(58),s=r(102),a=r(479),o=r(104),u=r(167),l=Array.prototype,c=l.splice;e.exports=n},function(e,t){"use strict";function r(e,t){var r="";if(!e||t<1||t>n)return r;do t%2&&(r+=e),t=i(t/2),t&&(e+=e);while(t);return r}var n=9007199254740991,i=Math.floor;e.exports=r},function(e,t,r){"use strict";var n=r(571),i=r(257),s=r(60),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;e.exports=a},function(e,t){"use strict";function r(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}e.exports=r},function(e,t){"use strict";function r(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}e.exports=r},function(e,t){"use strict";function r(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}e.exports=r},function(e,t,r){"use strict";function n(e,t,r){var n=-1,f=s,p=e.length,d=!0,h=[],m=h;if(r)d=!1,f=a;else if(p>=c){var v=t?null:u(e);if(v)return l(v);d=!1,f=o,m=new i}else m=t?[]:h;e:for(;++n<p;){var y=e[n],g=t?t(y):y;if(y=r||0!==y?y:0,d&&g===g){for(var b=m.length;b--;)if(m[b]===g)continue e;t&&m.push(g),h.push(y)}else f(m,g,r)||(m!==h&&m.push(g),h.push(y))}return h}var i=r(239),s=r(466),a=r(467),o=r(252),u=r(519),l=r(109),c=200;e.exports=n},function(e,t,r){"use strict";function n(e,t){return i(t,function(t){return e[t]})}var i=r(58);e.exports=n},function(e,t,r){"use strict";function n(e){return"function"==typeof e?e:i}var i=r(60);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:i(e,t,r)}var i=r(499);e.exports=n},function(e,t,r){"use strict";function n(e,t){for(var r=e.length;r--&&i(t,e[r],0)>-1;);return r}var i=r(102);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var i=r(166);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){var n=t?r(a(e),o):a(e);return s(n,i,new e.constructor)}var i=r(464),s=r(244),a=r(265),o=1;e.exports=n},function(e,t){"use strict";function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}var n=/\w*$/;e.exports=r},function(e,t,r){"use strict";function n(e,t,r){var n=t?r(a(e),o):a(e);return s(n,i,new e.constructor)}var i=r(465),s=r(244),a=r(109),o=1;e.exports=n},function(e,t,r){"use strict";function n(e){return a?Object(a.call(e)):{}}var i=r(44),s=i?i.prototype:void 0,a=s?s.valueOf:void 0;e.exports=n},function(e,t,r){"use strict";function n(e,t){if(e!==t){var r=void 0!==e,n=null===e,s=e===e,a=i(e),o=void 0!==t,u=null===t,l=t===t,c=i(t);if(!u&&!c&&!a&&e>t||a&&o&&l&&!u&&!c||n&&o&&l||!r&&l||!s)return 1;if(!n&&!a&&!c&&e<t||c&&r&&s&&!n&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}var i=r(61);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){for(var n=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++n<o;){var l=i(s[n],a[n]);if(l){if(n>=u)return l;var c=r[n];return l*("desc"==c?-1:1)}}return e.index-t.index}var i=r(512);e.exports=n},function(e,t,r){"use strict";function n(e,t){return i(e,s(e),t)}var i=r(31),s=r(169);e.exports=n},function(e,t,r){"use strict";function n(e,t){return i(e,s(e),t)}var i=r(31),s=r(260);e.exports=n},function(e,t,r){"use strict";var n=r(16),i=n["__core-js_shared__"];e.exports=i},function(e,t,r){"use strict";function n(e,t){return function(r,n){if(null==r)return r;if(!i(r))return e(r,n);for(var s=r.length,a=t?s:-1,o=Object(r);(t?a--:++a<s)&&n(o[a],a,o)!==!1;);return r}}var i=r(26);e.exports=n},function(e,t){"use strict";function r(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[e?o:++i];if(r(s[u],u,s)===!1)break}return t}}e.exports=r},function(e,t,r){"use strict";var n=r(238),i=r(586),s=r(109),a=1/0,o=n&&1/s(new n([,-0]))[1]==a?function(e){return new n(e)}:i;e.exports=o},function(e,t,r){"use strict";function n(e,t,r,n,i,S,D){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!S(new s(e),new s(t)));case p:case d:case v:return a(+e,+t);case h:return e.name==t.name&&e.message==t.message;case y:case b:return e==t+"";case m:var C=u;case g:var w=n&c;if(C||(C=l),e.size!=t.size&&!w)return!1;var F=D.get(e);if(F)return F==t;n|=f,D.set(e,t);var k=o(C(e),C(t),n,i,S,D);return D.delete(e),k;case E:if(_)return _.call(e)==_.call(t)}return!1}var i=r(44),s=r(240),a=r(45),o=r(258),u=r(265),l=r(109),c=1,f=2,p="[object Boolean]",d="[object Date]",h="[object Error]",m="[object Map]",v="[object Number]",y="[object RegExp]",g="[object Set]",b="[object String]",E="[object Symbol]",x="[object ArrayBuffer]",A="[object DataView]",S=i?i.prototype:void 0,_=S?S.valueOf:void 0;e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n,a,u){var l=r&s,c=i(e),f=c.length,p=i(t),d=p.length;if(f!=d&&!l)return!1;for(var h=f;h--;){var m=c[h];if(!(l?m in t:o.call(t,m)))return!1}var v=u.get(e);if(v&&u.get(t))return v==t;var y=!0;u.set(e,t),u.set(t,e);for(var g=l;++h<f;){m=c[h];var b=e[m],E=t[m];if(n)var x=l?n(E,b,m,t,e,u):n(b,E,m,e,t,u);if(!(void 0===x?b===E||a(b,E,r,n,u):x)){y=!1;break}g||(g="constructor"==m)}if(y&&!g){var A=e.constructor,S=t.constructor;A!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof A&&A instanceof A&&"function"==typeof S&&S instanceof S)&&(y=!1)}return u.delete(e),u.delete(t),y}var i=r(27),s=1,a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e){return i(e,a,s)}var i=r(249),s=r(169),a=r(27);e.exports=n},function(e,t,r){"use strict";function n(e){return i(e,a,s)}var i=r(249),s=r(260),a=r(46);e.exports=n},function(e,t,r){"use strict";function n(e){for(var t=s(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,i(a)]}return t}var i=r(264),s=r(27);e.exports=n},function(e,t,r){"use strict";function n(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var i=o.call(e);return n&&(t?e[u]=r:delete e[u]),i}var i=r(44),s=Object.prototype,a=s.hasOwnProperty,o=s.toString,u=i?i.toStringTag:void 0;e.exports=n},function(e,t){"use strict";function r(e,t){return null==e?void 0:e[t]}e.exports=r},function(e,t){"use strict";function r(e){return c.test(e)}var n="\\ud800-\\udfff",i="\\u0300-\\u036f",s="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",o=i+s+a,u="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+n+o+u+"]");e.exports=r},function(e,t,r){"use strict";function n(){this.__data__=i?i(null):{},this.size=0}var i=r(108);e.exports=n},function(e,t){"use strict";function r(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}e.exports=r},function(e,t,r){"use strict";function n(e){var t=this.__data__;if(i){var r=t[e];return r===s?void 0:r}return o.call(t,e)?t[e]:void 0}var i=r(108),s="__lodash_hash_undefined__",a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e){var t=this.__data__;return i?void 0!==t[e]:a.call(t,e)}var i=r(108),s=Object.prototype,a=s.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=i&&void 0===t?s:t,this}var i=r(108),s="__lodash_hash_undefined__";e.exports=n},function(e,t){"use strict";function r(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var n=Object.prototype,i=n.hasOwnProperty;e.exports=r},function(e,t,r){"use strict";function n(e,t,r,n){var P=e.constructor;switch(t){case b:return i(e);case f:case p:return new P((+e));case E:return s(e,n);case x:case A:case S:case _:case D:case C:case w:case F:case k:return c(e,n);case d:return a(e,n,r);case h:case y:return new P(e);case m:return o(e);case v:return u(e,n,r);case g:return l(e)}}var i=r(166),s=r(507),a=r(508),o=r(509),u=r(510),l=r(511),c=r(255),f="[object Boolean]",p="[object Date]",d="[object Map]",h="[object Number]",m="[object RegExp]",v="[object Set]",y="[object String]",g="[object Symbol]",b="[object ArrayBuffer]",E="[object DataView]",x="[object Float32Array]",A="[object Float64Array]",S="[object Int8Array]",_="[object Int16Array]",D="[object Int32Array]",C="[object Uint8Array]",w="[object Uint8ClampedArray]",F="[object Uint16Array]",k="[object Uint32Array]";e.exports=n},function(e,t,r){"use strict";function n(e){return a(e)||s(e)||!!(o&&e&&e[o])}var i=r(44),s=r(114),a=r(6),o=i?i.isConcatSpreadable:void 0;e.exports=n},function(e,t){"use strict";function r(e){var t="undefined"==typeof e?"undefined":n(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=r},function(e,t,r){"use strict";function n(e){return!!s&&s in e}var i=r(516),s=function(){var e=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t){"use strict";function r(){this.__data__=[],this.size=0}e.exports=r},function(e,t,r){"use strict";function n(e){var t=this.__data__,r=i(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():a.call(t,r,1),--this.size,!0}var i=r(101),s=Array.prototype,a=s.splice;e.exports=n},function(e,t,r){"use strict";function n(e){var t=this.__data__,r=i(t,e);return r<0?void 0:t[r][1]}var i=r(101);e.exports=n},function(e,t,r){"use strict";function n(e){return i(this.__data__,e)>-1}var i=r(101);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=r(101);e.exports=n},function(e,t,r){"use strict";function n(){this.size=0,this.__data__={hash:new i,map:new(a||s),string:new i}}var i=r(461),s=r(99),a=r(158);e.exports=n},function(e,t,r){"use strict";function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=r(106);e.exports=n},function(e,t,r){"use strict";function n(e){return i(this,e).get(e)}var i=r(106);e.exports=n},function(e,t,r){"use strict";function n(e){return i(this,e).has(e)}var i=r(106);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=r(106);e.exports=n},function(e,t,r){"use strict";function n(e){var t=i(e,function(e){return r.size===s&&r.clear(),e}),r=t.cache;return t}var i=r(584),s=500;e.exports=n},function(e,t,r){"use strict";var n=r(173),i=n(Object.keys,Object);e.exports=i},function(e,t){"use strict";function r(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}e.exports=r},function(e,t){"use strict";function r(e){return i.call(e)}var n=Object.prototype,i=n.toString;e.exports=r},function(e,t,r){"use strict";function n(e,t,r){return t=s(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,o=s(n.length-t,0),u=Array(o);++a<o;)u[a]=n[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=n[a];return l[t]=r(u),i(e,this,l)}}var i=r(241),s=Math.max;e.exports=n},function(e,t){"use strict";function r(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=r},function(e,t){"use strict";function r(e){return this.__data__.has(e)}e.exports=r},function(e,t,r){"use strict";var n=r(498),i=r(556),s=i(n);e.exports=s},function(e,t){"use strict";function r(e){var t=0,r=0;return function(){var a=s(),o=i-(a-r);if(r=a,o>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n=800,i=16,s=Date.now;e.exports=r},function(e,t,r){"use strict";function n(){this.__data__=new i,this.size=0}var i=r(99);e.exports=n},function(e,t){"use strict";function r(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}e.exports=r},function(e,t){"use strict";function r(e){return this.__data__.get(e)}e.exports=r},function(e,t){"use strict";function r(e){return this.__data__.has(e)}e.exports=r},function(e,t,r){"use strict";function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!s||n.length<o-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(n)}return r.set(e,t),this.size=r.size,this}var i=r(99),s=r(158),a=r(159),o=200;e.exports=n},function(e,t){"use strict";function r(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}e.exports=r},function(e,t,r){"use strict";function n(e){return s(e)?a(e):i(e)}var i=r(469),s=r(527),a=r(565);e.exports=n},function(e,t,r){"use strict";var n=r(548),i=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=n(function(e){var t=[];return i.test(e)&&t.push(""),e.replace(s,function(e,r,n,i){t.push(n?i.replace(a,"$1"):r||e)}),t});e.exports=o},function(e,t){"use strict";function r(e){return e.match(A)||[]}var n="\\ud800-\\udfff",i="\\u0300-\\u036f",s="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",o=i+s+a,u="\\ufe0e\\ufe0f",l="["+n+"]",c="["+o+"]",f="\\ud83c[\\udffb-\\udfff]",p="(?:"+c+"|"+f+")",d="[^"+n+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",y=p+"?",g="["+u+"]?",b="(?:"+v+"(?:"+[d,h,m].join("|")+")"+g+y+")*",E=g+y+b,x="(?:"+[d+c+"?",c,h,m,l].join("|")+")",A=RegExp(f+"(?="+f+")|"+x+E,"g");e.exports=r},function(e,t,r){"use strict";var n=r(31),i=r(105),s=r(46),a=i(function(e,t){n(t,s(t),e)});e.exports=a},function(e,t,r){"use strict";var n=r(31),i=r(105),s=r(46),a=i(function(e,t,r,i){n(t,s(t),e,i)});e.exports=a},function(e,t,r){"use strict";function n(e){return i(e,s|a)}var i=r(163),s=1,a=4;e.exports=n},function(e,t,r){"use strict";function n(e,t){return t="function"==typeof t?t:void 0,i(e,s|a,t)}var i=r(163),s=1,a=4;e.exports=n},function(e,t){"use strict";function r(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var s=e[t];s&&(i[n++]=s)}return i}e.exports=r},function(e,t){"use strict";function r(e){return function(){return e}}e.exports=r},function(e,t,r){"use strict";function n(e){return e=i(e),e&&a.test(e)?e.replace(s,"\\$&"):e}var i=r(62),s=/[\\^$.*+?()[\]{}|]/g,a=RegExp(s.source);e.exports=n},function(e,t,r){"use strict";e.exports=r(566)},function(e,t,r){"use strict";var n=r(256),i=r(575),s=n(i);e.exports=s},function(e,t,r){"use strict";function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var u=null==r?0:a(r);return u<0&&(u=o(n+u,0)),i(e,s(t,3),u)}var i=r(164),s=r(59),a=r(47),o=Math.max;e.exports=n},function(e,t,r){"use strict";var n=r(256),i=r(577),s=n(i);e.exports=s},function(e,t,r){"use strict";function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var l=n-1;return void 0!==r&&(l=a(r),l=r<0?o(n+l,0):u(l,n-1)),i(e,s(t,3),l,!0)}var i=r(164),s=r(59),a=r(47),o=Math.max,u=Math.min;e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=o(e)?i:s;return r(e,a(t))}var i=r(242),s=r(246),a=r(504),o=r(6);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){var n=null==e?void 0:i(e,t);return void 0===n?r:n}var i=r(248);e.exports=n},function(e,t,r){"use strict";function n(e,t){return null!=e&&s(e,t,i)}var i=r(478),s=r(262);e.exports=n},function(e,t,r){"use strict";function n(e){return s(e)&&i(e)}var i=r(26),s=r(13);e.exports=n},function(e,t,r){"use strict";function n(e){return"number"==typeof e&&e==i(e)}var i=r(47);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=o(e)?i:a;return r(e,s(t,3))}var i=r(58),s=r(59),a=r(251),o=r(6);e.exports=n},function(e,t,r){"use strict";function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var r=function r(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(n.Cache||i),r}var i=r(159),s="Expected a function";n.Cache=i,e.exports=n},function(e,t,r){"use strict";var n=r(491),i=r(105),s=i(function(e,t,r,i){n(e,t,r,i)});e.exports=s},function(e,t){"use strict";function r(){}e.exports=r},function(e,t,r){"use strict";function n(e){return a(e)?i(o(e)):s(e)}var i=r(494),s=r(495),a=r(172),o=r(110);e.exports=n},function(e,t,r){"use strict";function n(e,t){return e&&e.length&&t&&t.length?i(e,t):e}var i=r(496);e.exports=n},function(e,t,r){"use strict";var n=r(475),i=r(493),s=r(103),a=r(171),o=s(function(e,t){if(null==e)return[];var r=t.length;return r>1&&a(e,t[0],t[1])?t=[]:r>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])});e.exports=o},function(e,t,r){"use strict";function n(e,t,r){return e=o(e),r=i(a(r),0,e.length),t=s(t),e.slice(r,r+t.length)==t}var i=r(473),s=r(165),a=r(47),o=r(62);e.exports=n},function(e,t){"use strict";function r(){return!1}e.exports=r},function(e,t,r){"use strict";function n(e){if(!e)return 0===e?e:0;if(e=i(e),e===s||e===-s){var t=e<0?-1:1;return t*a}return e===e?e:0}var i=r(593),s=1/0,a=1.7976931348623157e308;e.exports=n},function(e,t,r){"use strict";function n(e){if("number"==typeof e)return e;if(s(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=l.test(e);return r||c.test(e)?f(e.slice(2),r?2:8):u.test(e)?a:+e}var i=r(12),s=r(61),a=NaN,o=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;e.exports=n},function(e,t,r){"use strict";function n(e){return i(e,s(e))}var i=r(31),s=r(46);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){if(e=u(e),e&&(r||void 0===t))return e.replace(l,"");if(!e||!(t=i(t)))return e;var n=o(e),c=a(n,o(t))+1;return s(n,0,c).join("")}var i=r(165),s=r(505),a=r(506),o=r(563),u=r(62),l=/\s+$/;e.exports=n},function(e,t,r){"use strict";function n(e){return e&&e.length?i(e):[]}var i=r(502);e.exports=n},function(e,t,r){"use strict";function n(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function i(e,t){return t=t||{},function(r,n,i){return a(r,e,t)}}function s(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function a(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new o(t,r).match(e))}function o(e,t){if(!(this instanceof o))return new o(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==v.sep&&(e=e.split(v.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function u(){if(!this._made){var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(D)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return e.indexOf(!1)===-1}),this.debug(this.pattern,r),this.set=r}}function l(){var e=this.pattern,t=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,s=e.length;i<s&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}}function c(e,t){if(t||(t=this instanceof o?this.options:{}),e="undefined"==typeof e?this.pattern:e,"undefined"==typeof e)throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:g(e)}function f(e,t){function r(){if(i){switch(i){case"*":a+=x,o=!0;break;case"?":a+=E,o=!0;break;default:a+="\\"+i}v.debug("clearStateChar %j %j",i,a),i=!1}}if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return y;if(""===e)return"";for(var i,s,a="",o=!!n.nocase,u=!1,l=[],c=[],f=!1,p=-1,d=-1,m="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this,g=0,A=e.length;g<A&&(s=e.charAt(g));g++)if(this.debug("%s\t%s %s %j",e,g,a,s),u&&_[s])a+="\\"+s,u=!1;else switch(s){case"/":return!1;case"\\":r(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,g,a,s),f){this.debug(" in class"),"!"===s&&g===d+1&&(s="^"),a+=s;continue}v.debug("call clearStateChar %j",i),r(),i=s,n.noext&&r();continue;case"(":if(f){a+="(";continue}if(!i){a+="\\(";continue}l.push({type:i,start:g-1,reStart:a.length,open:b[i].open,close:b[i].close}),a+="!"===i?"(?:(?!(?:":"(?:",this.debug("plType %j %j",i,a),i=!1;continue;case")":if(f||!l.length){a+="\\)";continue}r(),o=!0;var S=l.pop();a+=S.close,"!"===S.type&&c.push(S),S.reEnd=a.length;continue;case"|":if(f||!l.length||u){a+="\\|",u=!1;continue}r(),a+="|";continue;case"[":if(r(),f){a+="\\"+s;continue}f=!0,d=g,p=a.length,a+=s;continue;case"]":if(g===d+1||!f){a+="\\"+s,u=!1;continue}if(f){var D=e.substring(d+1,g);try{RegExp("["+D+"]")}catch(e){var w=this.parse(D,C);a=a.substr(0,p)+"\\["+w[0]+"\\]",o=o||w[1],f=!1;continue}}o=!0,f=!1,a+=s;continue;default:r(),u?u=!1:!_[s]||"^"===s&&f||(a+="\\"),a+=s}for(f&&(D=e.substr(d+1),w=this.parse(D,C),a=a.substr(0,p)+"\\["+w[0],o=o||w[1]),S=l.pop();S;S=l.pop()){var F=a.slice(S.reStart+S.open.length);this.debug("setting tail",a,S),F=F.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",F,F,S,a);var k="*"===S.type?x:"?"===S.type?E:"\\"+S.type;o=!0,a=a.slice(0,S.reStart)+k+"\\("+F}r(),u&&(a+="\\\\");var P=!1;switch(a.charAt(0)){case".":case"[":case"(":P=!0}for(var T=c.length-1;T>-1;T--){var O=c[T],B=a.slice(0,O.reStart),R=a.slice(O.reStart,O.reEnd-8),I=a.slice(O.reEnd-8,O.reEnd),M=a.slice(O.reEnd);I+=M;var N=B.split("(").length-1,L=M;for(g=0;g<N;g++)L=L.replace(/\)[+*?]?/,"");M=L;var j="";""===M&&t!==C&&(j="$");var U=B+R+M+j+I;a=U}if(""!==a&&o&&(a="(?=.)"+a),P&&(a=m+a),t===C)return[a,o];if(!o)return h(e);var V=n.nocase?"i":"";try{var G=new RegExp("^"+a+"$",V)}catch(e){return new RegExp("$.")}return G._glob=e,G._src=a,G}function p(){if(this.regexp||this.regexp===!1)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?x:t.dot?A:S,n=t.nocase?"i":"",i=e.map(function(e){return e.map(function(e){return e===y?r:"string"==typeof e?m(e):e._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(e){this.regexp=!1}return this.regexp}function d(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==v.sep&&(e=e.split(v.sep).join("/")),e=e.split(D),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,s;for(s=e.length-1;s>=0&&!(i=e[s]);s--);for(s=0;s<n.length;s++){var a=n[s],o=e;r.matchBase&&1===a.length&&(o=[i]);var u=this.matchOne(o,a,t);if(u)return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}function h(e){return e.replace(/\\(.)/g,"$1")}function m(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}e.exports=a,a.Minimatch=o;var v={sep:"/"};try{v=r(17)}catch(e){}var y=a.GLOBSTAR=o.GLOBSTAR={},g=r(391),b={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},E="[^/]",x=E+"*?",A="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",S="(?:(?!(?:\\/|^)\\.).)*?",_=n("().*{}+?[]^$\\!"),D=/\/+/;a.filter=i,a.defaults=function(e){if(!e||!Object.keys(e).length)return a;var t=a,r=function(r,n,i){return t.minimatch(r,n,s(e,i))};return r.Minimatch=function(r,n){return new t.Minimatch(r,s(e,n))},r},o.defaults=function(e){return e&&Object.keys(e).length?a.defaults(e).Minimatch:o},o.prototype.debug=function(){},o.prototype.make=u,o.prototype.parseNegate=l,a.braceExpand=function(e,t){return c(e,t)},o.prototype.braceExpand=c,o.prototype.parse=f;var C={};a.makeRe=function(e,t){return new o(e,t||{}).makeRe()},o.prototype.makeRe=p,a.match=function(e,t,r){r=r||{};var n=new o(t,r);return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},o.prototype.match=d,o.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,s=0,a=e.length,o=t.length;i<a&&s<o;i++,s++){this.debug("matchOne loop");var u=t[s],l=e[i];if(this.debug(t,u,l),u===!1)return!1;if(u===y){this.debug("GLOBSTAR",[t,u,l]);var c=i,f=s+1;if(f===o){for(this.debug("** at the end");i<a;i++)if("."===e[i]||".."===e[i]||!n.dot&&"."===e[i].charAt(0))return!1;return!0}for(;c<a;){var p=e[c];if(this.debug("\nglobstar while",e,c,t,f,p),this.matchOne(e.slice(c),t.slice(f),r))return this.debug("globstar found match!",c,a,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",e,c,t,f);break}this.debug("globstar swallow a segment, and continue"),c++}return!(!r||(this.debug("\n>>> no match, partial?",e,c,t,f),c!==a))}var d;if("string"==typeof u?(d=n.nocase?l.toLowerCase()===u.toLowerCase():l===u,this.debug("string match",u,l,d)):(d=l.match(u),this.debug("pattern match",u,l,d)),!d)return!1}if(i===a&&s===o)return!0;if(i===a)return r;if(s===o){var h=i===a-1&&""===e[i];return h}throw new Error("wtf?")}},function(e,t){"use strict";function r(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*f;case"days":case"day":case"d":return r*c;case"hours":case"hour":case"hrs":case"hr":case"h":return r*l;case"minutes":case"minute":case"mins":case"min":case"m":return r*u;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function n(e){return e>=c?Math.round(e/c)+"d":e>=l?Math.round(e/l)+"h":e>=u?Math.round(e/u)+"m":e>=o?Math.round(e/o)+"s":e+"ms"}function i(e){return s(e,c,"day")||s(e,l,"hour")||s(e,u,"minute")||s(e,o,"second")||e+" ms"}function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=1e3,u=60*o,l=60*u,c=24*l,f=365.25*c;e.exports=function(e,t){t=t||{};var s="undefined"==typeof e?"undefined":a(e);if("string"===s&&e.length>0)return r(e);if("number"===s&&isNaN(e)===!1)return t.long?i(e):n(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t){"use strict";e.exports=Number.isNaN||function(e){return e!==e}},function(e,t,r){(function(t){"use strict";function r(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=t.exec(e),n=r[1]||"",i=Boolean(n&&":"!==n.charAt(1));return Boolean(r[2]||i)}e.exports="win32"===t.platform?n:r,e.exports.posix=r,e.exports.win32=n}).call(t,r(18))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}var s=r(20),a=i(s),o=r(1),u=n(o),l=Object.prototype.hasOwnProperty;t.hoist=function(e){function t(e,t){u.assertVariableDeclaration(e);var n=[];return e.declarations.forEach(function(e){r[e.id.name]=u.identifier(e.id.name),e.init?n.push(u.assignmentExpression("=",e.id,e.init)):t&&n.push(e.id)}),0===n.length?null:1===n.length?n[0]:u.sequenceExpression(n)}u.assertFunction(e.node);var r={};e.get("body").traverse({VariableDeclaration:{exit:function(e){var r=t(e.node,!1);null===r?e.remove():e.replaceWith(u.expressionStatement(r)),e.skip()}},ForStatement:function(e){var r=e.node.init;u.isVariableDeclaration(r)&&e.get("init").replaceWith(t(r,!1))},ForXStatement:function(e){var r=e.get("left");r.isVariableDeclaration()&&r.replaceWith(t(r.node,!0))},FunctionDeclaration:function(e){var t=e.node;r[t.id.name]=t.id;var n=u.expressionStatement(u.assignmentExpression("=",t.id,u.functionExpression(t.id,t.params,t.body,t.generator,t.expression)));e.parentPath.isBlockStatement()?(e.parentPath.unshiftContainer("body",n),e.remove()):e.replaceWith(n),e.skip()},FunctionExpression:function(e){e.skip()}});var n={};e.get("params").forEach(function(e){var t=e.node;u.isIdentifier(t)&&(n[t.name]=t)});var i=[];return(0,a.default)(r).forEach(function(e){l.call(n,e)||i.push(u.variableDeclarator(r[e],null))}),0===i.length?null:u.variableDeclaration("var",i)}},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return r(605)}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){m.default.ok(this instanceof s)}function a(e){s.call(this),y.assertLiteral(e),this.returnLoc=e}function o(e,t,r){s.call(this),y.assertLiteral(e),y.assertLiteral(t),r?y.assertIdentifier(r):r=null,this.breakLoc=e,this.continueLoc=t,this.label=r}function u(e){s.call(this),y.assertLiteral(e),this.breakLoc=e}function l(e,t,r){s.call(this),y.assertLiteral(e),t?m.default.ok(t instanceof c):t=null,r?m.default.ok(r instanceof f):r=null,m.default.ok(t||r),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=r}function c(e,t){s.call(this),y.assertLiteral(e),y.assertIdentifier(t),this.firstLoc=e,this.paramId=t}function f(e,t){s.call(this),y.assertLiteral(e),y.assertLiteral(t),this.firstLoc=e,this.afterLoc=t}function p(e,t){s.call(this),y.assertLiteral(e),y.assertIdentifier(t),this.breakLoc=e,this.label=t}function d(e){m.default.ok(this instanceof d);var t=r(281).Emitter;m.default.ok(e instanceof t),this.emitter=e,this.entryStack=[new a(e.finalLoc)]}var h=r(64),m=i(h),v=r(1),y=n(v),g=r(118);(0,g.inherits)(a,s),t.FunctionEntry=a,(0,g.inherits)(o,s),t.LoopEntry=o,(0,g.inherits)(u,s),t.SwitchEntry=u,(0,g.inherits)(l,s),t.TryEntry=l,(0,g.inherits)(c,s),t.CatchEntry=c,(0,g.inherits)(f,s),t.FinallyEntry=f,(0,g.inherits)(p,s),t.LabeledEntry=p;var b=d.prototype;t.LeapManager=d,b.withEntry=function(e,t){m.default.ok(e instanceof s),this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();m.default.strictEqual(r,e)}},b._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var n=this.entryStack[r],i=n[e];
+if(i)if(t){if(n.label&&n.label.name===t.name)return i}else if(!(n instanceof p))return i}return null},b.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},b.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){function r(e){function t(e){return r||(Array.isArray(e)?e.some(t):l.isNode(e)&&(o.default.strictEqual(r,!1),r=n(e))),r}l.assertNode(e);var r=!1,i=l.VISITOR_KEYS[e.type];if(i)for(var s=0;s<i.length;s++){var a=i[s],u=e[a];t(u)}return r}function n(n){l.assertNode(n);var i=c(n);return f.call(i,e)?i[e]:f.call(p,n.type)?i[e]=!1:f.call(t,n.type)?i[e]=!0:i[e]=r(n)}return n.onlyChildren=r,n}var a=r(64),o=i(a),u=r(1),l=n(u),c=r(279).makeAccessor(),f=Object.prototype.hasOwnProperty,p={FunctionExpression:!0},d={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},h={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var m in h)f.call(h,m)&&(d[m]=h[m]);t.hasSideEffects=s("hasSideEffects",d),t.containsLeap=s("containsLeap",h)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=e.node;if(f.assertFunction(t),t.id||(t.id=e.scope.parent.generateUidIdentifier("callee")),t.generator&&f.isFunctionDeclaration(t)){var r=e.findParent(function(e){return e.isProgram()||e.isBlockStatement()});if(!r)return t.id;var n=a(r),i=n.declarations[0].id,s=n.declarations[0].init.callee.object;f.assertArrayExpression(s);var o=s.elements.length;return s.elements.push(t.id),f.memberExpression(i,f.numericLiteral(o),!0)}return t.id}function a(e){var t=e.node;l.default.ok(Array.isArray(t.body));var r=v(t);return r.decl?r.decl:(r.decl=f.variableDeclaration("var",[f.variableDeclarator(e.scope.generateUidIdentifier("marked"),f.callExpression(f.memberExpression(f.arrayExpression([]),f.identifier("map"),!1),[m.runtimeProperty("mark")]))]),e.unshiftContainer("body",r.decl),r.decl)}function o(e,t){var r={didRenameArguments:!1,argsId:t};return e.traverse(y,r),r.didRenameArguments}var u=r(64),l=i(u),c=r(1),f=n(c),p=r(601),d=r(281),h=r(282),m=n(h),v=r(279).makeAccessor();t.visitor={Function:{exit:function(e,t){var r=e.node;if(r.generator){if(r.async){if(t.opts.asyncGenerators===!1)return}else if(t.opts.generators===!1)return}else{if(!r.async)return;if(t.opts.async===!1)return}var n=e.scope.generateUidIdentifier("context"),i=e.scope.generateUidIdentifier("args");e.ensureBlock();var a=e.get("body");r.async&&a.traverse(b),a.traverse(g,{context:n});var u=[],l=[];a.get("body").forEach(function(e){var t=e.node;f.isExpressionStatement(t)&&f.isStringLiteral(t.expression)?u.push(t):t&&null!=t._blockHoist?u.push(t):l.push(t)}),u.length>0&&(a.node.body=l);var c=s(e);f.assertIdentifier(r.id);var h=f.identifier(r.id.name+"$"),v=(0,p.hoist)(e),y=o(e,i);y&&(v=v||f.variableDeclaration("var",[]),v.declarations.push(f.variableDeclarator(i,f.identifier("arguments"))));var E=new d.Emitter(n);E.explode(e.get("body")),v&&v.declarations.length>0&&u.push(v);var x=[E.getContextFunction(h),r.generator?c:f.nullLiteral(),f.thisExpression()],A=E.getTryLocsList();A&&x.push(A);var S=f.callExpression(m.runtimeProperty(r.async?"async":"wrap"),x);u.push(f.returnStatement(S)),r.body=f.blockStatement(u);var _=a.node.directives;_&&(r.body.directives=_);var D=r.generator;D&&(r.generator=!1),r.async&&(r.async=!1),D&&f.isExpression(r)&&e.replaceWith(f.callExpression(m.runtimeProperty("mark"),[r])),e.requeue()}}};var y={"FunctionExpression|FunctionDeclaration":function(e){e.skip()},Identifier:function(e,t){"arguments"===e.node.name&&m.isReference(e)&&(e.replaceWith(t.argsId),t.didRenameArguments=!0)}},g={MetaProperty:function(e){var t=e.node;"function"===t.meta.name&&"sent"===t.property.name&&e.replaceWith(f.memberExpression(this.context,f.identifier("_sent")))}},b={Function:function(e){e.skip()},AwaitExpression:function(e){var t=e.node.argument;e.replaceWith(f.yieldExpression(f.callExpression(m.runtimeProperty("awrap"),[t]),!1))}}},function(e,t,r){"use strict";var n=r(280);t.REGULAR={d:n().addRange(48,57),D:n().addRange(0,47).addRange(58,65535),s:n(32,160,5760,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:n().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:n(95).addRange(48,57).addRange(65,90).addRange(97,122),W:n(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)},t.UNICODE={d:n().addRange(48,57),D:n().addRange(0,47).addRange(58,1114111),s:n(32,160,5760,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:n().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:n(95).addRange(48,57).addRange(65,90).addRange(97,122),W:n(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)},t.UNICODE_IGNORE_CASE={d:n().addRange(48,57),D:n().addRange(0,47).addRange(58,1114111),s:n(32,160,5760,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:n().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:n(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:n(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},function(e,t,r){"use strict";function n(e){return S?A?m.UNICODE_IGNORE_CASE[e]:m.UNICODE[e]:m.REGULAR[e]}function i(e,t){return y.call(e,t)}function s(e,t){for(var r in t)e[r]=t[r]}function a(e,t){if(t){var r=p(t,"");switch(r.type){case"characterClass":case"group":case"value":break;default:r=o(r,t)}s(e,r)}}function o(e,t){return{type:"group",behavior:"ignore",body:[e],raw:"(?:"+t+")"}}function u(e){return!!i(h,e)&&h[e]}function l(e){var t=d();e.body.forEach(function(e){switch(e.type){case"value":if(t.add(e.codePoint),A&&S){var r=u(e.codePoint);r&&t.add(r)}break;case"characterClassRange":var i=e.min.codePoint,s=e.max.codePoint;t.addRange(i,s),A&&S&&t.iuAddRange(i,s);break;case"characterClassEscape":t.add(n(e.value));break;default:throw Error("Unknown term type: "+e.type)}});return e.negative&&(t=(S?g:b).clone().remove(t)),a(e,t.toString()),e}function c(e){switch(e.type){case"dot":a(e,(S?E:x).toString());break;case"characterClass":e=l(e);break;case"characterClassEscape":a(e,n(e.value).toString());break;case"alternative":case"disjunction":case"group":case"quantifier":e.body=e.body.map(c);break;case"value":var t=e.codePoint,r=d(t);if(A&&S){var i=u(t);i&&r.add(i)}a(e,r.toString());break;case"anchor":case"empty":case"group":case"reference":break;default:throw Error("Unknown term type: "+e.type)}return e}var f=r(608).generate,p=r(609).parse,d=r(280),h=r(625),m=r(606),v={},y=v.hasOwnProperty,g=d().addRange(0,1114111),b=d().addRange(0,65535),E=g.clone().remove(10,13,8232,8233),x=E.clone().intersection(b);d.prototype.iuAddRange=function(e,t){var r=this;do{var n=u(e);n&&r.add(n)}while(++e<=t);return r};var A=!1,S=!1;e.exports=function(e,t){var r=p(e,t);return A=!!t&&t.indexOf("i")>-1,S=!!t&&t.indexOf("u")>-1,s(r,c(r)),f(r)}},function(e,t,r){var n;(function(e,i){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};(function(){function a(){var e,t,r=16384,n=[],i=-1,s=arguments.length;if(!s)return"";for(var a="";++i<s;){var o=Number(arguments[i]);if(!isFinite(o)||o<0||o>1114111||k(o)!=o)throw RangeError("Invalid code point: "+o);o<=65535?n.push(o):(o-=65536,e=(o>>10)+55296,t=o%1024+56320,n.push(e,t)),(i+1==s||n.length>r)&&(a+=F.apply(null,n),n.length=0)}return a}function o(e,t){if(t.indexOf("|")==-1){if(e==t)return;throw Error("Invalid node type: "+e)}if(t=o.hasOwnProperty(t)?o[t]:o[t]=RegExp("^(?:"+t+")$"),!t.test(e))throw Error("Invalid node type: "+e)}function u(e){var t=e.type;if(u.hasOwnProperty(t)&&"function"==typeof u[t])return u[t](e);throw Error("Invalid node type: "+t)}function l(e){o(e.type,"alternative");var t=e.body,r=t?t.length:0;if(1==r)return x(t[0]);for(var n=-1,i="";++n<r;)i+=x(t[n]);return i}function c(e){switch(o(e.type,"anchor"),e.kind){case"start":return"^";case"end":return"$";case"boundary":return"\\b";case"not-boundary":return"\\B";default:throw Error("Invalid assertion")}}function f(e){return o(e.type,"anchor|characterClass|characterClassEscape|dot|group|reference|value"),u(e)}function p(e){o(e.type,"characterClass");var t=e.body,r=t?t.length:0,n=-1,i="[";for(e.negative&&(i+="^");++n<r;)i+=m(t[n]);return i+="]"}function d(e){return o(e.type,"characterClassEscape"),"\\"+e.value}function h(e){o(e.type,"characterClassRange");var t=e.min,r=e.max;if("characterClassRange"==t.type||"characterClassRange"==r.type)throw Error("Invalid character class range");return m(t)+"-"+m(r)}function m(e){return o(e.type,"anchor|characterClassEscape|characterClassRange|dot|value"),u(e)}function v(e){o(e.type,"disjunction");var t=e.body,r=t?t.length:0;if(0==r)throw Error("No body");if(1==r)return u(t[0]);for(var n=-1,i="";++n<r;)0!=n&&(i+="|"),i+=u(t[n]);return i}function y(e){return o(e.type,"dot"),"."}function g(e){o(e.type,"group");var t="(";switch(e.behavior){case"normal":break;case"ignore":t+="?:";break;case"lookahead":t+="?=";break;case"negativeLookahead":t+="?!";break;default:throw Error("Invalid behaviour: "+e.behaviour)}var r=e.body,n=r?r.length:0;if(1==n)t+=u(r[0]);else for(var i=-1;++i<n;)t+=u(r[i]);return t+=")"}function b(e){o(e.type,"quantifier");var t="",r=e.min,n=e.max;switch(n){case void 0:case null:switch(r){case 0:t="*";break;case 1:t="+";break;default:t="{"+r+",}"}break;default:t=r==n?"{"+r+"}":0==r&&1==n?"?":"{"+r+","+n+"}"}return e.greedy||(t+="?"),f(e.body[0])+t}function E(e){return o(e.type,"reference"),"\\"+e.matchIndex}function x(e){return o(e.type,"anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value"),u(e)}function A(e){o(e.type,"value");var t=e.kind,r=e.codePoint;switch(t){case"controlLetter":return"\\c"+a(r+64);case"hexadecimalEscape":return"\\x"+("00"+r.toString(16).toUpperCase()).slice(-2);case"identifier":return"\\"+a(r);case"null":return"\\"+r;case"octal":return"\\"+r.toString(8);case"singleEscape":switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r";default:throw Error("Invalid codepoint: "+r)}case"symbol":return a(r);case"unicodeEscape":return"\\u"+("0000"+r.toString(16).toUpperCase()).slice(-4);case"unicodeCodePointEscape":return"\\u{"+r.toString(16).toUpperCase()+"}";default:throw Error("Unsupported node kind: "+t)}}var S={function:!0,object:!0},_=S["undefined"==typeof window?"undefined":s(window)]&&window||this,D=S[s(t)]&&t,C=S[s(e)]&&e&&!e.nodeType&&e,w=D&&C&&"object"==("undefined"==typeof i?"undefined":s(i))&&i;!w||w.global!==w&&w.window!==w&&w.self!==w||(_=w);var F=String.fromCharCode,k=Math.floor;u.alternative=l,u.anchor=c,u.characterClass=p,u.characterClassEscape=d,u.characterClassRange=h,u.disjunction=v,u.dot=y,u.group=g,u.quantifier=b,u.reference=E,u.value=A,"object"==s(r(48))&&r(48)?(n=function(){return{generate:u}}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))):D&&C?D.generate=u:_.regjsgen={generate:u}}).call(void 0)}).call(t,r(39)(e),function(){return this}())},function(e,t){"use strict";!function(){function t(e,t){function r(t){return t.raw=e.substring(t.range[0],t.range[1]),t}function n(e,t){return e.range[0]=t,r(e)}function i(e,t){return r({type:"anchor",kind:e,range:[$-t,$]})}function s(e,t,n,i){return r({type:"value",kind:e,codePoint:t,range:[n,i]})}function a(e,t,r,n){return n=n||0,s(e,t,$-(r.length+n),$)}function o(e){var t=e[0],r=t.charCodeAt(0);if(z){var n;if(1===t.length&&r>=55296&&r<=56319&&(n=x().charCodeAt(0),n>=56320&&n<=57343))return $++,s("symbol",1024*(r-55296)+n-56320+65536,$-2,$)}return s("symbol",r,$-1,$)}function u(e,t,n){return r({type:"disjunction",body:e,range:[t,n]})}function l(){return r({type:"dot",range:[$-1,$]})}function c(e){return r({type:"characterClassEscape",value:e,range:[$-2,$]})}function f(e){return r({type:"reference",matchIndex:parseInt(e,10),range:[$-1-e.length,$]})}function p(e,t,n,i){return r({type:"group",behavior:e,body:t,range:[n,i]})}function d(e,t,n,i){return null==i&&(n=$-1,i=$),r({type:"quantifier",min:e,max:t,greedy:!0,body:null,range:[n,i]})}function h(e,t,n){return r({type:"alternative",body:e,range:[t,n]})}function m(e,t,n,i){return r({type:"characterClass",body:e,negative:t,range:[n,i]})}function v(e,t,n,i){return e.codePoint>t.codePoint&&K("invalid range in character class",e.raw+"-"+t.raw,n,i),r({type:"characterClassRange",min:e,max:t,range:[n,i]})}function y(e){return"alternative"===e.type?e.body:[e]}function g(t){t=t||1;var r=e.substring($,$+t);return $+=t||1,r}function b(e){E(e)||K("character",e)}function E(t){if(e.indexOf(t,$)===$)return g(t.length)}function x(){return e[$]}function A(t){return e.indexOf(t,$)===$}function S(t){return e[$+1]===t}function _(t){var r=e.substring($),n=r.match(t);return n&&(n.range=[],n.range[0]=$,g(n[0].length),n.range[1]=$),n}function D(){var e=[],t=$;for(e.push(C());E("|");)e.push(C());return 1===e.length?e[0]:u(e,t,$)}function C(){for(var e,t=[],r=$;e=w();)t.push(e);return 1===t.length?t[0]:h(t,r,$)}function w(){if($>=e.length||A("|")||A(")"))return null;var t=k();if(t)return t;var r=T();r||K("Expected atom");var i=P()||!1;return i?(i.body=y(r),n(i,r.range[0]),i):r}function F(e,t,r,n){var i=null,s=$;if(E(e))i=t;else{if(!E(r))return!1;i=n}var a=D();a||K("Expected disjunction"),b(")");var o=p(i,y(a),s,$);return"normal"==i&&X&&J++,o}function k(){return E("^")?i("start",1):E("$")?i("end",1):E("\\b")?i("boundary",2):E("\\B")?i("not-boundary",2):F("(?=","lookahead","(?!","negativeLookahead")}function P(){var e,t,r,n,i=$;return E("*")?t=d(0):E("+")?t=d(1):E("?")?t=d(0,1):(e=_(/^\{([0-9]+)\}/))?(r=parseInt(e[1],10),t=d(r,r,e.range[0],e.range[1])):(e=_(/^\{([0-9]+),\}/))?(r=parseInt(e[1],10),t=d(r,void 0,e.range[0],e.range[1])):(e=_(/^\{([0-9]+),([0-9]+)\}/))&&(r=parseInt(e[1],10),n=parseInt(e[2],10),r>n&&K("numbers out of order in {} quantifier","",i,$),t=d(r,n,e.range[0],e.range[1])),t&&E("?")&&(t.greedy=!1,t.range[1]+=1),t}function T(){var e;return(e=_(/^[^^$\\.*+?(){[|]/))?o(e):E(".")?l():E("\\")?(e=R(),e||K("atomEscape"),e):(e=j())?e:F("(?:","ignore","(","normal")}function O(e){if(z){var t,n;if("unicodeEscape"==e.kind&&(t=e.codePoint)>=55296&&t<=56319&&A("\\")&&S("u")){var i=$;$++;var s=B();"unicodeEscape"==s.kind&&(n=s.codePoint)>=56320&&n<=57343?(e.range[1]=s.range[1],e.codePoint=1024*(t-55296)+n-56320+65536,e.type="value",e.kind="unicodeCodePointEscape",r(e)):$=i}}return e}function B(){return R(!0)}function R(e){var t,r=$;if(t=I())return t;if(e){if(E("b"))return a("singleEscape",8,"\\b");E("B")&&K("\\B not possible inside of CharacterClass","",r)}return t=M()}function I(){var e,t;if(e=_(/^(?!0)\d+/)){t=e[0];var r=parseInt(e[0],10);return r<=J?f(e[0]):(H.push(r),g(-e[0].length),(e=_(/^[0-7]{1,3}/))?a("octal",parseInt(e[0],8),e[0],1):(e=o(_(/^[89]/)),n(e,e.range[0]-1)))}return(e=_(/^[0-7]{1,3}/))?(t=e[0],/^0{1,3}$/.test(t)?a("null",0,"0",t.length+1):a("octal",parseInt(t,8),t,1)):!!(e=_(/^[dDsSwW]/))&&c(e[0])}function M(){var e;if(e=_(/^[fnrtv]/)){var t=0;switch(e[0]){case"t":t=9;break;case"n":t=10;break;case"v":t=11;break;case"f":t=12;break;case"r":t=13}return a("singleEscape",t,"\\"+e[0])}return(e=_(/^c([a-zA-Z])/))?a("controlLetter",e[1].charCodeAt(0)%32,e[1],2):(e=_(/^x([0-9a-fA-F]{2})/))?a("hexadecimalEscape",parseInt(e[1],16),e[1],2):(e=_(/^u([0-9a-fA-F]{4})/))?O(a("unicodeEscape",parseInt(e[1],16),e[1],2)):z&&(e=_(/^u\{([0-9a-fA-F]+)\}/))?a("unicodeCodePointEscape",parseInt(e[1],16),e[1],4):L()}function N(e){var t=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&t.test(String.fromCharCode(e))}function L(){var e,t="‌",r="‍";return N(x())?E(t)?a("identifier",8204,t):E(r)?a("identifier",8205,r):null:(e=g(),a("identifier",e.charCodeAt(0),e,1))}function j(){var e,t=$;return(e=_(/^\[\^/))?(e=U(),b("]"),m(e,!0,t,$)):E("[")?(e=U(),b("]"),m(e,!1,t,$)):null}function U(){var e;return A("]")?[]:(e=G(),e||K("nonEmptyClassRanges"),e)}function V(e){var t,r,n;if(A("-")&&!S("]")){b("-"),n=Y(),n||K("classAtom"),r=$;var i=U();return i||K("classRanges"),t=e.range[0],"empty"===i.type?[v(e,n,t,r)]:[v(e,n,t,r)].concat(i)}return n=W(),n||K("nonEmptyClassRangesNoDash"),[e].concat(n)}function G(){var e=Y();return e||K("classAtom"),A("]")?[e]:V(e)}function W(){var e=Y();return e||K("classAtom"),A("]")?e:V(e)}function Y(){return E("-")?o("-"):q()}function q(){var e;return(e=_(/^[^\\\]-]/))?o(e[0]):E("\\")?(e=B(),e||K("classEscape"),O(e)):void 0}function K(t,r,n,i){n=null==n?$:n,i=null==i?n:i;var s=Math.max(0,n-10),a=Math.min(i+10,e.length),o=" "+e.substring(s,a),u=" "+new Array(n-s+1).join(" ")+"^";throw SyntaxError(t+" at position "+n+(r?": "+r:"")+"\n"+o+"\n"+u)}var H=[],J=0,X=!0,z=(t||"").indexOf("u")!==-1,$=0;e=String(e),""===e&&(e="(?:)");var Q=D();Q.range[1]!==e.length&&K("Could not parse entire input - got stuck","",Q.range[1]);for(var Z=0;Z<H.length;Z++)if(H[Z]<=J)return $=0,X=!1,D();return Q}var r={parse:t};"undefined"!=typeof e&&e.exports?e.exports=r:window.regjsparser=r}()},function(e,t,r){"use strict";var n=r(455);e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `input` to be a string");if(t<0||!n(t))throw new TypeError("Expected `count` to be a positive finite number");var r="";do 1&t&&(r+=e),e+=e;while(t>>=1);return r}},function(e,t){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){var t=65,r=90,n=97,i=122,s=48,a=57,o=43,u=47,l=26,c=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+l:s<=e&&e<=a?e-s+c:e==o?62:e==u?63:-1}},function(e,t){"use strict";function r(e,n,i,s,a,o){var u=Math.floor((n-e)/2)+e,l=a(i,s[u],!0);return 0===l?u:l>0?n-u>1?r(u,n,i,s,a,o):o==t.LEAST_UPPER_BOUND?n<s.length?n:-1:u:u-e>1?r(e,u,i,s,a,o):o==t.LEAST_UPPER_BOUND?u:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,n,i,s){if(0===n.length)return-1;var a=r(-1,n.length,e,n,i,s||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(n[a],n[a-1],!0);)--a;return a}},function(e,t,r){"use strict";function n(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=i||s.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=r(63);i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=i},function(e,t){"use strict";function r(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function n(e,t){return Math.round(e+Math.random()*(t-e))}function i(e,t,s,a){if(s<a){var o=n(s,a),u=s-1;r(e,o,a);for(var l=e[a],c=s;c<a;c++)t(e[c],l)<=0&&(u+=1,r(e,u,c));r(e,u+1,c);var f=u+1;i(e,t,s,f-1),i(e,t,f+1,a)}}t.quickSort=function(e,t){i(e,t,0,e.length-1)}},function(e,t,r){"use strict";function n(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sources"),i=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),c=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);n=n.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(n,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=c}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=o.getArg(e,"offset"),r=o.getArg(t,"line"),i=o.getArg(t,"column");if(r<s.line||r===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:i+1},consumer:new n(o.getArg(e,"map"))}})}var o=r(63),u=r(612),l=r(284).ArraySet,c=r(285),f=r(614).quickSort;n.fromSourceMap=function(e){return i.fromSourceMap(e)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),n.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},n.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(e,t,r){var i,s=t||null,a=r||n.GENERATED_ORDER;switch(a){case n.GENERATED_ORDER:i=this._generatedMappings;break;case n.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=o.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},n.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var n=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},t.SourceMapConsumer=n,i.prototype=Object.create(n.prototype),i.prototype.consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],p=0,d=a.length;p<d;p++){var h=a[p],m=new s;m.generatedLine=h.generatedLine,m.generatedColumn=h.generatedColumn,h.source&&(m.source=n.indexOf(h.source),m.originalLine=h.originalLine,m.originalColumn=h.originalColumn,h.name&&(m.name=r.indexOf(h.name)),c.push(m)),u.push(m)}return f(t.__originalMappings,o.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?o.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var r,n,i,a,u,l=1,p=0,d=0,h=0,m=0,v=0,y=e.length,g=0,b={},E={},x=[],A=[];g<y;)if(";"===e.charAt(g))l++,g++,p=0;else if(","===e.charAt(g))g++;else{for(r=new s,r.generatedLine=l,a=g;a<y&&!this._charIsMappingSeparator(e,a);a++);if(n=e.slice(g,a),i=b[n])g+=n.length;else{for(i=[];g<a;)c.decode(e,g,E),u=E.value,g=E.rest,i.push(u);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");b[n]=i}r.generatedColumn=p+i[0],p=r.generatedColumn,i.length>1&&(r.source=m+i[1],m+=i[1],r.originalLine=d+i[2],d=r.originalLine,r.originalLine+=1,r.originalColumn=h+i[3],h=r.originalColumn,i.length>4&&(r.name=v+i[4],v+=i[4])),A.push(r),"number"==typeof r.originalLine&&x.push(r)}f(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,f(x,o.compareByOriginalPositions),this.__originalMappings=x},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",o.compareByGeneratedPositionsDeflated,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var r={source:t,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=i,a.prototype=Object.create(n.prototype),a.prototype.constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),a.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=u.search(t,this._sections,function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r?r:e.generatedColumn-t.generatedOffset.generatedColumn}),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},a.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r],i=n.consumer.sourceContentFor(e,!0);if(i)return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(r.consumer.sources.indexOf(o.getArg(e,"source"))!==-1){var n=r.consumer.generatedPositionFor(e);if(n){var i={line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}},a.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],i=n.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],u=n.consumer._sources.at(a.source);null!==n.consumer.sourceRoot&&(u=o.join(n.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=n.consumer._names.at(a.name);this._names.add(l),l=this._names.indexOf(l);var c={source:u,generatedLine:a.generatedLine+(n.generatedOffset.generatedLine-1),
+generatedColumn:a.generatedColumn+(n.generatedOffset.generatedLine===a.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}f(this.__generatedMappings,o.compareByGeneratedPositionsDeflated),f(this.__originalMappings,o.compareByOriginalPositions)},t.IndexedSourceMapConsumer=a},function(e,t,r){"use strict";function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[u]=!0,null!=n&&this.add(n)}var i=r(286).SourceMapGenerator,s=r(63),a=/(\r?\n)/,o=10,u="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=r?s.join(r,e.source):e.source;o.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new n,u=e.split(a),l=function(){var e=u.shift(),t=u.shift()||"";return e+t},c=1,f=0,p=null;return t.eachMapping(function(e){if(null!==p){if(!(c<e.generatedLine)){var t=u[0],r=t.substr(0,e.generatedColumn-f);return u[0]=t.substr(e.generatedColumn-f),f=e.generatedColumn,i(p,r),void(p=e)}i(p,l()),c++,f=0}for(;c<e.generatedLine;)o.add(l()),c++;if(f<e.generatedColumn){var t=u[0];o.add(t.substr(0,e.generatedColumn)),u[0]=t.substr(e.generatedColumn),f=e.generatedColumn}p=e},this),u.length>0&&(p&&i(p,l()),o.add(u.join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=s.join(r,e)),o.setSourceContent(e,n))}),o},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)t=this.children[r],t[u]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},n.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},n.prototype.setSourceContent=function(e,t){this.sourceContents[s.toSetString(e)]=t},n.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][u]&&this.children[t].walkSourceContents(e);for(var n=Object.keys(this.sourceContents),t=0,r=n.length;t<r;t++)e(s.fromSetString(n[t]),this.sourceContents[n[t]])},n.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},n.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new i(e),n=!1,s=null,a=null,u=null,l=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(s===i.source&&a===i.line&&u===i.column&&l===i.name||r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),s=i.source,a=i.line,u=i.column,l=i.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),s=null,n=!1);for(var c=0,f=e.length;c<f;c++)e.charCodeAt(c)===o?(t.line++,t.column=0,c+1===f?(s=null,n=!1):n&&r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:t.code,map:r}},t.SourceNode=n},function(e,t,r){"use strict";var n=r(180)();e.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},function(e,t,r){(function(t){"use strict";var r=t.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return t!==-1&&(n===-1||t<n)};e.exports=function(){return"FORCE_COLOR"in t.env||!(i("no-color")||i("no-colors")||i("color=false"))&&(!!(i("color")||i("colors")||i("color=true")||i("color=always"))||!(t.stdout&&!t.stdout.isTTY)&&("win32"===t.platform||("COLORTERM"in t.env||"dumb"!==t.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(t.env.TERM))))}()}).call(t,r(18))},function(e,t){"use strict";e.exports=function e(t){function r(){}r.prototype=t,new r}},function(e,t){"use strict";"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return e&&"object"===("undefined"==typeof e?"undefined":r(e))&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.version="6.21.0"},function(e,t){"use strict";function r(e,t){var r=void 0;return null!=t.url?r=t.url:(r="Inline Babel script",p++,p>1&&(r+=" ("+p+")")),e(t.content,l({filename:r},n(t))).code}function n(e){return{presets:e.presets||["react","es2015"],plugins:e.plugins||["transform-class-properties","transform-object-rest-spread","transform-flow-strip-types"],sourceMaps:"inline"}}function i(e,t){var n=document.createElement("script");n.text=r(e,t),f.appendChild(n)}function s(e,t,r){var n=new XMLHttpRequest;return n.open("GET",e,!0),"overrideMimeType"in n&&n.overrideMimeType("text/plain"),n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)throw (r(), new Error("Could not load "+e));t(n.responseText)}},n.send(null);}function a(e,t){var r=e.getAttribute(t);return""===r?[]:r?r.split(",").map(function(e){return e.trim()}):null}function o(e,t){function r(){var t,r;for(r=0;r<o;r++)if(t=n[r],t.loaded&&!t.executed)t.executed=!0,i(e,t);else if(!t.loaded&&!t.error&&!t.async)break}var n=[],o=t.length;t.forEach(function(e,t){var i={async:e.hasAttribute("async"),error:!1,executed:!1,plugins:a(e,"data-plugins"),presets:a(e,"data-presets")};e.src?(n[t]=l({},i,{content:null,loaded:!1,url:e.src}),s(e.src,function(e){n[t].loaded=!0,n[t].content=e,r()},function(){n[t].error=!0,r()})):n[t]=l({},i,{content:e.innerHTML,loaded:!0,url:null})}),r()}function u(e){f=document.getElementsByTagName("head")[0];for(var t=document.getElementsByTagName("script"),r=[],n=0;n<t.length;n++){var i=t.item(n),s=i.type.split(";")[0];c.indexOf(s)!==-1&&r.push(i)}0!==r.length&&(console.warn("You are using the in-browser Babel transformer. Be sure to precompile your scripts for production - https://babeljs.io/docs/setup/"),o(e,r))}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.runScripts=u;var c=["text/jsx","text/babel"],f=void 0,p=0},function(e,t){e.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},function(e,t){e.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,68736:68800,68737:68801,68738:68802,68739:68803,68740:68804,68741:68805,68742:68806,68743:68807,68744:68808,68745:68809,68746:68810,68747:68811,68748:68812,68749:68813,68750:68814,68751:68815,68752:68816,68753:68817,68754:68818,68755:68819,68756:68820,68757:68821,68758:68822,68759:68823,68760:68824,68761:68825,68762:68826,68763:68827,68764:68828,68765:68829,68766:68830,68767:68831,68768:68832,68769:68833,68770:68834,68771:68835,68772:68836,68773:68837,68774:68838,68775:68839,68776:68840,68777:68841,68778:68842,68779:68843,68780:68844,68781:68845,68782:68846,68783:68847,68784:68848,68785:68849,68786:68850,68800:68736,68801:68737,68802:68738,68803:68739,68804:68740,68805:68741,68806:68742,68807:68743,68808:68744,68809:68745,68810:68746,68811:68747,68812:68748,68813:68749,68814:68750,68815:68751,68816:68752,68817:68753,68818:68754,68819:68755,68820:68756,68821:68757,68822:68758,68823:68759,68824:68760,68825:68761,68826:68762,68827:68763,68828:68764,68829:68765,68830:68766,68831:68767,68832:68768,68833:68769,68834:68770,68835:68771,68836:68772,68837:68773,68838:68774,68839:68775,68840:68776,68841:68777,68842:68778,68843:68779,68844:68780,68845:68781,68846:68782,68847:68783,68848:68784,68849:68785,68850:68786,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}}]));}); \ No newline at end of file
diff --git a/devtools/client/inspector/markup/test/lib_jquery_1.0.js b/devtools/client/inspector/markup/test/lib_jquery_1.0.js
new file mode 100644
index 0000000000..564361282f
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_jquery_1.0.js
@@ -0,0 +1,1814 @@
+/*
+ * jQuery - New Wave Javascript
+ *
+ * Copyright (c) 2006 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2006-10-27 23:14:48 -0400 (Fri, 27 Oct 2006) $
+ * $Rev: 509 $
+ */
+
+// Global undefined variable
+window.undefined = window.undefined;
+function jQuery(a,c) {
+
+ // Shortcut for document ready (because $(document).each() is silly)
+ if ( a && a.constructor == Function && jQuery.fn.ready )
+ return jQuery(document).ready(a);
+
+ // Make sure that a selection was provided
+ a = a || jQuery.context || document;
+
+ // Watch for when a jQuery object is passed as the selector
+ if ( a.jquery )
+ return $( jQuery.merge( a, [] ) );
+
+ // Watch for when a jQuery object is passed at the context
+ if ( c && c.jquery )
+ return $( c ).find(a);
+
+ // If the context is global, return a new object
+ if ( window == this )
+ return new jQuery(a,c);
+
+ // Handle HTML strings
+ var m = /^[^<]*(<.+>)[^>]*$/.exec(a);
+ if ( m ) a = jQuery.clean( [ m[1] ] );
+
+ // Watch for when an array is passed in
+ this.get( a.constructor == Array || a.length && !a.nodeType && a[0] != undefined && a[0].nodeType ?
+ // Assume that it is an array of DOM Elements
+ jQuery.merge( a, [] ) :
+
+ // Find the matching elements and save them for later
+ jQuery.find( a, c ) );
+
+ // See if an extra function was provided
+ var fn = arguments[ arguments.length - 1 ];
+
+ // If so, execute it in context
+ if ( fn && fn.constructor == Function )
+ this.each(fn);
+}
+
+// Map over the $ in case of overwrite
+if ( $ )
+ jQuery._$ = $;
+
+// Map the jQuery namespace to the '$' one
+var $ = jQuery;
+
+jQuery.fn = jQuery.prototype = {
+ jquery: "$Rev: 509 $",
+
+ size: function() {
+ return this.length;
+ },
+
+ get: function( num ) {
+ // Watch for when an array (of elements) is passed in
+ if ( num && num.constructor == Array ) {
+
+ // Use a tricky hack to make the jQuery object
+ // look and feel like an array
+ this.length = 0;
+ [].push.apply( this, num );
+
+ return this;
+ } else
+ return num == undefined ?
+
+ // Return a 'clean' array
+ jQuery.map( this, function(a){ return a } ) :
+
+ // Return just the object
+ this[num];
+ },
+ each: function( fn, args ) {
+ return jQuery.each( this, fn, args );
+ },
+
+ index: function( obj ) {
+ var pos = -1;
+ this.each(function(i){
+ if ( this == obj ) pos = i;
+ });
+ return pos;
+ },
+
+ attr: function( key, value, type ) {
+ // Check to see if we're setting style values
+ return key.constructor != String || value != undefined ?
+ this.each(function(){
+ // See if we're setting a hash of styles
+ if ( value == undefined )
+ // Set all the styles
+ for ( var prop in key )
+ jQuery.attr(
+ type ? this.style : this,
+ prop, key[prop]
+ );
+
+ // See if we're setting a single key/value style
+ else
+ jQuery.attr(
+ type ? this.style : this,
+ key, value
+ );
+ }) :
+
+ // Look for the case where we're accessing a style value
+ jQuery[ type || "attr" ]( this[0], key );
+ },
+
+ css: function( key, value ) {
+ return this.attr( key, value, "curCSS" );
+ },
+ text: function(e) {
+ e = e || this;
+ var t = "";
+ for ( var j = 0; j < e.length; j++ ) {
+ var r = e[j].childNodes;
+ for ( var i = 0; i < r.length; i++ )
+ t += r[i].nodeType != 1 ?
+ r[i].nodeValue : jQuery.fn.text([ r[i] ]);
+ }
+ return t;
+ },
+ wrap: function() {
+ // The elements to wrap the target around
+ var a = jQuery.clean(arguments);
+
+ // Wrap each of the matched elements individually
+ return this.each(function(){
+ // Clone the structure that we're using to wrap
+ var b = a[0].cloneNode(true);
+
+ // Insert it before the element to be wrapped
+ this.parentNode.insertBefore( b, this );
+
+ // Find he deepest point in the wrap structure
+ while ( b.firstChild )
+ b = b.firstChild;
+
+ // Move the matched element to within the wrap structure
+ b.appendChild( this );
+ });
+ },
+ append: function() {
+ return this.domManip(arguments, true, 1, function(a){
+ this.appendChild( a );
+ });
+ },
+ prepend: function() {
+ return this.domManip(arguments, true, -1, function(a){
+ this.insertBefore( a, this.firstChild );
+ });
+ },
+ before: function() {
+ return this.domManip(arguments, false, 1, function(a){
+ this.parentNode.insertBefore( a, this );
+ });
+ },
+ after: function() {
+ return this.domManip(arguments, false, -1, function(a){
+ this.parentNode.insertBefore( a, this.nextSibling );
+ });
+ },
+ end: function() {
+ return this.get( this.stack.pop() );
+ },
+ find: function(t) {
+ return this.pushStack( jQuery.map( this, function(a){
+ return jQuery.find(t,a);
+ }), arguments );
+ },
+
+ clone: function(deep) {
+ return this.pushStack( jQuery.map( this, function(a){
+ return a.cloneNode( deep != undefined ? deep : true );
+ }), arguments );
+ },
+
+ filter: function(t) {
+ return this.pushStack(
+ t.constructor == Array &&
+ jQuery.map(this,function(a){
+ for ( var i = 0; i < t.length; i++ )
+ if ( jQuery.filter(t[i],[a]).r.length )
+ return a;
+ }) ||
+
+ t.constructor == Boolean &&
+ ( t ? this.get() : [] ) ||
+
+ t.constructor == Function &&
+ jQuery.grep( this, t ) ||
+
+ jQuery.filter(t,this).r, arguments );
+ },
+
+ not: function(t) {
+ return this.pushStack( t.constructor == String ?
+ jQuery.filter(t,this,false).r :
+ jQuery.grep(this,function(a){ return a != t; }), arguments );
+ },
+
+ add: function(t) {
+ return this.pushStack( jQuery.merge( this, t.constructor == String ?
+ jQuery.find(t) : t.constructor == Array ? t : [t] ), arguments );
+ },
+ is: function(expr) {
+ return expr ? jQuery.filter(expr,this).r.length > 0 : this.length > 0;
+ },
+ domManip: function(args, table, dir, fn){
+ var clone = this.size() > 1;
+ var a = jQuery.clean(args);
+
+ return this.each(function(){
+ var obj = this;
+
+ if ( table && this.nodeName == "TABLE" && a[0].nodeName != "THEAD" ) {
+ var tbody = this.getElementsByTagName("tbody");
+
+ if ( !tbody.length ) {
+ obj = document.createElement("tbody");
+ this.appendChild( obj );
+ } else
+ obj = tbody[0];
+ }
+
+ for ( var i = ( dir < 0 ? a.length - 1 : 0 );
+ i != ( dir < 0 ? dir : a.length ); i += dir ) {
+ fn.apply( obj, [ clone ? a[i].cloneNode(true) : a[i] ] );
+ }
+ });
+ },
+ pushStack: function(a,args) {
+ var fn = args && args[args.length-1];
+
+ if ( !fn || fn.constructor != Function ) {
+ if ( !this.stack ) this.stack = [];
+ this.stack.push( this.get() );
+ this.get( a );
+ } else {
+ var old = this.get();
+ this.get( a );
+ if ( fn.constructor == Function )
+ return this.each( fn );
+ this.get( old );
+ }
+
+ return this;
+ }
+};
+
+jQuery.extend = jQuery.fn.extend = function(obj,prop) {
+ if ( !prop ) { prop = obj; obj = this; }
+ for ( var i in prop ) obj[i] = prop[i];
+ return obj;
+};
+
+jQuery.extend({
+ init: function(){
+ jQuery.initDone = true;
+
+ jQuery.each( jQuery.macros.axis, function(i,n){
+ jQuery.fn[ i ] = function(a) {
+ var ret = jQuery.map(this,n);
+ if ( a && a.constructor == String )
+ ret = jQuery.filter(a,ret).r;
+ return this.pushStack( ret, arguments );
+ };
+ });
+
+ jQuery.each( jQuery.macros.to, function(i,n){
+ jQuery.fn[ i ] = function(){
+ var a = arguments;
+ return this.each(function(){
+ for ( var j = 0; j < a.length; j++ )
+ $(a[j])[n]( this );
+ });
+ };
+ });
+
+ jQuery.each( jQuery.macros.each, function(i,n){
+ jQuery.fn[ i ] = function() {
+ return this.each( n, arguments );
+ };
+ });
+
+ jQuery.each( jQuery.macros.filter, function(i,n){
+ jQuery.fn[ n ] = function(num,fn) {
+ return this.filter( ":" + n + "(" + num + ")", fn );
+ };
+ });
+
+ jQuery.each( jQuery.macros.attr, function(i,n){
+ n = n || i;
+ jQuery.fn[ i ] = function(h) {
+ return h == undefined ?
+ this.length ? this[0][n] : null :
+ this.attr( n, h );
+ };
+ });
+
+ jQuery.each( jQuery.macros.css, function(i,n){
+ jQuery.fn[ n ] = function(h) {
+ return h == undefined ?
+ ( this.length ? jQuery.css( this[0], n ) : null ) :
+ this.css( n, h );
+ };
+ });
+
+ },
+ each: function( obj, fn, args ) {
+ if ( obj.length == undefined )
+ for ( var i in obj )
+ fn.apply( obj[i], args || [i, obj[i]] );
+ else
+ for ( var i = 0; i < obj.length; i++ )
+ fn.apply( obj[i], args || [i, obj[i]] );
+ return obj;
+ },
+
+ className: {
+ add: function(o,c){
+ if (jQuery.className.has(o,c)) return;
+ o.className += ( o.className ? " " : "" ) + c;
+ },
+ remove: function(o,c){
+ o.className = !c ? "" :
+ o.className.replace(
+ new RegExp("(^|\\s*\\b[^-])"+c+"($|\\b(?=[^-]))", "g"), "");
+ },
+ has: function(e,a) {
+ if ( e.className != undefined )
+ e = e.className;
+ return new RegExp("(^|\\s)" + a + "(\\s|$)").test(e);
+ }
+ },
+ swap: function(e,o,f) {
+ for ( var i in o ) {
+ e.style["old"+i] = e.style[i];
+ e.style[i] = o[i];
+ }
+ f.apply( e, [] );
+ for ( var i in o )
+ e.style[i] = e.style["old"+i];
+ },
+
+ css: function(e,p) {
+ if ( p == "height" || p == "width" ) {
+ var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];
+
+ for ( var i in d ) {
+ old["padding" + d[i]] = 0;
+ old["border" + d[i] + "Width"] = 0;
+ }
+
+ jQuery.swap( e, old, function() {
+ if (jQuery.css(e,"display") != "none") {
+ oHeight = e.offsetHeight;
+ oWidth = e.offsetWidth;
+ } else {
+ e = $(e.cloneNode(true)).css({
+ visibility: "hidden", position: "absolute", display: "block"
+ }).prependTo("body")[0];
+
+ oHeight = e.clientHeight;
+ oWidth = e.clientWidth;
+
+ e.parentNode.removeChild(e);
+ }
+ });
+
+ return p == "height" ? oHeight : oWidth;
+ } else if ( p == "opacity" && jQuery.browser.msie )
+ return parseFloat( jQuery.curCSS(e,"filter").replace(/[^0-9.]/,"") ) || 1;
+
+ return jQuery.curCSS( e, p );
+ },
+
+ curCSS: function(elem, prop, force) {
+ var ret;
+
+ if (!force && elem.style[prop]) {
+
+ ret = elem.style[prop];
+
+ } else if (elem.currentStyle) {
+
+ var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
+ ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
+
+ } else if (document.defaultView && document.defaultView.getComputedStyle) {
+
+ prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
+ var cur = document.defaultView.getComputedStyle(elem, null);
+
+ if ( cur )
+ ret = cur.getPropertyValue(prop);
+ else if ( prop == 'display' )
+ ret = 'none';
+ else
+ jQuery.swap(elem, { display: 'block' }, function() {
+ ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop);
+ });
+
+ }
+
+ return ret;
+ },
+
+ clean: function(a) {
+ var r = [];
+ for ( var i = 0; i < a.length; i++ ) {
+ if ( a[i].constructor == String ) {
+
+ var table = "";
+
+ if ( !a[i].indexOf("<thead") || !a[i].indexOf("<tbody") ) {
+ table = "thead";
+ a[i] = "<table>" + a[i] + "</table>";
+ } else if ( !a[i].indexOf("<tr") ) {
+ table = "tr";
+ a[i] = "<table>" + a[i] + "</table>";
+ } else if ( !a[i].indexOf("<td") || !a[i].indexOf("<th") ) {
+ table = "td";
+ a[i] = "<table><tbody><tr>" + a[i] + "</tr></tbody></table>";
+ }
+
+ var div = document.createElement("div");
+ div.innerHTML = a[i];
+
+ if ( table ) {
+ div = div.firstChild;
+ if ( table != "thead" ) div = div.firstChild;
+ if ( table == "td" ) div = div.firstChild;
+ }
+
+ for ( var j = 0; j < div.childNodes.length; j++ )
+ r.push( div.childNodes[j] );
+ } else if ( a[i].jquery || a[i].length && !a[i].nodeType )
+ for ( var k = 0; k < a[i].length; k++ )
+ r.push( a[i][k] );
+ else if ( a[i] !== null )
+ r.push( a[i].nodeType ? a[i] : document.createTextNode(a[i].toString()) );
+ }
+ return r;
+ },
+
+ expr: {
+ "": "m[2]== '*'||a.nodeName.toUpperCase()==m[2].toUpperCase()",
+ "#": "a.getAttribute('id')&&a.getAttribute('id')==m[2]",
+ ":": {
+ // Position Checks
+ lt: "i<m[3]-0",
+ gt: "i>m[3]-0",
+ nth: "m[3]-0==i",
+ eq: "m[3]-0==i",
+ first: "i==0",
+ last: "i==r.length-1",
+ even: "i%2==0",
+ odd: "i%2",
+
+ // Child Checks
+ "first-child": "jQuery.sibling(a,0).cur",
+ "last-child": "jQuery.sibling(a,0).last",
+ "only-child": "jQuery.sibling(a).length==1",
+
+ // Parent Checks
+ parent: "a.childNodes.length",
+ empty: "!a.childNodes.length",
+
+ // Text Check
+ contains: "(a.innerText||a.innerHTML).indexOf(m[3])>=0",
+
+ // Visibility
+ visible: "a.type!='hidden'&&jQuery.css(a,'display')!='none'&&jQuery.css(a,'visibility')!='hidden'",
+ hidden: "a.type=='hidden'||jQuery.css(a,'display')=='none'||jQuery.css(a,'visibility')=='hidden'",
+
+ // Form elements
+ enabled: "!a.disabled",
+ disabled: "a.disabled",
+ checked: "a.checked",
+ selected: "a.selected"
+ },
+ ".": "jQuery.className.has(a,m[2])",
+ "@": {
+ "=": "z==m[4]",
+ "!=": "z!=m[4]",
+ "^=": "!z.indexOf(m[4])",
+ "$=": "z.substr(z.length - m[4].length,m[4].length)==m[4]",
+ "*=": "z.indexOf(m[4])>=0",
+ "": "z"
+ },
+ "[": "jQuery.find(m[2],a).length"
+ },
+
+ token: [
+ "\\.\\.|/\\.\\.", "a.parentNode",
+ ">|/", "jQuery.sibling(a.firstChild)",
+ "\\+", "jQuery.sibling(a).next",
+ "~", function(a){
+ var r = [];
+ var s = jQuery.sibling(a);
+ if ( s.n > 0 )
+ for ( var i = s.n; i < s.length; i++ )
+ r.push( s[i] );
+ return r;
+ }
+ ],
+ find: function( t, context ) {
+ // Make sure that the context is a DOM Element
+ if ( context && context.nodeType == undefined )
+ context = null;
+
+ // Set the correct context (if none is provided)
+ context = context || jQuery.context || document;
+
+ if ( t.constructor != String ) return [t];
+
+ if ( !t.indexOf("//") ) {
+ context = context.documentElement;
+ t = t.substr(2,t.length);
+ } else if ( !t.indexOf("/") ) {
+ context = context.documentElement;
+ t = t.substr(1,t.length);
+ // FIX Assume the root element is right :(
+ if ( t.indexOf("/") >= 1 )
+ t = t.substr(t.indexOf("/"),t.length);
+ }
+
+ var ret = [context];
+ var done = [];
+ var last = null;
+
+ while ( t.length > 0 && last != t ) {
+ var r = [];
+ last = t;
+
+ t = jQuery.trim(t).replace( /^\/\//i, "" );
+
+ var foundToken = false;
+
+ for ( var i = 0; i < jQuery.token.length; i += 2 ) {
+ var re = new RegExp("^(" + jQuery.token[i] + ")");
+ var m = re.exec(t);
+
+ if ( m ) {
+ r = ret = jQuery.map( ret, jQuery.token[i+1] );
+ t = jQuery.trim( t.replace( re, "" ) );
+ foundToken = true;
+ }
+ }
+
+ if ( !foundToken ) {
+ if ( !t.indexOf(",") || !t.indexOf("|") ) {
+ if ( ret[0] == context ) ret.shift();
+ done = jQuery.merge( done, ret );
+ r = ret = [context];
+ t = " " + t.substr(1,t.length);
+ } else {
+ var re2 = /^([#.]?)([a-z0-9\\*_-]*)/i;
+ var m = re2.exec(t);
+
+ if ( m[1] == "#" ) {
+ // Ummm, should make this work in all XML docs
+ var oid = document.getElementById(m[2]);
+ r = ret = oid ? [oid] : [];
+ t = t.replace( re2, "" );
+ } else {
+ if ( !m[2] || m[1] == "." ) m[2] = "*";
+
+ for ( var i = 0; i < ret.length; i++ )
+ r = jQuery.merge( r,
+ m[2] == "*" ?
+ jQuery.getAll(ret[i]) :
+ ret[i].getElementsByTagName(m[2])
+ );
+ }
+ }
+ }
+
+ if ( t ) {
+ var val = jQuery.filter(t,r);
+ ret = r = val.r;
+ t = jQuery.trim(val.t);
+ }
+ }
+
+ if ( ret && ret[0] == context ) ret.shift();
+ done = jQuery.merge( done, ret );
+
+ return done;
+ },
+
+ getAll: function(o,r) {
+ r = r || [];
+ var s = o.childNodes;
+ for ( var i = 0; i < s.length; i++ )
+ if ( s[i].nodeType == 1 ) {
+ r.push( s[i] );
+ jQuery.getAll( s[i], r );
+ }
+ return r;
+ },
+
+ attr: function(elem, name, value){
+ var fix = {
+ "for": "htmlFor",
+ "class": "className",
+ "float": "cssFloat",
+ innerHTML: "innerHTML",
+ className: "className"
+ };
+
+ if ( fix[name] ) {
+ if ( value != undefined ) elem[fix[name]] = value;
+ return elem[fix[name]];
+ } else if ( elem.getAttribute ) {
+ if ( value != undefined ) elem.setAttribute( name, value );
+ return elem.getAttribute( name, 2 );
+ } else {
+ name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
+ if ( value != undefined ) elem[name] = value;
+ return elem[name];
+ }
+ },
+
+ // The regular expressions that power the parsing engine
+ parse: [
+ // Match: [@value='test'], [@foo]
+ [ "\\[ *(@)S *([!*$^=]*) *Q\\]", 1 ],
+
+ // Match: [div], [div p]
+ [ "(\\[)Q\\]", 0 ],
+
+ // Match: :contains('foo')
+ [ "(:)S\\(Q\\)", 0 ],
+
+ // Match: :even, :last-chlid
+ [ "([:.#]*)S", 0 ]
+ ],
+
+ filter: function(t,r,not) {
+ // Figure out if we're doing regular, or inverse, filtering
+ var g = not !== false ? jQuery.grep :
+ function(a,f) {return jQuery.grep(a,f,true);};
+
+ while ( t && /^[a-z[({<*:.#]/i.test(t) ) {
+
+ var p = jQuery.parse;
+
+ for ( var i = 0; i < p.length; i++ ) {
+ var re = new RegExp( "^" + p[i][0]
+
+ // Look for a string-like sequence
+ .replace( 'S', "([a-z*_-][a-z0-9_-]*)" )
+
+ // Look for something (optionally) enclosed with quotes
+ .replace( 'Q', " *'?\"?([^'\"]*?)'?\"? *" ), "i" );
+
+ var m = re.exec( t );
+
+ if ( m ) {
+ // Re-organize the match
+ if ( p[i][1] )
+ m = ["", m[1], m[3], m[2], m[4]];
+
+ // Remove what we just matched
+ t = t.replace( re, "" );
+
+ break;
+ }
+ }
+
+ // :not() is a special case that can be optomized by
+ // keeping it out of the expression list
+ if ( m[1] == ":" && m[2] == "not" )
+ r = jQuery.filter(m[3],r,false).r;
+
+ // Otherwise, find the expression to execute
+ else {
+ var f = jQuery.expr[m[1]];
+ if ( f.constructor != String )
+ f = jQuery.expr[m[1]][m[2]];
+
+ // Build a custom macro to enclose it
+ eval("f = function(a,i){" +
+ ( m[1] == "@" ? "z=jQuery.attr(a,m[3]);" : "" ) +
+ "return " + f + "}");
+
+ // Execute it against the current filter
+ r = g( r, f );
+ }
+ }
+
+ // Return an array of filtered elements (r)
+ // and the modified expression string (t)
+ return { r: r, t: t };
+ },
+ trim: function(t){
+ return t.replace(/^\s+|\s+$/g, "");
+ },
+ parents: function( elem ){
+ var matched = [];
+ var cur = elem.parentNode;
+ while ( cur && cur != document ) {
+ matched.push( cur );
+ cur = cur.parentNode;
+ }
+ return matched;
+ },
+ sibling: function(elem, pos, not) {
+ var elems = [];
+
+ var siblings = elem.parentNode.childNodes;
+ for ( var i = 0; i < siblings.length; i++ ) {
+ if ( not === true && siblings[i] == elem ) continue;
+
+ if ( siblings[i].nodeType == 1 )
+ elems.push( siblings[i] );
+ if ( siblings[i] == elem )
+ elems.n = elems.length - 1;
+ }
+
+ return jQuery.extend( elems, {
+ last: elems.n == elems.length - 1,
+ cur: pos == "even" && elems.n % 2 == 0 || pos == "odd" && elems.n % 2 || elems[pos] == elem,
+ prev: elems[elems.n - 1],
+ next: elems[elems.n + 1]
+ });
+ },
+ merge: function(first, second) {
+ var result = [];
+
+ // Move b over to the new array (this helps to avoid
+ // StaticNodeList instances)
+ for ( var k = 0; k < first.length; k++ )
+ result[k] = first[k];
+
+ // Now check for duplicates between a and b and only
+ // add the unique items
+ for ( var i = 0; i < second.length; i++ ) {
+ var noCollision = true;
+
+ // The collision-checking process
+ for ( var j = 0; j < first.length; j++ )
+ if ( second[i] == first[j] )
+ noCollision = false;
+
+ // If the item is unique, add it
+ if ( noCollision )
+ result.push( second[i] );
+ }
+
+ return result;
+ },
+ grep: function(elems, fn, inv) {
+ // If a string is passed in for the function, make a function
+ // for it (a handy shortcut)
+ if ( fn.constructor == String )
+ fn = new Function("a","i","return " + fn);
+
+ var result = [];
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0; i < elems.length; i++ )
+ if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
+ result.push( elems[i] );
+
+ return result;
+ },
+ map: function(elems, fn) {
+ // If a string is passed in for the function, make a function
+ // for it (a handy shortcut)
+ if ( fn.constructor == String )
+ fn = new Function("a","return " + fn);
+
+ var result = [];
+
+ // Go through the array, translating each of the items to their
+ // new value (or values).
+ for ( var i = 0; i < elems.length; i++ ) {
+ var val = fn(elems[i],i);
+
+ if ( val !== null && val != undefined ) {
+ if ( val.constructor != Array ) val = [val];
+ result = jQuery.merge( result, val );
+ }
+ }
+
+ return result;
+ },
+
+ /*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code orignated from Dean Edwards' addEvent library.
+ */
+ event: {
+
+ // Bind an event to an element
+ // Original by Dean Edwards
+ add: function(element, type, handler) {
+ // For whatever reason, IE has trouble passing the window object
+ // around, causing it to be cloned in the process
+ if ( jQuery.browser.msie && element.setInterval != undefined )
+ element = window;
+
+ // Make sure that the function being executed has a unique ID
+ if ( !handler.guid )
+ handler.guid = this.guid++;
+
+ // Init the element's event structure
+ if (!element.events)
+ element.events = {};
+
+ // Get the current list of functions bound to this event
+ var handlers = element.events[type];
+
+ // If it hasn't been initialized yet
+ if (!handlers) {
+ // Init the event handler queue
+ handlers = element.events[type] = {};
+
+ // Remember an existing handler, if it's already there
+ if (element["on" + type])
+ handlers[0] = element["on" + type];
+ }
+
+ // Add the function to the element's handler list
+ handlers[handler.guid] = handler;
+
+ // And bind the global event handler to the element
+ element["on" + type] = this.handle;
+
+ // Remember the function in a global list (for triggering)
+ if (!this.global[type])
+ this.global[type] = [];
+ this.global[type].push( element );
+ },
+
+ guid: 1,
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function(element, type, handler) {
+ if (element.events)
+ if (type && element.events[type])
+ if ( handler )
+ delete element.events[type][handler.guid];
+ else
+ for ( var i in element.events[type] )
+ delete element.events[type][i];
+ else
+ for ( var j in element.events )
+ this.remove( element, j );
+ },
+
+ trigger: function(type,data,element) {
+ // Touch up the incoming data
+ data = data || [];
+
+ // Handle a global trigger
+ if ( !element ) {
+ var g = this.global[type];
+ if ( g )
+ for ( var i = 0; i < g.length; i++ )
+ this.trigger( type, data, g[i] );
+
+ // Handle triggering a single element
+ } else if ( element["on" + type] ) {
+ // Pass along a fake event
+ data.unshift( this.fix({ type: type, target: element }) );
+
+ // Trigger the event
+ element["on" + type].apply( element, data );
+ }
+ },
+
+ handle: function(event) {
+ if ( typeof jQuery == "undefined" ) return;
+
+ event = event || jQuery.event.fix( window.event );
+
+ // If no correct event was found, fail
+ if ( !event ) return;
+
+ var returnValue = true;
+
+ var c = this.events[event.type];
+
+ for ( var j in c ) {
+ if ( c[j].apply( this, [event] ) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ returnValue = false;
+ }
+ }
+
+ return returnValue;
+ },
+
+ fix: function(event) {
+ if ( event ) {
+ event.preventDefault = function() {
+ this.returnValue = false;
+ };
+
+ event.stopPropagation = function() {
+ this.cancelBubble = true;
+ };
+ }
+
+ return event;
+ }
+
+ }
+});
+
+new function() {
+ var b = navigator.userAgent.toLowerCase();
+
+ // Figure out what browser is being used
+ jQuery.browser = {
+ safari: /webkit/.test(b),
+ opera: /opera/.test(b),
+ msie: /msie/.test(b) && !/opera/.test(b),
+ mozilla: /mozilla/.test(b) && !/compatible/.test(b)
+ };
+
+ // Check to see if the W3C box model is being used
+ jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat";
+};
+
+jQuery.macros = {
+ to: {
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after"
+ },
+
+
+ css: "width,height,top,left,position,float,overflow,color,background".split(","),
+
+ filter: [ "eq", "lt", "gt", "contains" ],
+
+ attr: {
+
+ val: "value",
+
+ html: "innerHTML",
+
+ id: null,
+
+ title: null,
+
+ name: null,
+
+ href: null,
+
+ src: null,
+
+ rel: null
+ },
+
+ axis: {
+
+ parent: "a.parentNode",
+
+ ancestors: jQuery.parents,
+
+ parents: jQuery.parents,
+
+ next: "jQuery.sibling(a).next",
+
+ prev: "jQuery.sibling(a).prev",
+
+ siblings: jQuery.sibling,
+
+ children: "a.childNodes"
+ },
+
+ each: {
+
+ removeAttr: function( key ) {
+ this.removeAttribute( key );
+ },
+ show: function(){
+ this.style.display = this.oldblock ? this.oldblock : "";
+ if ( jQuery.css(this,"display") == "none" )
+ this.style.display = "block";
+ },
+ hide: function(){
+ this.oldblock = this.oldblock || jQuery.css(this,"display");
+ if ( this.oldblock == "none" )
+ this.oldblock = "block";
+ this.style.display = "none";
+ },
+ toggle: function(){
+ $(this)[ $(this).is(":hidden") ? "show" : "hide" ].apply( $(this), arguments );
+ },
+ addClass: function(c){
+ jQuery.className.add(this,c);
+ },
+ removeClass: function(c){
+ jQuery.className.remove(this,c);
+ },
+ toggleClass: function( c ){
+ jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this,c);
+ },
+
+ remove: function(a){
+ if ( !a || jQuery.filter( [this], a ).r )
+ this.parentNode.removeChild( this );
+ },
+ empty: function(){
+ while ( this.firstChild )
+ this.removeChild( this.firstChild );
+ },
+ bind: function( type, fn ) {
+ if ( fn.constructor == String )
+ fn = new Function("e", ( !fn.indexOf(".") ? "$(this)" : "return " ) + fn);
+ jQuery.event.add( this, type, fn );
+ },
+
+ unbind: function( type, fn ) {
+ jQuery.event.remove( this, type, fn );
+ },
+ trigger: function( type, data ) {
+ jQuery.event.trigger( type, data, this );
+ }
+ }
+};
+
+jQuery.init();jQuery.fn.extend({
+
+ // We're overriding the old toggle function, so
+ // remember it for later
+ _toggle: jQuery.fn.toggle,
+ toggle: function(a,b) {
+ // If two functions are passed in, we're
+ // toggling on a click
+ return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){
+ // Figure out which function to execute
+ this.last = this.last == a ? b : a;
+
+ // Make sure that clicks stop
+ e.preventDefault();
+
+ // and execute the function
+ return this.last.apply( this, [e] ) || false;
+ }) :
+
+ // Otherwise, execute the old toggle function
+ this._toggle.apply( this, arguments );
+ },
+
+ hover: function(f,g) {
+
+ // A private function for haandling mouse 'hovering'
+ function handleHover(e) {
+ // Check if mouse(over|out) are still within the same parent element
+ var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
+
+ // Traverse up the tree
+ while ( p && p != this ) p = p.parentNode;
+
+ // If we actually just moused on to a sub-element, ignore it
+ if ( p == this ) return false;
+
+ // Execute the right function
+ return (e.type == "mouseover" ? f : g).apply(this, [e]);
+ }
+
+ // Bind the function to the two event listeners
+ return this.mouseover(handleHover).mouseout(handleHover);
+ },
+ ready: function(f) {
+ // If the DOM is already ready
+ if ( jQuery.isReady )
+ // Execute the function immediately
+ f.apply( document );
+
+ // Otherwise, remember the function for later
+ else {
+ // Add the function to the wait list
+ jQuery.readyList.push( f );
+ }
+
+ return this;
+ }
+});
+
+jQuery.extend({
+ /*
+ * All the code that makes DOM Ready work nicely.
+ */
+ isReady: false,
+ readyList: [],
+
+ // Handle when the DOM is ready
+ ready: function() {
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.isReady ) {
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If there are functions bound, to execute
+ if ( jQuery.readyList ) {
+ // Execute all of them
+ for ( var i = 0; i < jQuery.readyList.length; i++ )
+ jQuery.readyList[i].apply( document );
+
+ // Reset the list of functions
+ jQuery.readyList = null;
+ }
+ }
+ }
+});
+
+new function(){
+
+ var e = ("blur,focus,load,resize,scroll,unload,click,dblclick," +
+ "mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," +
+ "submit,keydown,keypress,keyup,error").split(",");
+
+ // Go through all the event names, but make sure that
+ // it is enclosed properly
+ for ( var i = 0; i < e.length; i++ ) new function(){
+
+ var o = e[i];
+
+ // Handle event binding
+ jQuery.fn[o] = function(f){
+ return f ? this.bind(o, f) : this.trigger(o);
+ };
+
+ // Handle event unbinding
+ jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); };
+
+ // Finally, handle events that only fire once
+ jQuery.fn["one"+o] = function(f){
+ // Attach the event listener
+ return this.each(function(){
+
+ var count = 0;
+
+ // Add the event
+ jQuery.event.add( this, o, function(e){
+ // If this function has already been executed, stop
+ if ( count++ ) return;
+
+ // And execute the bound function
+ return f.apply(this, [e]);
+ });
+ });
+ };
+
+ };
+
+ // If Mozilla is used
+ if ( jQuery.browser.mozilla || jQuery.browser.opera ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
+
+ // If IE is used, use the excellent hack by Matthias Miller
+ // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
+ } else if ( jQuery.browser.msie ) {
+
+ // Only works if you document.write() it
+ document.write("<scr" + "ipt id=__ie_init defer=true " +
+ "src=//:><\/script>");
+
+ // Use the defer script hack
+ var script = document.getElementById("__ie_init");
+ script.onreadystatechange = function() {
+ if ( this.readyState == "complete" )
+ jQuery.ready();
+ };
+
+ // Clear from memory
+ script = null;
+
+ // If Safari is used
+ } else if ( jQuery.browser.safari ) {
+ // Continually check to see if the document.readyState is valid
+ jQuery.safariTimer = setInterval(function(){
+ // loaded and complete are both valid states
+ if ( document.readyState == "loaded" ||
+ document.readyState == "complete" ) {
+
+ // If either one are found, remove the timer
+ clearInterval( jQuery.safariTimer );
+ jQuery.safariTimer = null;
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ }, 10);
+ }
+
+ // A fallback to window.onload, that will always work
+ jQuery.event.add( window, "load", jQuery.ready );
+
+};
+jQuery.fn.extend({
+
+ // overwrite the old show method
+ _show: jQuery.fn.show,
+
+ show: function(speed,callback){
+ return speed ? this.animate({
+ height: "show", width: "show", opacity: "show"
+ }, speed, callback) : this._show();
+ },
+
+ // Overwrite the old hide method
+ _hide: jQuery.fn.hide,
+
+ hide: function(speed,callback){
+ return speed ? this.animate({
+ height: "hide", width: "hide", opacity: "hide"
+ }, speed, callback) : this._hide();
+ },
+
+ slideDown: function(speed,callback){
+ return this.animate({height: "show"}, speed, callback);
+ },
+
+ slideUp: function(speed,callback){
+ return this.animate({height: "hide"}, speed, callback);
+ },
+
+ slideToggle: function(speed,callback){
+ return this.each(function(){
+ var state = $(this).is(":hidden") ? "show" : "hide";
+ $(this).animate({height: state}, speed, callback);
+ });
+ },
+
+ fadeIn: function(speed,callback){
+ return this.animate({opacity: "show"}, speed, callback);
+ },
+
+ fadeOut: function(speed,callback){
+ return this.animate({opacity: "hide"}, speed, callback);
+ },
+
+ fadeTo: function(speed,to,callback){
+ return this.animate({opacity: to}, speed, callback);
+ },
+ animate: function(prop,speed,callback) {
+ return this.queue(function(){
+
+ this.curAnim = prop;
+
+ for ( var p in prop ) {
+ var e = new jQuery.fx( this, jQuery.speed(speed,callback), p );
+ if ( prop[p].constructor == Number )
+ e.custom( e.cur(), prop[p] );
+ else
+ e[ prop[p] ]( prop );
+ }
+
+ });
+ },
+ queue: function(type,fn){
+ if ( !fn ) {
+ fn = type;
+ type = "fx";
+ }
+
+ return this.each(function(){
+ if ( !this.queue )
+ this.queue = {};
+
+ if ( !this.queue[type] )
+ this.queue[type] = [];
+
+ this.queue[type].push( fn );
+
+ if ( this.queue[type].length == 1 )
+ fn.apply(this);
+ });
+ }
+
+});
+
+jQuery.extend({
+
+ setAuto: function(e,p) {
+ if ( e.notAuto ) return;
+
+ if ( p == "height" && e.scrollHeight != parseInt(jQuery.curCSS(e,p)) ) return;
+ if ( p == "width" && e.scrollWidth != parseInt(jQuery.curCSS(e,p)) ) return;
+
+ // Remember the original height
+ var a = e.style[p];
+
+ // Figure out the size of the height right now
+ var o = jQuery.curCSS(e,p,1);
+
+ if ( p == "height" && e.scrollHeight != o ||
+ p == "width" && e.scrollWidth != o ) return;
+
+ // Set the height to auto
+ e.style[p] = e.currentStyle ? "" : "auto";
+
+ // See what the size of "auto" is
+ var n = jQuery.curCSS(e,p,1);
+
+ // Revert back to the original size
+ if ( o != n && n != "auto" ) {
+ e.style[p] = a;
+ e.notAuto = true;
+ }
+ },
+
+ speed: function(s,o) {
+ o = o || {};
+
+ if ( o.constructor == Function )
+ o = { complete: o };
+
+ var ss = { slow: 600, fast: 200 };
+ o.duration = (s && s.constructor == Number ? s : ss[s]) || 400;
+
+ // Queueing
+ o.oldComplete = o.complete;
+ o.complete = function(){
+ jQuery.dequeue(this, "fx");
+ if ( o.oldComplete && o.oldComplete.constructor == Function )
+ o.oldComplete.apply( this );
+ };
+
+ return o;
+ },
+
+ queue: {},
+
+ dequeue: function(elem,type){
+ type = type || "fx";
+
+ if ( elem.queue && elem.queue[type] ) {
+ // Remove self
+ elem.queue[type].shift();
+
+ // Get next function
+ var f = elem.queue[type][0];
+
+ if ( f ) f.apply( elem );
+ }
+ },
+
+ /*
+ * I originally wrote fx() as a clone of moo.fx and in the process
+ * of making it small in size the code became illegible to sane
+ * people. You've been warned.
+ */
+
+ fx: function( elem, options, prop ){
+
+ var z = this;
+
+ // The users options
+ z.o = {
+ duration: options.duration || 400,
+ complete: options.complete,
+ step: options.step
+ };
+
+ // The element
+ z.el = elem;
+
+ // The styles
+ var y = z.el.style;
+
+ // Simple function for setting a style value
+ z.a = function(){
+ if ( options.step )
+ options.step.apply( elem, [ z.now ] );
+
+ if ( prop == "opacity" ) {
+ if (z.now == 1) z.now = 0.9999;
+ if (window.ActiveXObject)
+ y.filter = "alpha(opacity=" + z.now*100 + ")";
+ else
+ y.opacity = z.now;
+
+ // My hate for IE will never die
+ } else if ( parseInt(z.now) )
+ y[prop] = parseInt(z.now) + "px";
+
+ y.display = "block";
+ };
+
+ // Figure out the maximum number to run to
+ z.max = function(){
+ return parseFloat( jQuery.css(z.el,prop) );
+ };
+
+ // Get the current size
+ z.cur = function(){
+ var r = parseFloat( jQuery.curCSS(z.el, prop) );
+ return r && r > -10000 ? r : z.max();
+ };
+
+ // Start an animation from one number to another
+ z.custom = function(from,to){
+ z.startTime = (new Date()).getTime();
+ z.now = from;
+ z.a();
+
+ z.timer = setInterval(function(){
+ z.step(from, to);
+ }, 13);
+ };
+
+ // Simple 'show' function
+ z.show = function( p ){
+ if ( !z.el.orig ) z.el.orig = {};
+
+ // Remember where we started, so that we can go back to it later
+ z.el.orig[prop] = this.cur();
+
+ z.custom( 0, z.el.orig[prop] );
+
+ // Stupid IE, look what you made me do
+ if ( prop != "opacity" )
+ y[prop] = "1px";
+ };
+
+ // Simple 'hide' function
+ z.hide = function(){
+ if ( !z.el.orig ) z.el.orig = {};
+
+ // Remember where we started, so that we can go back to it later
+ z.el.orig[prop] = this.cur();
+
+ z.o.hide = true;
+
+ // Begin the animation
+ z.custom(z.el.orig[prop], 0);
+ };
+
+ // IE has trouble with opacity if it does not have layout
+ if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout )
+ y.zoom = "1";
+
+ // Remember the overflow of the element
+ if ( !z.el.oldOverlay )
+ z.el.oldOverflow = jQuery.css( z.el, "overflow" );
+
+ // Make sure that nothing sneaks out
+ y.overflow = "hidden";
+
+ // Each step of an animation
+ z.step = function(firstNum, lastNum){
+ var t = (new Date()).getTime();
+
+ if (t > z.o.duration + z.startTime) {
+ // Stop the timer
+ clearInterval(z.timer);
+ z.timer = null;
+
+ z.now = lastNum;
+ z.a();
+
+ z.el.curAnim[ prop ] = true;
+
+ var done = true;
+ for ( var i in z.el.curAnim )
+ if ( z.el.curAnim[i] !== true )
+ done = false;
+
+ if ( done ) {
+ // Reset the overflow
+ y.overflow = z.el.oldOverflow;
+
+ // Hide the element if the "hide" operation was done
+ if ( z.o.hide )
+ y.display = 'none';
+
+ // Reset the property, if the item has been hidden
+ if ( z.o.hide ) {
+ for ( var p in z.el.curAnim ) {
+ y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" );
+
+ // set its height and/or width to auto
+ if ( p == 'height' || p == 'width' )
+ jQuery.setAuto( z.el, p );
+ }
+ }
+ }
+
+ // If a callback was provided, execute it
+ if( done && z.o.complete && z.o.complete.constructor == Function )
+ // Execute the complete function
+ z.o.complete.apply( z.el );
+ } else {
+ // Figure out where in the animation we are and set the number
+ var p = (t - this.startTime) / z.o.duration;
+ z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum;
+
+ // Perform the next step of the animation
+ z.a();
+ }
+ };
+
+ }
+
+});
+// AJAX Plugin
+// Docs Here:
+// http://jquery.com/docs/ajax/
+jQuery.fn.loadIfModified = function( url, params, callback ) {
+ this.load( url, params, callback, 1 );
+};
+
+jQuery.fn.load = function( url, params, callback, ifModified ) {
+ if ( url.constructor == Function )
+ return this.bind("load", url);
+
+ callback = callback || function(){};
+
+ // Default to a GET request
+ var type = "GET";
+
+ // If the second parameter was provided
+ if ( params ) {
+ // If it's a function
+ if ( params.constructor == Function ) {
+ // We assume that it's the callback
+ callback = params;
+ params = null;
+
+ // Otherwise, build a param string
+ } else {
+ params = jQuery.param( params );
+ type = "POST";
+ }
+ }
+
+ var self = this;
+
+ // Request the remote document
+ jQuery.ajax( type, url, params,function(res, status){
+
+ if ( status == "success" || !ifModified && status == "notmodified" ) {
+ // Inject the HTML into all the matched elements
+ self.html(res.responseText).each( callback, [res.responseText, status] );
+
+ // Execute all the scripts inside of the newly-injected HTML
+ $("script", self).each(function(){
+ if ( this.src )
+ $.getScript( this.src );
+ else
+ eval.call( window, this.text || this.textContent || this.innerHTML || "" );
+ });
+ } else
+ callback.apply( self, [res.responseText, status] );
+
+ }, ifModified);
+
+ return this;
+};
+
+// If IE is used, create a wrapper for the XMLHttpRequest object
+if ( jQuery.browser.msie )
+ XMLHttpRequest = function(){
+ return new ActiveXObject(
+ navigator.userAgent.indexOf("MSIE 5") >= 0 ?
+ "Microsoft.XMLHTTP" : "Msxml2.XMLHTTP"
+ );
+ };
+
+// Attach a bunch of functions for handling common AJAX events
+new function(){
+ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(',');
+
+ for ( var i = 0; i < e.length; i++ ) new function(){
+ var o = e[i];
+ jQuery.fn[o] = function(f){
+ return this.bind(o, f);
+ };
+ };
+};
+
+jQuery.extend({
+ get: function( url, data, callback, type, ifModified ) {
+ if ( data.constructor == Function ) {
+ type = callback;
+ callback = data;
+ data = null;
+ }
+
+ if ( data ) url += "?" + jQuery.param(data);
+
+ // Build and start the HTTP Request
+ jQuery.ajax( "GET", url, null, function(r, status) {
+ if ( callback ) callback( jQuery.httpData(r,type), status );
+ }, ifModified);
+ },
+
+ getIfModified: function( url, data, callback, type ) {
+ jQuery.get(url, data, callback, type, 1);
+ },
+
+ getScript: function( url, data, callback ) {
+ jQuery.get(url, data, callback, "script");
+ },
+ post: function( url, data, callback, type ) {
+ // Build and start the HTTP Request
+ jQuery.ajax( "POST", url, jQuery.param(data), function(r, status) {
+ if ( callback ) callback( jQuery.httpData(r,type), status );
+ });
+ },
+
+ // timeout (ms)
+ timeout: 0,
+
+ ajaxTimeout: function(timeout) {
+ jQuery.timeout = timeout;
+ },
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ ajax: function( type, url, data, ret, ifModified ) {
+ // If only a single argument was passed in,
+ // assume that it is a object of key/value pairs
+ if ( !url ) {
+ ret = type.complete;
+ var success = type.success;
+ var error = type.error;
+ data = type.data;
+ url = type.url;
+ type = type.type;
+ }
+
+ // Watch for a new set of requests
+ if ( ! jQuery.active++ )
+ jQuery.event.trigger( "ajaxStart" );
+
+ var requestDone = false;
+
+ // Create the request object
+ var xml = new XMLHttpRequest();
+
+ // Open the socket
+ xml.open(type || "GET", url, true);
+
+ // Set the correct header, if data is being sent
+ if ( data )
+ xml.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+
+ // Set the If-Modified-Since header, if ifModified mode.
+ if ( ifModified )
+ xml.setRequestHeader("If-Modified-Since",
+ jQuery.lastModified[url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
+
+ // Set header so calling script knows that it's an XMLHttpRequest
+ xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+
+ // Make sure the browser sends the right content length
+ if ( xml.overrideMimeType )
+ xml.setRequestHeader("Connection", "close");
+
+ // Wait for a response to come back
+ var onreadystatechange = function(istimeout){
+ // The transfer is complete and the data is available, or the request timed out
+ if ( xml && (xml.readyState == 4 || istimeout == "timeout") ) {
+ requestDone = true;
+
+ var status = jQuery.httpSuccess( xml ) && istimeout != "timeout" ?
+ ifModified && jQuery.httpNotModified( xml, url ) ? "notmodified" : "success" : "error";
+
+ // Make sure that the request was successful or notmodified
+ if ( status != "error" ) {
+ // Cache Last-Modified header, if ifModified mode.
+ var modRes = xml.getResponseHeader("Last-Modified");
+ if ( ifModified && modRes ) jQuery.lastModified[url] = modRes;
+
+ // If a local callback was specified, fire it
+ if ( success ) success( xml, status );
+
+ // Fire the global callback
+ jQuery.event.trigger( "ajaxSuccess" );
+
+ // Otherwise, the request was not successful
+ } else {
+ // If a local callback was specified, fire it
+ if ( error ) error( xml, status );
+
+ // Fire the global callback
+ jQuery.event.trigger( "ajaxError" );
+ }
+
+ // The request was completed
+ jQuery.event.trigger( "ajaxComplete" );
+
+ // Handle the global AJAX counter
+ if ( ! --jQuery.active )
+ jQuery.event.trigger( "ajaxStop" );
+
+ // Process result
+ if ( ret ) ret(xml, status);
+
+ // Stop memory leaks
+ xml.onreadystatechange = function(){};
+ xml = null;
+
+ }
+ };
+ xml.onreadystatechange = onreadystatechange;
+
+ // Timeout checker
+ if(jQuery.timeout > 0)
+ setTimeout(function(){
+ // Check to see if the request is still happening
+ if (xml) {
+ // Cancel the request
+ xml.abort();
+
+ if ( !requestDone ) onreadystatechange( "timeout" );
+
+ // Clear from memory
+ xml = null;
+ }
+ }, jQuery.timeout);
+
+ // Send the data
+ xml.send(data);
+ },
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Determines if an XMLHttpRequest was successful or not
+ httpSuccess: function(r) {
+ try {
+ return !r.status && location.protocol == "file:" ||
+ ( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
+ jQuery.browser.safari && r.status == undefined;
+ } catch(e){}
+
+ return false;
+ },
+
+ // Determines if an XMLHttpRequest returns NotModified
+ httpNotModified: function(xml, url) {
+ try {
+ var xmlRes = xml.getResponseHeader("Last-Modified");
+
+ // Firefox always returns 200. check Last-Modified date
+ return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
+ jQuery.browser.safari && xml.status == undefined;
+ } catch(e){}
+
+ return false;
+ },
+
+ // Get the data out of an XMLHttpRequest.
+ // Return parsed XML if content-type header is "xml" and type is "xml" or omitted,
+ // otherwise return plain text.
+ httpData: function(r,type) {
+ var ct = r.getResponseHeader("content-type");
+ var data = !type && ct && ct.indexOf("xml") >= 0;
+ data = type == "xml" || data ? r.responseXML : r.responseText;
+
+ // If the type is "script", eval it
+ if ( type == "script" ) eval.call( window, data );
+
+ return data;
+ },
+
+ // Serialize an array of form elements or a set of
+ // key/values into a query string
+ param: function(a) {
+ var s = [];
+
+ // If an array was passed in, assume that it is an array
+ // of form elements
+ if ( a.constructor == Array ) {
+ // Serialize the form elements
+ for ( var i = 0; i < a.length; i++ )
+ s.push( a[i].name + "=" + encodeURIComponent( a[i].value ) );
+
+ // Otherwise, assume that it's an object of key/value pairs
+ } else {
+ // Serialize the key/values
+ for ( var j in a )
+ s.push( j + "=" + encodeURIComponent( a[j] ) );
+ }
+
+ // Return the resulting serialization
+ return s.join("&");
+ }
+
+});
diff --git a/devtools/client/inspector/markup/test/lib_jquery_1.1.js b/devtools/client/inspector/markup/test/lib_jquery_1.1.js
new file mode 100644
index 0000000000..981a3bdc1c
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_jquery_1.1.js
@@ -0,0 +1,2172 @@
+/* prevent execution of jQuery if included more than once */
+if(typeof window.jQuery == "undefined") {
+/*
+ * jQuery 1.1 - New Wave Javascript
+ *
+ * Copyright (c) 2007 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2007-01-14 17:37:33 -0500 (Sun, 14 Jan 2007) $
+ * $Rev: 1073 $
+ */
+
+// Global undefined variable
+window.undefined = window.undefined;
+var jQuery = function(a,c) {
+ // If the context is global, return a new object
+ if ( window == this )
+ return new jQuery(a,c);
+
+ // Make sure that a selection was provided
+ a = a || document;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ // Safari reports typeof on DOM NodeLists as a function
+ if ( jQuery.isFunction(a) && !a.nodeType && a[0] == undefined )
+ return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( a );
+
+ // Handle HTML strings
+ if ( typeof a == "string" ) {
+ var m = /^[^<]*(<.+>)[^>]*$/.exec(a);
+
+ a = m ?
+ // HANDLE: $(html) -> $(array)
+ jQuery.clean( [ m[1] ] ) :
+
+ // HANDLE: $(expr)
+ jQuery.find( a, c );
+ }
+
+ return this.setArray(
+ // HANDLE: $(array)
+ a.constructor == Array && a ||
+
+ // HANDLE: $(arraylike)
+ // Watch for when an array-like object is passed as the selector
+ (a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) ||
+
+ // HANDLE: $(*)
+ [ a ] );
+};
+
+// Map over the $ in case of overwrite
+if ( typeof $ != "undefined" )
+ jQuery._$ = $;
+
+// Map the jQuery namespace to the '$' one
+var $ = jQuery;
+
+jQuery.fn = jQuery.prototype = {
+ jquery: "1.1",
+
+ size: function() {
+ return this.length;
+ },
+
+ length: 0,
+
+ get: function( num ) {
+ return num == undefined ?
+
+ // Return a 'clean' array
+ jQuery.makeArray( this ) :
+
+ // Return just the object
+ this[num];
+ },
+ pushStack: function( a ) {
+ var ret = jQuery(this);
+ ret.prevObject = this;
+ return ret.setArray( a );
+ },
+ setArray: function( a ) {
+ this.length = 0;
+ [].push.apply( this, a );
+ return this;
+ },
+ each: function( fn, args ) {
+ return jQuery.each( this, fn, args );
+ },
+ index: function( obj ) {
+ var pos = -1;
+ this.each(function(i){
+ if ( this == obj ) pos = i;
+ });
+ return pos;
+ },
+
+ attr: function( key, value, type ) {
+ var obj = key;
+
+ // Look for the case where we're accessing a style value
+ if ( key.constructor == String )
+ if ( value == undefined )
+ return jQuery[ type || "attr" ]( this[0], key );
+ else {
+ obj = {};
+ obj[ key ] = value;
+ }
+
+ // Check to see if we're setting style values
+ return this.each(function(){
+ // Set all the styles
+ for ( var prop in obj )
+ jQuery.attr(
+ type ? this.style : this,
+ prop, jQuery.prop(this, obj[prop], type)
+ );
+ });
+ },
+
+ css: function( key, value ) {
+ return this.attr( key, value, "curCSS" );
+ },
+
+ text: function(e) {
+ if ( typeof e == "string" )
+ return this.empty().append( document.createTextNode( e ) );
+
+ var t = "";
+ jQuery.each( e || this, function(){
+ jQuery.each( this.childNodes, function(){
+ if ( this.nodeType != 8 )
+ t += this.nodeType != 1 ?
+ this.nodeValue : jQuery.fn.text([ this ]);
+ });
+ });
+ return t;
+ },
+
+ wrap: function() {
+ // The elements to wrap the target around
+ var a = jQuery.clean(arguments);
+
+ // Wrap each of the matched elements individually
+ return this.each(function(){
+ // Clone the structure that we're using to wrap
+ var b = a[0].cloneNode(true);
+
+ // Insert it before the element to be wrapped
+ this.parentNode.insertBefore( b, this );
+
+ // Find the deepest point in the wrap structure
+ while ( b.firstChild )
+ b = b.firstChild;
+
+ // Move the matched element to within the wrap structure
+ b.appendChild( this );
+ });
+ },
+ append: function() {
+ return this.domManip(arguments, true, 1, function(a){
+ this.appendChild( a );
+ });
+ },
+ prepend: function() {
+ return this.domManip(arguments, true, -1, function(a){
+ this.insertBefore( a, this.firstChild );
+ });
+ },
+ before: function() {
+ return this.domManip(arguments, false, 1, function(a){
+ this.parentNode.insertBefore( a, this );
+ });
+ },
+ after: function() {
+ return this.domManip(arguments, false, -1, function(a){
+ this.parentNode.insertBefore( a, this.nextSibling );
+ });
+ },
+ end: function() {
+ return this.prevObject || jQuery([]);
+ },
+ find: function(t) {
+ return this.pushStack( jQuery.map( this, function(a){
+ return jQuery.find(t,a);
+ }) );
+ },
+ clone: function(deep) {
+ return this.pushStack( jQuery.map( this, function(a){
+ return a.cloneNode( deep != undefined ? deep : true );
+ }) );
+ },
+
+ filter: function(t) {
+ return this.pushStack(
+ jQuery.isFunction( t ) &&
+ jQuery.grep(this, function(el, index){
+ return t.apply(el, [index])
+ }) ||
+
+ jQuery.multiFilter(t,this) );
+ },
+
+ not: function(t) {
+ return this.pushStack(
+ t.constructor == String &&
+ jQuery.multiFilter(t,this,true) ||
+
+ jQuery.grep(this,function(a){
+ if ( t.constructor == Array || t.jquery )
+ return jQuery.inArray( t, a ) < 0;
+ else
+ return a != t;
+ }) );
+ },
+
+ add: function(t) {
+ return this.pushStack( jQuery.merge(
+ this.get(),
+ typeof t == "string" ? jQuery(t).get() : t )
+ );
+ },
+ is: function(expr) {
+ return expr ? jQuery.filter(expr,this).r.length > 0 : false;
+ },
+
+ val: function( val ) {
+ return val == undefined ?
+ ( this.length ? this[0].value : null ) :
+ this.attr( "value", val );
+ },
+
+ html: function( val ) {
+ return val == undefined ?
+ ( this.length ? this[0].innerHTML : null ) :
+ this.empty().append( val );
+ },
+ domManip: function(args, table, dir, fn){
+ var clone = this.length > 1;
+ var a = jQuery.clean(args);
+ if ( dir < 0 )
+ a.reverse();
+
+ return this.each(function(){
+ var obj = this;
+
+ if ( table && this.nodeName.toUpperCase() == "TABLE" && a[0].nodeName.toUpperCase() == "TR" )
+ obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));
+
+ jQuery.each( a, function(){
+ fn.apply( obj, [ clone ? this.cloneNode(true) : this ] );
+ });
+
+ });
+ }
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ // copy reference to target object
+ var target = arguments[0],
+ a = 1;
+
+ // extend jQuery itself if only one argument is passed
+ if ( arguments.length == 1 ) {
+ target = this;
+ a = 0;
+ }
+ var prop;
+ while (prop = arguments[a++])
+ // Extend the base object
+ for ( var i in prop ) target[i] = prop[i];
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function() {
+ if ( jQuery._$ )
+ $ = jQuery._$;
+ },
+
+ isFunction: function( fn ) {
+ return fn && typeof fn == "function";
+ },
+ // args is for internal usage only
+ each: function( obj, fn, args ) {
+ if ( obj.length == undefined )
+ for ( var i in obj )
+ fn.apply( obj[i], args || [i, obj[i]] );
+ else
+ for ( var i = 0, ol = obj.length; i < ol; i++ )
+ if ( fn.apply( obj[i], args || [i, obj[i]] ) === false ) break;
+ return obj;
+ },
+
+ prop: function(elem, value, type){
+ // Handle executable functions
+ if ( jQuery.isFunction( value ) )
+ return value.call( elem );
+
+ // Handle passing in a number to a CSS property
+ if ( value.constructor == Number && type == "curCSS" )
+ return value + "px";
+
+ return value;
+ },
+
+ className: {
+ // internal only, use addClass("class")
+ add: function( elem, c ){
+ jQuery.each( c.split(/\s+/), function(i, cur){
+ if ( !jQuery.className.has( elem.className, cur ) )
+ elem.className += ( elem.className ? " " : "" ) + cur;
+ });
+ },
+
+ // internal only, use removeClass("class")
+ remove: function( elem, c ){
+ elem.className = c ?
+ jQuery.grep( elem.className.split(/\s+/), function(cur){
+ return !jQuery.className.has( c, cur );
+ }).join(" ") : "";
+ },
+
+ // internal only, use is(".class")
+ has: function( t, c ) {
+ t = t.className || t;
+ return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t );
+ }
+ },
+ swap: function(e,o,f) {
+ for ( var i in o ) {
+ e.style["old"+i] = e.style[i];
+ e.style[i] = o[i];
+ }
+ f.apply( e, [] );
+ for ( var i in o )
+ e.style[i] = e.style["old"+i];
+ },
+
+ css: function(e,p) {
+ if ( p == "height" || p == "width" ) {
+ var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];
+
+ jQuery.each( d, function(){
+ old["padding" + this] = 0;
+ old["border" + this + "Width"] = 0;
+ });
+
+ jQuery.swap( e, old, function() {
+ if (jQuery.css(e,"display") != "none") {
+ oHeight = e.offsetHeight;
+ oWidth = e.offsetWidth;
+ } else {
+ e = jQuery(e.cloneNode(true))
+ .find(":radio").removeAttr("checked").end()
+ .css({
+ visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
+ }).appendTo(e.parentNode)[0];
+
+ var parPos = jQuery.css(e.parentNode,"position");
+ if ( parPos == "" || parPos == "static" )
+ e.parentNode.style.position = "relative";
+
+ oHeight = e.clientHeight;
+ oWidth = e.clientWidth;
+
+ if ( parPos == "" || parPos == "static" )
+ e.parentNode.style.position = "static";
+
+ e.parentNode.removeChild(e);
+ }
+ });
+
+ return p == "height" ? oHeight : oWidth;
+ }
+
+ return jQuery.curCSS( e, p );
+ },
+
+ curCSS: function(elem, prop, force) {
+ var ret;
+
+ if (prop == "opacity" && jQuery.browser.msie)
+ return jQuery.attr(elem.style, "opacity");
+
+ if (prop == "float" || prop == "cssFloat")
+ prop = jQuery.browser.msie ? "styleFloat" : "cssFloat";
+
+ if (!force && elem.style[prop])
+ ret = elem.style[prop];
+
+ else if (document.defaultView && document.defaultView.getComputedStyle) {
+
+ if (prop == "cssFloat" || prop == "styleFloat")
+ prop = "float";
+
+ prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
+ var cur = document.defaultView.getComputedStyle(elem, null);
+
+ if ( cur )
+ ret = cur.getPropertyValue(prop);
+ else if ( prop == "display" )
+ ret = "none";
+ else
+ jQuery.swap(elem, { display: "block" }, function() {
+ var c = document.defaultView.getComputedStyle(this, "");
+ ret = c && c.getPropertyValue(prop) || "";
+ });
+
+ } else if (elem.currentStyle) {
+
+ var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
+ ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
+
+ }
+
+ return ret;
+ },
+
+ clean: function(a) {
+ var r = [];
+
+ jQuery.each( a, function(i,arg){
+ if ( !arg ) return;
+
+ if ( arg.constructor == Number )
+ arg = arg.toString();
+
+ // Convert html string into DOM nodes
+ if ( typeof arg == "string" ) {
+ // Trim whitespace, otherwise indexOf won't work as expected
+ var s = jQuery.trim(arg), div = document.createElement("div"), tb = [];
+
+ var wrap =
+ // option or optgroup
+ !s.indexOf("<opt") &&
+ [1, "<select>", "</select>"] ||
+
+ (!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot")) &&
+ [1, "<table>", "</table>"] ||
+
+ !s.indexOf("<tr") &&
+ [2, "<table><tbody>", "</tbody></table>"] ||
+
+ // <thead> matched above
+ (!s.indexOf("<td") || !s.indexOf("<th")) &&
+ [3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
+
+ [0,"",""];
+
+ // Go to html and back, then peel off extra wrappers
+ div.innerHTML = wrap[1] + s + wrap[2];
+
+ // Move to the right depth
+ while ( wrap[0]-- )
+ div = div.firstChild;
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( jQuery.browser.msie ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 )
+ tb = div.firstChild && div.firstChild.childNodes;
+
+ // String was a bare <thead> or <tfoot>
+ else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
+ tb = div.childNodes;
+
+ for ( var n = tb.length-1; n >= 0 ; --n )
+ if ( tb[n].nodeName.toUpperCase() == "TBODY" && !tb[n].childNodes.length )
+ tb[n].parentNode.removeChild(tb[n]);
+
+ }
+
+ arg = div.childNodes;
+ }
+
+ if ( arg.length === 0 )
+ return;
+
+ if ( arg[0] == undefined )
+ r.push( arg );
+ else
+ r = jQuery.merge( r, arg );
+
+ });
+
+ return r;
+ },
+
+ attr: function(elem, name, value){
+ var fix = {
+ "for": "htmlFor",
+ "class": "className",
+ "float": jQuery.browser.msie ? "styleFloat" : "cssFloat",
+ cssFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
+ innerHTML: "innerHTML",
+ className: "className",
+ value: "value",
+ disabled: "disabled",
+ checked: "checked",
+ readonly: "readOnly",
+ selected: "selected"
+ };
+
+ // IE actually uses filters for opacity ... elem is actually elem.style
+ if ( name == "opacity" && jQuery.browser.msie && value != undefined ) {
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ elem.zoom = 1;
+
+ // Set the alpha filter to set the opacity
+ return elem.filter = elem.filter.replace(/alpha\([^\)]*\)/gi,"") +
+ ( value == 1 ? "" : "alpha(opacity=" + value * 100 + ")" );
+
+ } else if ( name == "opacity" && jQuery.browser.msie )
+ return elem.filter ?
+ parseFloat( elem.filter.match(/alpha\(opacity=(.*)\)/)[1] ) / 100 : 1;
+
+ // Mozilla doesn't play well with opacity 1
+ if ( name == "opacity" && jQuery.browser.mozilla && value == 1 )
+ value = 0.9999;
+
+ // Certain attributes only work when accessed via the old DOM 0 way
+ if ( fix[name] ) {
+ if ( value != undefined ) elem[fix[name]] = value;
+ return elem[fix[name]];
+
+ } else if ( value == undefined && jQuery.browser.msie && elem.nodeName && elem.nodeName.toUpperCase() == "FORM" && (name == "action" || name == "method") )
+ return elem.getAttributeNode(name).nodeValue;
+
+ // IE elem.getAttribute passes even for style
+ else if ( elem.tagName ) {
+ if ( value != undefined ) elem.setAttribute( name, value );
+ return elem.getAttribute( name );
+
+ } else {
+ name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
+ if ( value != undefined ) elem[name] = value;
+ return elem[name];
+ }
+ },
+ trim: function(t){
+ return t.replace(/^\s+|\s+$/g, "");
+ },
+
+ makeArray: function( a ) {
+ var r = [];
+
+ if ( a.constructor != Array )
+ for ( var i = 0, al = a.length; i < al; i++ )
+ r.push( a[i] );
+ else
+ r = a.slice( 0 );
+
+ return r;
+ },
+
+ inArray: function( b, a ) {
+ for ( var i = 0, al = a.length; i < al; i++ )
+ if ( a[i] == b )
+ return i;
+ return -1;
+ },
+ merge: function(first, second) {
+ var r = [].slice.call( first, 0 );
+
+ // Now check for duplicates between the two arrays
+ // and only add the unique items
+ for ( var i = 0, sl = second.length; i < sl; i++ )
+ // Check for duplicates
+ if ( jQuery.inArray( second[i], r ) == -1 )
+ // The item is unique, add it
+ first.push( second[i] );
+
+ return first;
+ },
+ grep: function(elems, fn, inv) {
+ // If a string is passed in for the function, make a function
+ // for it (a handy shortcut)
+ if ( typeof fn == "string" )
+ fn = new Function("a","i","return " + fn);
+
+ var result = [];
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, el = elems.length; i < el; i++ )
+ if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
+ result.push( elems[i] );
+
+ return result;
+ },
+ map: function(elems, fn) {
+ // If a string is passed in for the function, make a function
+ // for it (a handy shortcut)
+ if ( typeof fn == "string" )
+ fn = new Function("a","return " + fn);
+
+ var result = [], r = [];
+
+ // Go through the array, translating each of the items to their
+ // new value (or values).
+ for ( var i = 0, el = elems.length; i < el; i++ ) {
+ var val = fn(elems[i],i);
+
+ if ( val !== null && val != undefined ) {
+ if ( val.constructor != Array ) val = [val];
+ result = result.concat( val );
+ }
+ }
+
+ var r = result.length ? [ result[0] ] : [];
+
+ check: for ( var i = 1, rl = result.length; i < rl; i++ ) {
+ for ( var j = 0; j < i; j++ )
+ if ( result[i] == r[j] )
+ continue check;
+
+ r.push( result[i] );
+ }
+
+ return r;
+ }
+});
+
+/*
+ * Whether the W3C compliant box model is being used.
+ *
+ * @property
+ * @name $.boxModel
+ * @type Boolean
+ * @cat JavaScript
+ */
+new function() {
+ var b = navigator.userAgent.toLowerCase();
+
+ // Figure out what browser is being used
+ jQuery.browser = {
+ safari: /webkit/.test(b),
+ opera: /opera/.test(b),
+ msie: /msie/.test(b) && !/opera/.test(b),
+ mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b)
+ };
+
+ // Check to see if the W3C box model is being used
+ jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat";
+};
+
+jQuery.each({
+ parent: "a.parentNode",
+ parents: "jQuery.parents(a)",
+ next: "jQuery.nth(a,2,'nextSibling')",
+ prev: "jQuery.nth(a,2,'previousSibling')",
+ siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
+ children: "jQuery.sibling(a.firstChild)"
+}, function(i,n){
+ jQuery.fn[ i ] = function(a) {
+ var ret = jQuery.map(this,n);
+ if ( a && typeof a == "string" )
+ ret = jQuery.multiFilter(a,ret);
+ return this.pushStack( ret );
+ };
+});
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after"
+}, function(i,n){
+ jQuery.fn[ i ] = function(){
+ var a = arguments;
+ return this.each(function(){
+ for ( var j = 0, al = a.length; j < al; j++ )
+ jQuery(a[j])[n]( this );
+ });
+ };
+});
+
+jQuery.each( {
+ removeAttr: function( key ) {
+ jQuery.attr( this, key, "" );
+ this.removeAttribute( key );
+ },
+ addClass: function(c){
+ jQuery.className.add(this,c);
+ },
+ removeClass: function(c){
+ jQuery.className.remove(this,c);
+ },
+ toggleClass: function( c ){
+ jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
+ },
+ remove: function(a){
+ if ( !a || jQuery.filter( a, [this] ).r.length )
+ this.parentNode.removeChild( this );
+ },
+ empty: function() {
+ while ( this.firstChild )
+ this.removeChild( this.firstChild );
+ }
+}, function(i,n){
+ jQuery.fn[ i ] = function() {
+ return this.each( n, arguments );
+ };
+});
+
+jQuery.each( [ "eq", "lt", "gt", "contains" ], function(i,n){
+ jQuery.fn[ n ] = function(num,fn) {
+ return this.filter( ":" + n + "(" + num + ")", fn );
+ };
+});
+
+jQuery.each( [ "height", "width" ], function(i,n){
+ jQuery.fn[ n ] = function(h) {
+ return h == undefined ?
+ ( this.length ? jQuery.css( this[0], n ) : null ) :
+ this.css( n, h.constructor == String ? h : h + "px" );
+ };
+});
+jQuery.extend({
+ expr: {
+ "": "m[2]=='*'||a.nodeName.toUpperCase()==m[2].toUpperCase()",
+ "#": "a.getAttribute('id')==m[2]",
+ ":": {
+ // Position Checks
+ lt: "i<m[3]-0",
+ gt: "i>m[3]-0",
+ nth: "m[3]-0==i",
+ eq: "m[3]-0==i",
+ first: "i==0",
+ last: "i==r.length-1",
+ even: "i%2==0",
+ odd: "i%2",
+
+ // Child Checks
+ "nth-child": "jQuery.nth(a.parentNode.firstChild,m[3],'nextSibling',a)==a",
+ "first-child": "jQuery.nth(a.parentNode.firstChild,1,'nextSibling')==a",
+ "last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
+ "only-child": "jQuery.sibling(a.parentNode.firstChild).length==1",
+
+ // Parent Checks
+ parent: "a.firstChild",
+ empty: "!a.firstChild",
+
+ // Text Check
+ contains: "jQuery.fn.text.apply([a]).indexOf(m[3])>=0",
+
+ // Visibility
+ visible: 'a.type!="hidden"&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
+ hidden: 'a.type=="hidden"||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
+
+ // Form attributes
+ enabled: "!a.disabled",
+ disabled: "a.disabled",
+ checked: "a.checked",
+ selected: "a.selected||jQuery.attr(a,'selected')",
+
+ // Form elements
+ text: "a.type=='text'",
+ radio: "a.type=='radio'",
+ checkbox: "a.type=='checkbox'",
+ file: "a.type=='file'",
+ password: "a.type=='password'",
+ submit: "a.type=='submit'",
+ image: "a.type=='image'",
+ reset: "a.type=='reset'",
+ button: 'a.type=="button"||a.nodeName=="BUTTON"',
+ input: "/input|select|textarea|button/i.test(a.nodeName)"
+ },
+ ".": "jQuery.className.has(a,m[2])",
+ "@": {
+ "=": "z==m[4]",
+ "!=": "z!=m[4]",
+ "^=": "z&&!z.indexOf(m[4])",
+ "$=": "z&&z.substr(z.length - m[4].length,m[4].length)==m[4]",
+ "*=": "z&&z.indexOf(m[4])>=0",
+ "": "z",
+ _resort: function(m){
+ return ["", m[1], m[3], m[2], m[5]];
+ },
+ _prefix: "z=a[m[3]]||jQuery.attr(a,m[3]);"
+ },
+ "[": "jQuery.find(m[2],a).length"
+ },
+
+ // The regular expressions that power the parsing engine
+ parse: [
+ // Match: [@value='test'], [@foo]
+ /^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i,
+
+ // Match: [div], [div p]
+ /^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,
+
+ // Match: :contains('foo')
+ /^(:)([a-z0-9_-]*)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/i,
+
+ // Match: :even, :last-chlid
+ /^([:.#]*)([a-z0-9_*-]*)/i
+ ],
+
+ token: [
+ /^(\/?\.\.)/, "a.parentNode",
+ /^(>|\/)/, "jQuery.sibling(a.firstChild)",
+ /^(\+)/, "jQuery.nth(a,2,'nextSibling')",
+ /^(~)/, function(a){
+ var s = jQuery.sibling(a.parentNode.firstChild);
+ return s.slice(0, jQuery.inArray(a,s));
+ }
+ ],
+
+ multiFilter: function( expr, elems, not ) {
+ var old, cur = [];
+
+ while ( expr && expr != old ) {
+ old = expr;
+ var f = jQuery.filter( expr, elems, not );
+ expr = f.t.replace(/^\s*,\s*/, "" );
+ cur = not ? elems = f.r : jQuery.merge( cur, f.r );
+ }
+
+ return cur;
+ },
+ find: function( t, context ) {
+ // Quickly handle non-string expressions
+ if ( typeof t != "string" )
+ return [ t ];
+
+ // Make sure that the context is a DOM Element
+ if ( context && !context.nodeType )
+ context = null;
+
+ // Set the correct context (if none is provided)
+ context = context || document;
+
+ // Handle the common XPath // expression
+ if ( !t.indexOf("//") ) {
+ context = context.documentElement;
+ t = t.substr(2,t.length);
+
+ // And the / root expression
+ } else if ( !t.indexOf("/") ) {
+ context = context.documentElement;
+ t = t.substr(1,t.length);
+ if ( t.indexOf("/") >= 1 )
+ t = t.substr(t.indexOf("/"),t.length);
+ }
+
+ // Initialize the search
+ var ret = [context], done = [], last = null;
+
+ // Continue while a selector expression exists, and while
+ // we're no longer looping upon ourselves
+ while ( t && last != t ) {
+ var r = [];
+ last = t;
+
+ t = jQuery.trim(t).replace( /^\/\//i, "" );
+
+ var foundToken = false;
+
+ // An attempt at speeding up child selectors that
+ // point to a specific element tag
+ var re = /^[\/>]\s*([a-z0-9*-]+)/i;
+ var m = re.exec(t);
+
+ if ( m ) {
+ // Perform our own iteration and filter
+ jQuery.each( ret, function(){
+ for ( var c = this.firstChild; c; c = c.nextSibling )
+ if ( c.nodeType == 1 && ( c.nodeName == m[1].toUpperCase() || m[1] == "*" ) )
+ r.push( c );
+ });
+
+ ret = r;
+ t = jQuery.trim( t.replace( re, "" ) );
+ foundToken = true;
+ } else {
+ // Look for pre-defined expression tokens
+ for ( var i = 0; i < jQuery.token.length; i += 2 ) {
+ // Attempt to match each, individual, token in
+ // the specified order
+ var re = jQuery.token[i];
+ var m = re.exec(t);
+
+ // If the token match was found
+ if ( m ) {
+ // Map it against the token's handler
+ r = ret = jQuery.map( ret, jQuery.isFunction( jQuery.token[i+1] ) ?
+ jQuery.token[i+1] :
+ function(a){ return eval(jQuery.token[i+1]); });
+
+ // And remove the token
+ t = jQuery.trim( t.replace( re, "" ) );
+ foundToken = true;
+ break;
+ }
+ }
+ }
+
+ // See if there's still an expression, and that we haven't already
+ // matched a token
+ if ( t && !foundToken ) {
+ // Handle multiple expressions
+ if ( !t.indexOf(",") ) {
+ // Clean the result set
+ if ( ret[0] == context ) ret.shift();
+
+ // Merge the result sets
+ jQuery.merge( done, ret );
+
+ // Reset the context
+ r = ret = [context];
+
+ // Touch up the selector string
+ t = " " + t.substr(1,t.length);
+
+ } else {
+ // Optomize for the case nodeName#idName
+ var re2 = /^([a-z0-9_-]+)(#)([a-z0-9\\*_-]*)/i;
+ var m = re2.exec(t);
+
+ // Re-organize the results, so that they're consistent
+ if ( m ) {
+ m = [ 0, m[2], m[3], m[1] ];
+
+ } else {
+ // Otherwise, do a traditional filter check for
+ // ID, class, and element selectors
+ re2 = /^([#.]?)([a-z0-9\\*_-]*)/i;
+ m = re2.exec(t);
+ }
+
+ // Try to do a global search by ID, where we can
+ if ( m[1] == "#" && ret[ret.length-1].getElementById ) {
+ // Optimization for HTML document case
+ var oid = ret[ret.length-1].getElementById(m[2]);
+
+ // Do a quick check for node name (where applicable) so
+ // that div#foo searches will be really fast
+ ret = r = oid &&
+ (!m[3] || oid.nodeName == m[3].toUpperCase()) ? [oid] : [];
+
+ } else {
+ // Pre-compile a regular expression to handle class searches
+ if ( m[1] == "." )
+ var rec = new RegExp("(^|\\s)" + m[2] + "(\\s|$)");
+
+ // We need to find all descendant elements, it is more
+ // efficient to use getAll() when we are already further down
+ // the tree - we try to recognize that here
+ jQuery.each( ret, function(){
+ // Grab the tag name being searched for
+ var tag = m[1] != "" || m[0] == "" ? "*" : m[2];
+
+ // Handle IE7 being really dumb about <object>s
+ if ( this.nodeName.toUpperCase() == "OBJECT" && tag == "*" )
+ tag = "param";
+
+ jQuery.merge( r,
+ m[1] != "" && ret.length != 1 ?
+ jQuery.getAll( this, [], m[1], m[2], rec ) :
+ this.getElementsByTagName( tag )
+ );
+ });
+
+ // It's faster to filter by class and be done with it
+ if ( m[1] == "." && ret.length == 1 )
+ r = jQuery.grep( r, function(e) {
+ return rec.test(e.className);
+ });
+
+ // Same with ID filtering
+ if ( m[1] == "#" && ret.length == 1 ) {
+ // Remember, then wipe out, the result set
+ var tmp = r;
+ r = [];
+
+ // Then try to find the element with the ID
+ jQuery.each( tmp, function(){
+ if ( this.getAttribute("id") == m[2] ) {
+ r = [ this ];
+ return false;
+ }
+ });
+ }
+
+ ret = r;
+ }
+
+ t = t.replace( re2, "" );
+ }
+
+ }
+
+ // If a selector string still exists
+ if ( t ) {
+ // Attempt to filter it
+ var val = jQuery.filter(t,r);
+ ret = r = val.r;
+ t = jQuery.trim(val.t);
+ }
+ }
+
+ // Remove the root context
+ if ( ret && ret[0] == context ) ret.shift();
+
+ // And combine the results
+ jQuery.merge( done, ret );
+
+ return done;
+ },
+
+ filter: function(t,r,not) {
+ // Look for common filter expressions
+ while ( t && /^[a-z[({<*:.#]/i.test(t) ) {
+
+ var p = jQuery.parse, m;
+
+ jQuery.each( p, function(i,re){
+
+ // Look for, and replace, string-like sequences
+ // and finally build a regexp out of it
+ m = re.exec( t );
+
+ if ( m ) {
+ // Remove what we just matched
+ t = t.substring( m[0].length );
+
+ // Re-organize the first match
+ if ( jQuery.expr[ m[1] ]._resort )
+ m = jQuery.expr[ m[1] ]._resort( m );
+
+ return false;
+ }
+ });
+
+ // :not() is a special case that can be optimized by
+ // keeping it out of the expression list
+ if ( m[1] == ":" && m[2] == "not" )
+ r = jQuery.filter(m[3], r, true).r;
+
+ // Handle classes as a special case (this will help to
+ // improve the speed, as the regexp will only be compiled once)
+ else if ( m[1] == "." ) {
+
+ var re = new RegExp("(^|\\s)" + m[2] + "(\\s|$)");
+ r = jQuery.grep( r, function(e){
+ return re.test(e.className || "");
+ }, not);
+
+ // Otherwise, find the expression to execute
+ } else {
+ var f = jQuery.expr[m[1]];
+ if ( typeof f != "string" )
+ f = jQuery.expr[m[1]][m[2]];
+
+ // Build a custom macro to enclose it
+ eval("f = function(a,i){" +
+ ( jQuery.expr[ m[1] ]._prefix || "" ) +
+ "return " + f + "}");
+
+ // Execute it against the current filter
+ r = jQuery.grep( r, f, not );
+ }
+ }
+
+ // Return an array of filtered elements (r)
+ // and the modified expression string (t)
+ return { r: r, t: t };
+ },
+
+ getAll: function( o, r, token, name, re ) {
+ for ( var s = o.firstChild; s; s = s.nextSibling )
+ if ( s.nodeType == 1 ) {
+ var add = true;
+
+ if ( token == "." )
+ add = s.className && re.test(s.className);
+ else if ( token == "#" )
+ add = s.getAttribute("id") == name;
+
+ if ( add )
+ r.push( s );
+
+ if ( token == "#" && r.length ) break;
+
+ if ( s.firstChild )
+ jQuery.getAll( s, r, token, name, re );
+ }
+
+ return r;
+ },
+ parents: function( elem ){
+ var matched = [];
+ var cur = elem.parentNode;
+ while ( cur && cur != document ) {
+ matched.push( cur );
+ cur = cur.parentNode;
+ }
+ return matched;
+ },
+ nth: function(cur,result,dir,elem){
+ result = result || 1;
+ var num = 0;
+ for ( ; cur; cur = cur[dir] ) {
+ if ( cur.nodeType == 1 ) num++;
+ if ( num == result || result == "even" && num % 2 == 0 && num > 1 && cur == elem ||
+ result == "odd" && num % 2 == 1 && cur == elem ) return cur;
+ }
+ },
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType == 1 && (!elem || n != elem) )
+ r.push( n );
+ }
+
+ return r;
+ }
+});
+/*
+ * A number of helper functions used for managing events.
+ * Many of the ideas behind this code orignated from
+ * Dean Edwards' addEvent library.
+ */
+jQuery.event = {
+
+ // Bind an event to an element
+ // Original by Dean Edwards
+ add: function(element, type, handler, data) {
+ // For whatever reason, IE has trouble passing the window object
+ // around, causing it to be cloned in the process
+ if ( jQuery.browser.msie && element.setInterval != undefined )
+ element = window;
+
+ // if data is passed, bind to handler
+ if( data )
+ handler.data = data;
+
+ // Make sure that the function being executed has a unique ID
+ if ( !handler.guid )
+ handler.guid = this.guid++;
+
+ // Init the element's event structure
+ if (!element.events)
+ element.events = {};
+
+ // Get the current list of functions bound to this event
+ var handlers = element.events[type];
+
+ // If it hasn't been initialized yet
+ if (!handlers) {
+ // Init the event handler queue
+ handlers = element.events[type] = {};
+
+ // Remember an existing handler, if it's already there
+ if (element["on" + type])
+ handlers[0] = element["on" + type];
+ }
+
+ // Add the function to the element's handler list
+ handlers[handler.guid] = handler;
+
+ // And bind the global event handler to the element
+ element["on" + type] = this.handle;
+
+ // Remember the function in a global list (for triggering)
+ if (!this.global[type])
+ this.global[type] = [];
+ this.global[type].push( element );
+ },
+
+ guid: 1,
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function(element, type, handler) {
+ if (element.events)
+ if ( type && type.type )
+ delete element.events[ type.type ][ type.handler.guid ];
+ else if (type && element.events[type])
+ if ( handler )
+ delete element.events[type][handler.guid];
+ else
+ for ( var i in element.events[type] )
+ delete element.events[type][i];
+ else
+ for ( var j in element.events )
+ this.remove( element, j );
+ },
+
+ trigger: function(type,data,element) {
+ // Clone the incoming data, if any
+ data = jQuery.makeArray(data || []);
+
+ // Handle a global trigger
+ if ( !element ) {
+ var g = this.global[type];
+ if ( g )
+ jQuery.each( g, function(){
+ jQuery.event.trigger( type, data, this );
+ });
+
+ // Handle triggering a single element
+ } else if ( element["on" + type] ) {
+ // Pass along a fake event
+ data.unshift( this.fix({ type: type, target: element }) );
+
+ // Trigger the event
+ var val = element["on" + type].apply( element, data );
+
+ if ( val !== false && jQuery.isFunction( element[ type ] ) )
+ element[ type ]();
+ }
+ },
+
+ handle: function(event) {
+ if ( typeof jQuery == "undefined" ) return false;
+
+ // Empty object is for triggered events with no data
+ event = jQuery.event.fix( event || window.event || {} );
+
+ // returned undefined or false
+ var returnValue;
+
+ var c = this.events[event.type];
+
+ var args = [].slice.call( arguments, 1 );
+ args.unshift( event );
+
+ for ( var j in c ) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ args[0].handler = c[j];
+ args[0].data = c[j].data;
+
+ if ( c[j].apply( this, args ) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ returnValue = false;
+ }
+ }
+
+ // Clean up added properties in IE to prevent memory leak
+ if (jQuery.browser.msie) event.target = event.preventDefault = event.stopPropagation = event.handler = event.data = null;
+
+ return returnValue;
+ },
+
+ fix: function(event) {
+ // Fix target property, if necessary
+ if ( !event.target && event.srcElement )
+ event.target = event.srcElement;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == undefined && event.clientX != undefined ) {
+ var e = document.documentElement, b = document.body;
+ event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft);
+ event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
+ }
+
+ // check if target is a textnode (safari)
+ if (jQuery.browser.safari && event.target.nodeType == 3) {
+ // store a copy of the original event object
+ // and clone because target is read only
+ var originalEvent = event;
+ event = jQuery.extend({}, originalEvent);
+
+ // get parentnode from textnode
+ event.target = originalEvent.target.parentNode;
+
+ // add preventDefault and stopPropagation since
+ // they will not work on the clone
+ event.preventDefault = function() {
+ return originalEvent.preventDefault();
+ };
+ event.stopPropagation = function() {
+ return originalEvent.stopPropagation();
+ };
+ }
+
+ // fix preventDefault and stopPropagation
+ if (!event.preventDefault)
+ event.preventDefault = function() {
+ this.returnValue = false;
+ };
+
+ if (!event.stopPropagation)
+ event.stopPropagation = function() {
+ this.cancelBubble = true;
+ };
+
+ return event;
+ }
+};
+
+jQuery.fn.extend({
+ bind: function( type, data, fn ) {
+ return this.each(function(){
+ jQuery.event.add( this, type, fn || data, data );
+ });
+ },
+ one: function( type, data, fn ) {
+ return this.each(function(){
+ jQuery.event.add( this, type, function(event) {
+ jQuery(this).unbind(event);
+ return (fn || data).apply( this, arguments);
+ }, data);
+ });
+ },
+ unbind: function( type, fn ) {
+ return this.each(function(){
+ jQuery.event.remove( this, type, fn );
+ });
+ },
+ trigger: function( type, data ) {
+ return this.each(function(){
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ toggle: function() {
+ // Save reference to arguments for access in closure
+ var a = arguments;
+
+ return this.click(function(e) {
+ // Figure out which function to execute
+ this.lastToggle = this.lastToggle == 0 ? 1 : 0;
+
+ // Make sure that clicks stop
+ e.preventDefault();
+
+ // and execute the function
+ return a[this.lastToggle].apply( this, [e] ) || false;
+ });
+ },
+ hover: function(f,g) {
+
+ // A private function for handling mouse 'hovering'
+ function handleHover(e) {
+ // Check if mouse(over|out) are still within the same parent element
+ var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
+
+ // Traverse up the tree
+ while ( p && p != this ) try { p = p.parentNode } catch(e) { p = this; };
+
+ // If we actually just moused on to a sub-element, ignore it
+ if ( p == this ) return false;
+
+ // Execute the right function
+ return (e.type == "mouseover" ? f : g).apply(this, [e]);
+ }
+
+ // Bind the function to the two event listeners
+ return this.mouseover(handleHover).mouseout(handleHover);
+ },
+ ready: function(f) {
+ // If the DOM is already ready
+ if ( jQuery.isReady )
+ // Execute the function immediately
+ f.apply( document, [jQuery] );
+
+ // Otherwise, remember the function for later
+ else {
+ // Add the function to the wait list
+ jQuery.readyList.push( function() { return f.apply(this, [jQuery]) } );
+ }
+
+ return this;
+ }
+});
+
+jQuery.extend({
+ /*
+ * All the code that makes DOM Ready work nicely.
+ */
+ isReady: false,
+ readyList: [],
+
+ // Handle when the DOM is ready
+ ready: function() {
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.isReady ) {
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If there are functions bound, to execute
+ if ( jQuery.readyList ) {
+ // Execute all of them
+ jQuery.each( jQuery.readyList, function(){
+ this.apply( document );
+ });
+
+ // Reset the list of functions
+ jQuery.readyList = null;
+ }
+ // Remove event lisenter to avoid memory leak
+ if ( jQuery.browser.mozilla || jQuery.browser.opera )
+ document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
+ }
+ }
+});
+
+new function(){
+
+ jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
+ "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
+ "submit,keydown,keypress,keyup,error").split(","), function(i,o){
+
+ // Handle event binding
+ jQuery.fn[o] = function(f){
+ return f ? this.bind(o, f) : this.trigger(o);
+ };
+
+ });
+
+ // If Mozilla is used
+ if ( jQuery.browser.mozilla || jQuery.browser.opera )
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
+
+ // If IE is used, use the excellent hack by Matthias Miller
+ // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
+ else if ( jQuery.browser.msie ) {
+
+ // Only works if you document.write() it
+ document.write("<scr" + "ipt id=__ie_init defer=true " +
+ "src=//:><\/script>");
+
+ // Use the defer script hack
+ var script = document.getElementById("__ie_init");
+
+ // script does not exist if jQuery is loaded dynamically
+ if ( script )
+ script.onreadystatechange = function() {
+ if ( this.readyState != "complete" ) return;
+ this.parentNode.removeChild( this );
+ jQuery.ready();
+ };
+
+ // Clear from memory
+ script = null;
+
+ // If Safari is used
+ } else if ( jQuery.browser.safari )
+ // Continually check to see if the document.readyState is valid
+ jQuery.safariTimer = setInterval(function(){
+ // loaded and complete are both valid states
+ if ( document.readyState == "loaded" ||
+ document.readyState == "complete" ) {
+
+ // If either one are found, remove the timer
+ clearInterval( jQuery.safariTimer );
+ jQuery.safariTimer = null;
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ }, 10);
+
+ // A fallback to window.onload, that will always work
+ jQuery.event.add( window, "load", jQuery.ready );
+
+};
+
+// Clean up after IE to avoid memory leaks
+if (jQuery.browser.msie)
+ jQuery(window).one("unload", function() {
+ var global = jQuery.event.global;
+ for ( var type in global ) {
+ var els = global[type], i = els.length;
+ if ( i && type != 'unload' )
+ do
+ jQuery.event.remove(els[i-1], type);
+ while (--i);
+ }
+ });
+jQuery.fn.extend({
+
+ show: function(speed,callback){
+ var hidden = this.filter(":hidden");
+ return speed ?
+ hidden.animate({
+ height: "show", width: "show", opacity: "show"
+ }, speed, callback) :
+
+ hidden.each(function(){
+ this.style.display = this.oldblock ? this.oldblock : "";
+ if ( jQuery.css(this,"display") == "none" )
+ this.style.display = "block";
+ });
+ },
+
+ hide: function(speed,callback){
+ var visible = this.filter(":visible");
+ return speed ?
+ visible.animate({
+ height: "hide", width: "hide", opacity: "hide"
+ }, speed, callback) :
+
+ visible.each(function(){
+ this.oldblock = this.oldblock || jQuery.css(this,"display");
+ if ( this.oldblock == "none" )
+ this.oldblock = "block";
+ this.style.display = "none";
+ });
+ },
+
+ // Save the old toggle function
+ _toggle: jQuery.fn.toggle,
+ toggle: function( fn, fn2 ){
+ var args = arguments;
+ return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
+ this._toggle( fn, fn2 ) :
+ this.each(function(){
+ jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]
+ .apply( jQuery(this), args );
+ });
+ },
+ slideDown: function(speed,callback){
+ return this.animate({height: "show"}, speed, callback);
+ },
+ slideUp: function(speed,callback){
+ return this.animate({height: "hide"}, speed, callback);
+ },
+ slideToggle: function(speed, callback){
+ return this.each(function(){
+ var state = jQuery(this).is(":hidden") ? "show" : "hide";
+ jQuery(this).animate({height: state}, speed, callback);
+ });
+ },
+ fadeIn: function(speed, callback){
+ return this.animate({opacity: "show"}, speed, callback);
+ },
+ fadeOut: function(speed, callback){
+ return this.animate({opacity: "hide"}, speed, callback);
+ },
+ fadeTo: function(speed,to,callback){
+ return this.animate({opacity: to}, speed, callback);
+ },
+ animate: function( prop, speed, easing, callback ) {
+ return this.queue(function(){
+
+ this.curAnim = jQuery.extend({}, prop);
+ var opt = jQuery.speed(speed, easing, callback);
+
+ for ( var p in prop ) {
+ var e = new jQuery.fx( this, opt, p );
+ if ( prop[p].constructor == Number )
+ e.custom( e.cur(), prop[p] );
+ else
+ e[ prop[p] ]( prop );
+ }
+
+ });
+ },
+ queue: function(type,fn){
+ if ( !fn ) {
+ fn = type;
+ type = "fx";
+ }
+
+ return this.each(function(){
+ if ( !this.queue )
+ this.queue = {};
+
+ if ( !this.queue[type] )
+ this.queue[type] = [];
+
+ this.queue[type].push( fn );
+
+ if ( this.queue[type].length == 1 )
+ fn.apply(this);
+ });
+ }
+
+});
+
+jQuery.extend({
+
+ speed: function(speed, easing, fn) {
+ var opt = speed && speed.constructor == Object ? speed : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && easing.constructor != Function && easing
+ };
+
+ opt.duration = (opt.duration && opt.duration.constructor == Number ?
+ opt.duration :
+ { slow: 600, fast: 200 }[opt.duration]) || 400;
+
+ // Queueing
+ opt.old = opt.complete;
+ opt.complete = function(){
+ jQuery.dequeue(this, "fx");
+ if ( jQuery.isFunction( opt.old ) )
+ opt.old.apply( this );
+ };
+
+ return opt;
+ },
+
+ easing: {},
+
+ queue: {},
+
+ dequeue: function(elem,type){
+ type = type || "fx";
+
+ if ( elem.queue && elem.queue[type] ) {
+ // Remove self
+ elem.queue[type].shift();
+
+ // Get next function
+ var f = elem.queue[type][0];
+
+ if ( f ) f.apply( elem );
+ }
+ },
+
+ /*
+ * I originally wrote fx() as a clone of moo.fx and in the process
+ * of making it small in size the code became illegible to sane
+ * people. You've been warned.
+ */
+
+ fx: function( elem, options, prop ){
+
+ var z = this;
+
+ // The styles
+ var y = elem.style;
+
+ // Store display property
+ var oldDisplay = jQuery.css(elem, "display");
+
+ // Set display property to block for animation
+ y.display = "block";
+
+ // Make sure that nothing sneaks out
+ y.overflow = "hidden";
+
+ // Simple function for setting a style value
+ z.a = function(){
+ if ( options.step )
+ options.step.apply( elem, [ z.now ] );
+
+ if ( prop == "opacity" )
+ jQuery.attr(y, "opacity", z.now); // Let attr handle opacity
+ else if ( parseInt(z.now) ) // My hate for IE will never die
+ y[prop] = parseInt(z.now) + "px";
+ };
+
+ // Figure out the maximum number to run to
+ z.max = function(){
+ return parseFloat( jQuery.css(elem,prop) );
+ };
+
+ // Get the current size
+ z.cur = function(){
+ var r = parseFloat( jQuery.curCSS(elem, prop) );
+ return r && r > -10000 ? r : z.max();
+ };
+
+ // Start an animation from one number to another
+ z.custom = function(from,to){
+ z.startTime = (new Date()).getTime();
+ z.now = from;
+ z.a();
+
+ z.timer = setInterval(function(){
+ z.step(from, to);
+ }, 13);
+ };
+
+ // Simple 'show' function
+ z.show = function(){
+ if ( !elem.orig ) elem.orig = {};
+
+ // Remember where we started, so that we can go back to it later
+ elem.orig[prop] = this.cur();
+
+ options.show = true;
+
+ // Begin the animation
+ z.custom(0, elem.orig[prop]);
+
+ // Stupid IE, look what you made me do
+ if ( prop != "opacity" )
+ y[prop] = "1px";
+ };
+
+ // Simple 'hide' function
+ z.hide = function(){
+ if ( !elem.orig ) elem.orig = {};
+
+ // Remember where we started, so that we can go back to it later
+ elem.orig[prop] = this.cur();
+
+ options.hide = true;
+
+ // Begin the animation
+ z.custom(elem.orig[prop], 0);
+ };
+
+ //Simple 'toggle' function
+ z.toggle = function() {
+ if ( !elem.orig ) elem.orig = {};
+
+ // Remember where we started, so that we can go back to it later
+ elem.orig[prop] = this.cur();
+
+ if(oldDisplay == "none") {
+ options.show = true;
+
+ // Stupid IE, look what you made me do
+ if ( prop != "opacity" )
+ y[prop] = "1px";
+
+ // Begin the animation
+ z.custom(0, elem.orig[prop]);
+ } else {
+ options.hide = true;
+
+ // Begin the animation
+ z.custom(elem.orig[prop], 0);
+ }
+ };
+
+ // Each step of an animation
+ z.step = function(firstNum, lastNum){
+ var t = (new Date()).getTime();
+
+ if (t > options.duration + z.startTime) {
+ // Stop the timer
+ clearInterval(z.timer);
+ z.timer = null;
+
+ z.now = lastNum;
+ z.a();
+
+ if (elem.curAnim) elem.curAnim[ prop ] = true;
+
+ var done = true;
+ for ( var i in elem.curAnim )
+ if ( elem.curAnim[i] !== true )
+ done = false;
+
+ if ( done ) {
+ // Reset the overflow
+ y.overflow = "";
+
+ // Reset the display
+ y.display = oldDisplay;
+ if (jQuery.css(elem, "display") == "none")
+ y.display = "block";
+
+ // Hide the element if the "hide" operation was done
+ if ( options.hide )
+ y.display = "none";
+
+ // Reset the properties, if the item has been hidden or shown
+ if ( options.hide || options.show )
+ for ( var p in elem.curAnim )
+ if (p == "opacity")
+ jQuery.attr(y, p, elem.orig[p]);
+ else
+ y[p] = "";
+ }
+
+ // If a callback was provided, execute it
+ if ( done && jQuery.isFunction( options.complete ) )
+ // Execute the complete function
+ options.complete.apply( elem );
+ } else {
+ var n = t - this.startTime;
+ // Figure out where in the animation we are and set the number
+ var p = n / options.duration;
+
+ // If the easing function exists, then use it
+ z.now = options.easing && jQuery.easing[options.easing] ?
+ jQuery.easing[options.easing](p, n, firstNum, (lastNum-firstNum), options.duration) :
+ // else use default linear easing
+ ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum;
+
+ // Perform the next step of the animation
+ z.a();
+ }
+ };
+
+ }
+});
+jQuery.fn.extend({
+ loadIfModified: function( url, params, callback ) {
+ this.load( url, params, callback, 1 );
+ },
+ load: function( url, params, callback, ifModified ) {
+ if ( jQuery.isFunction( url ) )
+ return this.bind("load", url);
+
+ callback = callback || function(){};
+
+ // Default to a GET request
+ var type = "GET";
+
+ // If the second parameter was provided
+ if ( params )
+ // If it's a function
+ if ( jQuery.isFunction( params.constructor ) ) {
+ // We assume that it's the callback
+ callback = params;
+ params = null;
+
+ // Otherwise, build a param string
+ } else {
+ params = jQuery.param( params );
+ type = "POST";
+ }
+
+ var self = this;
+
+ // Request the remote document
+ jQuery.ajax({
+ url: url,
+ type: type,
+ data: params,
+ ifModified: ifModified,
+ complete: function(res, status){
+ if ( status == "success" || !ifModified && status == "notmodified" )
+ // Inject the HTML into all the matched elements
+ self.attr("innerHTML", res.responseText)
+ // Execute all the scripts inside of the newly-injected HTML
+ .evalScripts()
+ // Execute callback
+ .each( callback, [res.responseText, status, res] );
+ else
+ callback.apply( self, [res.responseText, status, res] );
+ }
+ });
+ return this;
+ },
+ serialize: function() {
+ return jQuery.param( this );
+ },
+ evalScripts: function() {
+ return this.find("script").each(function(){
+ if ( this.src )
+ jQuery.getScript( this.src );
+ else
+ jQuery.globalEval( this.text || this.textContent || this.innerHTML || "" );
+ }).end();
+ }
+
+});
+
+// If IE is used, create a wrapper for the XMLHttpRequest object
+if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" )
+ XMLHttpRequest = function(){
+ return new ActiveXObject("Microsoft.XMLHTTP");
+ };
+
+// Attach a bunch of functions for handling common AJAX events
+
+jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
+ jQuery.fn[o] = function(f){
+ return this.bind(o, f);
+ };
+});
+
+jQuery.extend({
+ get: function( url, data, callback, type, ifModified ) {
+ // shift arguments if data argument was ommited
+ if ( jQuery.isFunction( data ) ) {
+ callback = data;
+ data = null;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ data: data,
+ success: callback,
+ dataType: type,
+ ifModified: ifModified
+ });
+ },
+ getIfModified: function( url, data, callback, type ) {
+ return jQuery.get(url, data, callback, type, 1);
+ },
+ getScript: function( url, callback ) {
+ return jQuery.get(url, null, callback, "script");
+ },
+ getJSON: function( url, data, callback ) {
+ return jQuery.get(url, data, callback, "json");
+ },
+ post: function( url, data, callback, type ) {
+ return jQuery.ajax({
+ type: "POST",
+ url: url,
+ data: data,
+ success: callback,
+ dataType: type
+ });
+ },
+
+ // timeout (ms)
+ //timeout: 0,
+ ajaxTimeout: function( timeout ) {
+ jQuery.ajaxSettings.timeout = timeout;
+ },
+ ajaxSetup: function( settings ) {
+ jQuery.extend( jQuery.ajaxSettings, settings );
+ },
+
+ ajaxSettings: {
+ global: true,
+ type: "GET",
+ timeout: 0,
+ contentType: "application/x-www-form-urlencoded",
+ processData: true,
+ async: true,
+ data: null
+ },
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ ajax: function( s ) {
+ // TODO introduce global settings, allowing the client to modify them for all requests, not only timeout
+ s = jQuery.extend({}, jQuery.ajaxSettings, s);
+
+ // if data available
+ if ( s.data ) {
+ // convert data if not already a string
+ if (s.processData && typeof s.data != "string")
+ s.data = jQuery.param(s.data);
+ // append data to url for get requests
+ if( s.type.toLowerCase() == "get" )
+ // "?" + data or "&" + data (in case there are already params)
+ s.url += ((s.url.indexOf("?") > -1) ? "&" : "?") + s.data;
+ }
+
+ // Watch for a new set of requests
+ if ( s.global && ! jQuery.active++ )
+ jQuery.event.trigger( "ajaxStart" );
+
+ var requestDone = false;
+
+ // Create the request object
+ var xml = new XMLHttpRequest();
+
+ // Open the socket
+ xml.open(s.type, s.url, s.async);
+
+ // Set the correct header, if data is being sent
+ if ( s.data )
+ xml.setRequestHeader("Content-Type", s.contentType);
+
+ // Set the If-Modified-Since header, if ifModified mode.
+ if ( s.ifModified )
+ xml.setRequestHeader("If-Modified-Since",
+ jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
+
+ // Set header so the called script knows that it's an XMLHttpRequest
+ xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+
+ // Make sure the browser sends the right content length
+ if ( xml.overrideMimeType )
+ xml.setRequestHeader("Connection", "close");
+
+ // Allow custom headers/mimetypes
+ if( s.beforeSend )
+ s.beforeSend(xml);
+
+ if ( s.global )
+ jQuery.event.trigger("ajaxSend", [xml, s]);
+
+ // Wait for a response to come back
+ var onreadystatechange = function(isTimeout){
+ // The transfer is complete and the data is available, or the request timed out
+ if ( xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
+ requestDone = true;
+ var status;
+ try {
+ status = jQuery.httpSuccess( xml ) && isTimeout != "timeout" ?
+ s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error";
+ // Make sure that the request was successful or notmodified
+ if ( status != "error" ) {
+ // Cache Last-Modified header, if ifModified mode.
+ var modRes;
+ try {
+ modRes = xml.getResponseHeader("Last-Modified");
+ } catch(e) {} // swallow exception thrown by FF if header is not available
+
+ if ( s.ifModified && modRes )
+ jQuery.lastModified[s.url] = modRes;
+
+ // process the data (runs the xml through httpData regardless of callback)
+ var data = jQuery.httpData( xml, s.dataType );
+
+ // If a local callback was specified, fire it and pass it the data
+ if ( s.success )
+ s.success( data, status );
+
+ // Fire the global callback
+ if( s.global )
+ jQuery.event.trigger( "ajaxSuccess", [xml, s] );
+ } else
+ jQuery.handleError(s, xml, status);
+ } catch(e) {
+ status = "error";
+ jQuery.handleError(s, xml, status, e);
+ }
+
+ // The request was completed
+ if( s.global )
+ jQuery.event.trigger( "ajaxComplete", [xml, s] );
+
+ // Handle the global AJAX counter
+ if ( s.global && ! --jQuery.active )
+ jQuery.event.trigger( "ajaxStop" );
+
+ // Process result
+ if ( s.complete )
+ s.complete(xml, status);
+
+ // Stop memory leaks
+ xml.onreadystatechange = function(){};
+ xml = null;
+ }
+ };
+ xml.onreadystatechange = onreadystatechange;
+
+ // Timeout checker
+ if ( s.timeout > 0 )
+ setTimeout(function(){
+ // Check to see if the request is still happening
+ if ( xml ) {
+ // Cancel the request
+ xml.abort();
+
+ if( !requestDone )
+ onreadystatechange( "timeout" );
+ }
+ }, s.timeout);
+
+ // save non-leaking reference
+ var xml2 = xml;
+
+ // Send the data
+ try {
+ xml2.send(s.data);
+ } catch(e) {
+ jQuery.handleError(s, xml, null, e);
+ }
+
+ // firefox 1.5 doesn't fire statechange for sync requests
+ if ( !s.async )
+ onreadystatechange();
+
+ // return XMLHttpRequest to allow aborting the request etc.
+ return xml2;
+ },
+
+ handleError: function( s, xml, status, e ) {
+ // If a local callback was specified, fire it
+ if ( s.error ) s.error( xml, status, e );
+
+ // Fire the global callback
+ if ( s.global )
+ jQuery.event.trigger( "ajaxError", [xml, s, e] );
+ },
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Determines if an XMLHttpRequest was successful or not
+ httpSuccess: function( r ) {
+ try {
+ return !r.status && location.protocol == "file:" ||
+ ( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
+ jQuery.browser.safari && r.status == undefined;
+ } catch(e){}
+ return false;
+ },
+
+ // Determines if an XMLHttpRequest returns NotModified
+ httpNotModified: function( xml, url ) {
+ try {
+ var xmlRes = xml.getResponseHeader("Last-Modified");
+
+ // Firefox always returns 200. check Last-Modified date
+ return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
+ jQuery.browser.safari && xml.status == undefined;
+ } catch(e){}
+ return false;
+ },
+
+ /* Get the data out of an XMLHttpRequest.
+ * Return parsed XML if content-type header is "xml" and type is "xml" or omitted,
+ * otherwise return plain text.
+ * (String) data - The type of data that you're expecting back,
+ * (e.g. "xml", "html", "script")
+ */
+ httpData: function( r, type ) {
+ var ct = r.getResponseHeader("content-type");
+ var data = !type && ct && ct.indexOf("xml") >= 0;
+ data = type == "xml" || data ? r.responseXML : r.responseText;
+
+ // If the type is "script", eval it in global context
+ if ( type == "script" )
+ jQuery.globalEval( data );
+
+ // Get the JavaScript object, if JSON is used.
+ if ( type == "json" )
+ eval( "data = " + data );
+
+ // evaluate scripts within html
+ if ( type == "html" )
+ jQuery("<div>").html(data).evalScripts();
+
+ return data;
+ },
+
+ // Serialize an array of form elements or a set of
+ // key/values into a query string
+ param: function( a ) {
+ var s = [];
+
+ // If an array was passed in, assume that it is an array
+ // of form elements
+ if ( a.constructor == Array || a.jquery )
+ // Serialize the form elements
+ jQuery.each( a, function(){
+ s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
+ });
+
+ // Otherwise, assume that it's an object of key/value pairs
+ else
+ // Serialize the key/values
+ for ( var j in a )
+ // If the value is an array then the key names need to be repeated
+ if ( a[j].constructor == Array )
+ jQuery.each( a[j], function(){
+ s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
+ });
+ else
+ s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
+
+ // Return the resulting serialization
+ return s.join("&");
+ },
+
+ // evalulates a script in global context
+ // not reliable for safari
+ globalEval: function( data ) {
+ if ( window.execScript )
+ window.execScript( data );
+ else if ( jQuery.browser.safari )
+ // safari doesn't provide a synchronous global eval
+ window.setTimeout( data, 0 );
+ else
+ eval.call( window, data );
+ }
+
+});
+}
diff --git a/devtools/client/inspector/markup/test/lib_jquery_1.11.1_min.js b/devtools/client/inspector/markup/test/lib_jquery_1.11.1_min.js
new file mode 100644
index 0000000000..ab28a24729
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_jquery_1.11.1_min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
+if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
+},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/devtools/client/inspector/markup/test/lib_jquery_1.2_min.js b/devtools/client/inspector/markup/test/lib_jquery_1.2_min.js
new file mode 100644
index 0000000000..f10d4943f1
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_jquery_1.2_min.js
@@ -0,0 +1,32 @@
+/*
+ * jQuery 1.2 - New Wave Javascript
+ *
+ * Copyright (c) 2007 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2007-09-10 15:45:49 -0400 (Mon, 10 Sep 2007) $
+ * $Rev: 3219 $
+ */
+(function(){if(typeof jQuery!="undefined")var _jQuery=jQuery;var jQuery=window.jQuery=function(a,c){if(window==this||!this.init)return new jQuery(a,c);return this.init(a,c);};if(typeof $!="undefined")var _$=$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;jQuery.fn=jQuery.prototype={init:function(a,c){a=a||document;if(typeof a=="string"){var m=quickExpr.exec(a);if(m&&(m[1]||!c)){if(m[1])a=jQuery.clean([m[1]],c);else{var tmp=document.getElementById(m[3]);if(tmp)if(tmp.id!=m[3])return jQuery().find(a);else{this[0]=tmp;this.length=1;return this;}else
+a=[];}}else
+return new jQuery(c).find(a);}else if(jQuery.isFunction(a))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](a);return this.setArray(a.constructor==Array&&a||(a.jquery||a.length&&a!=window&&!a.nodeType&&a[0]!=undefined&&a[0].nodeType)&&jQuery.makeArray(a)||[a]);},jquery:"1.2",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(a){var ret=jQuery(a);ret.prevObject=this;return ret;},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this;},each:function(fn,args){return jQuery.each(this,fn,args);},index:function(obj){var pos=-1;this.each(function(i){if(this==obj)pos=i;});return pos;},attr:function(key,value,type){var obj=key;if(key.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],key)||undefined;else{obj={};obj[key]=value;}return this.each(function(index){for(var prop in obj)jQuery.attr(type?this.style:this,prop,jQuery.prop(this,obj[prop],type,index,prop));});},css:function(key,value){return this.attr(key,value,"curCSS");},text:function(e){if(typeof e!="object"&&e!=null)return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return t;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a);});},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild);});},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this);});},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(t){var data=jQuery.map(this,function(a){return jQuery.find(t,a);});return this.pushStack(/[^+>] [^+>]/.test(t)||t.indexOf("..")>-1?jQuery.unique(data):data);},clone:function(events){var ret=this.map(function(){return this.outerHTML?jQuery(this.outerHTML)[0]:this.cloneNode(true);});if(events===true){var clone=ret.find("*").andSelf();this.find("*").andSelf().each(function(i){var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});}return ret;},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(el,index){return t.apply(el,[index]);})||jQuery.multiFilter(t,this));},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jquery)?jQuery.inArray(a,t)<0:a!=t;}));},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||t.nodeName=="FORM")?t:[t]));},is:function(expr){return expr?jQuery.multiFilter(expr,this).length>0:false;},hasClass:function(expr){return this.is("."+expr);},val:function(val){if(val==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,a=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){var val=jQuery.browser.msie&&!option.attributes["value"].specified?option.text:option.value;if(one)return val;a.push(val);}}return a;}else
+return this[0].value.replace(/\r/g,"");}}else
+return this.each(function(){if(val.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,val)>=0||jQuery.inArray(this.name,val)>=0);else if(jQuery.nodeName(this,"select")){var tmp=val.constructor==Array?val:[val];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,tmp)>=0||jQuery.inArray(this.text,tmp)>=0);});if(!tmp.length)this.selectedIndex=-1;}else
+this.value=val;});},html:function(val){return val==undefined?(this.length?this[0].innerHTML:null):this.empty().append(val);},replaceWith:function(val){return this.after(val).remove();},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(fn){return this.pushStack(jQuery.map(this,function(elem,i){return fn.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,dir,fn){var clone=this.length>1,a;return this.each(function(){if(!a){a=jQuery.clean(args,this.ownerDocument);if(dir<0)a.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){if(jQuery.nodeName(this,"script")){if(this.src)jQuery.ajax({url:this.src,async:false,dataType:"script"});else
+jQuery.globalEval(this.text||this.textContent||this.innerHTML||"");}else
+fn.apply(obj,[clone?this.cloneNode(true):this]);});});}};jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},a=1,al=arguments.length,deep=false;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};}if(al==1){target=this;a=0;}var prop;for(;a<al;a++)if((prop=arguments[a])!=null)for(var i in prop){if(target==prop[i])continue;if(deep&&typeof prop[i]=='object'&&target[i])jQuery.extend(target[i],prop[i]);else if(prop[i]!=undefined)target[i]=prop[i];}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,win={};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){if(window.execScript)window.execScript(data);else if(jQuery.browser.safari)window.setTimeout(data,0);else
+eval.call(window,data);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?win:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!=undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?win:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(obj,fn,args){if(args){if(obj.length==undefined)for(var i in obj)fn.apply(obj[i],args);else
+for(var i=0,ol=obj.length;i<ol;i++)if(fn.apply(obj[i],args)===false)break;}else{if(obj.length==undefined)for(var i in obj)fn.call(obj[i],i,obj[i]);else
+for(var i=0,ol=obj.length,val=obj[0];i<ol&&fn.call(val,i,val)!==false;val=obj[++i]){}}return obj;},prop:function(elem,value,type,index,prop){if(jQuery.isFunction(value))value=value.call(elem,[index]);var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(prop)?value+"px":value;},className:{add:function(elem,c){jQuery.each((c||"").split(/\s+/),function(i,cur){if(!jQuery.className.has(elem.className,cur))elem.className+=(elem.className?" ":"")+cur;});},remove:function(elem,c){elem.className=c!=undefined?jQuery.grep(elem.className.split(/\s+/),function(cur){return!jQuery.className.has(c,cur);}).join(" "):"";},has:function(t,c){return jQuery.inArray(c,(t.className||t).toString().split(/\s+/))>-1;}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i];}f.apply(e,[]);for(var i in o)e.style[i]=e.style["old"+i];},css:function(e,p){if(p=="height"||p=="width"){var old={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];jQuery.each(d,function(){old["padding"+this]=0;old["border"+this+"Width"]=0;});jQuery.swap(e,old,function(){if(jQuery(e).is(':visible')){oHeight=e.offsetHeight;oWidth=e.offsetWidth;}else{e=jQuery(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var parPos=jQuery.css(e.parentNode,"position")||"static";if(parPos=="static")e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(parPos=="static")e.parentNode.style.position="static";e.parentNode.removeChild(e);}});return p=="height"?oHeight:oWidth;}return jQuery.curCSS(e,p);},curCSS:function(elem,prop,force){var ret,stack=[],swap=[];function color(a){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(a,null);return!ret||ret.getPropertyValue("color")=="";}if(prop=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(prop.match(/float/i))prop=styleFloat;if(!force&&elem.style[prop])ret=elem.style[prop];else if(document.defaultView&&document.defaultView.getComputedStyle){if(prop.match(/float/i))prop="float";prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();var cur=document.defaultView.getComputedStyle(elem,null);if(cur&&!color(elem))ret=cur.getPropertyValue(prop);else{for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(a=0;a<stack.length;a++)if(color(stack[a])){swap[a]=stack[a].style.display;stack[a].style.display="block";}ret=prop=="display"&&swap[stack.length-1]!=null?"none":document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop)||"";for(a=0;a<swap.length;a++)if(swap[a]!=null)stack[a].style.display=swap[a];}if(prop=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var newProp=prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});ret=elem.currentStyle[prop]||elem.currentStyle[newProp];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left;var runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}return ret;},clean:function(a,doc){var r=[];doc=doc||document;jQuery.each(a,function(i,arg){if(!arg)return;if(arg.constructor==Number)arg=arg.toString();if(typeof arg=="string"){arg=arg.replace(/(<(\w+)[^>]*?)\/>/g,function(m,all,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)?m:all+"></"+tag+">";});var s=jQuery.trim(arg).toLowerCase(),div=doc.createElement("div"),tb=[];var wrap=!s.indexOf("<opt")&&[1,"<select>","</select>"]||!s.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||s.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!s.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+arg+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)tb=div.firstChild&&div.firstChild.childNodes;else if(wrap[1]=="<table>"&&s.indexOf("<tbody")<0)tb=div.childNodes;for(var n=tb.length-1;n>=0;--n)if(jQuery.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)tb[n].parentNode.removeChild(tb[n]);if(/^\s/.test(arg))div.insertBefore(doc.createTextNode(arg.match(/^\s*/)[0]),div.firstChild);}arg=jQuery.makeArray(div.childNodes);}if(0===arg.length&&(!jQuery.nodeName(arg,"form")&&!jQuery.nodeName(arg,"select")))return;if(arg[0]==undefined||jQuery.nodeName(arg,"form")||arg.options)r.push(arg);else
+r=jQuery.merge(r,arg);});return r;},attr:function(elem,name,value){var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(t){return(t||"").replace(/^\s+|\s+$/g,"");},makeArray:function(a){var r=[];if(typeof a!="array")for(var i=0,al=a.length;i<al;i++)r.push(a[i]);else
+r=a.slice(0);return r;},inArray:function(b,a){for(var i=0,al=a.length;i<al;i++)if(a[i]==b)return i;return-1;},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++)if(second[i].nodeType!=8)first.push(second[i]);}else
+for(var i=0;second[i];i++)first.push(second[i]);return first;},unique:function(first){var r=[],done={};try{for(var i=0,fl=first.length;i<fl;i++){var id=jQuery.data(first[i]);if(!done[id]){done[id]=true;r.push(first[i]);}}}catch(e){r=first;}return r;},grep:function(elems,fn,inv){if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++)if(!inv&&fn(elems[i],i)||inv&&!fn(elems[i],i))result.push(elems[i]);return result;},map:function(elems,fn){if(typeof fn=="string")fn=eval("false||function(a){return "+fn+"}");var result=[];for(var i=0,el=elems.length;i<el;i++){var val=fn(elems[i],i);if(val!==null&&val!=undefined){if(val.constructor!=Array)val=[val];result=result.concat(val);}}return result;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",styleFloat:jQuery.browser.msie?"styleFloat":"cssFloat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength"}});jQuery.each({parent:"a.parentNode",parents:"jQuery.dir(a,'parentNode')",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",nextAll:"jQuery.dir(a,'nextSibling')",prevAll:"jQuery.dir(a,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)",contents:"jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)"},function(i,n){jQuery.fn[i]=function(a){var ret=jQuery.map(this,n);if(a&&typeof a=="string")ret=jQuery.multiFilter(a,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(i,n){jQuery.fn[i]=function(){var a=arguments;return this.each(function(){for(var j=0,al=a.length;j<al;j++)jQuery(a[j])[n](this);});};});jQuery.each({removeAttr:function(key){jQuery.attr(this,key,"");this.removeAttribute(key);},addClass:function(c){jQuery.className.add(this,c);},removeClass:function(c){jQuery.className.remove(this,c);},toggleClass:function(c){jQuery.className[jQuery.className.has(this,c)?"remove":"add"](this,c);},remove:function(a){if(!a||jQuery.filter(a,[this]).r.length){jQuery.removeData(this);this.parentNode.removeChild(this);}},empty:function(){jQuery("*",this).each(function(){jQuery.removeData(this);});while(this.firstChild)this.removeChild(this.firstChild);}},function(i,n){jQuery.fn[i]=function(){return this.each(n,arguments);};});jQuery.each(["Height","Width"],function(i,name){var n=name.toLowerCase();jQuery.fn[n]=function(h){return this[0]==window?jQuery.browser.safari&&self["inner"+name]||jQuery.boxModel&&Math.max(document.documentElement["client"+name],document.body["client"+name])||document.body["client"+name]:this[0]==document?Math.max(document.body["scroll"+name],document.body["offset"+name]):h==undefined?(this.length?jQuery.css(this[0],n):null):this.css(n,h.constructor==String?h:h+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)",has:"jQuery.find(m[3],a).length",header:"/h\\d/i.test(a.nodeName)",animated:"jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&!context.nodeType)context=null;context=context||document;var ret=[context],done=[],last;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){var nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName.toUpperCase()))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var nodeName=m[2],merge={};m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName.toUpperCase()){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=jQuery.filter(m[3],r,true).r;else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(\d*)n\+?(\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"n+"+m[3]||m[3]),first=(test[1]||1)-0,last=test[2]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==1){if(last==0||node.nodeIndex==last)add=true;}else if((node.nodeIndex+last)%first==0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var f=jQuery.expr[m[1]];if(typeof f!="string")f=jQuery.expr[m[1]][m[2]];f=eval("false||function(a,i){return "+f+"}");r=jQuery.grep(r,f,not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(element,type,handler,data){if(jQuery.browser.msie&&element.setInterval!=undefined)element=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var parts=type.split(".");type=parts[0];handler.type=parts[1];var events=jQuery.data(element,"events")||jQuery.data(element,"events",{});var handle=jQuery.data(element,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(element,arguments);return val;});var handlers=events[type];if(!handlers){handlers=events[type]={};if(element.addEventListener)element.addEventListener(type,handle,false);else
+element.attachEvent("on"+type,handle);}handlers[handler.guid]=handler;this.global[type]=true;},guid:1,global:{},remove:function(element,type,handler){var events=jQuery.data(element,"events"),ret,index;if(typeof type=="string"){var parts=type.split(".");type=parts[0];}if(events){if(type&&type.type){handler=type.handler;type=type.type;}if(!type){for(type in events)this.remove(element,type);}else if(events[type]){if(handler)delete events[type][handler.guid];else
+for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(element.removeEventListener)element.removeEventListener(type,jQuery.data(element,"handle"),false);else
+element.detachEvent("on"+type,jQuery.data(element,"handle"));ret=null;delete events[type];}}for(ret in events)break;if(!ret){jQuery.removeData(element,"events");jQuery.removeData(element,"handle");}}},trigger:function(type,data,element,donative,extra){data=jQuery.makeArray(data||[]);if(!element){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{var val,ret,fn=jQuery.isFunction(element[type]||null),evt=!data[0]||!data[0].preventDefault;if(evt)data.unshift(this.fix({type:type,target:element}));if(jQuery.isFunction(jQuery.data(element,"handle")))val=jQuery.data(element,"handle").apply(element,data);if(!fn&&element["on"+type]&&element["on"+type].apply(element,data)===false)val=false;if(evt)data.shift();if(extra&&extra.apply(element,data)===false)val=false;if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(element,'a')&&type=="click")){this.triggered=true;element[type]();}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var c=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in c){args[0].handler=c[j];args[0].data=c[j].data;if(!parts[1]||c[j].type==parts[1]){var tmp=c[j].apply(this,args);if(val!==false)val=tmp;if(tmp===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target&&event.srcElement)event.target=event.srcElement;if(jQuery.browser.safari&&event.target.nodeType==3)event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var e=document.documentElement,b=document.body;event.pageX=event.clientX+(e&&e.scrollLeft||b.scrollLeft||0);event.pageY=event.clientY+(e&&e.scrollTop||b.scrollTop||0);}if(!event.which&&(event.charCode||event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(){var a=arguments;return this.click(function(e){this.lastToggle=0==this.lastToggle?1:0;e.preventDefault();return a[this.lastToggle].apply(this,[e])||false;});},hover:function(f,g){function handleHover(e){var p=e.relatedTarget;while(p&&p!=this)try{p=p.parentNode;}catch(e){p=this;};if(p==this)return false;return(e.type=="mouseover"?f:g).apply(this,[e]);}return this.mouseover(handleHover).mouseout(handleHover);},ready:function(f){bindReady();if(jQuery.isReady)f.apply(document,[jQuery]);else
+jQuery.readyList.push(function(){return f.apply(this,[jQuery]);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}if(jQuery.browser.mozilla||jQuery.browser.opera)document.removeEventListener("DOMContentLoaded",jQuery.ready,false);if(!window.frames.length)jQuery(window).load(function(){jQuery("#__ie_init").remove();});}}});jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,o){jQuery.fn[o]=function(f){return f?this.bind(o,f):this.trigger(o);};});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(jQuery.browser.mozilla||jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);else if(jQuery.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var script=document.getElementById("__ie_init");if(script)script.onreadystatechange=function(){if(this.readyState!="complete")return;jQuery.ready();};script=null;}else if(jQuery.browser.safari)jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready();}},10);jQuery.event.add(window,"load",jQuery.ready);}jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);setTimeout(function(){self.each(callback,[res.responseText,status,res]);},13);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(i,val){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){var jsonp,jsre=/=(\?|%3F)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);var q=s.url.indexOf("?");if(q>-1){s.data=(s.data?s.data+"&":"")+s.url.slice(q+1);s.url=s.url.slice(0,q);}if(s.dataType=="jsonp"){if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&s.data&&s.data.match(jsre)){jsonp="jsonp"+jsc++;s.data=s.data.replace(jsre,"="+jsonp);s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get")s.data=(s.data?s.data+"&":"")+"_="+(new Date()).getTime();if(s.data&&s.type.toLowerCase()=="get"){s.url+="?"+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if(!s.url.indexOf("http")&&s.dataType=="script"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(!jsonp&&(s.success||s.complete)){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async);if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
+jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();return xml;function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
+for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
+s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none")this.style.display="block";}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none")this.oldblock="block";this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var opt=jQuery.speed(speed,easing,callback);return this[opt.queue===false?"each":"queue"](function(){opt=jQuery.extend({},opt);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]?)([\d.]+)(.*)$/),start=e.cur(true)||0;if(parts){end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=end+unit;start=(end/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-"?-1:1)*end)+start;e.custom(start,end,unit);}else
+e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(!fn){fn=type;type="fx";}if(!arguments.length)return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(){var timers=jQuery.timers;return this.each(function(){for(var i=0;i<timers.length;i++)if(timers[i].elem==this)timers.splice(i--,1);}).dequeue();}});var queue=function(elem,type,array){if(!elem)return;var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.curCSS(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.css(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(){return self.step();}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timers.length==1){var timer=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length)clearInterval(timer);},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(){var t=(new Date()).getTime();if(t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var absolute=jQuery.css(elem,"position")=="absolute",parent=elem.parentNode,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&!absolute&&parseInt(version)<522;if(elem.getBoundingClientRect){box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));if(msie){var border=jQuery("html").css("borderWidth");border=(border=="medium"||jQuery.boxModel&&parseInt(version)>=7)&&2||border;add(-border,-border);}}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&/^t[d|h]$/i.test(parent.tagName)||!safari2)border(offsetParent);if(safari2&&!absolute&&jQuery.css(offsetParent,"position")=="absolute")absolute=true;offsetParent=offsetParent.offsetParent;}while(parent.tagName&&/^body|html$/i.test(parent.tagName)){if(/^inline|table-row.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if(safari&&absolute)add(-doc.body.offsetLeft,-doc.body.offsetTop);}results={top:top,left:left};}return results;function border(elem){add(jQuery.css(elem,"borderLeftWidth"),jQuery.css(elem,"borderTopWidth"));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}};})(); \ No newline at end of file
diff --git a/devtools/client/inspector/markup/test/lib_jquery_1.3_min.js b/devtools/client/inspector/markup/test/lib_jquery_1.3_min.js
new file mode 100644
index 0000000000..378f94376d
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_jquery_1.3_min.js
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-01-13 12:50:31 -0500 (Tue, 13 Jan 2009)
+ * Revision: 6104
+ */
+(function(){var l=this,g,x=l.jQuery,o=l.$,n=l.jQuery=l.$=function(D,E){return new n.fn.init(D,E)},C=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;n.fn=n.prototype={init:function(D,G){D=D||document;if(D.nodeType){this[0]=D;this.length=1;this.context=D;return this}if(typeof D==="string"){var F=C.exec(D);if(F&&(F[1]||!G)){if(F[1]){D=n.clean([F[1]],G)}else{var H=document.getElementById(F[3]);if(H){if(H.id!=F[3]){return n().find(D)}var E=n(H);E.context=document;E.selector=D;return E}D=[]}}else{return n(G).find(D)}}else{if(n.isFunction(D)){return n(document).ready(D)}}if(D.selector&&D.context){this.selector=D.selector;this.context=D.context}return this.setArray(n.makeArray(D))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(D){return D===g?n.makeArray(this):this[D]},pushStack:function(E,G,D){var F=n(E);F.prevObject=this;F.context=this.context;if(G==="find"){F.selector=this.selector+(this.selector?" ":"")+D}else{if(G){F.selector=this.selector+"."+G+"("+D+")"}}return F},setArray:function(D){this.length=0;Array.prototype.push.apply(this,D);return this},each:function(E,D){return n.each(this,E,D)},index:function(D){return n.inArray(D&&D.jquery?D[0]:D,this)},attr:function(E,G,F){var D=E;if(typeof E==="string"){if(G===g){return this[0]&&n[F||"attr"](this[0],E)}else{D={};D[E]=G}}return this.each(function(H){for(E in D){n.attr(F?this.style:this,E,n.prop(this,D[E],F,H,E))}})},css:function(D,E){if((D=="width"||D=="height")&&parseFloat(E)<0){E=g}return this.attr(D,E,"curCSS")},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))}var D="";n.each(E||this,function(){n.each(this.childNodes,function(){if(this.nodeType!=8){D+=this.nodeType!=1?this.nodeValue:n.fn.text([this])}})});return D},wrapAll:function(D){if(this[0]){var E=n(D,this[0].ownerDocument).clone();if(this[0].parentNode){E.insertBefore(this[0])}E.map(function(){var F=this;while(F.firstChild){F=F.firstChild}return F}).append(this)}return this},wrapInner:function(D){return this.each(function(){n(this).contents().wrapAll(D)})},wrap:function(D){return this.each(function(){n(this).wrapAll(D)})},append:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.appendChild(D)}})},prepend:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.insertBefore(D,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this)})},after:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this.nextSibling)})},end:function(){return this.prevObject||n([])},push:[].push,find:function(D){if(this.length===1&&!/,/.test(D)){var F=this.pushStack([],"find",D);F.length=0;n.find(D,this[0],F);return F}else{var E=n.map(this,function(G){return n.find(D,G)});return this.pushStack(/[^+>] [^+>]/.test(D)?n.unique(E):E,"find",D)}},clone:function(E){var D=this.map(function(){if(!n.support.noCloneEvent&&!n.isXMLDoc(this)){var H=this.cloneNode(true),G=document.createElement("div");G.appendChild(H);return n.clean([G.innerHTML])[0]}else{return this.cloneNode(true)}});var F=D.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(E===true){this.find("*").andSelf().each(function(H){if(this.nodeType==3){return}var G=n.data(this,"events");for(var J in G){for(var I in G[J]){n.event.add(F[H],J,G[J][I],G[J][I].data)}}})}return D},filter:function(D){return this.pushStack(n.isFunction(D)&&n.grep(this,function(F,E){return D.call(F,E)})||n.multiFilter(D,n.grep(this,function(E){return E.nodeType===1})),"filter",D)},closest:function(D){var E=n.expr.match.POS.test(D)?n(D):null;return this.map(function(){var F=this;while(F&&F.ownerDocument){if(E?E.index(F)>-1:n(F).is(D)){return F}F=F.parentNode}})},not:function(D){if(typeof D==="string"){if(f.test(D)){return this.pushStack(n.multiFilter(D,this,true),"not",D)}else{D=n.multiFilter(D,this)}}var E=D.length&&D[D.length-1]!==g&&!D.nodeType;return this.filter(function(){return E?n.inArray(this,D)<0:this!=D})},add:function(D){return this.pushStack(n.unique(n.merge(this.get(),typeof D==="string"?n(D):n.makeArray(D))))},is:function(D){return !!D&&n.multiFilter(D,this).length>0},hasClass:function(D){return !!D&&this.is("."+D)},val:function(J){if(J===g){var D=this[0];if(D){if(n.nodeName(D,"option")){return(D.attributes.value||{}).specified?D.value:D.text}if(n.nodeName(D,"select")){var H=D.selectedIndex,K=[],L=D.options,G=D.type=="select-one";if(H<0){return null}for(var E=G?H:0,I=G?H+1:L.length;E<I;E++){var F=L[E];if(F.selected){J=n(F).val();if(G){return J}K.push(J)}}return K}return(D.value||"").replace(/\r/g,"")}return g}if(typeof J==="number"){J+=""}return this.each(function(){if(this.nodeType!=1){return}if(n.isArray(J)&&/radio|checkbox/.test(this.type)){this.checked=(n.inArray(this.value,J)>=0||n.inArray(this.name,J)>=0)}else{if(n.nodeName(this,"select")){var M=n.makeArray(J);n("option",this).each(function(){this.selected=(n.inArray(this.value,M)>=0||n.inArray(this.text,M)>=0)});if(!M.length){this.selectedIndex=-1}}else{this.value=J}}})},html:function(D){return D===g?(this[0]?this[0].innerHTML:null):this.empty().append(D)},replaceWith:function(D){return this.after(D).remove()},eq:function(D){return this.slice(D,+D+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(F,E){return D.call(F,E,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=n.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild,D=this.length>1?I.cloneNode(true):I;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),G>0?D.cloneNode(true):I)}}if(F){n.each(F,y)}}return this;function K(N,O){return M&&n.nodeName(N,"table")&&n.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};n.fn.init.prototype=n.fn;function y(D,E){if(E.src){n.ajax({url:E.src,async:false,dataType:"script"})}else{n.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function e(){return +new Date}n.extend=n.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,D=false,F;if(typeof I==="boolean"){D=I;I=arguments[1]||{};G=2}if(typeof I!=="object"&&!n.isFunction(I)){I={}}if(H==G){I=this;--G}for(;G<H;G++){if((F=arguments[G])!=null){for(var E in F){var J=I[E],K=F[E];if(I===K){continue}if(D&&K&&typeof K==="object"&&!K.nodeType){I[E]=n.extend(D,J||(K.length!=null?[]:{}),K)}else{if(K!==g){I[E]=K}}}}}return I};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,p=document.defaultView||{},r=Object.prototype.toString;n.extend({noConflict:function(D){l.$=o;if(D){l.jQuery=x}return n},isFunction:function(D){return r.call(D)==="[object Function]"},isArray:function(D){return r.call(D)==="[object Array]"},isXMLDoc:function(D){return D.documentElement&&!D.body||D.tagName&&D.ownerDocument&&!D.ownerDocument.body},globalEval:function(F){F=n.trim(F);if(F){var E=document.getElementsByTagName("head")[0]||document.documentElement,D=document.createElement("script");D.type="text/javascript";if(n.support.scriptEval){D.appendChild(document.createTextNode(F))}else{D.text=F}E.insertBefore(D,E.firstChild);E.removeChild(D)}},nodeName:function(E,D){return E.nodeName&&E.nodeName.toUpperCase()==D.toUpperCase()},each:function(F,J,E){var D,G=0,H=F.length;if(E){if(H===g){for(D in F){if(J.apply(F[D],E)===false){break}}}else{for(;G<H;){if(J.apply(F[G++],E)===false){break}}}}else{if(H===g){for(D in F){if(J.call(F[D],D,F[D])===false){break}}}else{for(var I=F[0];G<H&&J.call(I,G,I)!==false;I=F[++G]){}}}return F},prop:function(G,H,F,E,D){if(n.isFunction(H)){H=H.call(G,E)}return typeof H==="number"&&F=="curCSS"&&!b.test(D)?H+"px":H},className:{add:function(D,E){n.each((E||"").split(/\s+/),function(F,G){if(D.nodeType==1&&!n.className.has(D.className,G)){D.className+=(D.className?" ":"")+G}})},remove:function(D,E){if(D.nodeType==1){D.className=E!==g?n.grep(D.className.split(/\s+/),function(F){return !n.className.has(E,F)}).join(" "):""}},has:function(E,D){return n.inArray(D,(E.className||E).toString().split(/\s+/))>-1}},swap:function(G,F,H){var D={};for(var E in F){D[E]=G.style[E];G.style[E]=F[E]}H.call(G);for(var E in F){G.style[E]=D[E]}},css:function(F,D,H){if(D=="width"||D=="height"){var J,E={position:"absolute",visibility:"hidden",display:"block"},I=D=="width"?["Left","Right"]:["Top","Bottom"];function G(){J=D=="width"?F.offsetWidth:F.offsetHeight;var L=0,K=0;n.each(I,function(){L+=parseFloat(n.curCSS(F,"padding"+this,true))||0;K+=parseFloat(n.curCSS(F,"border"+this+"Width",true))||0});J-=Math.round(L+K)}if(n(F).is(":visible")){G()}else{n.swap(F,E,G)}return Math.max(0,J)}return n.curCSS(F,D,H)},curCSS:function(H,E,F){var K,D=H.style;if(E=="opacity"&&!n.support.opacity){K=n.attr(D,"opacity");return K==""?"1":K}if(E.match(/float/i)){E=v}if(!F&&D&&D[E]){K=D[E]}else{if(p.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=p.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E)}if(E=="opacity"&&K==""){K="1"}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(M,N){return N.toUpperCase()});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=D.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;D.left=K||0;K=D.pixelLeft+"px";D.left=G;H.runtimeStyle.left=J}}}}return K},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])]}}var F=[],D=[],K=J.createElement("div");n.each(E,function(O,Q){if(typeof Q==="number"){Q+=""}if(!Q){return}if(typeof Q==="string"){Q=Q.replace(/(<(\w+)[^>]*?)\/>/g,function(S,T,R){return R.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?S:T+"></"+R+">"});var N=n.trim(Q).toLowerCase();var P=!N.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!N.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!N.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!N.indexOf("<td")||!N.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!N.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!n.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];K.innerHTML=P[1]+Q+P[2];while(P[0]--){K=K.lastChild}if(!n.support.tbody){var M=!N.indexOf("<table")&&N.indexOf("<tbody")<0?K.firstChild&&K.firstChild.childNodes:P[1]=="<table>"&&N.indexOf("<tbody")<0?K.childNodes:[];for(var L=M.length-1;L>=0;--L){if(n.nodeName(M[L],"tbody")&&!M[L].childNodes.length){M[L].parentNode.removeChild(M[L])}}}if(!n.support.leadingWhitespace&&/^\s/.test(Q)){K.insertBefore(J.createTextNode(Q.match(/^\s*/)[0]),K.firstChild)}Q=n.makeArray(K.childNodes)}if(Q.nodeType){F.push(Q)}else{F=n.merge(F,Q)}});if(H){for(var I=0;F[I];I++){if(n.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){D.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I])}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(n.makeArray(F[I].getElementsByTagName("script"))))}H.appendChild(F[I])}}return D}return F},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return g}var G=!n.isXMLDoc(I),K=J!==g;F=G&&n.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(F in I&&G&&!E){if(K){if(F=="type"&&n.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[F]=J}if(n.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:g}return I[F]}if(!n.support.style&&G&&F=="style"){return n.attr(I.style,"cssText",J)}if(K){I.setAttribute(F,""+J)}var D=!n.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return D===null?g:D}if(!n.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}F=F.replace(/-([a-z])/ig,function(L,M){return M.toUpperCase()});if(K){I[F]=J}return I[F]},trim:function(D){return(D||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var D=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||n.isFunction(F)||F.setInterval){D[0]=F}else{while(E){D[--E]=F[E]}}}return D},inArray:function(F,G){for(var D=0,E=G.length;D<E;D++){if(G[D]===F){return D}}return -1},merge:function(G,D){var E=0,F,H=G.length;if(!n.support.getAll){while((F=D[E++])!=null){if(F.nodeType!=8){G[H++]=F}}}else{while((F=D[E++])!=null){G[H++]=F}}return G},unique:function(J){var E=[],D={};try{for(var F=0,G=J.length;F<G;F++){var I=n.data(J[F]);if(!D[I]){D[I]=true;E.push(J[F])}}}catch(H){E=J}return E},grep:function(E,I,D){var F=[];for(var G=0,H=E.length;G<H;G++){if(!D!=!I(E[G],G)){F.push(E[G])}}return F},map:function(D,I){var E=[];for(var F=0,G=D.length;F<G;F++){var H=I(D[F],F);if(H!=null){E[E.length]=H}}return E.concat.apply([],E)}});var B=navigator.userAgent.toLowerCase();n.browser={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)};n.each({parent:function(D){return D.parentNode},parents:function(D){return n.dir(D,"parentNode")},next:function(D){return n.nth(D,2,"nextSibling")},prev:function(D){return n.nth(D,2,"previousSibling")},nextAll:function(D){return n.dir(D,"nextSibling")},prevAll:function(D){return n.dir(D,"previousSibling")},siblings:function(D){return n.sibling(D.parentNode.firstChild,D)},children:function(D){return n.sibling(D.firstChild)},contents:function(D){return n.nodeName(D,"iframe")?D.contentDocument||D.contentWindow.document:n.makeArray(D.childNodes)}},function(D,E){n.fn[D]=function(F){var G=n.map(this,E);if(F&&typeof F=="string"){G=n.multiFilter(F,G)}return this.pushStack(n.unique(G),D,F)}});n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(D,E){n.fn[D]=function(){var F=arguments;return this.each(function(){for(var G=0,H=F.length;G<H;G++){n(F[G])[E](this)}})}});n.each({removeAttr:function(D){n.attr(this,D,"");if(this.nodeType==1){this.removeAttribute(D)}},addClass:function(D){n.className.add(this,D)},removeClass:function(D){n.className.remove(this,D)},toggleClass:function(E,D){if(typeof D!=="boolean"){D=!n.className.has(this,E)}n.className[D?"add":"remove"](this,E)},remove:function(D){if(!D||n.filter(D,[this]).length){n("*",this).add([this]).each(function(){n.event.remove(this);n.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){n(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(D,E){n.fn[D]=function(){return this.each(E,arguments)}});function j(D,E){return D[0]&&parseInt(n.curCSS(D[0],E,true),10)||0}var h="jQuery"+e(),u=0,z={};n.extend({cache:{},data:function(E,D,F){E=E==l?z:E;var G=E[h];if(!G){G=E[h]=++u}if(D&&!n.cache[G]){n.cache[G]={}}if(F!==g){n.cache[G][D]=F}return D?n.cache[G][D]:G},removeData:function(E,D){E=E==l?z:E;var G=E[h];if(D){if(n.cache[G]){delete n.cache[G][D];D="";for(D in n.cache[G]){break}if(!D){n.removeData(E)}}}else{try{delete E[h]}catch(F){if(E.removeAttribute){E.removeAttribute(h)}}delete n.cache[G]}},queue:function(E,D,G){if(E){D=(D||"fx")+"queue";var F=n.data(E,D);if(!F||n.isArray(G)){F=n.data(E,D,n.makeArray(G))}else{if(G){F.push(G)}}}return F},dequeue:function(G,F){var D=n.queue(G,F),E=D.shift();if(!F||F==="fx"){E=D[0]}if(E!==g){E.call(G)}}});n.fn.extend({data:function(D,F){var G=D.split(".");G[1]=G[1]?"."+G[1]:"";if(F===g){var E=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(E===g&&this.length){E=n.data(this[0],D)}return E===g&&G[1]?this.data(G[0]):E}else{return this.trigger("setData"+G[1]+"!",[G[0],F]).each(function(){n.data(this,D,F)})}},removeData:function(D){return this.each(function(){n.removeData(this,D)})},queue:function(D,E){if(typeof D!=="string"){E=D;D="fx"}if(E===g){return n.queue(this[0],D)}return this.each(function(){var F=n.queue(this,D,E);if(D=="fx"&&F.length==1){F[0].call(this)}})},dequeue:function(D){return this.each(function(){n.dequeue(this,D)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.1
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,I=0,F=Object.prototype.toString;var E=function(ae,S,aa,V){aa=aa||[];S=S||document;if(S.nodeType!==1&&S.nodeType!==9){return[]}if(!ae||typeof ae!=="string"){return aa}var ab=[],ac,Y,ah,ag,Z,R,Q=true;N.lastIndex=0;while((ac=N.exec(ae))!==null){ab.push(ac[1]);if(ac[2]){R=RegExp.rightContext;break}}if(ab.length>1&&G.match.POS.exec(ae)){if(ab.length===2&&G.relative[ab[0]]){var U="",X;while((X=G.match.POS.exec(ae))){U+=X[0];ae=ae.replace(G.match.POS,"")}Y=E.filter(U,E(/\s$/.test(ae)?ae+"*":ae,S))}else{Y=G.relative[ab[0]]?[S]:E(ab.shift(),S);while(ab.length){var P=[];ae=ab.shift();if(G.relative[ae]){ae+=ab.shift()}for(var af=0,ad=Y.length;af<ad;af++){E(ae,Y[af],P)}Y=P}}}else{var ai=V?{expr:ab.pop(),set:D(V)}:E.find(ab.pop(),ab.length===1&&S.parentNode?S.parentNode:S);Y=E.filter(ai.expr,ai.set);if(ab.length>0){ah=D(Y)}else{Q=false}while(ab.length){var T=ab.pop(),W=T;if(!G.relative[T]){T=""}else{W=ab.pop()}if(W==null){W=S}G.relative[T](ah,W,M(S))}}if(!ah){ah=Y}if(!ah){throw"Syntax error, unrecognized expression: "+(T||ae)}if(F.call(ah)==="[object Array]"){if(!Q){aa.push.apply(aa,ah)}else{if(S.nodeType===1){for(var af=0;ah[af]!=null;af++){if(ah[af]&&(ah[af]===true||ah[af].nodeType===1&&H(S,ah[af]))){aa.push(Y[af])}}}else{for(var af=0;ah[af]!=null;af++){if(ah[af]&&ah[af].nodeType===1){aa.push(Y[af])}}}}}else{D(ah,aa)}if(R){E(R,S,aa,V)}return aa};E.matches=function(P,Q){return E(P,null,null,Q)};E.find=function(V,S){var W,Q;if(!V){return[]}for(var R=0,P=G.order.length;R<P;R++){var T=G.order[R],Q;if((Q=G.match[T].exec(V))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){Q[1]=(Q[1]||"").replace(/\\/g,"");W=G.find[T](Q,S);if(W!=null){V=V.replace(G.match[T],"");break}}}}if(!W){W=S.getElementsByTagName("*")}return{set:W,expr:V}};E.filter=function(S,ac,ad,T){var Q=S,Y=[],ah=ac,V,ab;while(S&&ac.length){for(var U in G.filter){if((V=G.match[U].exec(S))!=null){var Z=G.filter[U],R=null,X=0,aa,ag;ab=false;if(ah==Y){Y=[]}if(G.preFilter[U]){V=G.preFilter[U](V,ah,ad,Y,T);if(!V){ab=aa=true}else{if(V===true){continue}else{if(V[0]===true){R=[];var W=null,af;for(var ae=0;(af=ah[ae])!==g;ae++){if(af&&W!==af){R.push(af);W=af}}}}}}if(V){for(var ae=0;(ag=ah[ae])!==g;ae++){if(ag){if(R&&ag!=R[X]){X++}aa=Z(ag,V,X,R);var P=T^!!aa;if(ad&&aa!=null){if(P){ab=true}else{ah[ae]=false}}else{if(P){Y.push(ag);ab=true}}}}}if(aa!==g){if(!ad){ah=Y}S=S.replace(G.match[U],"");if(!ab){return[]}break}}}S=S.replace(/\s*,\s*/,"");if(S==Q){if(ab==null){throw"Syntax error, unrecognized expression: "+S}else{break}}Q=S}return ah};var G=E.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(P){return P.getAttribute("href")}},relative:{"+":function(T,Q){for(var R=0,P=T.length;R<P;R++){var S=T[R];if(S){var U=S.previousSibling;while(U&&U.nodeType!==1){U=U.previousSibling}T[R]=typeof Q==="string"?U||false:U===Q}}if(typeof Q==="string"){E.filter(Q,T,true)}},">":function(U,Q,V){if(typeof Q==="string"&&!/\W/.test(Q)){Q=V?Q:Q.toUpperCase();for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){var S=T.parentNode;U[R]=S.nodeName===Q?S:false}}}else{for(var R=0,P=U.length;R<P;R++){var T=U[R];if(T){U[R]=typeof Q==="string"?T.parentNode:T.parentNode===Q}}if(typeof Q==="string"){E.filter(Q,U,true)}}},"":function(S,Q,U){var R="done"+(I++),P=O;if(!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("parentNode",Q,R,S,T,U)},"~":function(S,Q,U){var R="done"+(I++),P=O;if(typeof Q==="string"&&!Q.match(/\W/)){var T=Q=U?Q:Q.toUpperCase();P=L}P("previousSibling",Q,R,S,T,U)}},find:{ID:function(Q,R){if(R.getElementById){var P=R.getElementById(Q[1]);return P?[P]:[]}},NAME:function(P,Q){return Q.getElementsByName?Q.getElementsByName(P[1]):null},TAG:function(P,Q){return Q.getElementsByTagName(P[1])}},preFilter:{CLASS:function(S,Q,R,P,U){S=" "+S[1].replace(/\\/g,"")+" ";for(var T=0;Q[T];T++){if(U^(" "+Q[T].className+" ").indexOf(S)>=0){if(!R){P.push(Q[T])}}else{if(R){Q[T]=false}}}return false},ID:function(P){return P[1].replace(/\\/g,"")},TAG:function(Q,P){for(var R=0;!P[R];R++){}return M(P[R])?Q[1]:Q[1].toUpperCase()},CHILD:function(P){if(P[1]=="nth"){var Q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(P[2]=="even"&&"2n"||P[2]=="odd"&&"2n+1"||!/\D/.test(P[2])&&"0n+"+P[2]||P[2]);P[2]=(Q[1]+(Q[2]||1))-0;P[3]=Q[3]-0}P[0]="done"+(I++);return P},ATTR:function(Q){var P=Q[1];if(G.attrMap[P]){Q[1]=G.attrMap[P]}if(Q[2]==="~="){Q[4]=" "+Q[4]+" "}return Q},PSEUDO:function(T,Q,R,P,U){if(T[1]==="not"){if(T[3].match(N).length>1){T[3]=E(T[3],null,null,Q)}else{var S=E.filter(T[3],Q,R,true^U);if(!R){P.push.apply(P,S)}return false}}else{if(G.match.POS.test(T[0])){return true}}return T},POS:function(P){P.unshift(true);return P}},filters:{enabled:function(P){return P.disabled===false&&P.type!=="hidden"},disabled:function(P){return P.disabled===true},checked:function(P){return P.checked===true},selected:function(P){P.parentNode.selectedIndex;return P.selected===true},parent:function(P){return !!P.firstChild},empty:function(P){return !P.firstChild},has:function(R,Q,P){return !!E(P[3],R).length},header:function(P){return/h\d/i.test(P.nodeName)},text:function(P){return"text"===P.type},radio:function(P){return"radio"===P.type},checkbox:function(P){return"checkbox"===P.type},file:function(P){return"file"===P.type},password:function(P){return"password"===P.type},submit:function(P){return"submit"===P.type},image:function(P){return"image"===P.type},reset:function(P){return"reset"===P.type},button:function(P){return"button"===P.type||P.nodeName.toUpperCase()==="BUTTON"},input:function(P){return/input|select|textarea|button/i.test(P.nodeName)}},setFilters:{first:function(Q,P){return P===0},last:function(R,Q,P,S){return Q===S.length-1},even:function(Q,P){return P%2===0},odd:function(Q,P){return P%2===1},lt:function(R,Q,P){return Q<P[3]-0},gt:function(R,Q,P){return Q>P[3]-0},nth:function(R,Q,P){return P[3]-0==Q},eq:function(R,Q,P){return P[3]-0==Q}},filter:{CHILD:function(P,S){var V=S[1],W=P.parentNode;var U="child"+W.childNodes.length;if(W&&(!W[U]||!P.nodeIndex)){var T=1;for(var Q=W.firstChild;Q;Q=Q.nextSibling){if(Q.nodeType==1){Q.nodeIndex=T++}}W[U]=T-1}if(V=="first"){return P.nodeIndex==1}else{if(V=="last"){return P.nodeIndex==W[U]}else{if(V=="only"){return W[U]==1}else{if(V=="nth"){var Y=false,R=S[2],X=S[3];if(R==1&&X==0){return true}if(R==0){if(P.nodeIndex==X){Y=true}}else{if((P.nodeIndex-X)%R==0&&(P.nodeIndex-X)/R>=0){Y=true}}return Y}}}}},PSEUDO:function(V,R,S,W){var Q=R[1],T=G.filters[Q];if(T){return T(V,S,R,W)}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0}else{if(Q==="not"){var U=R[3];for(var S=0,P=U.length;S<P;S++){if(U[S]===V){return false}}return true}}}},ID:function(Q,P){return Q.nodeType===1&&Q.getAttribute("id")===P},TAG:function(Q,P){return(P==="*"&&Q.nodeType===1)||Q.nodeName===P},CLASS:function(Q,P){return P.test(Q.className)},ATTR:function(T,R){var P=G.attrHandle[R[1]]?G.attrHandle[R[1]](T):T[R[1]]||T.getAttribute(R[1]),U=P+"",S=R[2],Q=R[4];return P==null?false:S==="="?U===Q:S==="*="?U.indexOf(Q)>=0:S==="~="?(" "+U+" ").indexOf(Q)>=0:!R[4]?P:S==="!="?U!=Q:S==="^="?U.indexOf(Q)===0:S==="$="?U.substr(U.length-Q.length)===Q:S==="|="?U===Q||U.substr(0,Q.length+1)===Q+"-":false},POS:function(T,Q,R,U){var P=Q[2],S=G.setFilters[P];if(S){return S(T,R,Q,U)}}}};for(var K in G.match){G.match[K]=RegExp(G.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var D=function(Q,P){Q=Array.prototype.slice.call(Q);if(P){P.push.apply(P,Q);return P}return Q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){D=function(T,S){var Q=S||[];if(F.call(T)==="[object Array]"){Array.prototype.push.apply(Q,T)}else{if(typeof T.length==="number"){for(var R=0,P=T.length;R<P;R++){Q.push(T[R])}}else{for(var R=0;T[R];R++){Q.push(T[R])}}}return Q}}(function(){var Q=document.createElement("form"),R="script"+(new Date).getTime();Q.innerHTML="<input name='"+R+"'/>";var P=document.documentElement;P.insertBefore(Q,P.firstChild);if(!!document.getElementById(R)){G.find.ID=function(T,U){if(U.getElementById){var S=U.getElementById(T[1]);return S?S.id===T[1]||S.getAttributeNode&&S.getAttributeNode("id").nodeValue===T[1]?[S]:g:[]}};G.filter.ID=function(U,S){var T=U.getAttributeNode&&U.getAttributeNode("id");return U.nodeType===1&&T&&T.nodeValue===S}}P.removeChild(Q)})();(function(){var P=document.createElement("div");P.appendChild(document.createComment(""));if(P.getElementsByTagName("*").length>0){G.find.TAG=function(Q,U){var T=U.getElementsByTagName(Q[1]);if(Q[1]==="*"){var S=[];for(var R=0;T[R];R++){if(T[R].nodeType===1){S.push(T[R])}}T=S}return T}}P.innerHTML="<a href='#'></a>";if(P.firstChild.getAttribute("href")!=="#"){G.attrHandle.href=function(Q){return Q.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var P=E;E=function(T,S,Q,R){S=S||document;if(!R&&S.nodeType===9){try{return D(S.querySelectorAll(T),Q)}catch(U){}}return P(T,S,Q,R)};E.find=P.find;E.filter=P.filter;E.selectors=P.selectors;E.matches=P.matches})()}if(document.documentElement.getElementsByClassName){G.order.splice(1,0,"CLASS");G.find.CLASS=function(P,Q){return Q.getElementsByClassName(P[1])}}function L(Q,W,V,Z,X,Y){for(var T=0,R=Z.length;T<R;T++){var P=Z[T];if(P){P=P[Q];var U=false;while(P&&P.nodeType){var S=P[V];if(S){U=Z[S];break}if(P.nodeType===1&&!Y){P[V]=T}if(P.nodeName===W){U=P;break}P=P[Q]}Z[T]=U}}}function O(Q,V,U,Y,W,X){for(var S=0,R=Y.length;S<R;S++){var P=Y[S];if(P){P=P[Q];var T=false;while(P&&P.nodeType){if(P[U]){T=Y[P[U]];break}if(P.nodeType===1){if(!X){P[U]=S}if(typeof V!=="string"){if(P===V){T=true;break}}else{if(E.filter(V,[P]).length>0){T=P;break}}}P=P[Q]}Y[S]=T}}}var H=document.compareDocumentPosition?function(Q,P){return Q.compareDocumentPosition(P)&16}:function(Q,P){return Q!==P&&(Q.contains?Q.contains(P):true)};var M=function(P){return P.documentElement&&!P.body||P.tagName&&P.ownerDocument&&!P.ownerDocument.body};n.find=E;n.filter=E.filter;n.expr=E.selectors;n.expr[":"]=n.expr.filters;E.selectors.filters.hidden=function(P){return"hidden"===P.type||n.css(P,"display")==="none"||n.css(P,"visibility")==="hidden"};E.selectors.filters.visible=function(P){return"hidden"!==P.type&&n.css(P,"display")!=="none"&&n.css(P,"visibility")!=="hidden"};E.selectors.filters.animated=function(P){return n.grep(n.timers,function(Q){return P===Q.elem}).length};n.multiFilter=function(R,P,Q){if(Q){R=":not("+R+")"}return E.matches(R,P)};n.dir=function(R,Q){var P=[],S=R[Q];while(S&&S!=document){if(S.nodeType==1){P.push(S)}S=S[Q]}return P};n.nth=function(T,P,R,S){P=P||1;var Q=0;for(;T;T=T[R]){if(T.nodeType==1&&++Q==P){break}}return T};n.sibling=function(R,Q){var P=[];for(;R;R=R.nextSibling){if(R.nodeType==1&&R!=Q){P.push(R)}}return P};return;l.Sizzle=E})();n.event={add:function(H,E,G,J){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=l){H=l}if(!G.guid){G.guid=this.guid++}if(J!==g){var F=G;G=this.proxy(F);G.data=J}var D=n.data(H,"events")||n.data(H,"events",{}),I=n.data(H,"handle")||n.data(H,"handle",function(){return typeof n!=="undefined"&&!n.event.triggered?n.event.handle.apply(arguments.callee.elem,arguments):g});I.elem=H;n.each(E.split(/\s+/),function(L,M){var N=M.split(".");M=N.shift();G.type=N.slice().sort().join(".");var K=D[M];if(n.event.specialAll[M]){n.event.specialAll[M].setup.call(H,J,N)}if(!K){K=D[M]={};if(!n.event.special[M]||n.event.special[M].setup.call(H,J,N)===false){if(H.addEventListener){H.addEventListener(M,I,false)}else{if(H.attachEvent){H.attachEvent("on"+M,I)}}}}K[G.guid]=G;n.event.global[M]=true});H=null},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return}var F=n.data(J,"events"),E,D;if(F){if(G===g||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""))}}else{if(G.type){I=G.handler;G=G.type}n.each(G.split(/\s+/),function(L,N){var P=N.split(".");N=P.shift();var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");if(F[N]){if(I){delete F[N][I.guid]}else{for(var O in F[N]){if(M.test(F[N][O].type)){delete F[N][O]}}}if(n.event.specialAll[N]){n.event.specialAll[N].teardown.call(J,P)}for(E in F[N]){break}if(!E){if(!n.event.special[N]||n.event.special[N].teardown.call(J,P)===false){if(J.removeEventListener){J.removeEventListener(N,n.data(J,"handle"),false)}else{if(J.detachEvent){J.detachEvent("on"+N,n.data(J,"handle"))}}}E=null;delete F[N]}}})}for(E in F){break}if(!E){var K=n.data(J,"handle");if(K){K.elem=null}n.removeData(J,"events");n.removeData(J,"handle")}}},trigger:function(H,J,G,D){var F=H.type||H;if(!D){H=typeof H==="object"?H[h]?H:n.extend(n.Event(F),H):n.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true}if(!G){H.stopPropagation();if(this.global[F]){n.each(n.cache,function(){if(this.events&&this.events[F]){n.event.trigger(H,J,this.handle.elem)}})}}if(!G||G.nodeType==3||G.nodeType==8){return g}H.result=g;H.target=G;J=n.makeArray(J);J.unshift(H)}H.currentTarget=G;var I=n.data(G,"handle");if(I){I.apply(G,J)}if((!G[F]||(n.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false}if(!D&&G[F]&&!H.isDefaultPrevented()&&!(n.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]()}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){n.event.trigger(H,J,E,true)}}},handle:function(J){var I,D;J=arguments[0]=n.event.fix(J||l.event);var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");D=(n.data(this,"events")||{})[J.type];for(var F in D){var G=D[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==g){J.result=E;if(E===false){J.preventDefault();J.stopPropagation()}}if(J.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(G){if(G[h]){return G}var E=G;G=n.Event(E);for(var F=this.props.length,I;F;){I=this.props[--F];G[I]=E[I]}if(!G.target){G.target=G.srcElement||document}if(G.target.nodeType==3){G.target=G.target.parentNode}if(!G.relatedTarget&&G.fromElement){G.relatedTarget=G.fromElement==G.target?G.toElement:G.fromElement}if(G.pageX==null&&G.clientX!=null){var H=document.documentElement,D=document.body;G.pageX=G.clientX+(H&&H.scrollLeft||D&&D.scrollLeft||0)-(H.clientLeft||0);G.pageY=G.clientY+(H&&H.scrollTop||D&&D.scrollTop||0)-(H.clientTop||0)}if(!G.which&&((G.charCode||G.charCode===0)?G.charCode:G.keyCode)){G.which=G.charCode||G.keyCode}if(!G.metaKey&&G.ctrlKey){G.metaKey=G.ctrlKey}if(!G.which&&G.button){G.which=(G.button&1?1:(G.button&2?3:(G.button&4?2:0)))}return G},proxy:function(E,D){D=D||function(){return E.apply(this,arguments)};D.guid=E.guid=E.guid||D.guid||this.guid++;return D},special:{ready:{setup:A,teardown:function(){}}},specialAll:{live:{setup:function(D,E){n.event.add(this,E[0],c)},teardown:function(F){if(F.length){var D=0,E=RegExp("(^|\\.)"+F[0]+"(\\.|$)");n.each((n.data(this,"events").live||{}),function(){if(E.test(this.type)){D++}});if(D<1){n.event.remove(this,F[0],c)}}}}}};n.Event=function(D){if(!this.preventDefault){return new n.Event(D)}if(D&&D.type){this.originalEvent=D;this.type=D.type;this.timeStamp=D.timeStamp}else{this.type=D}if(!this.timeStamp){this.timeStamp=e()}this[h]=true};function k(){return false}function t(){return true}n.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var D=this.originalEvent;if(!D){return}if(D.preventDefault){D.preventDefault()}D.returnValue=false},stopPropagation:function(){this.isPropagationStopped=t;var D=this.originalEvent;if(!D){return}if(D.stopPropagation){D.stopPropagation()}D.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(E){var D=E.relatedTarget;while(D&&D!=this){try{D=D.parentNode}catch(F){D=this}}if(D!=this){E.type=E.data;n.event.handle.apply(this,arguments)}};n.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(E,D){n.event.special[D]={setup:function(){n.event.add(this,E,a,D)},teardown:function(){n.event.remove(this,E,a)}}});n.fn.extend({bind:function(E,F,D){return E=="unload"?this.one(E,F,D):this.each(function(){n.event.add(this,E,D||F,D&&F)})},one:function(F,G,E){var D=n.event.proxy(E||G,function(H){n(this).unbind(H,D);return(E||G).apply(this,arguments)});return this.each(function(){n.event.add(this,F,D,E&&G)})},unbind:function(E,D){return this.each(function(){n.event.remove(this,E,D)})},trigger:function(D,E){return this.each(function(){n.event.trigger(D,E,this)})},triggerHandler:function(D,F){if(this[0]){var E=n.Event(D);E.preventDefault();E.stopPropagation();n.event.trigger(E,F,this[0]);return E.result}},toggle:function(F){var D=arguments,E=1;while(E<D.length){n.event.proxy(F,D[E++])}return this.click(n.event.proxy(F,function(G){this.lastToggle=(this.lastToggle||0)%E;G.preventDefault();return D[this.lastToggle++].apply(this,arguments)||false}))},hover:function(D,E){return this.mouseenter(D).mouseleave(E)},ready:function(D){A();if(n.isReady){D.call(document,n)}else{n.readyList.push(D)}return this},live:function(F,E){var D=n.event.proxy(E);D.guid+=this.selector+F;n(document).bind(i(F,this.selector),this.selector,D);return this},die:function(E,D){n(document).unbind(i(E,this.selector),D?{guid:D.guid+this.selector+E}:null);return this}});function c(G){var D=RegExp("(^|\\.)"+G.type+"(\\.|$)"),F=true,E=[];n.each(n.data(this,"events").live||[],function(H,I){if(D.test(I.type)){var J=n(G.target).closest(I.data)[0];if(J){E.push({elem:J,fn:I})}}});n.each(E,function(){if(!G.isImmediatePropagationStopped()&&this.fn.call(this.elem,G,this.fn.data)===false){F=false}});return F}function i(E,D){return["live",E,D.replace(/\./g,"`").replace(/ /g,"|")].join(".")}n.extend({isReady:false,readyList:[],ready:function(){if(!n.isReady){n.isReady=true;if(n.readyList){n.each(n.readyList,function(){this.call(document,n)});n.readyList=null}n(document).triggerHandler("ready")}}});var w=false;function A(){if(w){return}w=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);n.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);n.ready()}});if(document.documentElement.doScroll&&!l.frameElement){(function(){if(n.isReady){return}try{document.documentElement.doScroll("left")}catch(D){setTimeout(arguments.callee,0);return}n.ready()})()}}}n.event.add(l,"load",n.ready)}n.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(E,D){n.fn[D]=function(F){return F?this.bind(D,F):this.trigger(D)}});n(l).bind("unload",function(){for(var D in n.cache){if(D!=1&&n.cache[D].handle){n.event.remove(n.cache[D].handle.elem)}}});(function(){n.support={};var E=document.documentElement,F=document.createElement("script"),J=document.createElement("div"),I="script"+(new Date).getTime();J.style.display="none";J.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var G=J.getElementsByTagName("*"),D=J.getElementsByTagName("a")[0];if(!G||!G.length||!D){return}n.support={leadingWhitespace:J.firstChild.nodeType==3,tbody:!J.getElementsByTagName("tbody").length,objectAll:!!J.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!J.getElementsByTagName("link").length,style:/red/.test(D.getAttribute("style")),hrefNormalized:D.getAttribute("href")==="/a",opacity:D.style.opacity==="0.5",cssFloat:!!D.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};F.type="text/javascript";try{F.appendChild(document.createTextNode("window."+I+"=1;"))}catch(H){}E.insertBefore(F,E.firstChild);if(l[I]){n.support.scriptEval=true;delete l[I]}E.removeChild(F);if(J.attachEvent&&J.fireEvent){J.attachEvent("onclick",function(){n.support.noCloneEvent=false;J.detachEvent("onclick",arguments.callee)});J.cloneNode(true).fireEvent("onclick")}n(function(){var K=document.createElement("div");K.style.width="1px";K.style.paddingLeft="1px";document.body.appendChild(K);n.boxModel=n.support.boxModel=K.offsetWidth===2;document.body.removeChild(K)})})();var v=n.support.cssFloat?"cssFloat":"styleFloat";n.props={"for":"htmlFor","class":"className","float":v,cssFloat:v,styleFloat:v,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};n.fn.extend({_load:n.fn.load,load:function(F,I,J){if(typeof F!=="string"){return this._load(F)}var H=F.indexOf(" ");if(H>=0){var D=F.slice(H,F.length);F=F.slice(0,H)}var G="GET";if(I){if(n.isFunction(I)){J=I;I=null}else{if(typeof I==="object"){I=n.param(I);G="POST"}}}var E=this;n.ajax({url:F,type:G,dataType:"html",data:I,complete:function(L,K){if(K=="success"||K=="notmodified"){E.html(D?n("<div/>").append(L.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(D):L.responseText)}if(J){E.each(J,[L.responseText,K,L])}}});return this},serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?n.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(D,E){var F=n(this).val();return F==null?null:n.isArray(F)?n.map(F,function(H,G){return{name:E.name,value:H}}):{name:E.name,value:F}}).get()}});n.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(D,E){n.fn[E]=function(F){return this.bind(E,F)}});var q=e();n.extend({get:function(D,F,G,E){if(n.isFunction(F)){G=F;F=null}return n.ajax({type:"GET",url:D,data:F,success:G,dataType:E})},getScript:function(D,E){return n.get(D,null,E,"script")},getJSON:function(D,E,F){return n.get(D,E,F,"json")},post:function(D,F,G,E){if(n.isFunction(F)){G=F;F={}}return n.ajax({type:"POST",url:D,data:F,success:G,dataType:E})},ajaxSetup:function(D){n.extend(n.ajaxSettings,D)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(L){L=n.extend(true,L,n.extend(true,{},n.ajaxSettings,L));var V,E=/=\?(&|$)/g,Q,U,F=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=n.param(L.data)}if(L.dataType=="jsonp"){if(F=="GET"){if(!L.url.match(E)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(E)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(E)||L.url.match(E))){V="jsonp"+q++;if(L.data){L.data=(L.data+"").replace(E,"="+V+"$1")}L.url=L.url.replace(E,"="+V+"$1");L.dataType="script";l[V]=function(W){U=W;H();K();l[V]=g;try{delete l[V]}catch(X){}if(G){G.removeChild(S)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&F=="GET"){var D=e();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+D+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+D:"")}if(L.data&&F=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!n.active++){n.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&F=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var G=document.getElementsByTagName("head")[0];var S=document.createElement("script");S.src=L.url;if(L.scriptCharset){S.charset=L.scriptCharset}if(!V){var N=false;S.onload=S.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){N=true;H();K();G.removeChild(S)}}}G.appendChild(S);return g}var J=false;var I=L.xhr();if(L.username){I.open(F,L.url,L.async,L.username,L.password)}else{I.open(F,L.url,L.async)}try{if(L.data){I.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){I.setRequestHeader("If-Modified-Since",n.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(I,L)===false){if(L.global&&!--n.active){n.event.trigger("ajaxStop")}I.abort();return false}if(L.global){n.event.trigger("ajaxSend",[I,L])}var M=function(W){if(I.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}}else{if(!J&&I&&(I.readyState==4||W=="timeout")){J=true;if(O){clearInterval(O);O=null}Q=W=="timeout"?"timeout":!n.httpSuccess(I)?"error":L.ifModified&&n.httpNotModified(I,L.url)?"notmodified":"success";if(Q=="success"){try{U=n.httpData(I,L.dataType,L)}catch(Y){Q="parsererror"}}if(Q=="success"){var X;try{X=I.getResponseHeader("Last-Modified")}catch(Y){}if(L.ifModified&&X){n.lastModified[L.url]=X}if(!V){H()}}else{n.handleError(L,I,Q)}K();if(L.async){I=null}}}};if(L.async){var O=setInterval(M,13);if(L.timeout>0){setTimeout(function(){if(I){if(!J){M("timeout")}if(I){I.abort()}}},L.timeout)}}try{I.send(L.data)}catch(R){n.handleError(L,I,null,R)}if(!L.async){M()}function H(){if(L.success){L.success(U,Q)}if(L.global){n.event.trigger("ajaxSuccess",[I,L])}}function K(){if(L.complete){L.complete(I,Q)}if(L.global){n.event.trigger("ajaxComplete",[I,L])}if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}return I},handleError:function(E,G,D,F){if(E.error){E.error(G,D,F)}if(E.global){n.event.trigger("ajaxError",[G,E,F])}},active:0,httpSuccess:function(E){try{return !E.status&&location.protocol=="file:"||(E.status>=200&&E.status<300)||E.status==304||E.status==1223}catch(D){}return false},httpNotModified:function(F,D){try{var G=F.getResponseHeader("Last-Modified");return F.status==304||G==n.lastModified[D]}catch(E){}return false},httpData:function(I,G,F){var E=I.getResponseHeader("content-type"),D=G=="xml"||!G&&E&&E.indexOf("xml")>=0,H=D?I.responseXML:I.responseText;if(D&&H.documentElement.tagName=="parsererror"){throw"parsererror"}if(F&&F.dataFilter){H=F.dataFilter(H,G)}if(typeof H==="string"){if(G=="script"){n.globalEval(H)}if(G=="json"){H=l["eval"]("("+H+")")}}return H},param:function(D){var F=[];function G(H,I){F[F.length]=encodeURIComponent(H)+"="+encodeURIComponent(I)}if(n.isArray(D)||D.jquery){n.each(D,function(){G(this.name,this.value)})}else{for(var E in D){if(n.isArray(D[E])){n.each(D[E],function(){G(E,this)})}else{G(E,n.isFunction(D[E])?D[E]():D[E])}}}return F.join("&").replace(/%20/g,"+")}});var m={},d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function s(E,D){var F={};n.each(d.concat.apply([],d.slice(0,D)),function(){F[this]=E});return F}n.fn.extend({show:function(I,K){if(I){return this.animate(s("show",3),I,K)}else{for(var G=0,E=this.length;G<E;G++){var D=n.data(this[G],"olddisplay");this[G].style.display=D||"";if(n.css(this[G],"display")==="none"){var F=this[G].tagName,J;if(m[F]){J=m[F]}else{var H=n("<"+F+" />").appendTo("body");J=H.css("display");if(J==="none"){J="block"}H.remove();m[F]=J}this[G].style.display=n.data(this[G],"olddisplay",J)}}return this}},hide:function(G,H){if(G){return this.animate(s("hide",3),G,H)}else{for(var F=0,E=this.length;F<E;F++){var D=n.data(this[F],"olddisplay");if(!D&&D!=="none"){n.data(this[F],"olddisplay",n.css(this[F],"display"))}this[F].style.display="none"}return this}},_toggle:n.fn.toggle,toggle:function(F,E){var D=typeof F==="boolean";return n.isFunction(F)&&n.isFunction(E)?this._toggle.apply(this,arguments):F==null||D?this.each(function(){var G=D?F:n(this).is(":hidden");n(this)[G?"show":"hide"]()}):this.animate(s("toggle",3),F,E)},fadeTo:function(D,F,E){return this.animate({opacity:F},D,E)},animate:function(H,E,G,F){var D=n.speed(E,G,F);return this[D.queue===false?"each":"queue"](function(){var J=n.extend({},D),L,K=this.nodeType==1&&n(this).is(":hidden"),I=this;for(L in H){if(H[L]=="hide"&&K||H[L]=="show"&&!K){return J.complete.call(this)}if((L=="height"||L=="width")&&this.style){J.display=n.css(this,"display");J.overflow=this.style.overflow}}if(J.overflow!=null){this.style.overflow="hidden"}J.curAnim=n.extend({},H);n.each(H,function(N,R){var Q=new n.fx(I,J,N);if(/toggle|show|hide/.test(R)){Q[R=="toggle"?K?"show":"hide":R](H)}else{var P=R.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),S=Q.cur(true)||0;if(P){var M=parseFloat(P[2]),O=P[3]||"px";if(O!="px"){I.style[N]=(M||1)+O;S=((M||1)/Q.cur(true))*S;I.style[N]=S+O}if(P[1]){M=((P[1]=="-="?-1:1)*M)+S}Q.custom(S,M,O)}else{Q.custom(S,R,"")}}});return true})},stop:function(E,D){var F=n.timers;if(E){this.queue([])}this.each(function(){for(var G=F.length-1;G>=0;G--){if(F[G].elem==this){if(D){F[G](true)}F.splice(G,1)}}});if(!D){this.dequeue()}return this}});n.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(D,E){n.fn[D]=function(F,G){return this.animate(E,F,G)}});n.extend({speed:function(F,G,E){var D=typeof F==="object"?F:{complete:E||!E&&G||n.isFunction(F)&&F,duration:F,easing:E&&G||G&&!n.isFunction(G)&&G};D.duration=n.fx.off?0:typeof D.duration==="number"?D.duration:n.fx.speeds[D.duration]||n.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){n(this).dequeue()}if(n.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(F,G,D,E){return D+E*F},swing:function(F,G,D,E){return((-Math.cos(F*Math.PI)/2)+0.5)*E+D}},timers:[],timerId:null,fx:function(E,D,F){this.options=D;this.elem=E;this.prop=F;if(!D.orig){D.orig={}}}});n.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(n.fx.step[this.prop]||n.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(E){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var D=parseFloat(n.css(this.elem,this.prop,E));return D&&D>-10000?D:parseFloat(n.curCSS(this.elem,this.prop))||0},custom:function(H,G,F){this.startTime=e();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;function E(I){return D.step(I)}E.elem=this.elem;n.timers.push(E);if(E()&&n.timerId==null){n.timerId=setInterval(function(){var J=n.timers;for(var I=0;I<J.length;I++){if(!J[I]()){J.splice(I--,1)}}if(!J.length){clearInterval(n.timerId);n.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());n(this.elem).show()},hide:function(){this.options.orig[this.prop]=n.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(G){var F=e();if(G||F>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var D=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){D=false}}if(D){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(n.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){n(this.elem).hide()}if(this.options.hide||this.options.show){for(var H in this.options.curAnim){n.attr(this.elem.style,H,this.options.orig[H])}}}if(D){this.options.complete.call(this.elem)}return false}else{var I=F-this.startTime;this.state=I/this.options.duration;this.pos=n.easing[this.options.easing||(n.easing.swing?"swing":"linear")](this.state,I,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};n.extend(n.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(D){n.attr(D.elem.style,"opacity",D.now)},_default:function(D){if(D.elem.style&&D.elem.style[D.prop]!=null){D.elem.style[D.prop]=D.now+D.unit}else{D.elem[D.prop]=D.now}}}});if(document.documentElement.getBoundingClientRect){n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,D=I.documentElement,K=D.clientTop||E.clientTop||0,J=D.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||n.boxModel&&D.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||n.boxModel&&D.scrollLeft||E.scrollLeft)-J;return{top:H,left:G}}}else{n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}n.offset.initialized||n.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,D=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(n.offset.doesNotAddBorder&&!(n.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}E=F,F=I.offsetParent}if(n.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}D=L}if(D.position==="relative"||D.position==="static"){M+=J.offsetTop,H+=J.offsetLeft}if(D.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:M,left:H}}}n.offset={initialize:function(){if(this.initialized){return}var K=document.body,E=document.createElement("div"),G,F,M,H,L,D,I=K.style.marginTop,J='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(D in L){E.style[D]=L[D]}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true},bodyOffset:function(D){n.offset.initialized||n.offset.initialize();var F=D.offsetTop,E=D.offsetLeft;if(n.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(n.curCSS(D,"marginTop",true),10)||0,E+=parseInt(n.curCSS(D,"marginLeft",true),10)||0}return{top:F,left:E}}};n.fn.extend({position:function(){var H=0,G=0,E;if(this[0]){var F=this.offsetParent(),I=this.offset(),D=/^body|html$/i.test(F[0].tagName)?{top:0,left:0}:F.offset();I.top-=j(this,"marginTop");I.left-=j(this,"marginLeft");D.top+=j(F,"borderTopWidth");D.left+=j(F,"borderLeftWidth");E={top:I.top-D.top,left:I.left-D.left}}return E},offsetParent:function(){var D=this[0].offsetParent||document.body;while(D&&(!/^body|html$/i.test(D.tagName)&&n.css(D,"position")=="static")){D=D.offsetParent}return n(D)}});n.each(["Left","Top"],function(E,D){var F="scroll"+D;n.fn[F]=function(G){if(!this[0]){return null}return G!==g?this.each(function(){this==l||this==document?l.scrollTo(!E?G:n(l).scrollLeft(),E?G:n(l).scrollTop()):this[F]=G}):this[0]==l||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||n.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});n.each(["Height","Width"],function(G,E){var D=G?"Left":"Top",F=G?"Right":"Bottom";n.fn["inner"+E]=function(){return this[E.toLowerCase()]()+j(this,"padding"+D)+j(this,"padding"+F)};n.fn["outer"+E]=function(I){return this["inner"+E]()+j(this,"border"+D+"Width")+j(this,"border"+F+"Width")+(I?j(this,"margin"+D)+j(this,"margin"+F):0)};var H=E.toLowerCase();n.fn[H]=function(I){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+E]||document.body["client"+E]:this[0]==document?Math.max(document.documentElement["client"+E],document.body["scroll"+E],document.documentElement["scroll"+E],document.body["offset"+E],document.documentElement["offset"+E]):I===g?(this.length?n.css(this[0],H):null):this.css(H,typeof I==="string"?I:I+"px")}})})();
diff --git a/devtools/client/inspector/markup/test/lib_jquery_1.4_min.js b/devtools/client/inspector/markup/test/lib_jquery_1.4_min.js
new file mode 100644
index 0000000000..5c70e4c5f3
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_jquery_1.4_min.js
@@ -0,0 +1,151 @@
+/*!
+ * jQuery JavaScript Library v1.4
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://docs.jquery.com/License
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Wed Jan 13 15:23:05 2010 -0500
+ */
+(function(A,w){function oa(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(oa,1);return}c.ready()}}function La(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function $(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var o in b)$(a,o,b[o],f,e,d);return a}if(d!==w){f=!i&&f&&c.isFunction(d);for(o=0;o<j;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,i);return a}return j?
+e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget);
+n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType===
+11}function ta(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ua(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:s;f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=
+i?f:1;return{fragment:f,cacheable:e}}function T(a){for(var b=0,d,f;(d=a[b])!=null;b++)if(!c.noData[d.nodeName.toLowerCase()]&&(f=d[H]))delete c.cache[f]}function L(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ma=A.jQuery,Na=A.$,s=A.document,U,Oa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Pa=/^.[^:#\[\.,]*$/,Qa=/\S/,
+Ra=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Sa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];
+c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ua([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return U.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||U).find(a):c(b).find(a);else if(c.isFunction(a))return U.ready(a);if(a.selector!==w){this.selector=a.selector;
+this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=
+0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||
+c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]=
+o}return a};c.extend({noConflict:function(a){A.$=Na;if(a)A.jQuery=Ma;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",M,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",
+M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)},
+isEmptyObject:function(a){for(var b in a)return false;return true},noop:function(){},globalEval:function(a){if(a&&Qa.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===w||c.isFunction(a);
+if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Ra,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ea.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=
+0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b===
+"string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&&
+!/compatible/.test(a))b={browser:"mozilla",version:/rv:([\w.]+)/};b.version=(b.version&&b.version.exec(a)||[0,"0"])[1];return b},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(V)c.inArray=function(a,b){return V.call(b,a)};U=c(s);if(s.addEventListener)M=function(){s.removeEventListener("DOMContentLoaded",M,false);c.ready()};else if(s.attachEvent)M=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",
+M);c.ready()}};if(V)c.inArray=function(a,b){return V.call(b,a)};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+K();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,
+htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,
+a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in
+p;if(!n){p.setAttribute(o,"return;");n=typeof p[o]==="function"}return n};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var H="jQuery"+K(),Ta=0,ya={},Ua={};c.extend({cache:{},expando:H,noData:{embed:true,object:true,applet:true},data:function(a,
+b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var f=a[H],e=c.cache;if(!b&&!f)return null;f||(f=++Ta);if(typeof b==="object"){a[H]=f;e=e[f]=c.extend(true,{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Ua:(e[f]={});if(d!==w){a[H]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var d=a[H],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[H]}catch(i){a.removeAttribute&&
+a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,
+a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,
+a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a,
+b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,o=b.length;j<o;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=
+" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,
+b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
+" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&&
+!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex=
+-1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;
+if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===
+3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):w};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var o,p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var t=e[o],z=this.special[o]||{};if(!t){t=e[o]={};
+if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,t))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}t[d.guid]=d;this.global[o]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);
+for(var o=0;i=b[o++];){var p=i.split(".");i=p.shift();var n=!p.length,t=c.map(p.slice(0).sort(),$a);t=new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.)?")+"(\\.|$)");var z=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var B in f[i])if(n||t.test(f[i][B].type))delete f[i][B];z.remove&&z.remove.call(a,p,j);for(e in f[i])break;if(!e){if(!z.teardown||z.teardown.call(a,p)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+
+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(B=c.data(a,"handle"))B.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[H]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
+8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;var i=c.data(d,"handle");i&&i.apply(d,b);var j,o;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){j=d[e];o=d["on"+e]}}catch(p){}i=c.nodeName(d,"a")&&e==="click";if(!f&&j&&!a.isDefaultPrevented()&&!i){this.triggered=true;try{d[e]()}catch(n){}}else if(o&&d["on"+e].apply(d,b)===false)a.result=false;this.triggered=false;if(!a.isPropagationStopped())(d=d.parentNode||d.ownerDocument)&&c.event.trigger(a,b,d,true)},
+handle:function(a){var b,d;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},
+props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[H])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||
+s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&
+a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,qa,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],qa)}},special:{}},beforeunload:{setup:function(a,
+b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=K();this[H]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=
+ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:aa,isPropagationStopped:aa,isImmediatePropagationStopped:aa};var Ba=function(a){for(var b=a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ca=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",
+mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ca:Ba,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ca:Ba)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return pa("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+
+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return pa("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var ga=/textarea|input|select/i;function Da(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>
+-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ha(a,b){var d=a.target,f,e;if(!(!ga.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Da(d);if(e!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(d.type!=="select"&&(f!=null||e)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ha,click:function(a){var b=a.target,d=b.type;if(d===
+"radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ha.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ha.call(this,a)},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Da(a))}},setup:function(a,b,d){for(var f in W)c.event.add(this,f+".specialChange."+d.guid,W[f]);return ga.test(this.nodeName)},
+remove:function(a,b){for(var d in W)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),W[d]);return ga.test(this.nodeName)}};var W=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,
+f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,
+b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||
+a)},live:function(a,b,d){if(c.isFunction(b)){d=b;b=w}c(this.context).bind(ra(a,this.selector),{data:b,selector:this.selector,live:a},d);return this},die:function(a,b){c(this.context).unbind(ra(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?
+this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===
+k){y=m[u.sizset];break}if(u.nodeType===1&&!q){u.sizcache=k;u.sizset=r}if(u.nodeName.toLowerCase()===h){y=u;break}u=u[g]}m[r]=y}}}function d(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===k){y=m[u.sizset];break}if(u.nodeType===1){if(!q){u.sizcache=k;u.sizset=r}if(typeof h!=="string"){if(u===h){y=true;break}}else if(p.filter(h,[u]).length>0){y=u;break}}u=u[g]}m[r]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+e=0,i=Object.prototype.toString,j=false,o=true;[0,0].sort(function(){o=false;return 0});var p=function(g,h,k,m){k=k||[];var r=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return k;for(var q=[],v,u,y,S,I=true,N=x(h),J=g;(f.exec(""),v=f.exec(J))!==null;){J=v[3];q.push(v[1]);if(v[2]){S=v[3];break}}if(q.length>1&&t.exec(g))if(q.length===2&&n.relative[q[0]])u=ia(q[0]+q[1],h);else for(u=n.relative[q[0]]?[h]:p(q.shift(),h);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();
+u=ia(g,u)}else{if(!m&&q.length>1&&h.nodeType===9&&!N&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){v=p.find(q.shift(),h,N);h=v.expr?p.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:q.pop(),set:B(m)}:p.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&h.parentNode?h.parentNode:h,N);u=v.expr?p.filter(v.expr,v.set):v.set;if(q.length>0)y=B(u);else I=false;for(;q.length;){var E=q.pop();v=E;if(n.relative[E])v=q.pop();else E="";if(v==null)v=h;n.relative[E](y,v,N)}}else y=[]}y||(y=u);if(!y)throw"Syntax error, unrecognized expression: "+
+(E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[];
+for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length-
+1)!=="\\"){if(v===q)q=[];if(n.preFilter[I])if(u=n.preFilter[I](u,v,k,q,m,S)){if(u===true)continue}else y=J=true;if(u)for(var X=0;(E=v[X])!=null;X++)if(E){J=N(E,u,X,v);var Ea=m^!!J;if(k&&J!=null)if(Ea)y=true;else v[X]=false;else if(Ea){q.push(E);y=true}}if(J!==w){k||(v=q);g=g.replace(n.match[I],"");if(!y)return[];break}}}if(g===r)if(y==null)throw"Syntax error, unrecognized expression: "+g;else break;r=g}return v};var n=p.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
+CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
+relative:{"+":function(g,h){var k=typeof h==="string",m=k&&!/\W/.test(h);k=k&&!m;if(m)h=h.toLowerCase();m=0;for(var r=g.length,q;m<r;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=k||q&&q.nodeName.toLowerCase()===h?q||false:q===h}k&&p.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,r=g.length;m<r;m++){var q=g[m];if(q){k=q.parentNode;g[m]=k.nodeName.toLowerCase()===h?k:false}}}else{m=0;for(r=g.length;m<r;m++)if(q=g[m])g[m]=
+k?q.parentNode:q.parentNode===h;k&&p.filter(h,g,true)}},"":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("parentNode",h,m,g,q,k)},"~":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("previousSibling",h,m,g,q,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];
+h=h.getElementsByName(g[1]);for(var m=0,r=h.length;m<r;m++)h[m].getAttribute("name")===g[1]&&k.push(h[m]);return k.length===0?null:k}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,m,r,q){g=" "+g[1].replace(/\\/g,"")+" ";if(q)return g;q=0;for(var v;(v=h[q])!=null;q++)if(v)if(r^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||m.push(v);else if(k)h[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
+CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,m,r,q){h=g[1].replace(/\\/g,"");if(!q&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,m,r){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=p(g[3],null,null,h);else{g=p.filter(g[3],h,k,true^r);k||m.push.apply(m,
+g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!p(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
+text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
+setFilters:{first:function(g,h){return h===0},last:function(g,h,k,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,m){var r=h[1],q=n.filters[r];if(q)return q(g,k,h,m);else if(r==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(r==="not"){h=
+h[3];k=0;for(m=h.length;k<m;k++)if(h[k]===g)return false;return true}else throw"Syntax error, unrecognized expression: "+r;},CHILD:function(g,h){var k=h[1],m=g;switch(k){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(k==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":k=h[2];var r=h[3];if(k===1&&r===0)return true;h=h[0];var q=g.parentNode;if(q&&(q.sizcache!==h||!g.nodeIndex)){var v=0;for(m=q.firstChild;m;m=
+m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;q.sizcache=h}g=g.nodeIndex-r;return k===0?g===0:g%k===0&&g/k>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=n.attrHandle[k]?n.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
+"="?k===h:m==="*="?k.indexOf(h)>=0:m==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:m==="!="?k!==h:m==="^="?k.indexOf(h)===0:m==="$="?k.substr(k.length-h.length)===h:m==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,m){var r=n.setFilters[h[2]];if(r)return r(g,k,h,m)}}},t=n.match.POS;for(var z in n.match){n.match[z]=new RegExp(n.match[z].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[z]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[z].source.replace(/\\(\d+)/g,function(g,
+h){return"\\"+(h-0+1)}))}var B=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){B=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,m=g.length;k<m;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var D;if(s.documentElement.compareDocumentPosition)D=function(g,h){if(!g.compareDocumentPosition||
+!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in s.documentElement)D=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(s.createRange)D=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),m=
+h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)j=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=s.documentElement;k.insertBefore(g,k.firstChild);if(s.getElementById(h)){n.find.ID=function(m,r,q){if(typeof r.getElementById!=="undefined"&&!q)return(r=r.getElementById(m[1]))?r.id===m[1]||typeof r.getAttributeNode!=="undefined"&&
+r.getAttributeNode("id").nodeValue===m[1]?[r]:w:[]};n.filter.ID=function(m,r){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===r}}k.removeChild(g);k=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;k[m];m++)k[m].nodeType===1&&h.push(k[m]);k=h}return k};g.innerHTML="<a href='#'></a>";
+if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=p,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){p=function(m,r,q,v){r=r||s;if(!v&&r.nodeType===9&&!x(r))try{return B(r.querySelectorAll(m),q)}catch(u){}return g(m,r,q,v)};for(var k in g)p[k]=g[k];h=null}}();
+(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,k,m){if(typeof k.getElementsByClassName!=="undefined"&&!m)return k.getElementsByClassName(h[1])};g=null}}})();var F=s.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,
+h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ia=function(g,h){var k=[],m="",r;for(h=h.nodeType?[h]:h;r=n.match.PSEUDO.exec(g);){m+=r[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;r=0;for(var q=h.length;r<q;r++)p(g,h[r],k);return p.filter(m,k)};c.find=p;c.expr=p.selectors;c.expr[":"]=c.expr.filters;c.unique=p.uniqueSort;c.getText=a;c.isXMLDoc=x;c.contains=F})();var ab=/Until$/,bb=/^(?:parents|prevUntil|prevAll)/,
+cb=/,/;R=Array.prototype.slice;var Fa=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Pa.test(b))return c.filter(b,f,!d);else b=c.filter(b,a)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
+c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Fa(this,a,false),"not",a)},filter:function(a){return this.pushStack(Fa(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i=
+{},j;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var p=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,t){for(;t&&t.ownerDocument&&t!==b;){if(p?p.index(t)>-1:c(t).is(a))return t;t=t.parentNode}return null})},index:function(a){if(!a||typeof a===
+"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(sa(a[0])||sa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
+d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
+a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);ab.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||cb.test(f))&&bb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||!c(a).is(d));){a.nodeType===
+1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ga=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,db=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,hb=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},G={option:[1,"<select multiple='multiple'>","</select>"],
+legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};G.optgroup=G.option;G.tbody=G.tfoot=G.colgroup=G.caption=G.thead;G.th=G.td;if(!c.support.htmlSerialize)G._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);
+return d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.getText(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&
+this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,
+"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ga,"").replace(Y,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ta(this,b);ta(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===
+1?this[0].innerHTML.replace(Ga,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!Y.test(a))&&!G[(Ha.exec(a)||["",""])[1].toLowerCase()])try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){T(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
+this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z=
+c(this);a[0]=j.call(this,t,b?z.html():w);return z.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ua(a,this,o);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var p=0,n=this.length;p<n;p++)d.call(b?f(this[p],i):this[p],e.cacheable||this.length>1||p>0?e.fragment.cloneNode(true):e.fragment)}o&&c.each(o,La)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},
+function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){T(this.getElementsByTagName("*"));T([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&T(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},
+function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j==="string"){j=j.replace(db,hb);var o=(Ha.exec(j)||["",""])[1].toLowerCase(),p=G[o]||G._default,n=p[0];i=b.createElement("div");for(i.innerHTML=p[1]+j+p[2];n--;)i=i.lastChild;
+if(!c.support.tbody){n=fb.test(j);o=o==="table"&&!n?i.firstChild&&i.firstChild.childNodes:p[1]==="<table>"&&!n?i.childNodes:[];for(p=o.length-1;p>=0;--p)c.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!c.support.leadingWhitespace&&Y.test(j)&&i.insertBefore(b.createTextNode(Y.exec(j)[0]),i.firstChild);j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()===
+"text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e}});var ib=/z-?index|font-?weight|opacity|zoom|line-?height/i,Ia=/alpha\([^)]*\)/,Ja=/opacity=([^)]*)/,ja=/float/i,ka=/-([a-z])/ig,jb=/([A-Z])/g,kb=/^-?\d+(?:px)?$/i,lb=/^-?\d/,mb={position:"absolute",visibility:"hidden",display:"block"},nb=["Left","Right"],ob=["Top","Bottom"],pb=s.defaultView&&
+s.defaultView.getComputedStyle,Ka=c.support.cssFloat?"cssFloat":"styleFloat",la=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return $(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!ib.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""===
+"NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ia.test(a)?a.replace(Ia,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ja.exec(f.filter)[1])/100+"":""}if(ja.test(b))b=Ka;b=b.replace(ka,la);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?nb:ob;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=
+parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,mb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Ja.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ja.test(b))b=Ka;if(!d&&e&&e[b])f=e[b];else if(pb){if(ja.test(b))b="float";b=b.replace(jb,"-$1").toLowerCase();e=
+a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ka,la);f=a.currentStyle[b]||a.currentStyle[d];if(!kb.test(f)&&lb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=
+f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var qb=K(),rb=/<script(.|\s)*?\/script>/gi,sb=/select|textarea/i,tb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,O=/=\?(&|$)/,ma=/\?/,ub=/(\?|&)_=.*?(&|$)/,vb=/^(\w+:)?\/\/([^\/?#]+)/,
+wb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}c.ajax({url:a,type:f,dataType:"html",data:b,context:this,complete:function(i,j){if(j==="success"||j==="notmodified")this.html(e?c("<div />").append(i.responseText.replace(rb,
+"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
+c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},
+ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",
+text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(p,o,j,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(p,x,j);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(r,q){(e.context?c(e.context):c.event).trigger(r,q)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,o,p=e.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,
+e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&&
+B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");
+C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",
+e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}t||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ia){}if(e.beforeSend&&e.beforeSend.call(p,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",
+[x,e]);var g=x.onreadystatechange=function(r){if(!x||x.readyState===0){F||d();F=true;if(x)x.onreadystatechange=c.noop}else if(!F&&x&&(x.readyState===4||r==="timeout")){F=true;x.onreadystatechange=c.noop;j=r==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";if(j==="success")try{o=c.httpData(x,e.dataType,e)}catch(q){j="parsererror"}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,x,j);d();r==="timeout"&&x.abort();if(e.async)x=
+null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol===
+"file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;if(e&&a.documentElement.nodeName==="parsererror")throw"parsererror";if(d&&
+d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))a=A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+a))();else throw"Invalid JSON: "+a;else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(e,i){i=
+c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/,
+Z,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a!=null)return this.animate(L("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(na[d])f=na[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();
+na[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a!=null)return this.animate(L("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&
+c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"),
+p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a);
+else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle",
+1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,
+b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==
+null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=K();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!Z)Z=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
+"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=K(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=
+this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=
+c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(Z);Z=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=
+null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
+f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
+b,e=b.ownerDocument,i,j=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;n-=b.scrollLeft;if(b===d){p+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){p+=parseFloat(i.borderTopWidth)||
+0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),
+d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);
+d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
+bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-
+e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
+this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
+c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+
+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
diff --git a/devtools/client/inspector/markup/test/lib_jquery_1.6_min.js b/devtools/client/inspector/markup/test/lib_jquery_1.6_min.js
new file mode 100644
index 0000000000..c72011dfa0
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_jquery_1.6_min.js
@@ -0,0 +1,16 @@
+/*!
+ * jQuery JavaScript Library v1.6
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon May 2 13:50:00 2011 -0400
+ */
+(function(a,b){function cw(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function ct(a){if(!ch[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ci||(ci=c.createElement("iframe"),ci.frameBorder=ci.width=ci.height=0),c.body.appendChild(ci);if(!cj||!ci.createElement)cj=(ci.contentWindow||ci.contentDocument).document,cj.write("<!doctype><html><body></body></html>");b=cj.createElement(a),cj.body.appendChild(b),d=f.css(b,"display"),c.body.removeChild(ci)}ch[a]=d}return ch[a]}function cs(a,b){var c={};f.each(cn.concat.apply([],cn.slice(0,b)),function(){c[this]=a});return c}function cr(){co=b}function cq(){setTimeout(cr,0);return co=f.now()}function cg(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cf(){try{return new a.XMLHttpRequest}catch(b){}}function b_(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function b$(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bZ(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):bZ(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bZ(a+"["+e+"]",b[e],c,d);else d(a,b)}function bY(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bY(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bY(a,c,d,e,"*",g));return l}function bX(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?bv:bw,e=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return e;f.each(d,function(){c||(e-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?e+=parseFloat(f.css(a,"margin"+this))||0:e-=parseFloat(f.css(a,"border"+this+"Width"))||0});return e}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):a.getElementsByTagName&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){name="data-"+c.replace(j,"$1-$2").toLowerCase(),d=a.getAttribute(name);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(e){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function H(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(H,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=d.userAgent,x,y,z,A=Object.prototype.toString,B=Object.prototype.hasOwnProperty,C=Array.prototype.push,D=Array.prototype.slice,E=String.prototype.trim,F=Array.prototype.indexOf,G={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?g=[null,a,null]:g=i.exec(a);if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6",length:0,size:function(){return this.length},toArray:function(){return D.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?C.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(D.apply(this,arguments),"slice",D.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:C,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;y.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!y){y=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",z,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",z),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&H()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):G[A.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!B.call(a,"constructor")&&!B.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||B.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:E?function(a){return a==null?"":E.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?C.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(F)return F.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=D.call(arguments,2),g=function(){return a.apply(c,f.concat(D.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(c,d){d&&d instanceof e&&!(d instanceof a)&&(d=a(d));return e.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){G["[object "+b+"]"]=b.toLowerCase()}),x=e.uaMatch(w),x.browser&&(e.browser[x.browser]=!0,e.browser.version=x.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?z=function(){c.removeEventListener("DOMContentLoaded",z,!1),e.ready()}:c.attachEvent&&(z=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",z),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b,d,e,f,g,h,i,j,k,l,m,n,o,p,q;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",b=a.getElementsByTagName("*"),d=a.getElementsByTagName("a")[0];if(!b||!b.length||!d)return{};e=c.createElement("select"),f=e.appendChild(c.createElement("option")),g=a.getElementsByTagName("input")[0],i={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.55$/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:g.value==="on",optSelected:f.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},g.checked=!0,i.noCloneChecked=g.cloneNode(!0).checked,e.disabled=!0,i.optDisabled=!f.disabled;try{delete a.test}catch(r){i.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function click(){i.noCloneEvent=!1,a.detachEvent("onclick",click)}),a.cloneNode(!0).fireEvent("onclick")),g=c.createElement("input"),g.value="t",g.setAttribute("type","radio"),i.radioValue=g.value==="t",g.setAttribute("checked","checked"),a.appendChild(g),j=c.createDocumentFragment(),j.appendChild(a.firstChild),i.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",k=c.createElement("body"),l={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(p in l)k.style[p]=l[p];k.appendChild(a),c.documentElement.appendChild(k),i.appendChecked=g.checked,i.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,i.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",i.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",m=a.getElementsByTagName("td"),q=m[0].offsetHeight===0,m[0].style.display="",m[1].style.display="none",i.reliableHiddenOffsets=q&&m[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(h=c.createElement("div"),h.style.width="0",h.style.marginRight="0",a.appendChild(h),i.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(h,null).marginRight,10)||0)===0),k.innerHTML="",c.documentElement.removeChild(k);if(a.attachEvent)for(p in{submit:1,change:1,focusin:1})o="on"+p,q=o in a,q||(a.setAttribute(o,"return;"),q=typeof a[o]=="function"),i[p+"Bubbles"]=q;return i}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[c]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function l(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark";while(g--)if(tmp=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,tmp.done(l);l();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:data-|aria-)/,u=/\:/,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.addClass(a.call(this,b,c.attr("class")||""))});if(a&&typeof a=="string"){var b=(a||"").split(o);for(var c=0,d=this.length;c<d;c++){var e=this[c];if(e.nodeType===1)if(!e.className)e.className=a;else{var g=" "+e.className+" ",h=e.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);e.className=f.trim(h)}}}return this},removeClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a=="string"||a===b){var c=(a||"").split(o);for(var d=0,e=this.length;d<e;d++){var g=this[d];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(n," ");for(var i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){var d=f(this);d.toggleClass(a.call(this,c,d.attr("class"),b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;return(e.value||"").replace(p,"")}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||"set"in c&&c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b=a.selectedIndex,c=[],d=a.options,e=a.type==="select-one";if(b<0)return null;for(var g=e?b:0,h=e?b+1:d.length;g<h;g++){var i=d[g];if(i.selected&&(f.support.optDisabled?!i.disabled:i.getAttribute("disabled")===null)&&(!i.parentNode.disabled||!f.nodeName(i.parentNode,"optgroup"))){value=f(i).val();if(e)return value;c.push(value)}}if(e&&!c.length&&d.length)return f(d[b]).val();return c},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex",readonly:"readOnly"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);var h,i,j=g!==1||!f.isXMLDoc(a);c=j&&f.attrFix[c]||c,i=f.attrHooks[c]||(v&&(f.nodeName(a,"form")||u.test(c))?v:b);if(d!==b){if(d===null||d===!1&&!t.test(c)){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;d===!0&&!t.test(c)&&(d=c),a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j)return i.get(a,c);h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.getAttribute("value");a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}},propFix:{},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),f.support.getSetAttribute||(f.attrFix=f.extend(f.attrFix,{"for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder"}),v=f.attrHooks.name=f.attrHooks.value=f.valHooks.button={get:function(a,c){var d;if(c==="value"&&!f.nodeName(a,"button"))return a.getAttribute(c);d=a.getAttributeNode(c);return d&&d.specified?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=Object.prototype.hasOwnProperty,x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&(a.type=a.data,f.event.handle.apply(this,arguments))}catch(d){}},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function J(a){var c=a.target,d,e;if(!!y.test(c.nodeName)&&!c.readOnly){d=f._data(c,"_change_data"),e=I(c),(a.type!=="focusout"||c.type!=="radio")&&f._data(c,"_change_data",e);if(d===b||e===d)return;if(d!=null||e)a.type="change",a.liveFired=b,f.event.trigger(a,arguments[1],c)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){return a.nodeName.toLowerCase()==="input"&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(a===b){g=!0;return 0}if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!be[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[];for(var i=0,j;(j=a[i])!=null;i++){typeof j=="number"&&(j+="");if(!j)continue;if(typeof j=="string")if(!ba.test(j))j=b.createTextNode(j);else{j=j.replace(Z,"<$1></$2>");var k=($.exec(j)||["",""])[1].toLowerCase(),l=be[k]||be._default,m=l[0],n=b.createElement("div");n.innerHTML=l[1]+j+l[2];while(m--)n=n.lastChild;if(!f.support.tbody){var o=_.test(j),p=k==="table"&&!o?n.firstChild&&n.firstChild.childNodes:l[1]==="<table>"&&!o?n.childNodes:[];for(var q=p.length-1;q>=0;--q)f.nodeName(p[q],"tbody")&&!p[q].childNodes.length&&p[q].parentNode.removeChild(p[q])}!f.support.leadingWhitespace&&Y.test(j)&&n.insertBefore(b.createTextNode(Y.exec(j)[0]),n.firstChild),j=n.childNodes}var r;if(!f.support.appendChecked)if(j[0]&&typeof (r=j.length)=="number")for(i=0;i<r;i++)bk(j[i]);else bk(j);j.nodeType?h.push(j):h=f.merge(h,j)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(i=0;h[i];i++)if(e&&f.nodeName(h[i],"script")&&(!h[i].type||h[i].type.toLowerCase()==="text/javascript"))e.push(h[i].parentNode?h[i].parentNode.removeChild(h[i]):h[i]);else{if(h[i].nodeType===1){var s=f.grep(h[i].getElementsByTagName("script"),g);h.splice.apply(h,[i+1,0].concat(s))}d.appendChild(h[i])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/-([a-z])/ig,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz,bA=function(a,b){return b.toUpperCase()};f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0,widows:!0,orphans:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c))),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bo,bA)}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){a.offsetWidth!==0?e=bB(a,b,d):f.swap(a,bu,function(){e=bB(a,b,d)});if(e<=0){e=bx(a,b,b),e==="0px"&&bz&&(e=bz(a,b,b));if(e!=null)return e===""||e==="auto"?"0px":e}if(e<0||e==null){e=a.style[b];return e===""||e==="auto"?"0px":e}return typeof e=="string"?e:e+"px"}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV;try{bU=e.href}catch(bW){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bX(bS),ajaxTransport:bX(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?b$(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b_(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bY(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bY(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bZ(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var ca=f.now(),cb=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+ca++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cb.test(b.url)||e&&cb.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cb,l),b.url===j&&(e&&(k=k.replace(cb,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cc=a.ActiveXObject?function(){for(var a in ce)ce[a](0,1)}:!1,cd=0,ce;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cf()||cg()}:cf,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cc&&delete ce[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cd,cc&&(ce||(ce={},f(a).unload(cc)),ce[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ch={},ci,cj,ck=/^(?:toggle|show|hide)$/,cl=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cm,cn=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],co,cp=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cs("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",ct(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cs("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cs("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g];if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=ct(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block")),b.animatedProperties[g]=f.isArray(h)?h[1]:b.specialEasing&&b.specialEasing[g]||b.easing||"swing"}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],ck.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=cl.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[g]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cs("show",1),slideUp:cs("hide",1),slideToggle:cs("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this),f.isFunction(d.old)&&d.old.call(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=co||cq(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cm&&(cp?(cm=1,g=function(){cm&&(cp(g),e.tick())},cp(g)):cm=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=co||cq(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a=f.timers,b=a.length;while(b--)a[b]()||a.splice(b,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cm),cm=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cu=/^t(?:able|d|h)$/i,cv=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cw(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cu.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cv.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cv.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cw(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cw(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){return this[0]?parseFloat(f.css(this[0],d,"padding")):null},f.fn["outer"+c]=function(a){return this[0]?parseFloat(f.css(this[0],d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file
diff --git a/devtools/client/inspector/markup/test/lib_jquery_1.7_min.js b/devtools/client/inspector/markup/test/lib_jquery_1.7_min.js
new file mode 100644
index 0000000000..3ca5e0f5de
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_jquery_1.7_min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.7 jquery.com | jquery.org/license */
+(function(a,b){function cA(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cx(a){if(!cm[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cn||(cn=c.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),b.appendChild(cn);if(!co||!cn.createElement)co=(cn.contentWindow||cn.contentDocument).document,co.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),co.close();d=co.createElement(a),co.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cn)}cm[a]=e}return cm[a]}function cw(a,b){var c={};f.each(cs.concat.apply([],cs.slice(0,b)),function(){c[this]=a});return c}function cv(){ct=b}function cu(){setTimeout(cv,0);return ct=f.now()}function cl(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ck(){try{return new a.XMLHttpRequest}catch(b){}}function ce(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cd(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function cc(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bG.test(a)?d(a,e):cc(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)cc(a+"["+e+"]",b[e],c,d);else d(a,b)}function cb(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function ca(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bV,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=ca(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=ca(a,c,d,e,"*",g));return l}function b_(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bR),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bE(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bz:bA;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bB(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function br(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bi,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bq(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bp(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bp)}function bp(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bo(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bn(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bm(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bl(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(a){var b=Y.split(" "),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(){return!0}function M(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.add(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return a!=null&&m.test(a)&&!isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(I)return I.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())}),typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return e});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments)},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,unknownElems:!!a.getElementsByTagName("nav").length,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",enctype:!!c.createElement("form").enctype,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.lastChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-999px",top:"-999px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;f(function(){var a,b,d,e,g,h,i=1,j="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",l="visibility:hidden;border:0;",n="style='"+j+"border:5px solid #000;padding:0;'",p="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>";m=c.getElementsByTagName("body")[0];!m||(a=c.createElement("div"),a.style.cssText=l+"width:0;height:0;position:static;top:0;margin-top:"+i+"px",m.insertBefore(a,m.firstChild),o=c.createElement("div"),o.style.cssText=j+l,o.innerHTML=p,a.appendChild(o),b=o.firstChild,d=b.firstChild,g=b.nextSibling.firstChild.firstChild,h={doesNotAddBorder:d.offsetTop!==5,doesAddBorderForTableAndCells:g.offsetTop===5},d.style.position="fixed",d.style.top="20px",h.fixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",b.style.overflow="hidden",b.style.position="relative",h.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,h.doesNotIncludeMarginInBodyOffset=m.offsetTop!==i,m.removeChild(a),o=a=null,f.extend(k,h))}),o.innerHTML="",n.removeChild(o),o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[f.expando]:a[f.expando]&&f.expando,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[f.expando]=n=++f.uuid:n=f.expando),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[f.expando]:f.expando;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)?b=b:b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" "));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];if(!arguments.length){if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}return b}e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!a||j===3||j===8||j===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g},removeAttr:function(a,b){var c,d,e,g,h=0;if(a.nodeType===1){d=(b||"").split(p),g=d.length;for(;h<g;h++)e=d[h].toLowerCase(),c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1)}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return b;h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/\.(.*)$/,A=/^(?:textarea|input|select)$/i,B=/\./g,C=/ /g,D=/[^\w\s.|`]/g,E=/^([^\.]*)?(?:\.(.+))?$/,F=/\bhover(\.\S+)?/,G=/^key/,H=/^(?:mouse|contextmenu)|click/,I=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,J=function(a){var b=I.exec(a);b&&
+(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},K=function(a,b){return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||a.id===b[2])&&(!b[3]||b[3].test(a.className))},L=function(a){return f.event.special.hover?a:a.replace(F,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=L(c).split(" ");for(k=0;k<c.length;k++){l=E.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,namespace:n.join(".")},p),g&&(o.quick=J(g),!o.quick&&f.expr.match.POS.test(g)&&(o.isPositional=!0)),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d){var e=f.hasData(a)&&f._data(a),g,h,i,j,k,l,m,n,o,p,q;if(!!e&&!!(m=e.events)){b=L(b||"").split(" ");for(g=0;g<b.length;g++){h=E.exec(b[g])||[],i=h[1],j=h[2];if(!i){j=j?"."+j:"";for(l in m)f.event.remove(a,l+j,c,d);return}n=f.event.special[i]||{},i=(d?n.delegateType:n.bindType)||i,p=m[i]||[],k=p.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;if(c||j||d||n.remove)for(l=0;l<p.length;l++){q=p[l];if(!c||c.guid===q.guid)if(!j||j.test(q.namespace))if(!d||d===q.selector||d==="**"&&q.selector)p.splice(l--,1),q.selector&&p.delegateCount--,n.remove&&n.remove.call(a,q)}else p.length=0;p.length===0&&k!==p.length&&((!n.teardown||n.teardown.call(a,j)===!1)&&f.removeEvent(a,i,e.handle),delete m[i])}f.isEmptyObject(m)&&(o=e.handle,o&&(o.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"",(g||!e)&&c.preventDefault();if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,n=null;for(m=e.parentNode;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length;l++){m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d);if(c.isPropagationStopped())break}c.type=h,c.isDefaultPrevented()||(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=(f.event.special[c.type]||{}).handle,j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click"))for(m=c.target;m!=this;m=m.parentNode||this){o={},q=[];for(k=0;k<e;k++)r=d[k],s=r.selector,t=o[s],r.isPositional?t=(t||(o[s]=f(s))).index(m)>=0:t===b&&(t=o[s]=r.quick?K(m,r.quick):f(m).is(s)),t&&q.push(r);q.length&&j.push({elem:m,matches:q})}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){p=j[k],c.currentTarget=p.elem;for(l=0;l<p.matches.length&&!c.isImmediatePropagationStopped();l++){r=p.matches[l];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=(i||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},focus:{delegateType:"focusin",noBubble:!0},blur:{delegateType:"focusout",noBubble:!0},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?N:M):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=N;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=N;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=N,this.stopPropagation()},isDefaultPrevented:M,isPropagationStopped:M,isImmediatePropagationStopped:M},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]=f.event.special[b]={delegateType:b,bindType:b,handle:function(a){var b=this,c=a.relatedTarget,d=a.handleObj,e=d.selector,g,h;if(!c||d.origType===a.type||c!==b&&!f.contains(b,c))g=a.type,a.type=d.origType,h=d.handler.apply(this,arguments),a.type=g;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(A.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;A.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return A.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=M;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=M);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),G.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),H.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw"Syntax error, unrecognized expression: "+a};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?T.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y="abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",Z=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,_=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,ba=/<([\w:]+)/,bb=/<tbody/i,bc=/<|&#?\w+;/,bd=/<(?:script|style)/i,be=/<(?:script|object|embed|option|style)/i,bf=new RegExp("<(?:"+Y.replace(" ","|")+")","i"),bg=/checked\s*(?:[^=]|=\s*.checked.)/i,bh=/\/(java|ecma)script/i,bi=/^\s*<!(?:\[CDATA\[|\-\-)/,bj={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bk=X(c);bj.optgroup=bj.option,bj.tbody=bj.tfoot=bj.colgroup=bj.caption=bj.thead,bj.th=bj.td,f.support.htmlSerialize||(bj._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after"
+,arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Z,""):null;if(typeof a=="string"&&!bd.test(a)&&(f.support.leadingWhitespace||!$.test(a))&&!bj[(ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(_,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bg.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bl(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,br)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!be.test(j)&&(f.support.checkClone||!bg.test(j))&&!f.support.unknownElems&&bf.test(j)&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bn(a,d),e=bo(a),g=bo(d);for(h=0;e[h];++h)g[h]&&bn(e[h],g[h])}if(b){bm(a,d);if(c){e=bo(a),g=bo(d);for(h=0;e[h];++h)bm(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bc.test(k))k=b.createTextNode(k);else{k=k.replace(_,"<$1></$2>");var l=(ba.exec(k)||["",""])[1].toLowerCase(),m=bj[l]||bj._default,n=m[0],o=b.createElement("div");b===c?bk.appendChild(o):X(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=bb.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&$.test(k)&&o.insertBefore(b.createTextNode($.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bq(k[i]);else bq(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bh.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bs=/alpha\([^)]*\)/i,bt=/opacity=([^)]*)/,bu=/([A-Z]|^ms)/g,bv=/^-?\d+(?:px)?$/i,bw=/^-?\d/,bx=/^([\-+])=([\-+.\de]+)/,by={position:"absolute",visibility:"hidden",display:"block"},bz=["Left","Right"],bA=["Top","Bottom"],bB,bC,bD;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bB(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bx.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bB)return bB(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bE(a,b,d);f.swap(a,by,function(){e=bE(a,b,d)});return e}},set:function(a,b){if(!bv.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bt.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bs,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bs.test(g)?g.replace(bs,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bB(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bC=function(a,c){var d,e,g;c=c.replace(bu,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bD=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bv.test(f)&&bw.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bB=bC||bD,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bF=/%20/g,bG=/\[\]$/,bH=/\r?\n/g,bI=/#.*$/,bJ=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bK=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bL=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bM=/^(?:GET|HEAD)$/,bN=/^\/\//,bO=/\?/,bP=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bQ=/^(?:select|textarea)/i,bR=/\s+/,bS=/([?&])_=[^&]*/,bT=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bU=f.fn.load,bV={},bW={},bX,bY,bZ=["*/"]+["*"];try{bX=e.href}catch(b$){bX=c.createElement("a"),bX.href="",bX=bX.href}bY=bT.exec(bX.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bU)return bU.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bP,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bQ.test(this.nodeName)||bK.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bH,"\r\n")}}):{name:b.name,value:c.replace(bH,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?cb(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),cb(a,b);return a},ajaxSettings:{url:bX,isLocal:bL.test(bY[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bZ},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:b_(bV),ajaxTransport:b_(bW),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cd(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=ce(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bJ.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bI,"").replace(bN,bY[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bR),d.crossDomain==null&&(r=bT.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bY[1]&&r[2]==bY[2]&&(r[3]||(r[1]==="http:"?80:443))==(bY[3]||(bY[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),ca(bV,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bM.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bO.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bS,"$1_="+x);d.url=y+(y===d.url?(bO.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bZ+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=ca(bW,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)cc(g,a[g],c,e);return d.join("&").replace(bF,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cf=f.now(),cg=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cf++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cg.test(b.url)||e&&cg.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cg,l),b.url===j&&(e&&(k=k.replace(cg,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ch=a.ActiveXObject?function(){for(var a in cj)cj[a](0,1)}:!1,ci=0,cj;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ck()||cl()}:ck,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ch&&delete cj[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++ci,ch&&(cj||(cj={},f(a).unload(ch)),cj[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cm={},cn,co,cp=/^(?:toggle|show|hide)$/,cq=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cr,cs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],ct;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cw("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cx(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cw("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cw("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cx(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cp.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=cq.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cw("show",1),slideUp:cw("hide",1),slideToggle:cw("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=ct||cu(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cr&&(cr=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=ct||cu(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cr),cr=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now))}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cy=/^t(?:able|d|h)$/i,cz=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cA(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cy.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cz.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cz.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cA(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cA(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file
diff --git a/devtools/client/inspector/markup/test/lib_jquery_2.1.1_min.js b/devtools/client/inspector/markup/test/lib_jquery_2.1.1_min.js
new file mode 100644
index 0000000000..e5ace116b6
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_jquery_2.1.1_min.js
@@ -0,0 +1,4 @@
+/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)
+},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
+},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});
diff --git a/devtools/client/inspector/markup/test/lib_react_16.2.0_min.js b/devtools/client/inspector/markup/test/lib_react_16.2.0_min.js
new file mode 100644
index 0000000000..9c934d7d1a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_react_16.2.0_min.js
@@ -0,0 +1,21 @@
+/** @license React v16.2.0
+ * react.production.min.js
+ *
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+'use strict';(function(q,k){"object"===typeof exports&&"undefined"!==typeof module?module.exports=k():"function"===typeof define&&define.amd?define(k):q.React=k()})(this,function(){function q(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;d<b;d++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);b=Error(c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");
+b.name="Invariant Violation";b.framesToPop=1;throw b;}function k(a){return function(){return a}}function p(a,b,c){this.props=a;this.context=b;this.refs=w;this.updater=c||x}function y(a,b,c){this.props=a;this.context=b;this.refs=w;this.updater=c||x}function z(){}function A(a,b,c){this.props=a;this.context=b;this.refs=w;this.updater=c||x}function G(a,b,c){var d,f={},l=null,e=null;if(null!=b)for(d in void 0!==b.ref&&(e=b.ref),void 0!==b.key&&(l=""+b.key),b)H.call(b,d)&&!I.hasOwnProperty(d)&&(f[d]=b[d]);
+var g=arguments.length-2;if(1===g)f.children=c;else if(1<g){for(var h=Array(g),n=0;n<g;n++)h[n]=arguments[n+2];f.children=h}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===f[d]&&(f[d]=g[d]);return{$$typeof:r,type:a,key:l,ref:e,props:f,_owner:B.current}}function C(a){return"object"===typeof a&&null!==a&&a.$$typeof===r}function O(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function J(a,b,c,d){if(u.length){var f=u.pop();f.result=a;f.keyPrefix=
+b;f.func=c;f.context=d;f.count=0;return f}return{result:a,keyPrefix:b,func:c,context:d,count:0}}function K(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>u.length&&u.push(a)}function t(a,b,c,d){var f=typeof a;if("undefined"===f||"boolean"===f)a=null;var l=!1;if(null===a)l=!0;else switch(f){case "string":case "number":l=!0;break;case "object":switch(a.$$typeof){case r:case P:case Q:case R:l=!0}}if(l)return c(d,a,""===b?"."+D(a,0):b),1;l=0;b=""===b?".":b+":";if(Array.isArray(a))for(var e=
+0;e<a.length;e++){f=a[e];var g=b+D(f,e);l+=t(f,g,c,d)}else if(null===a||"undefined"===typeof a?g=null:(g=L&&a[L]||a["@@iterator"],g="function"===typeof g?g:null),"function"===typeof g)for(a=g.call(a),e=0;!(f=a.next()).done;)f=f.value,g=b+D(f,e++),l+=t(f,g,c,d);else"object"===f&&(c=""+a,q("31","[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return l}function D(a,b){return"object"===typeof a&&null!==a&&null!=a.key?O(a.key):b.toString(36)}function S(a,b,c){a.func.call(a.context,
+b,a.count++)}function T(a,b,c){var d=a.result,f=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?E(a,d,c,F.thatReturnsArgument):null!=a&&(C(a)&&(b=f+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(M,"$\x26/")+"/")+c,a={$$typeof:r,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),d.push(a))}function E(a,b,c,d,f){var e="";null!=c&&(e=(""+c).replace(M,"$\x26/")+"/");b=J(b,e,d,f);null==a||t(a,"",T,b);K(b)}var N=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,
+V=Object.prototype.propertyIsEnumerable,v=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var c={};"abcdefghijklmnopqrst".split("").forEach(function(a){c[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},c)).join("")?!1:!0}catch(d){return!1}}()?Object.assign:
+function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var c=Object(a);for(var d,f=1;f<arguments.length;f++){var e=Object(arguments[f]);for(var h in e)U.call(e,h)&&(c[h]=e[h]);if(N){d=N(e);for(var g=0;g<d.length;g++)V.call(e,d[g])&&(c[d[g]]=e[d[g]])}}return c},h="function"===typeof Symbol&&Symbol["for"],r=h?Symbol["for"]("react.element"):60103,P=h?Symbol["for"]("react.call"):60104,Q=h?Symbol["for"]("react.return"):60105,R=h?Symbol["for"]("react.portal"):
+60106;h=h?Symbol["for"]("react.fragment"):60107;var L="function"===typeof Symbol&&Symbol.iterator,w={},e=function(){};e.thatReturns=k;e.thatReturnsFalse=k(!1);e.thatReturnsTrue=k(!0);e.thatReturnsNull=k(null);e.thatReturnsThis=function(){return this};e.thatReturnsArgument=function(a){return a};var F=e,x={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}};p.prototype.isReactComponent={};p.prototype.setState=
+function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?q("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};p.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};z.prototype=p.prototype;e=y.prototype=new z;e.constructor=y;v(e,p.prototype);e.isPureReactComponent=!0;e=A.prototype=new z;e.constructor=A;v(e,p.prototype);e.unstable_isAsyncReactComponent=!0;e.render=function(){return this.props.children};var B={current:null},H=Object.prototype.hasOwnProperty,
+I={key:!0,ref:!0,__self:!0,__source:!0},M=/\/+/g,u=[];h={Children:{map:function(a,b,c){if(null==a)return a;var d=[];E(a,d,null,b,c);return d},forEach:function(a,b,c){if(null==a)return a;b=J(null,null,b,c);null==a||t(a,"",S,b);K(b)},count:function(a,b){return null==a?0:t(a,"",F.thatReturnsNull,null)},toArray:function(a){var b=[];E(a,b,null,F.thatReturnsArgument);return b},only:function(a){C(a)?void 0:q("143");return a}},Component:p,PureComponent:y,unstable_AsyncComponent:A,Fragment:h,createElement:G,
+cloneElement:function(a,b,c){var d=v({},a.props),e=a.key,h=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,k=B.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(m in b)H.call(b,m)&&!I.hasOwnProperty(m)&&(d[m]=void 0===b[m]&&void 0!==g?g[m]:b[m])}var m=arguments.length-2;if(1===m)d.children=c;else if(1<m){g=Array(m);for(var n=0;n<m;n++)g[n]=arguments[n+2];d.children=g}return{$$typeof:r,type:a.type,key:e,ref:h,props:d,_owner:k}},createFactory:function(a){var b=
+G.bind(null,a);b.type=a;return b},isValidElement:C,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:B,assign:v}};h=(e=Object.freeze({default:h}))&&h||e;return h["default"]?h["default"]:h});
diff --git a/devtools/client/inspector/markup/test/lib_react_dom_15.3.1_min.js b/devtools/client/inspector/markup/test/lib_react_dom_15.3.1_min.js
new file mode 100644
index 0000000000..ff23244cf7
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_react_dom_15.3.1_min.js
@@ -0,0 +1,12 @@
+/**
+ * ReactDOM v15.3.1
+ *
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOM=e(f.React)}}(function(e){return e.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED});
diff --git a/devtools/client/inspector/markup/test/lib_react_dom_16.2.0_min.js b/devtools/client/inspector/markup/test/lib_react_dom_16.2.0_min.js
new file mode 100644
index 0000000000..11fba1d71a
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_react_dom_16.2.0_min.js
@@ -0,0 +1,193 @@
+/** @license React v16.2.0
+ * react-dom.production.min.js
+ *
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+/*
+ Modernizr 3.0.0pre (Custom Build) | MIT
+*/
+'use strict';(function(na,l){"object"===typeof exports&&"undefined"!==typeof module?module.exports=l(require("react")):"function"===typeof define&&define.amd?define(["react"],l):na.ReactDOM=l(na.React)})(this,function(na){function l(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;d<b;d++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);b=Error(c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");
+b.name="Invariant Violation";b.framesToPop=1;throw b;}function va(a,b){return(a&b)===b}function Xc(a,b){if(Yc.hasOwnProperty(a)||2<a.length&&("o"===a[0]||"O"===a[0])&&("n"===a[1]||"N"===a[1]))return!1;if(null===b)return!0;switch(typeof b){case "boolean":return Yc.hasOwnProperty(a)?a=!0:(b=Ub(a))?a=b.hasBooleanValue||b.hasStringBooleanValue||b.hasOverloadedBooleanValue:(a=a.toLowerCase().slice(0,5),a="data-"===a||"aria-"===a),a;case "undefined":case "number":case "string":case "object":return!0;default:return!1}}
+function Ub(a){return ib.hasOwnProperty(a)?ib[a]:null}function Zc(){if(jb)for(var a in ba){var b=ba[a],c=jb.indexOf(a);-1<c?void 0:l("96",a);if(!oa[c]){b.extractEvents?void 0:l("97",a);oa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;Vb.hasOwnProperty(h)?l("99",h):void 0;Vb[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&$c(k[e],g,h);e=!0}else f.registrationName?($c(f.registrationName,g,h),e=!0):e=!1;e?void 0:l("98",d,a)}}}}function $c(a,b,c){ca[a]?
+l("100",a):void 0;ca[a]=b;kb[a]=b.eventTypes[c].dependencies}function ad(a){jb?l("101"):void 0;jb=Array.prototype.slice.call(a);Zc()}function bd(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];ba.hasOwnProperty(c)&&ba[c]===d||(ba[c]?l("102",c):void 0,ba[c]=d,b=!0)}b&&Zc()}function lb(a){return function(){return a}}function cd(a,b,c,d){b=a.type||"unknown-event";a.currentTarget=dd(d);y.invokeGuardedCallbackAndCatchFirstError(b,c,void 0,a);a.currentTarget=null}function wa(a,b){null==b?l("30"):
+void 0;if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function da(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function Wb(a,b){var c=a.stateNode;if(!c)return null;var d=Xb(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(d=
+!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;c&&"function"!==typeof c?l("231",b,typeof c):void 0;return c}function ed(a,b,c,d){for(var e,f=0;f<oa.length;f++){var g=oa[f];g&&(g=g.extractEvents(a,b,c,d))&&(e=wa(e,g))}return e}function Yb(a){a&&(pa=wa(pa,a))}function Zb(a){var b=pa;pa=null;b&&(a?da(b,$e):da(b,af),pa?l("95"):void 0,y.rethrowCaughtError())}function W(a){if(a[O])return a[O];for(var b=[];!a[O];)if(b.push(a),
+a.parentNode)a=a.parentNode;else return null;var c=void 0,d=a[O];if(5===d.tag||6===d.tag)return d;for(;a&&(d=a[O]);a=b.pop())c=d;return c}function xa(a){if(5===a.tag||6===a.tag)return a.stateNode;l("33")}function fd(a){return a[ea]||null}function T(a){do a=a["return"];while(a&&5!==a.tag);return a?a:null}function gd(a,b,c){for(var d=[];a;)d.push(a),a=T(a);for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}function hd(a,b,c){if(b=Wb(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=
+wa(c._dispatchListeners,b),c._dispatchInstances=wa(c._dispatchInstances,a)}function bf(a){a&&a.dispatchConfig.phasedRegistrationNames&&gd(a._targetInst,hd,a)}function cf(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?T(b):null;gd(b,hd,a)}}function $b(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Wb(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=wa(c._dispatchListeners,b),c._dispatchInstances=wa(c._dispatchInstances,a))}function df(a){a&&a.dispatchConfig.registrationName&&
+$b(a._targetInst,null,a)}function ya(a){da(a,bf)}function id(a,b,c,d){if(c&&d)a:{var e=c;for(var f=d,g=0,h=e;h;h=T(h))g++;h=0;for(var k=f;k;k=T(k))h++;for(;0<g-h;)e=T(e),g--;for(;0<h-g;)f=T(f),h--;for(;g--;){if(e===f||e===f.alternate)break a;e=T(e);f=T(f)}e=null}else e=null;f=e;for(e=[];c&&c!==f;){g=c.alternate;if(null!==g&&g===f)break;e.push(c);c=T(c)}for(c=[];d&&d!==f;){g=d.alternate;if(null!==g&&g===f)break;c.push(d);d=T(d)}for(d=0;d<e.length;d++)$b(e[d],"bubbled",a);for(a=c.length;0<a--;)$b(c[a],
+"captured",b)}function jd(){!ac&&P.canUseDOM&&(ac="textContent"in document.documentElement?"textContent":"innerText");return ac}function kd(){if(H._fallbackText)return H._fallbackText;var a,b=H._startText,c=b.length,d,e=ld(),f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);H._fallbackText=e.slice(a,1<d?1-d:void 0);return H._fallbackText}function ld(){return"value"in H._root?H._root.value:H._root[jd()]}function n(a,b,c,d){this.dispatchConfig=a;this._targetInst=
+b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?G.thatReturnsTrue:G.thatReturnsFalse;this.isPropagationStopped=G.thatReturnsFalse;return this}function ef(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}function ff(a){a instanceof this?void 0:
+l("223");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function md(a){a.eventPool=[];a.getPooled=ef;a.release=ff}function nd(a,b,c,d){return n.call(this,a,b,c,d)}function od(a,b,c,d){return n.call(this,a,b,c,d)}function gf(){var a=window.opera;return"object"===typeof a&&"function"===typeof a.version&&12>=parseInt(a.version(),10)}function pd(a,b){switch(a){case "topKeyUp":return-1!==hf.indexOf(b.keyCode);case "topKeyDown":return 229!==b.keyCode;case "topKeyPress":case "topMouseDown":case "topBlur":return!0;
+default:return!1}}function qd(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}function jf(a,b){switch(a){case "topCompositionEnd":return qd(b);case "topKeyPress":if(32!==b.which)return null;rd=!0;return sd;case "topTextInput":return a=b.data,a===sd&&rd?null:a;default:return null}}function kf(a,b){if(za)return"topCompositionEnd"===a||!bc&&pd(a,b)?(a=kd(),H._root=null,H._startText=null,H._fallbackText=null,za=!1,a):null;switch(a){case "topPaste":return null;case "topKeyPress":if(!(b.ctrlKey||
+b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "topCompositionEnd":return td?null:b.data;default:return null}}function ud(a){if(a=vd(a)){mb&&"function"===typeof mb.restoreControlledState?void 0:l("194");var b=Xb(a.stateNode);mb.restoreControlledState(a.stateNode,a.type,b)}}function wd(a){Ga?fa?fa.push(a):fa=[a]:Ga=a}function xd(){if(Ga){var a=Ga,b=fa;fa=Ga=null;ud(a);if(b)for(a=0;a<b.length;a++)ud(b[a])}}
+function cc(a,b){if(dc)return ec(a,b);dc=!0;try{return ec(a,b)}finally{dc=!1,xd()}}function yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!lf[a.type]:"textarea"===b?!0:!1}function fc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function gc(a,b){if(!P.canUseDOM||b&&!("addEventListener"in document))return!1;b="on"+a;var c=b in document;c||(c=document.createElement("div"),c.setAttribute(b,"return;"),
+c="function"===typeof c[b]);!c&&zd&&"wheel"===a&&(c=document.implementation.hasFeature("Events.wheel","3.0"));return c}function Ad(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function mf(a){var b=Ad(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"function"===typeof c.get&&"function"===typeof c.set)return Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:!0,get:function(){return c.get.call(this)},
+set:function(a){d=""+a;c.set.call(this,a)}}),{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}function nb(a){a._valueTracker||(a._valueTracker=mf(a))}function Bd(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ad(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Cd(a,b,c){a=n.getPooled(Dd.change,a,b,c);a.type="change";wd(c);ya(a);return a}function nf(a){Yb(a);
+Zb(!1)}function ob(a){var b=xa(a);if(Bd(b))return a}function of(a,b){if("topChange"===a)return b}function Ed(){Ha&&(Ha.detachEvent("onpropertychange",Fd),Oa=Ha=null)}function Fd(a){"value"===a.propertyName&&ob(Oa)&&(a=Cd(Oa,a,fc(a)),cc(nf,a))}function pf(a,b,c){"topFocus"===a?(Ed(),Ha=b,Oa=c,Ha.attachEvent("onpropertychange",Fd)):"topBlur"===a&&Ed()}function qf(a,b){if("topSelectionChange"===a||"topKeyUp"===a||"topKeyDown"===a)return ob(Oa)}function rf(a,b){if("topClick"===a)return ob(b)}function sf(a,
+b){if("topInput"===a||"topChange"===a)return ob(b)}function Aa(a,b,c,d){return n.call(this,a,b,c,d)}function tf(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=uf[a])?!!b[a]:!1}function hc(a){return tf}function qa(a,b,c,d){return n.call(this,a,b,c,d)}function Pa(a){a=a.type;return"string"===typeof a?a:"function"===typeof a?a.displayName||a.name:null}function Qa(a){var b=a;if(a.alternate)for(;b["return"];)b=b["return"];else{if(0!==(b.effectTag&2))return 1;for(;b["return"];)if(b=
+b["return"],0!==(b.effectTag&2))return 1}return 3===b.tag?2:3}function vf(a){return(a=a._reactInternalFiber)?2===Qa(a):!1}function Gd(a){2!==Qa(a)?l("188"):void 0}function Hd(a){var b=a.alternate;if(!b)return b=Qa(a),3===b?l("188"):void 0,1===b?null:a;for(var c=a,d=b;;){var e=c["return"],f=e?e.alternate:null;if(!e||!f)break;if(e.child===f.child){for(var g=e.child;g;){if(g===c)return Gd(e),a;if(g===d)return Gd(e),b;g=g.sibling}l("188")}if(c["return"]!==d["return"])c=e,d=f;else{g=!1;for(var h=e.child;h;){if(h===
+c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}g?void 0:l("189")}}c.alternate!==d?l("190"):void 0}3!==c.tag?l("188"):void 0;return c.stateNode.current===c?a:b}function wf(a){a=Hd(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b["return"]||b["return"]===a)return null;b=b["return"]}b.sibling["return"]=
+b["return"];b=b.sibling}}return null}function xf(a){a=Hd(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child&&4!==b.tag)b.child["return"]=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b["return"]||b["return"]===a)return null;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}}return null}function yf(a){var b=a.targetInst;do{if(!b){a.ancestors.push(b);break}var c;for(c=b;c["return"];)c=c["return"];c=3!==c.tag?null:c.stateNode.containerInfo;if(!c)break;a.ancestors.push(b);
+b=W(c)}while(b);for(c=0;c<a.ancestors.length;c++)b=a.ancestors[c],pb(a.topLevelType,b,a.nativeEvent,fc(a.nativeEvent))}function ic(a){Ra=!!a}function r(a,b,c){return c?Id.listen(c,b,jc.bind(null,a)):null}function ha(a,b,c){return c?Id.capture(c,b,jc.bind(null,a)):null}function jc(a,b){if(Ra){var c=fc(b);c=W(c);null===c||"number"!==typeof c.tag||2===Qa(c)||(c=null);if(qb.length){var d=qb.pop();d.topLevelType=a;d.nativeEvent=b;d.targetInst=c;a=d}else a={topLevelType:a,nativeEvent:b,targetInst:c,ancestors:[]};
+try{cc(yf,a)}finally{a.topLevelType=null,a.nativeEvent=null,a.targetInst=null,a.ancestors.length=0,10>qb.length&&qb.push(a)}}}function rb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;c["ms"+a]="MS"+b;c["O"+a]="o"+b.toLowerCase();return c}function sb(a){if(kc[a])return kc[a];if(!U[a])return a;var b=U[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Jd)return kc[a]=b[c];return""}function Kd(a){Object.prototype.hasOwnProperty.call(a,tb)||(a[tb]=zf++,Ld[a[tb]]=
+{});return Ld[a[tb]]}function Md(a,b){return a===b?0!==a||0!==b||1/a===1/b:a!==a&&b!==b}function Nd(a,b){return a&&b?a===b?!0:Od(a)?!1:Od(b)?Nd(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function Pd(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Qd(a,b){var c=Pd(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=
+c.parentNode}c=void 0}c=Pd(c)}}function lc(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&"text"===a.type||"textarea"===b||"true"===a.contentEditable)}function Rd(a,b){if(mc||null==X||X!==nc())return null;var c=X;"selectionStart"in c&&lc(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return Sa&&oc(Sa,c)?null:(Sa=
+c,a=n.getPooled(Sd.select,pc,a,b),a.type="select",a.target=X,ya(a),a)}function Td(a,b,c,d){return n.call(this,a,b,c,d)}function Ud(a,b,c,d){return n.call(this,a,b,c,d)}function Vd(a,b,c,d){return n.call(this,a,b,c,d)}function ub(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;return 32<=a||13===a?a:0}function Wd(a,b,c,d){return n.call(this,a,b,c,d)}function Xd(a,b,c,d){return n.call(this,a,b,c,d)}function Yd(a,b,c,d){return n.call(this,a,b,c,d)}function Zd(a,b,c,d){return n.call(this,
+a,b,c,d)}function $d(a,b,c,d){return n.call(this,a,b,c,d)}function I(a,b){0>ra||(a.current=vb[ra],vb[ra]=null,ra--)}function M(a,b,c){ra++;vb[ra]=a.current;a.current=b}function Ta(a){return Ua(a)?wb:ia.current}function Va(a,b){var c=a.type.contextTypes;if(!c)return ja;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=
+e);return e}function Ua(a){return 2===a.tag&&null!=a.type.childContextTypes}function ae(a){Ua(a)&&(I(J,a),I(ia,a))}function be(a,b,c){null!=ia.cursor?l("168"):void 0;M(ia,b,a);M(J,c,a)}function ce(a,b){var c=a.stateNode,d=a.type.childContextTypes;if("function"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:l("108",Pa(a)||"Unknown",e);return C({},b,c)}function xb(a){if(!Ua(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||ja;wb=
+ia.current;M(ia,b,a);M(J,J.current,a);return!0}function de(a,b){var c=a.stateNode;c?void 0:l("169");if(b){var d=ce(a,wb);c.__reactInternalMemoizedMergedChildContext=d;I(J,a);I(ia,a);M(ia,d,a)}else I(J,a);M(J,b,a)}function Q(a,b,c){this.tag=a;this.key=b;this.stateNode=this.type=null;this.sibling=this.child=this["return"]=null;this.index=0;this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null;this.internalContextTag=c;this.effectTag=0;this.lastEffect=this.firstEffect=
+this.nextEffect=null;this.expirationTime=0;this.alternate=null}function yb(a,b,c){var d=a.alternate;null===d?(d=new Q(a.tag,a.key,a.internalContextTag),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.pendingProps=b;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}function qc(a,
+b,c){var d=void 0,e=a.type,f=a.key;"function"===typeof e?(d=e.prototype&&e.prototype.isReactComponent?new Q(2,f,b):new Q(0,f,b),d.type=e,d.pendingProps=a.props):"string"===typeof e?(d=new Q(5,f,b),d.type=e,d.pendingProps=a.props):"object"===typeof e&&null!==e&&"number"===typeof e.tag?(d=e,d.pendingProps=a.props):l("130",null==e?e:typeof e,"");d.expirationTime=c;return d}function zb(a,b,c,d){b=new Q(10,d,b);b.pendingProps=a;b.expirationTime=c;return b}function rc(a,b,c){b=new Q(6,null,b);b.pendingProps=
+a;b.expirationTime=c;return b}function sc(a,b,c){b=new Q(7,a.key,b);b.type=a.handler;b.pendingProps=a;b.expirationTime=c;return b}function tc(a,b,c){a=new Q(9,null,b);a.expirationTime=c;return a}function uc(a,b,c){b=new Q(4,a.key,b);b.pendingProps=a.children||[];b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function ee(a){return function(b){try{return a(b)}catch(c){}}}function Af(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;
+var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);vc=ee(function(a){return b.onCommitFiberRoot(c,a)});wc=ee(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function fe(a){"function"===typeof vc&&vc(a)}function ge(a){"function"===typeof wc&&wc(a)}function he(a){return{baseState:a,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function Ab(a,b){null===a.last?a.first=a.last=b:(a.last.next=
+b,a.last=b);if(0===a.expirationTime||a.expirationTime>b.expirationTime)a.expirationTime=b.expirationTime}function Bb(a,b){var c=a.alternate,d=a.updateQueue;null===d&&(d=a.updateQueue=he(null));null!==c?(a=c.updateQueue,null===a&&(a=c.updateQueue=he(null))):a=null;a=a!==d?a:null;null===a?Ab(d,b):null===d.last||null===a.last?(Ab(d,b),Ab(a,b)):(Ab(d,b),a.last=b)}function ie(a,b,c,d){a=a.partialState;return"function"===typeof a?a.call(b,c,d):a}function xc(a,b,c,d,e,f){null!==a&&a.updateQueue===c&&(c=
+b.updateQueue={baseState:c.baseState,expirationTime:c.expirationTime,first:c.first,last:c.last,isInitialized:c.isInitialized,callbackList:null,hasForceUpdate:!1});c.expirationTime=0;c.isInitialized?a=c.baseState:(a=c.baseState=b.memoizedState,c.isInitialized=!0);for(var g=!0,h=c.first,k=!1;null!==h;){var l=h.expirationTime;if(l>f){var D=c.expirationTime;if(0===D||D>l)c.expirationTime=l;k||(k=!0,c.baseState=a)}else{k||(c.first=h.next,null===c.first&&(c.last=null));if(h.isReplace)a=ie(h,d,a,e),g=!0;
+else if(l=ie(h,d,a,e))a=g?C({},a,l):C(a,l),g=!1;h.isForced&&(c.hasForceUpdate=!0);null!==h.callback&&(l=c.callbackList,null===l&&(l=c.callbackList=[]),l.push(h))}h=h.next}null!==c.callbackList?b.effectTag|=32:null!==c.first||c.hasForceUpdate||(b.updateQueue=null);k||(c.baseState=a);return a}function je(a,b){var c=a.callbackList;if(null!==c)for(a.callbackList=null,a=0;a<c.length;a++){var d=c[a],e=d.callback;d.callback=null;"function"!==typeof e?l("191",e):void 0;e.call(b)}}function Wa(a){if(null===
+a||"undefined"===typeof a)return null;a=ke&&a[ke]||a["@@iterator"];return"function"===typeof a?a:null}function Xa(a,b){var c=b.ref;if(null!==c&&"function"!==typeof c){if(b._owner){b=b._owner;var d=void 0;b&&(2!==b.tag?l("110"):void 0,d=b.stateNode);d?void 0:l("147",c);var e=""+c;if(null!==a&&null!==a.ref&&a.ref._stringRef===e)return a.ref;a=function(a){var b=d.refs===ja?d.refs={}:d.refs;null===a?delete b[e]:b[e]=a};a._stringRef=e;return a}"string"!==typeof c?l("148"):void 0;b._owner?void 0:l("149",
+c)}return c}function Cb(a,b){"textarea"!==a.type&&l("31","[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,"")}function le(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;
+return a}function e(a,b,c){a=yb(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=rc(c,a.internalContextTag,d),b["return"]=a,b;b=e(b,c,d);b["return"]=a;return b}function k(a,b,c,d){if(null!==b&&b.type===c.type)return d=e(b,c.props,d),d.ref=Xa(b,c),d["return"]=a,d;
+d=qc(c,a.internalContextTag,d);d.ref=Xa(b,c);d["return"]=a;return d}function m(a,b,c,d){if(null===b||7!==b.tag)return b=sc(c,a.internalContextTag,d),b["return"]=a,b;b=e(b,c,d);b["return"]=a;return b}function D(a,b,c,d){if(null===b||9!==b.tag)return b=tc(c,a.internalContextTag,d),b.type=c.value,b["return"]=a,b;b=e(b,null,d);b.type=c.value;b["return"]=a;return b}function A(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
+uc(c,a.internalContextTag,d),b["return"]=a,b;b=e(b,c.children||[],d);b["return"]=a;return b}function v(a,b,c,d,g){if(null===b||10!==b.tag)return b=zb(c,a.internalContextTag,d,g),b["return"]=a,b;b=e(b,c,d);b["return"]=a;return b}function K(a,b,c){if("string"===typeof b||"number"===typeof b)return b=rc(""+b,a.internalContextTag,c),b["return"]=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Db:if(b.type===sa)return b=zb(b.props.children,a.internalContextTag,c,b.key),b["return"]=a,b;c=qc(b,
+a.internalContextTag,c);c.ref=Xa(null,b);c["return"]=a;return c;case Eb:return b=sc(b,a.internalContextTag,c),b["return"]=a,b;case Fb:return c=tc(b,a.internalContextTag,c),c.type=b.value,c["return"]=a,c;case Ya:return b=uc(b,a.internalContextTag,c),b["return"]=a,b}if(Gb(b)||Wa(b))return b=zb(b,a.internalContextTag,c,null),b["return"]=a,b;Cb(a,b)}return null}function L(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&
+null!==c){switch(c.$$typeof){case Db:return c.key===e?c.type===sa?v(a,b,c.props.children,d,e):k(a,b,c,d):null;case Eb:return c.key===e?m(a,b,c,d):null;case Fb:return null===e?D(a,b,c,d):null;case Ya:return c.key===e?A(a,b,c,d):null}if(Gb(c)||Wa(c))return null!==e?null:v(a,b,c,d,null);Cb(a,c)}return null}function R(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Db:return a=a.get(null===d.key?c:d.key)||
+null,d.type===sa?v(b,a,d.props.children,e,d.key):k(b,a,d,e);case Eb:return a=a.get(null===d.key?c:d.key)||null,m(b,a,d,e);case Fb:return a=a.get(c)||null,D(b,a,d,e);case Ya:return a=a.get(null===d.key?c:d.key)||null,A(b,a,d,e)}if(Gb(d)||Wa(d))return a=a.get(c)||null,v(b,a,d,e,null);Cb(b,d)}return null}function n(e,g,h,z){for(var t=null,q=null,p=g,x=g=0,k=null;null!==p&&x<h.length;x++){p.index>x?(k=p,p=null):k=p.sibling;var l=L(e,p,h[x],z);if(null===l){null===p&&(p=k);break}a&&p&&null===l.alternate&&
+b(e,p);g=f(l,g,x);null===q?t=l:q.sibling=l;q=l;p=k}if(x===h.length)return c(e,p),t;if(null===p){for(;x<h.length;x++)if(p=K(e,h[x],z))g=f(p,g,x),null===q?t=p:q.sibling=p,q=p;return t}for(p=d(e,p);x<h.length;x++)if(k=R(p,e,x,h[x],z)){if(a&&null!==k.alternate)p["delete"](null===k.key?x:k.key);g=f(k,g,x);null===q?t=k:q.sibling=k;q=k}a&&p.forEach(function(a){return b(e,a)});return t}function r(e,g,h,z){var t=Wa(h);"function"!==typeof t?l("150"):void 0;h=t.call(h);null==h?l("151"):void 0;for(var q=t=null,
+p=g,x=g=0,k=null,m=h.next();null!==p&&!m.done;x++,m=h.next()){p.index>x?(k=p,p=null):k=p.sibling;var La=L(e,p,m.value,z);if(null===La){p||(p=k);break}a&&p&&null===La.alternate&&b(e,p);g=f(La,g,x);null===q?t=La:q.sibling=La;q=La;p=k}if(m.done)return c(e,p),t;if(null===p){for(;!m.done;x++,m=h.next())m=K(e,m.value,z),null!==m&&(g=f(m,g,x),null===q?t=m:q.sibling=m,q=m);return t}for(p=d(e,p);!m.done;x++,m=h.next())if(m=R(p,e,x,m.value,z),null!==m){if(a&&null!==m.alternate)p["delete"](null===m.key?x:m.key);
+g=f(m,g,x);null===q?t=m:q.sibling=m;q=m}a&&p.forEach(function(a){return b(e,a)});return t}return function(a,d,f,h){"object"===typeof f&&null!==f&&f.type===sa&&null===f.key&&(f=f.props.children);var k="object"===typeof f&&null!==f;if(k)switch(f.$$typeof){case Db:a:{var q=f.key;for(k=d;null!==k;){if(k.key===q)if(10===k.tag?f.type===sa:k.type===f.type){c(a,k.sibling);d=e(k,f.type===sa?f.props.children:f.props,h);d.ref=Xa(k,f);d["return"]=a;a=d;break a}else{c(a,k);break}else b(a,k);k=k.sibling}f.type===
+sa?(d=zb(f.props.children,a.internalContextTag,h,f.key),d["return"]=a,a=d):(h=qc(f,a.internalContextTag,h),h.ref=Xa(d,f),h["return"]=a,a=h)}return g(a);case Eb:a:{for(k=f.key;null!==d;){if(d.key===k)if(7===d.tag){c(a,d.sibling);d=e(d,f,h);d["return"]=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=sc(f,a.internalContextTag,h);d["return"]=a;a=d}return g(a);case Fb:a:{if(null!==d)if(9===d.tag){c(a,d.sibling);d=e(d,null,h);d.type=f.value;d["return"]=a;a=d;break a}else c(a,d);d=tc(f,a.internalContextTag,
+h);d.type=f.value;d["return"]=a;a=d}return g(a);case Ya:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d["return"]=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=uc(f,a.internalContextTag,h);d["return"]=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h)):(c(a,d),d=rc(f,a.internalContextTag,
+h)),d["return"]=a,a=d,g(a);if(Gb(f))return n(a,d,f,h);if(Wa(f))return r(a,d,f,h);k&&Cb(a,f);if("undefined"===typeof f)switch(a.tag){case 2:case 1:h=a.type,l("152",h.displayName||h.name||"Component")}return c(a,d)}}function Bf(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ya,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function Cf(a){if(me.hasOwnProperty(a))return!0;if(ne.hasOwnProperty(a))return!1;if(Df.test(a))return me[a]=!0;ne[a]=
+!0;return!1}function zc(a,b,c){var d=Ub(b);if(d&&Xc(b,c)){var e=d.mutationMethod;e?e(a,c):null==c||d.hasBooleanValue&&!c||d.hasNumericValue&&isNaN(c)||d.hasPositiveNumericValue&&1>c||d.hasOverloadedBooleanValue&&!1===c?oe(a,b):d.mustUseProperty?a[d.propertyName]=c:(b=d.attributeName,(e=d.attributeNamespace)?a.setAttributeNS(e,b,""+c):d.hasBooleanValue||d.hasOverloadedBooleanValue&&!0===c?a.setAttribute(b,""):a.setAttribute(b,""+c))}else Ac(a,b,Xc(b,c)?c:null)}function Ac(a,b,c){Cf(b)&&(null==c?a.removeAttribute(b):
+a.setAttribute(b,""+c))}function oe(a,b){var c=Ub(b);c?(b=c.mutationMethod)?b(a,void 0):c.mustUseProperty?a[c.propertyName]=c.hasBooleanValue?!1:"":a.removeAttribute(c.attributeName):a.removeAttribute(b)}function Bc(a,b){var c=b.value,d=b.checked;return C({type:void 0,step:void 0,min:void 0,max:void 0},b,{defaultChecked:void 0,defaultValue:void 0,value:null!=c?c:a._wrapperState.initialValue,checked:null!=d?d:a._wrapperState.initialChecked})}function pe(a,b){var c=b.defaultValue;a._wrapperState={initialChecked:null!=
+b.checked?b.checked:b.defaultChecked,initialValue:null!=b.value?b.value:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function qe(a,b){b=b.checked;null!=b&&zc(a,"checked",b)}function Cc(a,b){qe(a,b);var c=b.value;if(null!=c)if(0===c&&""===a.value)a.value="0";else if("number"===b.type){if(b=parseFloat(a.value)||0,c!=b||c==b&&a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else null==b.value&&null!=b.defaultValue&&a.defaultValue!==""+b.defaultValue&&(a.defaultValue=
+""+b.defaultValue),null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function re(a,b){switch(b.type){case "submit":case "reset":break;case "color":case "date":case "datetime":case "datetime-local":case "month":case "time":case "week":a.value="";a.value=a.defaultValue;break;default:a.value=a.value}b=a.name;""!==b&&(a.name="");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!a.defaultChecked;""!==b&&(a.name=b)}function Ef(a){var b="";na.Children.forEach(a,function(a){null==
+a||"string"!==typeof a&&"number"!==typeof a||(b+=a)});return b}function Dc(a,b){a=C({children:void 0},b);if(b=Ef(b.children))a.children=b;return a}function ka(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+c;b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=
+a[e])}null!==b&&(b.selected=!0)}}function se(a,b){var c=b.value;a._wrapperState={initialValue:null!=c?c:b.defaultValue,wasMultiple:!!b.multiple}}function Ec(a,b){null!=b.dangerouslySetInnerHTML?l("91"):void 0;return C({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function te(a,b){var c=b.value;null==c&&(c=b.defaultValue,b=b.children,null!=b&&(null!=c?l("92"):void 0,Array.isArray(b)&&(1>=b.length?void 0:l("93"),b=b[0]),c=""+b),null==c&&(c=""));a._wrapperState={initialValue:""+
+c}}function ue(a,b){var c=b.value;null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function ve(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fc(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?ve(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":
+a}function we(a,b,c){a=a.style;for(var d in b)if(b.hasOwnProperty(d)){c=0===d.indexOf("--");var e=d;var f=b[d];e=null==f||"boolean"===typeof f||""===f?"":c||"number"!==typeof f||0===f||Za.hasOwnProperty(e)&&Za[e]?(""+f).trim():f+"px";"float"===d&&(d="cssFloat");c?a.setProperty(d,e):a[d]=e}}function Gc(a,b,c){b&&(Ff[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?l("137",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?l("60"):void 0,"object"===typeof b.dangerouslySetInnerHTML&&
+"__html"in b.dangerouslySetInnerHTML?void 0:l("61")),null!=b.style&&"object"!==typeof b.style?l("62",c()):void 0)}function Hc(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function Y(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Kd(a);b=kb[b];for(var d=0;d<b.length;d++){var e=
+b[d];c.hasOwnProperty(e)&&c[e]||("topScroll"===e?ha("topScroll","scroll",a):"topFocus"===e||"topBlur"===e?(ha("topFocus","focus",a),ha("topBlur","blur",a),c.topBlur=!0,c.topFocus=!0):"topCancel"===e?(gc("cancel",!0)&&ha("topCancel","cancel",a),c.topCancel=!0):"topClose"===e?(gc("close",!0)&&ha("topClose","close",a),c.topClose=!0):xe.hasOwnProperty(e)&&r(e,xe[e],a),c[e]=!0)}}function ye(a,b,c,d){c=9===c.nodeType?c:c.ownerDocument;"http://www.w3.org/1999/xhtml"===d&&(d=ve(a));"http://www.w3.org/1999/xhtml"===
+d?"script"===a?(a=c.createElement("div"),a.innerHTML="\x3cscript\x3e\x3c/script\x3e",a=a.removeChild(a.firstChild)):a="string"===typeof b.is?c.createElement(a,{is:b.is}):c.createElement(a):a=c.createElementNS(d,a);return a}function ze(a,b){return(9===b.nodeType?b:b.ownerDocument).createTextNode(a)}function Ae(a,b,c,d){var e=Hc(b,c);switch(b){case "iframe":case "object":r("topLoad","load",a);var f=c;break;case "video":case "audio":for(f in Z)Z.hasOwnProperty(f)&&r(f,Z[f],a);f=c;break;case "source":r("topError",
+"error",a);f=c;break;case "img":case "image":r("topError","error",a);r("topLoad","load",a);f=c;break;case "form":r("topReset","reset",a);r("topSubmit","submit",a);f=c;break;case "details":r("topToggle","toggle",a);f=c;break;case "input":pe(a,c);f=Bc(a,c);r("topInvalid","invalid",a);Y(d,"onChange");break;case "option":f=Dc(a,c);break;case "select":se(a,c);f=C({},c,{value:void 0});r("topInvalid","invalid",a);Y(d,"onChange");break;case "textarea":te(a,c);f=Ec(a,c);r("topInvalid","invalid",a);Y(d,"onChange");
+break;default:f=c}Gc(b,f,$a);var g=f,h;for(h in g)if(g.hasOwnProperty(h)){var k=g[h];"style"===h?we(a,k,$a):"dangerouslySetInnerHTML"===h?(k=k?k.__html:void 0,null!=k&&Be(a,k)):"children"===h?"string"===typeof k?("textarea"!==b||""!==k)&&Ic(a,k):"number"===typeof k&&Ic(a,""+k):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(ca.hasOwnProperty(h)?null!=k&&Y(d,h):e?Ac(a,h,k):null!=k&&zc(a,h,k))}switch(b){case "input":nb(a);re(a,c);break;case "textarea":nb(a);c=
+a.textContent;c===a._wrapperState.initialValue&&(a.value=c);break;case "option":null!=c.value&&a.setAttribute("value",c.value);break;case "select":a.multiple=!!c.multiple;b=c.value;null!=b?ka(a,!!c.multiple,b,!1):null!=c.defaultValue&&ka(a,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof f.onClick&&(a.onclick=G)}}function Ce(a,b,c,d,e){var f=null;switch(b){case "input":c=Bc(a,c);d=Bc(a,d);f=[];break;case "option":c=Dc(a,c);d=Dc(a,d);f=[];break;case "select":c=C({},c,{value:void 0});
+d=C({},d,{value:void 0});f=[];break;case "textarea":c=Ec(a,c);d=Ec(a,d);f=[];break;default:"function"!==typeof c.onClick&&"function"===typeof d.onClick&&(a.onclick=G)}Gc(b,d,$a);var g,h;a=null;for(g in c)if(!d.hasOwnProperty(g)&&c.hasOwnProperty(g)&&null!=c[g])if("style"===g)for(h in (b=c[g], b))b.hasOwnProperty(h)&&(a||(a={}),a[h]="");else"dangerouslySetInnerHTML"!==g&&"children"!==g&&"suppressContentEditableWarning"!==g&&"suppressHydrationWarning"!==g&&"autoFocus"!==g&&(ca.hasOwnProperty(g)?f||(f=
+[]):(f=f||[]).push(g,null));for(g in d){var k=d[g];b=null!=c?c[g]:void 0;if(d.hasOwnProperty(g)&&k!==b&&(null!=k||null!=b))if("style"===g)if(b){for(h in b)!b.hasOwnProperty(h)||k&&k.hasOwnProperty(h)||(a||(a={}),a[h]="");for(h in k)k.hasOwnProperty(h)&&b[h]!==k[h]&&(a||(a={}),a[h]=k[h])}else a||(f||(f=[]),f.push(g,a)),a=k;else"dangerouslySetInnerHTML"===g?(k=k?k.__html:void 0,b=b?b.__html:void 0,null!=k&&b!==k&&(f=f||[]).push(g,""+k)):"children"===g?b===k||"string"!==typeof k&&"number"!==typeof k||
+(f=f||[]).push(g,""+k):"suppressContentEditableWarning"!==g&&"suppressHydrationWarning"!==g&&(ca.hasOwnProperty(g)?(null!=k&&Y(e,g),f||b===k||(f=[])):(f=f||[]).push(g,k))}a&&(f=f||[]).push("style",a);return f}function De(a,b,c,d,e){"input"===c&&"radio"===e.type&&null!=e.name&&qe(a,e);Hc(c,d);d=Hc(c,e);for(var f=0;f<b.length;f+=2){var g=b[f],h=b[f+1];"style"===g?we(a,h,$a):"dangerouslySetInnerHTML"===g?Be(a,h):"children"===g?Ic(a,h):d?null!=h?Ac(a,g,h):a.removeAttribute(g):null!=h?zc(a,g,h):oe(a,g)}switch(c){case "input":Cc(a,
+e);break;case "textarea":ue(a,e);break;case "select":a._wrapperState.initialValue=void 0,b=a._wrapperState.wasMultiple,a._wrapperState.wasMultiple=!!e.multiple,c=e.value,null!=c?ka(a,!!e.multiple,c,!1):b!==!!e.multiple&&(null!=e.defaultValue?ka(a,!!e.multiple,e.defaultValue,!0):ka(a,!!e.multiple,e.multiple?[]:"",!1))}}function Ee(a,b,c,d,e){switch(b){case "iframe":case "object":r("topLoad","load",a);break;case "video":case "audio":for(var f in Z)Z.hasOwnProperty(f)&&r(f,Z[f],a);break;case "source":r("topError",
+"error",a);break;case "img":case "image":r("topError","error",a);r("topLoad","load",a);break;case "form":r("topReset","reset",a);r("topSubmit","submit",a);break;case "details":r("topToggle","toggle",a);break;case "input":pe(a,c);r("topInvalid","invalid",a);Y(e,"onChange");break;case "select":se(a,c);r("topInvalid","invalid",a);Y(e,"onChange");break;case "textarea":te(a,c),r("topInvalid","invalid",a),Y(e,"onChange")}Gc(b,c,$a);d=null;for(var g in c)c.hasOwnProperty(g)&&(f=c[g],"children"===g?"string"===
+typeof f?a.textContent!==f&&(d=["children",f]):"number"===typeof f&&a.textContent!==""+f&&(d=["children",""+f]):ca.hasOwnProperty(g)&&null!=f&&Y(e,g));switch(b){case "input":nb(a);re(a,c);break;case "textarea":nb(a);b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b);break;case "select":case "option":break;default:"function"===typeof c.onClick&&(a.onclick=G)}return d}function Fe(a,b){return a.nodeValue!==b}function Jc(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==
+a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function Gf(a){a=a?9===a.nodeType?a.documentElement:a.firstChild:null;return!(!a||1!==a.nodeType||!a.hasAttribute("data-reactroot"))}function Hb(a,b,c,d,e){Jc(c)?void 0:l("200");var f=c._reactRootContainer;if(f)E.updateContainer(b,f,a,e);else{d=d||Gf(c);if(!d)for(f=void 0;f=c.lastChild;)c.removeChild(f);var g=E.createContainer(c,d);f=c._reactRootContainer=g;E.unbatchedUpdates(function(){E.updateContainer(b,g,a,e)})}return E.getPublicRootInstance(f)}
+function Ge(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;Jc(b)?void 0:l("200");return Bf(a,b,null,c)}function He(a,b){this._reactRootContainer=E.createContainer(a,b)}na?void 0:l("227");var Yc={children:!0,dangerouslySetInnerHTML:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,style:!0},Ie={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,
+HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(a){var b=Ie,c=a.Properties||{},d=a.DOMAttributeNamespaces||{},e=a.DOMAttributeNames||{};a=a.DOMMutationMethods||{};for(var f in c){ib.hasOwnProperty(f)?l("48",f):void 0;var g=f.toLowerCase(),h=c[f];g={attributeName:g,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseProperty:va(h,b.MUST_USE_PROPERTY),hasBooleanValue:va(h,b.HAS_BOOLEAN_VALUE),hasNumericValue:va(h,b.HAS_NUMERIC_VALUE),hasPositiveNumericValue:va(h,b.HAS_POSITIVE_NUMERIC_VALUE),
+hasOverloadedBooleanValue:va(h,b.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:va(h,b.HAS_STRING_BOOLEAN_VALUE)};1>=g.hasBooleanValue+g.hasNumericValue+g.hasOverloadedBooleanValue?void 0:l("50",f);e.hasOwnProperty(f)&&(g.attributeName=e[f]);d.hasOwnProperty(f)&&(g.attributeNamespace=d[f]);a.hasOwnProperty(f)&&(g.mutationMethod=a[f]);ib[f]=g}}},ib={},aa=Ie,Ib=aa.MUST_USE_PROPERTY,w=aa.HAS_BOOLEAN_VALUE,Je=aa.HAS_NUMERIC_VALUE,Jb=aa.HAS_POSITIVE_NUMERIC_VALUE,Ke=aa.HAS_OVERLOADED_BOOLEAN_VALUE,
+Kb=aa.HAS_STRING_BOOLEAN_VALUE,Hf={Properties:{allowFullScreen:w,async:w,autoFocus:w,autoPlay:w,capture:Ke,checked:Ib|w,cols:Jb,contentEditable:Kb,controls:w,"default":w,defer:w,disabled:w,download:Ke,draggable:Kb,formNoValidate:w,hidden:w,loop:w,multiple:Ib|w,muted:Ib|w,noValidate:w,open:w,playsInline:w,readOnly:w,required:w,reversed:w,rows:Jb,rowSpan:Je,scoped:w,seamless:w,selected:Ib|w,size:Jb,start:Je,span:Jb,spellCheck:Kb,style:0,tabIndex:0,itemScope:w,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,
+value:Kb},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(a,b){if(null==b)return a.removeAttribute("value");"number"!==a.type||!1===a.hasAttribute("value")?a.setAttribute("value",""+b):a.validity&&!a.validity.badInput&&a.ownerDocument.activeElement!==a&&a.setAttribute("value",""+b)}}},Kc=aa.HAS_STRING_BOOLEAN_VALUE,Lc={Properties:{autoReverse:Kc,externalResourcesRequired:Kc,preserveAlpha:Kc},DOMAttributeNames:{autoReverse:"autoReverse",
+externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:"http://www.w3.org/1999/xlink",xlinkArcrole:"http://www.w3.org/1999/xlink",xlinkHref:"http://www.w3.org/1999/xlink",xlinkRole:"http://www.w3.org/1999/xlink",xlinkShow:"http://www.w3.org/1999/xlink",xlinkTitle:"http://www.w3.org/1999/xlink",xlinkType:"http://www.w3.org/1999/xlink",xmlBase:"http://www.w3.org/XML/1998/namespace",xmlLang:"http://www.w3.org/XML/1998/namespace",xmlSpace:"http://www.w3.org/XML/1998/namespace"}},
+If=/[\-\:]([a-z])/g,Jf=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(a){var b=
+a.replace(If,Jf);Lc.Properties[b]=0;Lc.DOMAttributeNames[b]=a});aa.injectDOMPropertyConfig(Hf);aa.injectDOMPropertyConfig(Lc);var y={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(a){"function"!==typeof a.invokeGuardedCallback?l("197"):void 0;Le=a.invokeGuardedCallback}},invokeGuardedCallback:function(a,b,c,d,e,f,g,h,k){Le.apply(y,arguments)},invokeGuardedCallbackAndCatchFirstError:function(a,b,c,d,e,f,g,h,k){y.invokeGuardedCallback.apply(this,
+arguments);if(y.hasCaughtError()){var l=y.clearCaughtError();y._hasRethrowError||(y._hasRethrowError=!0,y._rethrowError=l)}},rethrowCaughtError:function(){return Kf.apply(y,arguments)},hasCaughtError:function(){return y._hasCaughtError},clearCaughtError:function(){if(y._hasCaughtError){var a=y._caughtError;y._caughtError=null;y._hasCaughtError=!1;return a}l("198")}},Le=function(a,b,c,d,e,f,g,h,k){y._hasCaughtError=!1;y._caughtError=null;var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,
+l)}catch(D){y._caughtError=D,y._hasCaughtError=!0}},Kf=function(){if(y._hasRethrowError){var a=y._rethrowError;y._rethrowError=null;y._hasRethrowError=!1;throw a;}},jb=null,ba={},oa=[],Vb={},ca={},kb={},Lf=Object.freeze({plugins:oa,eventNameDispatchConfigs:Vb,registrationNameModules:ca,registrationNameDependencies:kb,possibleRegistrationNames:null,injectEventPluginOrder:ad,injectEventPluginsByName:bd}),ta=function(){};ta.thatReturns=lb;ta.thatReturnsFalse=lb(!1);ta.thatReturnsTrue=lb(!0);ta.thatReturnsNull=
+lb(null);ta.thatReturnsThis=function(){return this};ta.thatReturnsArgument=function(a){return a};var G=ta,Xb=null,vd=null,dd=null,pa=null,Me=function(a,b){if(a){var c=a._dispatchListeners,d=a._dispatchInstances;if(Array.isArray(c))for(var e=0;e<c.length&&!a.isPropagationStopped();e++)cd(a,b,c[e],d[e]);else c&&cd(a,b,c,d);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}},$e=function(a){return Me(a,!0)},af=function(a){return Me(a,!1)},Mc={injectEventPluginOrder:ad,
+injectEventPluginsByName:bd},Mf=Object.freeze({injection:Mc,getListener:Wb,extractEvents:ed,enqueueEvents:Yb,processEventQueue:Zb}),Ne=Math.random().toString(36).slice(2),O="__reactInternalInstance$"+Ne,ea="__reactEventHandlers$"+Ne,Oe=Object.freeze({precacheFiberNode:function(a,b){b[O]=a},getClosestInstanceFromNode:W,getInstanceFromNode:function(a){a=a[O];return!a||5!==a.tag&&6!==a.tag?null:a},getNodeFromInstance:xa,getFiberCurrentPropsFromNode:fd,updateFiberProps:function(a,b){a[ea]=b}}),Nf=Object.freeze({accumulateTwoPhaseDispatches:ya,
+accumulateTwoPhaseDispatchesSkipTarget:function(a){da(a,cf)},accumulateEnterLeaveDispatches:id,accumulateDirectDispatches:function(a){da(a,df)}}),Lb=!("undefined"===typeof window||!window.document||!window.document.createElement),P={canUseDOM:Lb,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:Lb&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:Lb&&!!window.screen,isInWorker:!Lb},ac=null,H={_root:null,_startText:null,_fallbackText:null},C=na.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,
+Pe="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),Of={type:null,target:null,currentTarget:G.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};C(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=
+!1),this.isDefaultPrevented=G.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=G.thatReturnsTrue)},persist:function(){this.isPersistent=G.thatReturnsTrue},isPersistent:G.thatReturnsFalse,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;for(a=0;a<Pe.length;a++)this[Pe[a]]=null}});n.Interface=Of;n.augmentClass=function(a,b){var c=
+function(){};c.prototype=this.prototype;c=new c;C(c,a.prototype);a.prototype=c;a.prototype.constructor=a;a.Interface=C({},this.Interface,b);a.augmentClass=this.augmentClass;md(a)};md(n);n.augmentClass(nd,{data:null});n.augmentClass(od,{data:null});var hf=[9,13,27,32],bc=P.canUseDOM&&"CompositionEvent"in window,ab=null;P.canUseDOM&&"documentMode"in document&&(ab=document.documentMode);var Pf=P.canUseDOM&&"TextEvent"in window&&!ab&&!gf(),td=P.canUseDOM&&(!bc||ab&&8<ab&&11>=ab),sd=String.fromCharCode(32),
+V={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},
+compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},rd=!1,za=!1,Qf={eventTypes:V,extractEvents:function(a,b,c,d){var e;if(bc)b:{switch(a){case "topCompositionStart":var f=V.compositionStart;break b;case "topCompositionEnd":f=V.compositionEnd;break b;case "topCompositionUpdate":f=V.compositionUpdate;break b}f=void 0}else za?pd(a,c)&&(f=V.compositionEnd):
+"topKeyDown"===a&&229===c.keyCode&&(f=V.compositionStart);f?(td&&(za||f!==V.compositionStart?f===V.compositionEnd&&za&&(e=kd()):(H._root=d,H._startText=ld(),za=!0)),f=nd.getPooled(f,b,c,d),e?f.data=e:(e=qd(c),null!==e&&(f.data=e)),ya(f),e=f):e=null;(a=Pf?jf(a,c):kf(a,c))?(b=od.getPooled(V.beforeInput,b,c,d),b.data=a,ya(b)):b=null;return[e,b]}},mb=null,Ga=null,fa=null,Qe={injectFiberControlledHostComponent:function(a){mb=a}},Rf=Object.freeze({injection:Qe,enqueueStateRestore:wd,restoreStateIfNeeded:xd}),
+ec=function(a,b){return a(b)},dc=!1,lf={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},zd;P.canUseDOM&&(zd=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var Dd={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},
+Ha=null,Oa=null,Nc=!1;P.canUseDOM&&(Nc=gc("input")&&(!document.documentMode||9<document.documentMode));var Sf={eventTypes:Dd,_isInputEventSupported:Nc,extractEvents:function(a,b,c,d){var e=b?xa(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=of;else if(yd(e))if(Nc)g=sf;else{g=qf;var h=pf}else f=e.nodeName,!f||"input"!==f.toLowerCase()||"checkbox"!==e.type&&"radio"!==e.type||(g=rf);if(g&&(g=g(a,b)))return Cd(g,c,d);h&&h(a,e,b);"topBlur"===a&&null!=
+b&&(a=b._wrapperState||e._wrapperState)&&a.controlled&&"number"===e.type&&(a=""+e.value,e.getAttribute("value")!==a&&e.setAttribute("value",a))}};n.augmentClass(Aa,{view:null,detail:null});var uf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};Aa.augmentClass(qa,{screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:hc,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||
+(a.fromElement===a.srcElement?a.toElement:a.fromElement)}});var Oc={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},Tf={eventTypes:Oc,extractEvents:function(a,b,c,d){if("topMouseOver"===a&&(c.relatedTarget||c.fromElement)||"topMouseOut"!==a&&"topMouseOver"!==a)return null;var e=d.window===d?d:(e=d.ownerDocument)?e.defaultView||e.parentWindow:window;"topMouseOut"===a?(a=
+b,b=(b=c.relatedTarget||c.toElement)?W(b):null):a=null;if(a===b)return null;var f=null==a?e:xa(a);e=null==b?e:xa(b);var g=qa.getPooled(Oc.mouseLeave,a,c,d);g.type="mouseleave";g.target=f;g.relatedTarget=e;c=qa.getPooled(Oc.mouseEnter,b,c,d);c.type="mouseenter";c.target=e;c.relatedTarget=f;id(g,c,a,b);return[g,c]}},bb=na.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Id={listen:function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),{remove:function(){a.removeEventListener(b,
+c,!1)}};if(a.attachEvent)return a.attachEvent("on"+b,c),{remove:function(){a.detachEvent("on"+b,c)}}},capture:function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!0),{remove:function(){a.removeEventListener(b,c,!0)}}):{remove:G}},registerDefault:function(){}},qb=[],Ra=!0,pb=void 0,Uf=Object.freeze({get _enabled(){return Ra},get _handleTopLevel(){return pb},setHandleTopLevel:function(a){pb=a},setEnabled:ic,isEnabled:function(){return Ra},trapBubbledEvent:r,trapCapturedEvent:ha,dispatchEvent:jc}),
+U={animationend:rb("Animation","AnimationEnd"),animationiteration:rb("Animation","AnimationIteration"),animationstart:rb("Animation","AnimationStart"),transitionend:rb("Transition","TransitionEnd")},kc={},Jd={};P.canUseDOM&&(Jd=document.createElement("div").style,"AnimationEvent"in window||(delete U.animationend.animation,delete U.animationiteration.animation,delete U.animationstart.animation),"TransitionEvent"in window||delete U.transitionend.transition);var xe={topAbort:"abort",topAnimationEnd:sb("animationend")||
+"animationend",topAnimationIteration:sb("animationiteration")||"animationiteration",topAnimationStart:sb("animationstart")||"animationstart",topBlur:"blur",topCancel:"cancel",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topClose:"close",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",
+topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoad:"load",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",
+topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topToggle:"toggle",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:sb("transitionend")||
+"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},Ld={},zf=0,tb="_reactListenersID"+(""+Math.random()).slice(2),nc=function(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}},Vf=Object.prototype.hasOwnProperty,oc=function(a,b){if(Md(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==
+d.length)return!1;for(d=0;d<c.length;d++)if(!Vf.call(b,c[d])||!Md(a[c[d]],b[c[d]]))return!1;return!0},Od=function(a){var b=(a?a.ownerDocument||a:document).defaultView||window;return!!(a&&("function"===typeof b.Node?a instanceof b.Node:"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName))&&3==a.nodeType},Wf=P.canUseDOM&&"documentMode"in document&&11>=document.documentMode,Sd={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},
+X=null,pc=null,Sa=null,mc=!1,Xf={eventTypes:Sd,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=Kd(e);f=kb.onSelect;for(var g=0;g<f.length;g++){var h=f[g];if(!e.hasOwnProperty(h)||!e[h]){e=!1;break a}}e=!0}f=!e}if(f)return null;e=b?xa(b):window;switch(a){case "topFocus":if(yd(e)||"true"===e.contentEditable)X=e,pc=b,Sa=null;break;case "topBlur":Sa=pc=X=null;break;case "topMouseDown":mc=!0;break;case "topContextMenu":case "topMouseUp":return mc=
+!1,Rd(c,d);case "topSelectionChange":if(Wf)break;case "topKeyDown":case "topKeyUp":return Rd(c,d)}return null}};n.augmentClass(Td,{animationName:null,elapsedTime:null,pseudoElement:null});n.augmentClass(Ud,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});Aa.augmentClass(Vd,{relatedTarget:null});var Yf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",
+MozPrintableKey:"Unidentified"},Zf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};Aa.augmentClass(Wd,{key:function(a){if(a.key){var b=Yf[a.key]||
+a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=ub(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Zf[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:hc,charCode:function(a){return"keypress"===a.type?ub(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?ub(a):"keydown"===a.type||"keyup"===
+a.type?a.keyCode:0}});qa.augmentClass(Xd,{dataTransfer:null});Aa.augmentClass(Yd,{touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:hc});n.augmentClass(Zd,{propertyName:null,elapsedTime:null,pseudoElement:null});qa.augmentClass($d,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,
+deltaMode:null});var Re={},Se={};"abort animationEnd animationIteration animationStart blur cancel canPlay canPlayThrough click close contextMenu copy cut doubleClick drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error focus input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing progress rateChange reset scroll seeked seeking stalled submit suspend timeUpdate toggle touchCancel touchEnd touchMove touchStart transitionEnd volumeChange waiting wheel".split(" ").forEach(function(a){var b=
+a[0].toUpperCase()+a.slice(1),c="on"+b;b="top"+b;c={phasedRegistrationNames:{bubbled:c,captured:c+"Capture"},dependencies:[b]};Re[a]=c;Se[b]=c});var $f={eventTypes:Re,extractEvents:function(a,b,c,d){var e=Se[a];if(!e)return null;switch(a){case "topKeyPress":if(0===ub(c))return null;case "topKeyDown":case "topKeyUp":a=Wd;break;case "topBlur":case "topFocus":a=Vd;break;case "topClick":if(2===c.button)return null;case "topDoubleClick":case "topMouseDown":case "topMouseMove":case "topMouseUp":case "topMouseOut":case "topMouseOver":case "topContextMenu":a=
+qa;break;case "topDrag":case "topDragEnd":case "topDragEnter":case "topDragExit":case "topDragLeave":case "topDragOver":case "topDragStart":case "topDrop":a=Xd;break;case "topTouchCancel":case "topTouchEnd":case "topTouchMove":case "topTouchStart":a=Yd;break;case "topAnimationEnd":case "topAnimationIteration":case "topAnimationStart":a=Td;break;case "topTransitionEnd":a=Zd;break;case "topScroll":a=Aa;break;case "topWheel":a=$d;break;case "topCopy":case "topCut":case "topPaste":a=Ud;break;default:a=
+n}b=a.getPooled(e,b,c,d);ya(b);return b}};pb=function(a,b,c,d){a=ed(a,b,c,d);Yb(a);Zb(!1)};Mc.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin TapEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));(function(a){Xb=a.getFiberCurrentPropsFromNode;vd=a.getInstanceFromNode;dd=a.getNodeFromInstance})(Oe);Mc.injectEventPluginsByName({SimpleEventPlugin:$f,EnterLeaveEventPlugin:Tf,ChangeEventPlugin:Sf,SelectEventPlugin:Xf,BeforeInputEventPlugin:Qf});
+var ja={},vb=[],ra=-1;new Set;var ia={current:ja},J={current:!1},wb=ja,vc=null,wc=null,ag=function(a,b,c,d){function e(a,b){b.updater=f;a.stateNode=b;b._reactInternalFiber=a}var f={isMounted:vf,enqueueSetState:function(c,d,e){c=c._reactInternalFiber;e=void 0===e?null:e;var f=b(c);Bb(c,{expirationTime:f,partialState:d,callback:e,isReplace:!1,isForced:!1,nextCallback:null,next:null});a(c,f)},enqueueReplaceState:function(c,d,e){c=c._reactInternalFiber;e=void 0===e?null:e;var f=b(c);Bb(c,{expirationTime:f,
+partialState:d,callback:e,isReplace:!0,isForced:!1,nextCallback:null,next:null});a(c,f)},enqueueForceUpdate:function(c,d){c=c._reactInternalFiber;d=void 0===d?null:d;var e=b(c);Bb(c,{expirationTime:e,partialState:null,callback:d,isReplace:!1,isForced:!0,nextCallback:null,next:null});a(c,e)}};return{adoptClassInstance:e,constructClassInstance:function(a,b){var c=a.type,d=Ta(a),f=2===a.tag&&null!=a.type.contextTypes,g=f?Va(a,d):ja;b=new c(b,g);e(a,b);f&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=
+d,a.__reactInternalMemoizedMaskedChildContext=g);return b},mountClassInstance:function(a,b){var c=a.alternate,d=a.stateNode,e=d.state||null,h=a.pendingProps;h?void 0:l("158");var g=Ta(a);d.props=h;d.state=a.memoizedState=e;d.refs=ja;d.context=Va(a,g);null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent&&(a.internalContextTag|=1);"function"===typeof d.componentWillMount&&(e=d.state,d.componentWillMount(),e!==d.state&&f.enqueueReplaceState(d,d.state,null),e=a.updateQueue,
+null!==e&&(d.state=xc(c,a,e,d,h,b)));"function"===typeof d.componentDidMount&&(a.effectTag|=4)},updateClassInstance:function(a,b,e){var g=b.stateNode;g.props=b.memoizedProps;g.state=b.memoizedState;var h=b.memoizedProps,k=b.pendingProps;k||(k=h,null==k?l("159"):void 0);var v=g.context,K=Ta(b);K=Va(b,K);"function"!==typeof g.componentWillReceiveProps||h===k&&v===K||(v=g.state,g.componentWillReceiveProps(k,K),g.state!==v&&f.enqueueReplaceState(g,g.state,null));v=b.memoizedState;e=null!==b.updateQueue?
+xc(a,b,b.updateQueue,g,k,e):v;if(!(h!==k||v!==e||J.current||null!==b.updateQueue&&b.updateQueue.hasForceUpdate))return"function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&v===a.memoizedState||(b.effectTag|=4),!1;var L=k;if(null===h||null!==b.updateQueue&&b.updateQueue.hasForceUpdate)L=!0;else{var R=b.stateNode,n=b.type;L="function"===typeof R.shouldComponentUpdate?R.shouldComponentUpdate(L,e,K):n.prototype&&n.prototype.isPureReactComponent?!oc(h,L)||!oc(v,e):!0}L?("function"===typeof g.componentWillUpdate&&
+g.componentWillUpdate(k,e,K),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&v===a.memoizedState||(b.effectTag|=4),c(b,k),d(b,e));g.props=k;g.state=e;g.context=K;return L}}},cb="function"===typeof Symbol&&Symbol["for"],Db=cb?Symbol["for"]("react.element"):60103,Eb=cb?Symbol["for"]("react.call"):60104,Fb=cb?Symbol["for"]("react.return"):60105,Ya=cb?Symbol["for"]("react.portal"):60106,sa=cb?Symbol["for"]("react.fragment"):60107,
+ke="function"===typeof Symbol&&Symbol.iterator,Gb=Array.isArray,db=le(!0),Mb=le(!1),bg=function(a,b,c,d,e){function f(a,b,c){var d=b.expirationTime;b.child=null===a?Mb(b,null,c,d):db(b,a.child,c,d)}function g(a,b){var c=b.ref;null===c||a&&a.ref===c||(b.effectTag|=128)}function h(a,b,c,d){g(a,b);if(!c)return d&&de(b,!1),m(a,b);c=b.stateNode;bb.current=b;var e=c.render();b.effectTag|=1;f(a,b,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&de(b,!0);return b.child}function k(a){var b=a.stateNode;
+b.pendingContext?be(a,b.pendingContext,b.pendingContext!==b.context):b.context&&be(a,b.context,!1);R(a,b.containerInfo)}function m(a,b){null!==a&&b.child!==a.child?l("153"):void 0;if(null!==b.child){a=b.child;var c=yb(a,a.pendingProps,a.expirationTime);b.child=c;for(c["return"]=b;null!==a.sibling;)a=a.sibling,c=c.sibling=yb(a,a.pendingProps,a.expirationTime),c["return"]=b;c.sibling=null}return b.child}function D(a,b){switch(b.tag){case 3:k(b);break;case 2:xb(b);break;case 4:R(b,b.stateNode.containerInfo)}return null}
+var A=a.shouldSetTextContent,v=a.useSyncScheduling,n=a.shouldDeprioritizeSubtree,L=b.pushHostContext,R=b.pushHostContainer,r=c.enterHydrationState,w=c.resetHydrationState,y=c.tryToClaimNextHydratableInstance;a=ag(d,e,function(a,b){a.memoizedProps=b},function(a,b){a.memoizedState=b});var x=a.adoptClassInstance,t=a.constructClassInstance,z=a.mountClassInstance,yc=a.updateClassInstance;return{beginWork:function(a,b,c){if(0===b.expirationTime||b.expirationTime>c)return D(a,b);switch(b.tag){case 0:null!==
+a?l("155"):void 0;var d=b.type,e=b.pendingProps,q=Ta(b);q=Va(b,q);d=d(e,q);b.effectTag|=1;"object"===typeof d&&null!==d&&"function"===typeof d.render?(b.tag=2,e=xb(b),x(b,d),z(b,c),b=h(a,b,!0,e)):(b.tag=1,f(a,b,d),b.memoizedProps=e,b=b.child);return b;case 1:a:{e=b.type;c=b.pendingProps;d=b.memoizedProps;if(J.current)null===c&&(c=d);else if(null===c||d===c){b=m(a,b);break a}d=Ta(b);d=Va(b,d);e=e(c,d);b.effectTag|=1;f(a,b,e);b.memoizedProps=c;b=b.child}return b;case 2:return e=xb(b),d=void 0,null===
+a?b.stateNode?l("153"):(t(b,b.pendingProps),z(b,c),d=!0):d=yc(a,b,c),h(a,b,d,e);case 3:return k(b),e=b.updateQueue,null!==e?(d=b.memoizedState,e=xc(a,b,e,null,null,c),d===e?(w(),b=m(a,b)):(d=e.element,q=b.stateNode,(null===a||null===a.child)&&q.hydrate&&r(b)?(b.effectTag|=2,b.child=Mb(b,null,d,c)):(w(),f(a,b,d)),b.memoizedState=e,b=b.child)):(w(),b=m(a,b)),b;case 5:L(b);null===a&&y(b);e=b.type;var p=b.memoizedProps;d=b.pendingProps;null===d&&(d=p,null===d?l("154"):void 0);q=null!==a?a.memoizedProps:
+null;J.current||null!==d&&p!==d?(p=d.children,A(e,d)?p=null:q&&A(e,q)&&(b.effectTag|=16),g(a,b),2147483647!==c&&!v&&n(e,d)?(b.expirationTime=2147483647,b=null):(f(a,b,p),b.memoizedProps=d,b=b.child)):b=m(a,b);return b;case 6:return null===a&&y(b),a=b.pendingProps,null===a&&(a=b.memoizedProps),b.memoizedProps=a,null;case 8:b.tag=7;case 7:e=b.pendingProps;if(J.current)null===e&&(e=a&&a.memoizedProps,null===e?l("154"):void 0);else if(null===e||b.memoizedProps===e)e=b.memoizedProps;d=e.children;b.stateNode=
+null===a?Mb(b,b.stateNode,d,c):db(b,b.stateNode,d,c);b.memoizedProps=e;return b.stateNode;case 9:return null;case 4:a:{R(b,b.stateNode.containerInfo);e=b.pendingProps;if(J.current)null===e&&(e=a&&a.memoizedProps,null==e?l("154"):void 0);else if(null===e||b.memoizedProps===e){b=m(a,b);break a}null===a?b.child=db(b,null,e,c):f(a,b,e);b.memoizedProps=e;b=b.child}return b;case 10:a:{c=b.pendingProps;if(J.current)null===c&&(c=b.memoizedProps);else if(null===c||b.memoizedProps===c){b=m(a,b);break a}f(a,
+b,c);b.memoizedProps=c;b=b.child}return b;default:l("156")}},beginFailedWork:function(a,b,c){switch(b.tag){case 2:xb(b);break;case 3:k(b);break;default:l("157")}b.effectTag|=64;null===a?b.child=null:b.child!==a.child&&(b.child=a.child);if(0===b.expirationTime||b.expirationTime>c)return D(a,b);b.firstEffect=null;b.lastEffect=null;b.child=null===a?Mb(b,null,null,c):db(b,a.child,null,c);2===b.tag&&(a=b.stateNode,b.memoizedProps=a.props,b.memoizedState=a.state);return b.child}}},cg=function(a,b,c){function d(a){a.effectTag|=
+4}var e=a.createInstance,f=a.createTextInstance,g=a.appendInitialChild,h=a.finalizeInitialChildren,k=a.prepareUpdate,m=a.persistence,D=b.getRootHostContainer,A=b.popHostContext,v=b.getHostContext,n=b.popHostContainer,L=c.prepareToHydrateHostInstance,R=c.prepareToHydrateHostTextInstance,r=c.popHydrationState,w=void 0,y=void 0,x=void 0;a.mutation?(w=function(a){},y=function(a,b,c,e,f,g,h){(b.updateQueue=c)&&d(b)},x=function(a,b,c,e){c!==e&&d(b)}):m?l("235"):l("236");return{completeWork:function(a,b,
+c){var t=b.pendingProps;if(null===t)t=b.memoizedProps;else if(2147483647!==b.expirationTime||2147483647===c)b.pendingProps=null;switch(b.tag){case 1:return null;case 2:return ae(b),null;case 3:n(b);I(J,b);I(ia,b);t=b.stateNode;t.pendingContext&&(t.context=t.pendingContext,t.pendingContext=null);if(null===a||null===a.child)r(b),b.effectTag&=-3;w(b);return null;case 5:A(b);c=D();var z=b.type;if(null!==a&&null!=b.stateNode){var m=a.memoizedProps,K=b.stateNode,yc=v();K=k(K,z,m,t,c,yc);y(a,b,K,z,m,t,c);
+a.ref!==b.ref&&(b.effectTag|=128)}else{if(!t)return null===b.stateNode?l("166"):void 0,null;a=v();if(r(b))L(b,c,a)&&d(b);else{a=e(z,t,c,a,b);a:for(m=b.child;null!==m;){if(5===m.tag||6===m.tag)g(a,m.stateNode);else if(4!==m.tag&&null!==m.child){m.child["return"]=m;m=m.child;continue}if(m===b)break;for(;null===m.sibling;){if(null===m["return"]||m["return"]===b)break a;m=m["return"]}m.sibling["return"]=m["return"];m=m.sibling}h(a,z,t,c)&&d(b);b.stateNode=a}null!==b.ref&&(b.effectTag|=128)}return null;
+case 6:if(a&&null!=b.stateNode)x(a,b,a.memoizedProps,t);else{if("string"!==typeof t)return null===b.stateNode?l("166"):void 0,null;a=D();c=v();r(b)?R(b)&&d(b):b.stateNode=f(t,a,c,b)}return null;case 7:(t=b.memoizedProps)?void 0:l("165");b.tag=8;z=[];a:for((m=b.stateNode)&&(m["return"]=b);null!==m;){if(5===m.tag||6===m.tag||4===m.tag)l("247");else if(9===m.tag)z.push(m.type);else if(null!==m.child){m.child["return"]=m;m=m.child;continue}for(;null===m.sibling;){if(null===m["return"]||m["return"]===
+b)break a;m=m["return"]}m.sibling["return"]=m["return"];m=m.sibling}m=t.handler;t=m(t.props,z);b.child=db(b,null!==a?a.child:null,t,c);return b.child;case 8:return b.tag=7,null;case 9:return null;case 10:return null;case 4:return n(b),w(b),null;case 0:l("167");default:l("156")}}}},dg=function(a,b){function c(a){var c=a.ref;if(null!==c)try{c(null)}catch(z){b(a,z)}}function d(a){"function"===typeof ge&&ge(a);switch(a.tag){case 2:c(a);var d=a.stateNode;if("function"===typeof d.componentWillUnmount)try{d.props=
+a.memoizedProps,d.state=a.memoizedState,d.componentWillUnmount()}catch(z){b(a,z)}break;case 5:c(a);break;case 7:e(a.stateNode);break;case 4:k&&g(a)}}function e(a){for(var b=a;;)if(d(b),null===b.child||k&&4===b.tag){if(b===a)break;for(;null===b.sibling;){if(null===b["return"]||b["return"]===a)return;b=b["return"]}b.sibling["return"]=b["return"];b=b.sibling}else b.child["return"]=b,b=b.child}function f(a){return 5===a.tag||3===a.tag||4===a.tag}function g(a){for(var b=a,c=!1,f=void 0,g=void 0;;){if(!c){c=
+b["return"];a:for(;;){null===c?l("160"):void 0;switch(c.tag){case 5:f=c.stateNode;g=!1;break a;case 3:f=c.stateNode.containerInfo;g=!0;break a;case 4:f=c.stateNode.containerInfo;g=!0;break a}c=c["return"]}c=!0}if(5===b.tag||6===b.tag)e(b),g?y(f,b.stateNode):w(f,b.stateNode);else if(4===b.tag?f=b.stateNode.containerInfo:d(b),null!==b.child){b.child["return"]=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b["return"]||b["return"]===a)return;b=b["return"];4===b.tag&&(c=!1)}b.sibling["return"]=
+b["return"];b=b.sibling}}var h=a.getPublicInstance,k=a.mutation;a=a.persistence;k||(a?l("235"):l("236"));var m=k.commitMount,D=k.commitUpdate,A=k.resetTextContent,v=k.commitTextUpdate,n=k.appendChild,L=k.appendChildToContainer,R=k.insertBefore,r=k.insertInContainerBefore,w=k.removeChild,y=k.removeChildFromContainer;return{commitResetTextContent:function(a){A(a.stateNode)},commitPlacement:function(a){a:{for(var b=a["return"];null!==b;){if(f(b)){var c=b;break a}b=b["return"]}l("160");c=void 0}var d=
+b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:l("161")}c.effectTag&16&&(A(b),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c["return"]||f(c["return"])){c=null;break a}c=c["return"]}c.sibling["return"]=c["return"];for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child["return"]=c,c=c.child}if(!(c.effectTag&
+2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)c?d?r(b,e.stateNode,c):R(b,e.stateNode,c):d?L(b,e.stateNode):n(b,e.stateNode);else if(4!==e.tag&&null!==e.child){e.child["return"]=e;e=e.child;continue}if(e===a)break;for(;null===e.sibling;){if(null===e["return"]||e["return"]===a)return;e=e["return"]}e.sibling["return"]=e["return"];e=e.sibling}},commitDeletion:function(a){g(a);a["return"]=null;a.child=null;a.alternate&&(a.alternate.child=null,a.alternate["return"]=null)},commitWork:function(a,
+b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&D(c,f,e,a,d,b)}break;case 6:null===b.stateNode?l("162"):void 0;c=b.memoizedProps;v(b.stateNode,null!==a?a.memoizedProps:c,c);break;case 3:break;default:l("163")}},commitLifeCycles:function(a,b){switch(b.tag){case 2:var c=b.stateNode;if(b.effectTag&4)if(null===a)c.props=b.memoizedProps,c.state=b.memoizedState,c.componentDidMount();
+else{var d=a.memoizedProps;a=a.memoizedState;c.props=b.memoizedProps;c.state=b.memoizedState;c.componentDidUpdate(d,a)}b=b.updateQueue;null!==b&&je(b,c);break;case 3:c=b.updateQueue;null!==c&&je(c,null!==b.child?b.child.stateNode:null);break;case 5:c=b.stateNode;null===a&&b.effectTag&4&&m(c,b.type,b.memoizedProps,b);break;case 6:break;case 4:break;default:l("163")}},commitAttachRef:function(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:b(h(c));break;default:b(c)}}},commitDetachRef:function(a){a=
+a.ref;null!==a&&a(null)}}},la={},eg=function(a){function b(a){a===la?l("174"):void 0;return a}var c=a.getChildHostContext,d=a.getRootHostContext,e={current:la},f={current:la},g={current:la};return{getHostContext:function(){return b(e.current)},getRootHostContainer:function(){return b(g.current)},popHostContainer:function(a){I(e,a);I(f,a);I(g,a)},popHostContext:function(a){f.current===a&&(I(e,a),I(f,a))},pushHostContainer:function(a,b){M(g,b,a);b=d(b);M(f,a,a);M(e,b,a)},pushHostContext:function(a){var d=
+b(g.current),h=b(e.current);d=c(h,a.type,d);h!==d&&(M(f,a,a),M(e,d,a))},resetHostContainer:function(){e.current=la;g.current=la}}},fg=function(a){function b(a,b){var c=new Q(5,null,0);c.type="DELETED";c.stateNode=b;c["return"]=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function c(a,b){switch(a.tag){case 5:return b=f(b,a.type,a.pendingProps),null!==b?(a.stateNode=b,!0):!1;case 6:return b=g(b,a.pendingProps),null!==b?(a.stateNode=b,!0):
+!1;default:return!1}}function d(a){for(a=a["return"];null!==a&&5!==a.tag&&3!==a.tag;)a=a["return"];A=a}var e=a.shouldSetTextContent;a=a.hydration;if(!a)return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){l("175")},prepareToHydrateHostTextInstance:function(){l("176")},popHydrationState:function(a){return!1}};var f=a.canHydrateInstance,g=a.canHydrateTextInstance,h=a.getNextHydratableSibling,
+k=a.getFirstHydratableChild,m=a.hydrateInstance,D=a.hydrateTextInstance,A=null,v=null,n=!1;return{enterHydrationState:function(a){v=k(a.stateNode.containerInfo);A=a;return n=!0},resetHydrationState:function(){v=A=null;n=!1},tryToClaimNextHydratableInstance:function(a){if(n){var d=v;if(d){if(!c(a,d)){d=h(d);if(!d||!c(a,d)){a.effectTag|=2;n=!1;A=a;return}b(A,v)}A=a;v=k(d)}else a.effectTag|=2,n=!1,A=a}},prepareToHydrateHostInstance:function(a,b,c){b=m(a.stateNode,a.type,a.memoizedProps,b,c,a);a.updateQueue=
+b;return null!==b?!0:!1},prepareToHydrateHostTextInstance:function(a){return D(a.stateNode,a.memoizedProps,a)},popHydrationState:function(a){if(a!==A)return!1;if(!n)return d(a),n=!0,!1;var c=a.type;if(5!==a.tag||"head"!==c&&"body"!==c&&!e(c,a.memoizedProps))for(c=v;c;)b(a,c),c=h(c);d(a);v=A?h(a.stateNode):null;return!0}}},gg=function(a){function b(a){X=Ba=!0;var b=a.stateNode;b.current===a?l("177"):void 0;b.isReadyForCommit=!1;bb.current=null;if(1<a.effectTag)if(null!==a.lastEffect){a.lastEffect.nextEffect=
+a;var c=a.firstEffect}else c=a;else c=a.firstEffect;za();for(u=c;null!==u;){var d=!1,e=void 0;try{for(;null!==u;){var f=u.effectTag;f&16&&aa(u);if(f&128){var g=u.alternate;null!==g&&va(g)}switch(f&-242){case 2:V(u);u.effectTag&=-3;break;case 6:V(u);u.effectTag&=-3;ca(u.alternate,u);break;case 4:ca(u.alternate,u);break;case 8:ka=!0,na(u),ka=!1}u=u.nextEffect}}catch(Qc){d=!0,e=Qc}d&&(null===u?l("178"):void 0,h(u,e),null!==u&&(u=u.nextEffect))}Aa();b.current=a;for(u=c;null!==u;){c=!1;d=void 0;try{for(;null!==
+u;){var k=u.effectTag;k&36&&sa(u.alternate,u);k&128&&ta(u);if(k&64)switch(e=u,f=void 0,null!==S&&(f=S.get(e),S["delete"](e),null==f&&null!==e.alternate&&(e=e.alternate,f=S.get(e),S["delete"](e))),null==f?l("184"):void 0,e.tag){case 2:e.stateNode.componentDidCatch(f.error,{componentStack:f.componentStack});break;case 3:null===ma&&(ma=f.error);break;default:l("157")}var Ma=u.nextEffect;u.nextEffect=null;u=Ma}}catch(Qc){c=!0,d=Qc}c&&(null===u?l("178"):void 0,h(u,d),null!==u&&(u=u.nextEffect))}Ba=X=!1;
+"function"===typeof fe&&fe(a.stateNode);ua&&(ua.forEach(w),ua=null);null!==ma&&(a=ma,ma=null,G(a));b=b.current.expirationTime;0===b&&(Ia=S=null);return b}function c(a){for(;;){var b=Y(a.alternate,a,F),c=a["return"],d=a.sibling;var e=a;if(2147483647===F||2147483647!==e.expirationTime){if(2!==e.tag&&3!==e.tag)var f=0;else f=e.updateQueue,f=null===f?0:f.expirationTime;for(var g=e.child;null!==g;)0!==g.expirationTime&&(0===f||f>g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==
+b)return b;null!==c&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1<a.effectTag&&(null!==c.lastEffect?c.lastEffect.nextEffect=a:c.firstEffect=a,c.lastEffect=a));if(null!==d)return d;if(null!==c)a=c;else{a.stateNode.isReadyForCommit=!0;break}}return null}function d(a){var b=Q(a.alternate,a,F);null===b&&(b=c(a));bb.current=null;return b}function e(a){var b=T(a.alternate,a,F);null===
+b&&(b=c(a));bb.current=null;return b}function f(a){if(null!==S){if(!(0===F||F>a))if(F<=ha)for(;null!==B;)B=k(B)?e(B):d(B);else for(;null!==B&&!z();)B=k(B)?e(B):d(B)}else if(!(0===F||F>a))if(F<=ha)for(;null!==B;)B=d(B);else for(;null!==B&&!z();)B=d(B)}function g(a,b){Ba?l("243"):void 0;Ba=!0;a.isReadyForCommit=!1;if(a!==Ja||b!==F||null===B){for(;-1<ra;)vb[ra]=null,ra--;wb=ja;ia.current=ja;J.current=!1;P();Ja=a;F=b;B=yb(Ja.current,null,b)}var c=!1,d=null;try{f(b)}catch(Pc){c=!0,d=Pc}for(;c;){if(U){ma=
+d;break}var g=B;if(null===g)U=!0;else{var k=h(g,d);null===k?l("183"):void 0;if(!U){try{c=k;d=b;for(k=c;null!==g;){switch(g.tag){case 2:ae(g);break;case 5:O(g);break;case 3:I(g);break;case 4:I(g)}if(g===k||g.alternate===k)break;g=g["return"]}B=e(c);f(d)}catch(Pc){c=!0;d=Pc;continue}break}}}b=ma;U=Ba=!1;ma=null;null!==b&&G(b);return a.isReadyForCommit?a.current.alternate:null}function h(a,b){var c=bb.current=null,d=!1,e=!1,f=null;if(3===a.tag)c=a,m(a)&&(U=!0);else for(var g=a["return"];null!==g&&null===
+c;){2===g.tag?"function"===typeof g.stateNode.componentDidCatch&&(d=!0,f=Pa(g),c=g,e=!0):3===g.tag&&(c=g);if(m(g)){if(ka||null!==ua&&(ua.has(g)||null!==g.alternate&&ua.has(g.alternate)))return null;c=null;e=!1}g=g["return"]}if(null!==c){null===Ia&&(Ia=new Set);Ia.add(c);var h="";g=a;do{a:switch(g.tag){case 0:case 1:case 2:case 5:var k=g._debugOwner,l=g._debugSource;var Ma=Pa(g);var p=null;k&&(p=Pa(k));k=l;Ma="\n in "+(Ma||"Unknown")+(k?" (at "+k.fileName.replace(/^.*[\\\/]/,"")+":"+k.lineNumber+
+")":p?" (created by "+p+")":"");break a;default:Ma=""}h+=Ma;g=g["return"]}while(g);g=h;a=Pa(a);null===S&&(S=new Map);b={componentName:a,componentStack:g,error:b,errorBoundary:d?c.stateNode:null,errorBoundaryFound:d,errorBoundaryName:f,willRetry:e};S.set(c,b);try{var n=b.error;n&&n.suppressReactErrorLogging||console.error(n)}catch(Rc){Rc&&Rc.suppressReactErrorLogging||console.error(Rc)}X?(null===ua&&(ua=new Set),ua.add(c)):w(c);return c}null===ma&&(ma=b);return null}function k(a){return null!==S&&
+(S.has(a)||null!==a.alternate&&S.has(a.alternate))}function m(a){return null!==Ia&&(Ia.has(a)||null!==a.alternate&&Ia.has(a.alternate))}function n(){return 20*(((y()+100)/20|0)+1)}function A(a){return 0!==Ca?Ca:Ba?X?1:F:!ya||a.internalContextTag&1?n():1}function v(a,b){return r(a,b,!1)}function r(a,b,c){for(;null!==a;){if(0===a.expirationTime||a.expirationTime>b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===
+a["return"])if(3===a.tag){c=a.stateNode;!Ba&&c===Ja&&b<F&&(B=Ja=null,F=0);var d=c,e=b;fa>Ga&&l("185");if(null===d.nextScheduledRoot)d.remainingExpirationTime=e,null===N?(Ka=N=d,d.nextScheduledRoot=d):(N=N.nextScheduledRoot=d,N.nextScheduledRoot=Ka);else{var f=d.remainingExpirationTime;if(0===f||e<f)d.remainingExpirationTime=e}Na||(Da?ea&&(Ea=d,Fa=1,t(Ea,Fa)):1===e?x(1,null):C(e));!Ba&&c===Ja&&b<F&&(B=Ja=null,F=0)}else break;a=a["return"]}}function w(a){r(a,1,!0)}function y(){return ha=((ba()-qa)/
+10|0)+2}function C(a){if(0!==Z){if(a>Z)return;xa(la)}var b=ba()-qa;Z=a;la=wa(H,{timeout:10*(a-2)-b})}function E(){var a=0,b=null;if(null!==N)for(var c=N,d=Ka;null!==d;){var e=d.remainingExpirationTime;if(0===e){null===c||null===N?l("244"):void 0;if(d===d.nextScheduledRoot){Ka=N=d.nextScheduledRoot=null;break}else if(d===Ka)Ka=e=d.nextScheduledRoot,N.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===N){N=c;N.nextScheduledRoot=Ka;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,
+d.nextScheduledRoot=null;d=c.nextScheduledRoot}else{if(0===a||e<a)a=e,b=d;if(d===N)break;c=d;d=d.nextScheduledRoot}}c=Ea;null!==c&&c===b?fa++:fa=0;Ea=b;Fa=a}function H(a){x(0,a)}function x(a,b){W=b;for(E();null!==Ea&&0!==Fa&&(0===a||Fa<=a)&&!oa;)t(Ea,Fa),E();null!==W&&(Z=0,la=-1);0!==Fa&&C(Fa);W=null;oa=!1;fa=0;if(da)throw (a=pa, pa=null, da=!1, a);}function t(a,c){Na?l("245"):void 0;Na=!0;if(c<=y()){var d=a.finishedWork;null!==d?(a.finishedWork=null,a.remainingExpirationTime=b(d)):(a.finishedWork=null,
+d=g(a,c),null!==d&&(a.remainingExpirationTime=b(d)))}else d=a.finishedWork,null!==d?(a.finishedWork=null,a.remainingExpirationTime=b(d)):(a.finishedWork=null,d=g(a,c),null!==d&&(z()?a.finishedWork=d:a.remainingExpirationTime=b(d)));Na=!1}function z(){return null===W||W.timeRemaining()>Ha?!1:oa=!0}function G(a){null===Ea?l("246"):void 0;Ea.remainingExpirationTime=0;da||(da=!0,pa=a)}var q=eg(a),p=fg(a),I=q.popHostContainer,O=q.popHostContext,P=q.resetHostContainer,M=bg(a,q,p,v,A),Q=M.beginWork,T=M.beginFailedWork,
+Y=cg(a,q,p).completeWork;q=dg(a,h);var aa=q.commitResetTextContent,V=q.commitPlacement,na=q.commitDeletion,ca=q.commitWork,sa=q.commitLifeCycles,ta=q.commitAttachRef,va=q.commitDetachRef,ba=a.now,wa=a.scheduleDeferredCallback,xa=a.cancelDeferredCallback,ya=a.useSyncScheduling,za=a.prepareForCommit,Aa=a.resetAfterCommit,qa=ba(),ha=2,Ca=0,Ba=!1,B=null,Ja=null,F=0,u=null,S=null,Ia=null,ua=null,ma=null,U=!1,X=!1,ka=!1,Ka=null,N=null,Z=0,la=-1,Na=!1,Ea=null,Fa=0,oa=!1,da=!1,pa=null,W=null,Da=!1,ea=!1,
+Ga=1E3,fa=0,Ha=1;return{computeAsyncExpiration:n,computeExpirationForFiber:A,scheduleWork:v,batchedUpdates:function(a,b){var c=Da;Da=!0;try{return a(b)}finally{(Da=c)||Na||x(1,null)}},unbatchedUpdates:function(a){if(Da&&!ea){ea=!0;try{return a()}finally{ea=!1}}return a()},flushSync:function(a){var b=Da;Da=!0;try{a:{var c=Ca;Ca=1;try{var d=a();break a}finally{Ca=c}d=void 0}return d}finally{Da=b,Na?l("187"):void 0,x(1,null)}},deferredUpdates:function(a){var b=Ca;Ca=n();try{return a()}finally{Ca=b}}}},
+Te=function(a){function b(a){a=wf(a);return null===a?null:a.stateNode}var c=a.getPublicInstance;a=gg(a);var d=a.computeAsyncExpiration,e=a.computeExpirationForFiber,f=a.scheduleWork;return{createContainer:function(a,b){var c=new Q(3,null,0);a={current:c,containerInfo:a,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:b,nextScheduledRoot:null};return c.stateNode=a},updateContainer:function(a,b,c,m){var g=b.current;if(c){c=
+c._reactInternalFiber;var h;b:{2===Qa(c)&&2===c.tag?void 0:l("170");for(h=c;3!==h.tag;){if(Ua(h)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}(h=h["return"])?void 0:l("171")}h=h.stateNode.context}c=Ua(c)?ce(c,h):h}else c=ja;null===b.context?b.context=c:b.pendingContext=c;b=m;b=void 0===b?null:b;m=null!=a&&null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent?d():e(g);Bb(g,{expirationTime:m,partialState:{element:a},callback:b,isReplace:!1,isForced:!1,
+nextCallback:null,next:null});f(g,m)},batchedUpdates:a.batchedUpdates,unbatchedUpdates:a.unbatchedUpdates,deferredUpdates:a.deferredUpdates,flushSync:a.flushSync,getPublicRootInstance:function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return c(a.child.stateNode);default:return a.child.stateNode}},findHostInstance:b,findHostInstanceWithNoPortals:function(a){a=xf(a);return null===a?null:a.stateNode},injectIntoDevTools:function(a){var c=a.findFiberByHostInstance;return Af(C({},
+a,{findHostInstanceByFiber:function(a){return b(a)},findFiberByHostInstance:function(a){return c?c(a):null}}))}}},Ue=Object.freeze({default:Te}),Sc=Ue&&Te||Ue,hg=Sc["default"]?Sc["default"]:Sc,Ve="object"===typeof performance&&"function"===typeof performance.now,Nb=void 0;Nb=Ve?function(){return performance.now()}:function(){return Date.now()};var Ob=void 0,Pb=void 0;if(P.canUseDOM)if("function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback){var Qb=null,Rb=!1,eb=-1,fb=!1,gb=
+0,Sb=33,hb=33;var Tc=Ve?{didTimeout:!1,timeRemaining:function(){var a=gb-performance.now();return 0<a?a:0}}:{didTimeout:!1,timeRemaining:function(){var a=gb-Date.now();return 0<a?a:0}};var We="__reactIdleCallback$"+Math.random().toString(36).slice(2);window.addEventListener("message",function(a){if(a.source===window&&a.data===We){Rb=!1;a=Nb();if(0>=gb-a)if(-1!==eb&&eb<=a)Tc.didTimeout=!0;else{fb||(fb=!0,requestAnimationFrame(Xe));return}else Tc.didTimeout=!1;eb=-1;a=Qb;Qb=null;null!==a&&a(Tc)}},!1);
+var Xe=function(a){fb=!1;var b=a-gb+hb;b<hb&&Sb<hb?(8>b&&(b=8),hb=b<Sb?Sb:b):Sb=b;gb=a+hb;Rb||(Rb=!0,window.postMessage(We,"*"))};Ob=function(a,b){Qb=a;null!=b&&"number"===typeof b.timeout&&(eb=Nb()+b.timeout);fb||(fb=!0,requestAnimationFrame(Xe));return 0};Pb=function(){Qb=null;Rb=!1;eb=-1}}else Ob=window.requestIdleCallback,Pb=window.cancelIdleCallback;else Ob=function(a){return setTimeout(function(){a({timeRemaining:function(){return Infinity}})})},Pb=function(a){clearTimeout(a)};var Df=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
+ne={},me={},Tb=void 0,Be=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Tb=Tb||document.createElement("div");Tb.innerHTML="\x3csvg\x3e"+b+"\x3c/svg\x3e";for(b=Tb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),Ic=function(a,b){if(b){var c=
+a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b},Za={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,
+order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ig=["Webkit","ms","Moz","O"];Object.keys(Za).forEach(function(a){ig.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Za[b]=Za[a]})});var Ff=C({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),$a=G.thatReturns(""),
+Z={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",
+topWaiting:"waiting"},jg=Object.freeze({createElement:ye,createTextNode:ze,setInitialProperties:Ae,diffProperties:Ce,updateProperties:De,diffHydratedProperties:Ee,diffHydratedText:Fe,warnForUnmatchedText:function(a,b){},warnForDeletedHydratableElement:function(a,b){},warnForDeletedHydratableText:function(a,b){},warnForInsertedHydratedElement:function(a,b,c){},warnForInsertedHydratedText:function(a,b){},restoreControlledState:function(a,b,c){switch(b){case "input":Cc(a,c);b=c.name;if("radio"===c.type&&
+null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name\x3d"+JSON.stringify(""+b)+'][type\x3d"radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=fd(d);e?void 0:l("90");Bd(d);Cc(d,e)}}}break;case "textarea":ue(a,c);break;case "select":b=c.value,null!=b&&ka(a,!!c.multiple,b,!1)}}});Qe.injectFiberControlledHostComponent(jg);var Uc=null,Vc=null,E=hg({getRootHostContext:function(a){var b=a.nodeType;switch(b){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:
+Fc(null,"");break;default:b=8===b?a.parentNode:a,a=b.namespaceURI||null,b=b.tagName,a=Fc(a,b)}return a},getChildHostContext:function(a,b){return Fc(a,b)},getPublicInstance:function(a){return a},prepareForCommit:function(){Uc=Ra;var a=nc();if(lc(a)){if("selectionStart"in a)var b={start:a.selectionStart,end:a.selectionEnd};else a:{var c=window.getSelection&&window.getSelection();if(c&&0!==c.rangeCount){b=c.anchorNode;var d=c.anchorOffset,e=c.focusNode;c=c.focusOffset;try{b.nodeType,e.nodeType}catch(K){b=
+null;break a}var f=0,g=-1,h=-1,k=0,l=0,n=a,r=null;b:for(;;){for(var v;;){n!==b||0!==d&&3!==n.nodeType||(g=f+d);n!==e||0!==c&&3!==n.nodeType||(h=f+c);3===n.nodeType&&(f+=n.nodeValue.length);if(null===(v=n.firstChild))break;r=n;n=v}for(;;){if(n===a)break b;r===b&&++k===d&&(g=f);r===e&&++l===c&&(h=f);if(null!==(v=n.nextSibling))break;n=r;r=n.parentNode}n=v}b=-1===g||-1===h?null:{start:g,end:h}}else b=null}b=b||{start:0,end:0}}else b=null;Vc={focusedElem:a,selectionRange:b};ic(!1)},resetAfterCommit:function(){var a=
+Vc,b=nc(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&Nd(document.documentElement,c)){if(lc(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(window.getSelection){b=window.getSelection();var e=c[jd()].length;a=Math.min(d.start,e);d=void 0===d.end?a:Math.min(d.end,e);!b.extend&&a>d&&(e=d,d=a,a=e);e=Qd(c,a);var f=Qd(c,d);if(e&&f&&(1!==b.rangeCount||b.anchorNode!==e.node||b.anchorOffset!==e.offset||b.focusNode!==f.node||
+b.focusOffset!==f.offset)){var g=document.createRange();g.setStart(e.node,e.offset);b.removeAllRanges();a>d?(b.addRange(g),b.extend(f.node,f.offset)):(g.setEnd(f.node,f.offset),b.addRange(g))}}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});try{c.focus()}catch(h){}for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}Vc=null;ic(Uc);Uc=null},createInstance:function(a,b,c,d,e){a=ye(a,b,c,d);a[O]=e;a[ea]=b;return a},appendInitialChild:function(a,
+b){a.appendChild(b)},finalizeInitialChildren:function(a,b,c,d){Ae(a,b,c,d);a:{switch(b){case "button":case "input":case "select":case "textarea":a=!!c.autoFocus;break a}a=!1}return a},prepareUpdate:function(a,b,c,d,e,f){return Ce(a,b,c,d,e)},shouldSetTextContent:function(a,b){return"textarea"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&"string"===typeof b.dangerouslySetInnerHTML.__html},shouldDeprioritizeSubtree:function(a,
+b){return!!b.hidden},createTextInstance:function(a,b,c,d){a=ze(a,b);a[O]=d;return a},now:Nb,mutation:{commitMount:function(a,b,c,d){a.focus()},commitUpdate:function(a,b,c,d,e,f){a[ea]=e;De(a,b,c,d,e)},resetTextContent:function(a){a.textContent=""},commitTextUpdate:function(a,b,c){a.nodeValue=c},appendChild:function(a,b){a.appendChild(b)},appendChildToContainer:function(a,b){8===a.nodeType?a.parentNode.insertBefore(b,a):a.appendChild(b)},insertBefore:function(a,b,c){a.insertBefore(b,c)},insertInContainerBefore:function(a,
+b,c){8===a.nodeType?a.parentNode.insertBefore(b,c):a.insertBefore(b,c)},removeChild:function(a,b){a.removeChild(b)},removeChildFromContainer:function(a,b){8===a.nodeType?a.parentNode.removeChild(b):a.removeChild(b)}},hydration:{canHydrateInstance:function(a,b,c){return 1!==a.nodeType||b.toLowerCase()!==a.nodeName.toLowerCase()?null:a},canHydrateTextInstance:function(a,b){return""===b||3!==a.nodeType?null:a},getNextHydratableSibling:function(a){for(a=a.nextSibling;a&&1!==a.nodeType&&3!==a.nodeType;)a=
+a.nextSibling;return a},getFirstHydratableChild:function(a){for(a=a.firstChild;a&&1!==a.nodeType&&3!==a.nodeType;)a=a.nextSibling;return a},hydrateInstance:function(a,b,c,d,e,f){a[O]=f;a[ea]=c;return Ee(a,b,c,e,d)},hydrateTextInstance:function(a,b,c){a[O]=c;return Fe(a,b)},didNotMatchHydratedContainerTextInstance:function(a,b,c){},didNotMatchHydratedTextInstance:function(a,b,c,d,e){},didNotHydrateContainerInstance:function(a,b){},didNotHydrateInstance:function(a,b,c,d){},didNotFindHydratableContainerInstance:function(a,
+b,c){},didNotFindHydratableContainerTextInstance:function(a,b){},didNotFindHydratableInstance:function(a,b,c,d,e){},didNotFindHydratableTextInstance:function(a,b,c,d){}},scheduleDeferredCallback:Ob,cancelDeferredCallback:Pb,useSyncScheduling:!0});ec=E.batchedUpdates;He.prototype.render=function(a,b){E.updateContainer(a,this._reactRootContainer,null,b)};He.prototype.unmount=function(a){E.updateContainer(null,this._reactRootContainer,null,a)};var Ye={createPortal:Ge,findDOMNode:function(a){if(null==
+a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(b)return E.findHostInstance(b);"function"===typeof a.render?l("188"):l("213",Object.keys(a))},hydrate:function(a,b,c){return Hb(null,a,b,!0,c)},render:function(a,b,c){return Hb(null,a,b,!1,c)},unstable_renderSubtreeIntoContainer:function(a,b,c,d){null==a||void 0===a._reactInternalFiber?l("38"):void 0;return Hb(a,b,c,!1,d)},unmountComponentAtNode:function(a){Jc(a)?void 0:l("40");return a._reactRootContainer?(E.unbatchedUpdates(function(){Hb(null,
+null,a,!1,function(){a._reactRootContainer=null})}),!0):!1},unstable_createPortal:Ge,unstable_batchedUpdates:cc,unstable_deferredUpdates:E.deferredUpdates,flushSync:E.flushSync,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{EventPluginHub:Mf,EventPluginRegistry:Lf,EventPropagators:Nf,ReactControlledComponent:Rf,ReactDOMComponentTree:Oe,ReactDOMEventListener:Uf}};E.injectIntoDevTools({findFiberByHostInstance:W,bundleType:0,version:"16.2.0",rendererPackageName:"react-dom"});var Ze=Object.freeze({default:Ye}),
+Wc=Ze&&Ye||Ze;return Wc["default"]?Wc["default"]:Wc});
diff --git a/devtools/client/inspector/markup/test/lib_react_with_addons_15.3.1_min.js b/devtools/client/inspector/markup/test/lib_react_with_addons_15.3.1_min.js
new file mode 100644
index 0000000000..42f1dd5e1b
--- /dev/null
+++ b/devtools/client/inspector/markup/test/lib_react_with_addons_15.3.1_min.js
@@ -0,0 +1,16 @@
+/**
+ * React (with addons) v15.3.1
+ *
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";var r=e(44),o=e(162),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};t.exports=i},{162:162,44:44}],2:[function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function i(e){switch(e){case S.topCompositionStart:return k.compositionStart;case S.topCompositionEnd:return k.compositionEnd;case S.topCompositionUpdate:return k.compositionUpdate}}function a(e,t){return e===S.topKeyDown&&t.keyCode===_}function s(e,t){switch(e){case S.topKeyUp:return b.indexOf(t.keyCode)!==-1;case S.topKeyDown:return t.keyCode!==_;case S.topKeyPress:case S.topMouseDown:case S.topBlur:return!0;default:return!1}}function u(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function l(e,t,n,r){var o,l;if(E?o=i(e):R?s(e,n)&&(o=k.compositionEnd):a(e,n)&&(o=k.compositionStart),!o)return null;P&&(R||o!==k.compositionStart?o===k.compositionEnd&&R&&(l=R.getData()):R=v.getPooled(r));var c=g.getPooled(o,t,n,r);if(l)c.data=l;else{var p=u(n);null!==p&&(c.data=p)}return h.accumulateTwoPhaseDispatches(c),c}function c(e,t){switch(e){case S.topCompositionEnd:return u(t);case S.topKeyPress:var n=t.which;return n!==N?null:(M=!0,w);case S.topTextInput:var r=t.data;return r===w&&M?null:r;default:return null}}function p(e,t){if(R){if(e===S.topCompositionEnd||s(e,t)){var n=R.getData();return v.release(R),R=null,n}return null}switch(e){case S.topPaste:return null;case S.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case S.topCompositionEnd:return P?null:t.data;default:return null}}function d(e,t,n,r){var o;if(o=x?c(e,n):p(e,n),!o)return null;var i=y.getPooled(k.beforeInput,t,n,r);return i.data=o,h.accumulateTwoPhaseDispatches(i),i}var f=e(16),h=e(20),m=e(154),v=e(21),g=e(106),y=e(110),C=e(172),b=[9,13,27,32],_=229,E=m.canUseDOM&&"CompositionEvent"in window,T=null;m.canUseDOM&&"documentMode"in document&&(T=document.documentMode);var x=m.canUseDOM&&"TextEvent"in window&&!T&&!r(),P=m.canUseDOM&&(!E||T&&T>8&&T<=11),N=32,w=String.fromCharCode(N),S=f.topLevelTypes,k={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[S.topCompositionEnd,S.topKeyPress,S.topTextInput,S.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[S.topBlur,S.topCompositionEnd,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[S.topBlur,S.topCompositionStart,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[S.topBlur,S.topCompositionUpdate,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]}},M=!1,R=null,A={eventTypes:k,extractEvents:function(e,t,n,r){return[l(e,t,n,r),d(e,t,n,r)]}};t.exports=A},{106:106,110:110,154:154,16:16,172:172,20:20,21:21}],3:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){i.forEach(function(t){o[r(t,e)]=o[e]})});var a={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:a};t.exports=s},{}],4:[function(e,t,n){"use strict";var r=e(3),o=e(154),i=(e(71),e(156),e(124)),a=e(167),s=e(173),u=(e(175),s(function(e){return a(e)})),l=!1,c="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(e){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var d={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=u(r)+":",n+=i(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var s=i(a,t[a],n);if("float"!==a&&"cssFloat"!==a||(a=c),s)o[a]=s;else{var u=l&&r.shorthandPropertyExpansions[a];if(u)for(var p in u)o[p]="";else o[a]=""}}}};t.exports=d},{124:124,154:154,156:156,167:167,173:173,175:175,3:3,71:71}],5:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e(143),i=e(176),a=e(26);e(168);i(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?o("24"):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},checkpoint:function(){return this._callbacks?this._callbacks.length:0},rollback:function(e){this._callbacks&&(this._callbacks.length=e,this._contexts.length=e)},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),a.addPoolingTo(r),t.exports=r},{143:143,168:168,176:176,26:26}],6:[function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=x.getPooled(M.change,A,e,P(e));b.accumulateTwoPhaseDispatches(t),T.batchedUpdates(i,t)}function i(e){C.enqueueEvents(e),C.processEventQueue(!1)}function a(e,t){R=e,A=t,R.attachEvent("onchange",o)}function s(){R&&(R.detachEvent("onchange",o),R=null,A=null)}function u(e,t){if(e===k.topChange)return t}function l(e,t,n){e===k.topFocus?(s(),a(t,n)):e===k.topBlur&&s()}function c(e,t){R=e,A=t,O=e.value,D=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(R,"value",U),R.attachEvent?R.attachEvent("onpropertychange",d):R.addEventListener("propertychange",d,!1)}function p(){R&&(delete R.value,R.detachEvent?R.detachEvent("onpropertychange",d):R.removeEventListener("propertychange",d,!1),R=null,A=null,O=null,D=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==O&&(O=t,o(e))}}function f(e,t){if(e===k.topInput)return t}function h(e,t,n){e===k.topFocus?(p(),c(t,n)):e===k.topBlur&&p()}function m(e,t){if((e===k.topSelectionChange||e===k.topKeyUp||e===k.topKeyDown)&&R&&R.value!==O)return O=R.value,A}function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t){if(e===k.topClick)return t}var y=e(16),C=e(17),b=e(20),_=e(154),E=e(44),T=e(97),x=e(108),P=e(132),N=e(139),w=e(140),S=e(172),k=y.topLevelTypes,M={change:{phasedRegistrationNames:{bubbled:S({onChange:null}),captured:S({onChangeCapture:null})},dependencies:[k.topBlur,k.topChange,k.topClick,k.topFocus,k.topInput,k.topKeyDown,k.topKeyUp,k.topSelectionChange]}},R=null,A=null,O=null,D=null,I=!1;_.canUseDOM&&(I=N("change")&&(!("documentMode"in document)||document.documentMode>8));var L=!1;_.canUseDOM&&(L=N("input")&&(!("documentMode"in document)||document.documentMode>11));var U={get:function(){return D.get.call(this)},set:function(e){O=""+e,D.set.call(this,e)}},F={eventTypes:M,extractEvents:function(e,t,n,o){var i,a,s=t?E.getNodeFromInstance(t):window;if(r(s)?I?i=u:a=l:w(s)?L?i=f:(i=m,a=h):v(s)&&(i=g),i){var c=i(e,t);if(c){var p=x.getPooled(M.change,c,n,o);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}a&&a(e,s,t)}};t.exports=F},{108:108,132:132,139:139,140:140,154:154,16:16,17:17,172:172,20:20,44:44,97:97}],7:[function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?s(e,t[0],t[1],n):v(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],u(e,t,n),e.removeChild(n)}e.removeChild(t)}function s(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(v(e,o,r),o===n)break;o=i}}function u(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function l(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&v(r,document.createTextNode(n),o):n?(m(o,n),u(r,o,t)):u(r,e,t)}var c=e(8),p=e(12),d=e(76),f=(e(44),e(71),e(123)),h=e(145),m=e(146),v=f(function(e,t,n){e.insertBefore(t,n)}),g=p.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:l,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var s=t[n];switch(s.type){case d.INSERT_MARKUP:o(e,s.content,r(e,s.afterNode));break;case d.MOVE_EXISTING:i(e,s.fromNode,r(e,s.afterNode));break;case d.SET_MARKUP:h(e,s.content);break;case d.TEXT_CONTENT:m(e,s.content);break;case d.REMOVE_NODE:a(e,s.fromNode)}}}};t.exports=y},{12:12,123:123,145:145,146:146,44:44,71:71,76:76,8:8}],8:[function(e,t,n){"use strict";function r(e){if(v){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)g(t,n[r],null);else null!=e.html?p(t,e.html):null!=e.text&&f(t,e.text)}}function o(e,t){e.parentNode.replaceChild(t.node,e),r(t)}function i(e,t){v?e.children.push(t):e.node.appendChild(t.node)}function a(e,t){v?e.html=t:p(e.node,t)}function s(e,t){v?e.text=t:f(e.node,t)}function u(){return this.node.nodeName}function l(e){return{node:e,children:[],html:null,text:null,toString:u}}var c=e(9),p=e(145),d=e(123),f=e(146),h=1,m=11,v="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),g=d(function(e,t,n){t.node.nodeType===m||t.node.nodeType===h&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===c.html)?(r(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),r(t))});l.insertTreeBefore=g,l.replaceChildWithTree=o,l.queueChild=i,l.queueHTML=a,l.queueText=s,t.exports=l},{123:123,145:145,146:146,9:9}],9:[function(e,t,n){"use strict";var r={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};t.exports=r},{}],10:[function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=e(143),i=(e(168),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=i,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},u=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){s.properties.hasOwnProperty(p)?o("48",p):void 0;var d=p.toLowerCase(),f=n[p],h={attributeName:d,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseProperty:r(f,t.MUST_USE_PROPERTY),hasBooleanValue:r(f,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(f,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(f,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(f,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o("50",p),u.hasOwnProperty(p)){var m=u[p];h.attributeName=m}a.hasOwnProperty(p)&&(h.attributeNamespace=a[p]),l.hasOwnProperty(p)&&(h.propertyName=l[p]),c.hasOwnProperty(p)&&(h.mutationMethod=c[p]),s.properties[p]=h}}}),a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",s={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<s._isCustomAttributeFunctions.length;t++){var n=s._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},injection:i};t.exports=s},{143:143,168:168}],11:[function(e,t,n){"use strict";function r(e){return!!l.hasOwnProperty(e)||!u.hasOwnProperty(e)&&(s.test(e)?(l[e]=!0,!0):(u[e]=!0,!1))}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&t===!1}var i=e(10),a=(e(44),e(71),e(142)),s=(e(175),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),u={},l={},c={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+a(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+a(t)}return i.isCustomAttribute(e)?null==t?"":e+"="+a(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+a(t):""},setValueForProperty:function(e,t,n){var r=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else{if(o(r,n))return void this.deleteValueForProperty(e,t);if(r.mustUseProperty)e[r.propertyName]=n;else{var s=r.attributeName,u=r.attributeNamespace;u?e.setAttributeNS(u,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}}}else if(i.isCustomAttribute(t))return void c.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForAttribute:function(e,t){e.removeAttribute(t)},deleteValueForProperty:function(e,t){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?e[o]=!1:e[o]=""}else e.removeAttribute(n.attributeName)}else i.isCustomAttribute(t)&&e.removeAttribute(t)}};t.exports=c},{10:10,142:142,175:175,44:44,71:71}],12:[function(e,t,n){"use strict";var r=e(143),o=e(8),i=e(154),a=e(159),s=e(160),u=(e(168),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM?void 0:r("56"),t?void 0:r("57"),"HTML"===e.nodeName?r("58"):void 0,"string"==typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});t.exports=u},{143:143,154:154,159:159,160:160,168:168,8:8}],13:[function(e,t,n){"use strict";var r=e(172),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];t.exports=o},{172:172}],14:[function(e,t,n){"use strict";var r={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},o={getHostProps:function(e,t){if(!t.disabled)return t;var n={};for(var o in t)!r[o]&&t.hasOwnProperty(o)&&(n[o]=t[o]);return n}};t.exports=o},{}],15:[function(e,t,n){"use strict";var r=e(16),o=e(20),i=e(44),a=e(112),s=e(172),u=r.topLevelTypes,l={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},c={eventTypes:l,extractEvents:function(e,t,n,r){if(e===u.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var s;if(r.window===r)s=r;else{var c=r.ownerDocument;s=c?c.defaultView||c.parentWindow:window}var p,d;if(e===u.topMouseOut){p=t;var f=n.relatedTarget||n.toElement;d=f?i.getClosestInstanceFromNode(f):null}else p=null,d=t;if(p===d)return null;var h=null==p?s:i.getNodeFromInstance(p),m=null==d?s:i.getNodeFromInstance(d),v=a.getPooled(l.mouseLeave,p,n,r);v.type="mouseleave",v.target=h,v.relatedTarget=m;var g=a.getPooled(l.mouseEnter,d,n,r);return g.type="mouseenter",g.target=m,g.relatedTarget=h,o.accumulateEnterLeaveDispatches(v,g,p,d),[v,g]}};t.exports=c},{112:112,16:16,172:172,20:20,44:44}],16:[function(e,t,n){"use strict";var r=e(171),o=r({bubbled:null,captured:null}),i=r({topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};t.exports=a},{171:171}],17:[function(e,t,n){"use strict";var r=e(143),o=e(18),i=e(19),a=e(62),s=e(119),u=e(128),l=(e(168),{}),c=null,p=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return p(e,!0)},f=function(e){return p(e,!1)},h=function(e){return"."+e._rootNodeID},m={injection:{injectEventPluginOrder:o.injectEventPluginOrder,injectEventPluginsByName:o.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?r("94",t,typeof n):void 0;var i=h(e),a=l[t]||(l[t]={});a[i]=n;var s=o.registrationNameModules[t];s&&s.didPutListener&&s.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t],r=h(e);return n&&n[r]},deleteListener:function(e,t){var n=o.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=l[t];if(r){var i=h(e);delete r[i]}},deleteAllListeners:function(e){var t=h(e);for(var n in l)if(l.hasOwnProperty(n)&&l[n][t]){var r=o.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(e,n),delete l[n][t]}},extractEvents:function(e,t,n,r){for(var i,a=o.plugins,u=0;u<a.length;u++){var l=a[u];if(l){var c=l.extractEvents(e,t,n,r);c&&(i=s(i,c))}}return i},enqueueEvents:function(e){e&&(c=s(c,e))},processEventQueue:function(e){var t=c;c=null,e?u(t,d):u(t,f),c?r("95"):void 0,a.rethrowCaughtError()},__purge:function(){l={}},__getListenerBank:function(){return l}};t.exports=m},{119:119,128:128,143:143,168:168,18:18,19:19,62:62}],18:[function(e,t,n){"use strict";function r(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(n>-1?void 0:a("96",e),!l.plugins[n]){t.extractEvents?void 0:a("97",e),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a("98",i,e)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){l.registrationNameModules[e]?a("100",e):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=e(143),s=(e(168),null),u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a("101"):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];u.hasOwnProperty(n)&&u[n]===o||(u[n]?a("102",n):void 0,u[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=l},{143:143,168:168}],19:[function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function o(e){return e===y.topMouseMove||e===y.topTouchMove}function i(e){return e===y.topMouseDown||e===y.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=C.getNodeFromInstance(r),t?v.invokeGuardedCallbackWithCatch(o,n,e):v.invokeGuardedCallback(o,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)a(e,t,n[o],r[o]);else n&&a(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function u(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function l(e){var t=u(e);return e._dispatchInstances=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?h("103"):void 0,e.currentTarget=t?C.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function p(e){return!!e._dispatchListeners}var d,f,h=e(143),m=e(16),v=e(62),g=(e(168),e(175),{injectComponentTree:function(e){d=e},injectTreeTraversal:function(e){f=e}}),y=m.topLevelTypes,C={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:c,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:l,hasDispatches:p,getInstanceFromNode:function(e){return d.getInstanceFromNode(e)},getNodeFromInstance:function(e){return d.getNodeFromInstance(e)},isAncestor:function(e,t){return f.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return f.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return f.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return f.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,o){return f.traverseEnterLeave(e,t,n,r,o)},injection:g};t.exports=C},{143:143,16:16,168:168,175:175,62:62}],20:[function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return C(e,r)}function o(e,t,n){var o=t?y.bubbled:y.captured,i=r(e,n,o);i&&(n._dispatchListeners=v(n._dispatchListeners,i),n._dispatchInstances=v(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&m.traverseTwoPhase(e._targetInst,o,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?m.getParentInstance(t):null;m.traverseTwoPhase(n,o,e)}}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=C(e,r);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchInstances=v(n._dispatchInstances,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null,e)}function l(e){g(e,i)}function c(e){g(e,a)}function p(e,t,n,r){m.traverseEnterLeave(n,r,s,e,t)}function d(e){g(e,u)}var f=e(16),h=e(17),m=e(19),v=e(119),g=e(128),y=(e(175),f.PropagationPhases),C=h.getListener,b={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:p};t.exports=b},{119:119,128:128,16:16,17:17,175:175,19:19}],21:[function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=e(176),i=e(26),a=e(136);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),i.addPoolingTo(r),t.exports=r},{136:136,176:176,26:26}],22:[function(e,t,n){"use strict";var r=e(10),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,u=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,default:i,defer:i,dir:0,disabled:i,download:u,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};t.exports=l},{10:10}],23:[function(e,t,n){"use strict";function r(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var i={escape:r,unescape:o};t.exports=i},{}],24:[function(e,t,n){"use strict";var r=e(72),o=e(92),i={linkState:function(e){return new r(this.state[e],o.createStateKeySetter(this,e))}};t.exports=i},{72:72,92:92}],25:[function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?s("87"):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?s("88"):void 0}function i(e){r(e),null!=e.checked||null!=e.onChange?s("89"):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=e(143),u=e(82),l=e(81),c=e(83),p=(e(168),e(175),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),d={value:function(e,t,n){return!e[t]||p[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},f={},h={checkPropTypes:function(e,t,n){for(var r in d){if(d.hasOwnProperty(r))var o=d[r](t,r,e,l.prop,null,c);o instanceof Error&&!(o.message in f)&&(f[o.message]=!0,a(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=h},{143:143,168:168,175:175,81:81,82:82,83:83}],26:[function(e,t,n){"use strict";var r=e(143),o=(e(168),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},l=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,p=o,d=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=c),n.release=l,n},f={addPoolingTo:d,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s,fiveArgumentPooler:u};t.exports=f},{143:143,168:168}],27:[function(e,t,n){"use strict";var r=e(176),o=e(32),i=e(34),a=e(84),s=e(33),u=e(47),l=e(60),c=e(82),p=e(98),d=e(141),f=(e(175),l.createElement),h=l.createFactory,m=l.cloneElement,v=r,g={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:d},Component:i,PureComponent:a,createElement:f,cloneElement:m,isValidElement:l.isValidElement,PropTypes:c,createClass:s.createClass,createFactory:h,createMixin:function(e){return e},DOM:u,version:p,__spread:v};t.exports=g},{141:141,175:175,176:176,32:32,33:33,34:34,47:47,
+60:60,82:82,84:84,98:98}],28:[function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,v)||(e[v]=h++,d[e[v]]={}),d[e[v]]}var o,i=e(176),a=e(16),s=e(18),u=e(63),l=e(118),c=e(137),p=e(139),d={},f=!1,h=0,m={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),g=i({},u,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),i=s.registrationNameDependencies[e],u=a.topLevelTypes,l=0;l<i.length;l++){var c=i[l];o.hasOwnProperty(c)&&o[c]||(c===u.topWheel?p("wheel")?g.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",n):p("mousewheel")?g.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",n):g.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",n):c===u.topScroll?p("scroll",!0)?g.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):g.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",g.ReactEventListener.WINDOW_HANDLE):c===u.topFocus||c===u.topBlur?(p("focus",!0)?(g.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",n),g.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",n)):p("focusin")&&(g.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",n),g.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",n)),o[u.topBlur]=!0,o[u.topFocus]=!0):m.hasOwnProperty(c)&&g.ReactEventListener.trapBubbledEvent(c,m[c],n),o[c]=!0)}},trapBubbledEvent:function(e,t,n){return g.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return g.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(void 0===o&&(o=document.createEvent&&"pageX"in document.createEvent("MouseEvent")),!o&&!f){var e=l.refreshScrollValues;g.ReactEventListener.monitorScrollValue(e),f=!0}}});t.exports=g},{118:118,137:137,139:139,16:16,176:176,18:18,63:63}],29:[function(e,t,n){"use strict";function r(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to ReactCSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}}}var o=e(176),i=e(27),a=e(95),s=e(30),u=i.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:s.propTypes.name,transitionAppear:i.PropTypes.bool,transitionEnter:i.PropTypes.bool,transitionLeave:i.PropTypes.bool,transitionAppearTimeout:r("Appear"),transitionEnterTimeout:r("Enter"),transitionLeaveTimeout:r("Leave")},getDefaultProps:function(){return{transitionAppear:!1,transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return i.createElement(s,{name:this.props.transitionName,appear:this.props.transitionAppear,enter:this.props.transitionEnter,leave:this.props.transitionLeave,appearTimeout:this.props.transitionAppearTimeout,enterTimeout:this.props.transitionEnterTimeout,leaveTimeout:this.props.transitionLeaveTimeout},e)},render:function(){return i.createElement(a,o({},this.props,{childFactory:this._wrapChild}))}});t.exports=u},{176:176,27:27,30:30,95:95}],30:[function(e,t,n){"use strict";var r=e(27),o=e(40),i=e(152),a=e(94),s=e(141),u=17,l=r.createClass({displayName:"ReactCSSTransitionGroupChild",propTypes:{name:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.shape({enter:r.PropTypes.string,leave:r.PropTypes.string,active:r.PropTypes.string}),r.PropTypes.shape({enter:r.PropTypes.string,enterActive:r.PropTypes.string,leave:r.PropTypes.string,leaveActive:r.PropTypes.string,appear:r.PropTypes.string,appearActive:r.PropTypes.string})]).isRequired,appear:r.PropTypes.bool,enter:r.PropTypes.bool,leave:r.PropTypes.bool,appearTimeout:r.PropTypes.number,enterTimeout:r.PropTypes.number,leaveTimeout:r.PropTypes.number},transition:function(e,t,n){var r=o.findDOMNode(this);if(!r)return void(t&&t());var s=this.props.name[e]||this.props.name+"-"+e,u=this.props.name[e+"Active"]||s+"-active",l=null,c=function(e){e&&e.target!==r||(clearTimeout(l),i.removeClass(r,s),i.removeClass(r,u),a.removeEndEventListener(r,c),t&&t())};i.addClass(r,s),this.queueClassAndNode(u,r),n?(l=setTimeout(c,n),this.transitionTimeouts.push(l)):a.addEndEventListener(r,c)},queueClassAndNode:function(e,t){this.classNameAndNodeQueue.push({className:e,node:t}),this.timeout||(this.timeout=setTimeout(this.flushClassNameAndNodeQueue,u))},flushClassNameAndNodeQueue:function(){this.isMounted()&&this.classNameAndNodeQueue.forEach(function(e){i.addClass(e.node,e.className)}),this.classNameAndNodeQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameAndNodeQueue=[],this.transitionTimeouts=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)}),this.classNameAndNodeQueue.length=0},componentWillAppear:function(e){this.props.appear?this.transition("appear",e,this.props.appearTimeout):e()},componentWillEnter:function(e){this.props.enter?this.transition("enter",e,this.props.enterTimeout):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e,this.props.leaveTimeout):e()},render:function(){return s(this.props.children)}});t.exports=l},{141:141,152:152,27:27,40:40,94:94}],31:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){var o=void 0===e[n];null!=t&&o&&(e[n]=i(t,!0))}var o=e(86),i=e(138),a=(e(23),e(148)),s=e(149);e(175);"undefined"!=typeof n&&n.env,1;var u={instantiateChildren:function(e,t,n,o){if(null==e)return null;var i={};return s(e,r,i),i},updateChildren:function(e,t,n,r,s,u,l,c,p){if(t||e){var d,f;for(d in t)if(t.hasOwnProperty(d)){f=e&&e[d];var h=f&&f._currentElement,m=t[d];if(null!=f&&a(h,m))o.receiveComponent(f,m,s,c),t[d]=f;else{f&&(r[d]=o.getHostNode(f),o.unmountComponent(f,!1));var v=i(m,!0);t[d]=v;var g=o.mountComponent(v,s,u,l,c,p);n.push(g)}}for(d in e)!e.hasOwnProperty(d)||t&&t.hasOwnProperty(d)||(f=e[d],r[d]=o.getHostNode(f),o.unmountComponent(f,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}};t.exports=u}).call(this,void 0)},{138:138,148:148,149:149,175:175,23:23,86:86}],32:[function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);g(e,i,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?l(u,o,n,v.thatReturnsArgument):null!=u&&(m.isValidElement(u)&&(u=m.cloneAndReplaceKey(u,i+(!u.key||t&&t.key===u.key?"":r(u.key)+"/")+n)),o.push(u))}function l(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var l=s.getPooled(t,a,o,i);g(e,u,l),s.release(l)}function c(e,t,n){if(null==e)return e;var r=[];return l(e,r,null,t,n),r}function p(e,t,n){return null}function d(e,t){return g(e,p,null)}function f(e){var t=[];return l(e,t,null,v.thatReturnsArgument),t}var h=e(26),m=e(60),v=e(160),g=e(149),y=h.twoArgumentPooler,C=h.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,y),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,C);var _={forEach:a,map:c,mapIntoWithKeyPrefixInternal:l,count:d,toArray:f};t.exports=_},{149:149,160:160,26:26,60:60}],33:[function(e,t,n){"use strict";function r(e,t){var n=E.hasOwnProperty(t)?E[t]:null;x.hasOwnProperty(t)&&(n!==b.OVERRIDE_BASE?p("73",t):void 0),e&&(n!==b.DEFINE_MANY&&n!==b.DEFINE_MANY_MERGED?p("74",t):void 0)}function o(e,t){if(t){"function"==typeof t?p("75"):void 0,h.isValidElement(t)?p("76"):void 0;var n=e.prototype,o=n.__reactAutoBindPairs;t.hasOwnProperty(C)&&T.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==C){var a=t[i],l=n.hasOwnProperty(i);if(r(l,i),T.hasOwnProperty(i))T[i](e,a);else{var c=E.hasOwnProperty(i),d="function"==typeof a,f=d&&!c&&!l&&t.autobind!==!1;if(f)o.push(i,a),n[i]=a;else if(l){var m=E[i];!c||m!==b.DEFINE_MANY_MERGED&&m!==b.DEFINE_MANY?p("77",m,i):void 0,m===b.DEFINE_MANY_MERGED?n[i]=s(n[i],a):m===b.DEFINE_MANY&&(n[i]=u(n[i],a))}else n[i]=a}}}}function i(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in T;o?p("78",n):void 0;var i=n in e;i?p("79",n):void 0,e[n]=r}}}function a(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:p("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?p("81",n):void 0,e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return a(o,n),a(o,r),o}}function u(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){var n=t.bind(e);return n}function c(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=l(e,o)}}var p=e(143),d=e(176),f=e(34),h=e(60),m=(e(81),e(80),e(78)),v=e(161),g=(e(168),e(171)),y=e(172),C=(e(175),y({mixins:null})),b=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),_=[],E={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},T={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=d({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=d({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=s(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=d({},e.propTypes,t)},statics:function(e,t){i(e,t)},autobind:function(){}},x={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},P=function(){};d(P.prototype,f.prototype,x);var N={createClass:function(e){var t=function(e,n,r){this.__reactAutoBindPairs.length&&c(this),this.props=e,this.context=n,this.refs=v,this.updater=r||m,this.state=null;var o=this.getInitialState?this.getInitialState():null;"object"!=typeof o||Array.isArray(o)?p("82",t.displayName||"ReactCompositeComponent"):void 0,this.state=o};t.prototype=new P,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],_.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:p("83");for(var n in E)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){_.push(e)}}};t.exports=N},{143:143,161:161,168:168,171:171,172:172,175:175,176:176,34:34,60:60,78:78,80:80,81:81}],34:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||i}var o=e(143),i=e(78),a=(e(121),e(161));e(168),e(175);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?o("85"):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};t.exports=r},{121:121,143:143,161:161,168:168,175:175,78:78}],35:[function(e,t,n){"use strict";var r=e(7),o=e(49),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};t.exports=i},{49:49,7:7}],36:[function(e,t,n){"use strict";var r=e(143),o=(e(168),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r("104"):void 0,i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};t.exports=i},{143:143,168:168}],37:[function(e,t,n){"use strict";var r=e(147),o={shouldComponentUpdate:function(e,t){return r(this,e,t)}};t.exports=o},{147:147}],38:[function(e,t,n){"use strict";function r(e){}function o(e,t){}function i(e){return!(!e.prototype||!e.prototype.isReactComponent)}function a(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}var s=e(143),u=e(176),l=e(36),c=e(39),p=e(60),d=e(62),f=e(70),h=(e(71),e(77)),m=(e(81),e(86)),v=e(122),g=e(161),y=(e(168),e(174)),C=e(148),b=(e(175),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return o(e,t),t};var _=1,E={construct:function(e){this._currentElement=e,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,u){this._context=u,this._mountOrder=_++,this._hostParent=t,this._hostContainerInfo=n;var l,c=this._currentElement.props,d=this._processContext(u),h=this._currentElement.type,m=e.getUpdateQueue(),v=i(h),y=this._constructComponent(v,c,d,m);v||null!=y&&null!=y.render?a(h)?this._compositeType=b.PureClass:this._compositeType=b.ImpureClass:(l=y,o(h,l),null===y||y===!1||p.isValidElement(y)?void 0:s("105",h.displayName||h.name||"Component"),y=new r(h),this._compositeType=b.StatelessFunctional),y.props=c,y.context=d,y.refs=g,y.updater=m,this._instance=y,f.set(y,this);var C=y.state;void 0===C&&(y.state=C=null),"object"!=typeof C||Array.isArray(C)?s("106",this.getName()||"ReactCompositeComponent"):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var E;return E=y.unstable_handleError?this.performInitialMountWithErrorHandling(l,t,n,e,u):this.performInitialMount(l,t,n,e,u),y.componentDidMount&&e.getReactMountReady().enqueue(y.componentDidMount,y),E},_constructComponent:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)},_constructComponentWithoutOwner:function(e,t,n,r){var o,i=this._currentElement.type;return o=e?new i(t,n,r):i(t,n,r)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,o)}catch(s){r.rollback(a),this._instance.unstable_handleError(s),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(e,t,n,r,o)}return i},performInitialMount:function(e,t,n,r,o){var i=this._instance;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===e&&(e=this._renderValidatedComponent());var a=h.getType(e);this._renderedNodeType=a;var s=this._instantiateReactComponent(e,a!==h.EMPTY);this._renderedComponent=s;var u=0,l=m.mountComponent(s,r,t,n,this._processChildContext(o),u);return l},getHostNode:function(){return m.getHostNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";d.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(m.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return g;var r={};for(var o in n)r[o]=e[o];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?s("107",this.getName()||"ReactCompositeComponent"):void 0;for(var o in r)o in t.childContextTypes?void 0:s("108",this.getName()||"ReactCompositeComponent",o);return u({},e,r)}return e},_checkContextTypes:function(e,t,n){v(e,t,n,this.getName(),null,this._debugID)},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?m.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,o){var i=this._instance;null==i?s("136",this.getName()||"ReactCompositeComponent"):void 0;var a,u=!1;this._context===o?a=i.context:(a=this._processContext(o),u=!0);var l=t.props,c=n.props;t!==n&&(u=!0),u&&i.componentWillReceiveProps&&i.componentWillReceiveProps(c,a);var p=this._processPendingState(c,a),d=!0;this._pendingForceUpdate||(i.shouldComponentUpdate?d=i.shouldComponentUpdate(c,p,a):this._compositeType===b.PureClass&&(d=!y(l,c)||!y(i.state,p))),this._updateBatchNumber=null,d?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,c,p,a,e,o)):(this._currentElement=n,this._context=o,i.props=c,i.state=p,i.context=a)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=u({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];u(i,"function"==typeof s?s.call(n,i,e,t):s)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a,s,u,l=this._instance,c=Boolean(l.componentDidUpdate);c&&(a=l.props,s=l.state,u=l.context),l.componentWillUpdate&&l.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,l.props=t,l.state=n,l.context=r,this._updateRenderedComponent(o,i),c&&o.getReactMountReady().enqueue(l.componentDidUpdate.bind(l,a,s,u),l)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(C(r,o))m.receiveComponent(n,o,e,this._processChildContext(t));else{var i=m.getHostNode(n);m.unmountComponent(n,!1);var a=h.getType(o);this._renderedNodeType=a;var s=this._instantiateReactComponent(o,a!==h.EMPTY);this._renderedComponent=s;var u=0,l=m.mountComponent(s,e,this._hostParent,this._hostContainerInfo,this._processChildContext(t),u);this._replaceNodeWithMarkup(i,l,n)}},_replaceNodeWithMarkup:function(e,t,n){l.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;if(this._compositeType!==b.StatelessFunctional){c.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{c.current=null}}else e=this._renderValidatedComponentWithoutOwnerOrContext();return null===e||e===!1||p.isValidElement(e)?void 0:s("109",this.getName()||"ReactCompositeComponent"),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?s("110"):void 0;var r=t.getPublicInstance(),o=n.refs===g?n.refs={}:n.refs;o[e]=r},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return this._compositeType===b.StatelessFunctional?null:e},_instantiateReactComponent:null},T={Mixin:E};t.exports=T},{122:122,143:143,148:148,161:161,168:168,174:174,175:175,176:176,36:36,39:39,60:60,62:62,70:70,71:71,77:77,81:81,86:86}],39:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],40:[function(e,t,n){"use strict";var r=e(44),o=e(59),i=e(74),a=e(86),s=e(97),u=e(98),l=e(126),c=e(133),p=e(144);e(175);o.inject();var d={findDOMNode:l,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:u,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:p};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=c(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:a});t.exports=d},{126:126,133:133,144:144,175:175,44:44,59:59,74:74,86:86,97:97,98:98}],41:[function(e,t,n){"use strict";var r=e(14),o={getHostProps:r.getHostProps};t.exports=o},{14:14}],42:[function(e,t,n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(e,t){t&&($[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?m("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?m("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&K in t.dangerouslySetInnerHTML?void 0:m("61")),null!=t.style&&"object"!=typeof t.style?m("62",r(e)):void 0)}function i(e,t,n,r){if(!(r instanceof I)){var o=e._hostContainerInfo,i=o._node&&o._node.nodeType===z,s=i?o._node:o._ownerDocument;B(t,s),r.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;x.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;M.postMountWrapper(e)}function u(){var e=this;O.postMountWrapper(e)}function l(){var e=this;R.postMountWrapper(e)}function c(){var e=this;e._rootNodeID?void 0:m("63");var t=j(e);switch(t?void 0:m("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[N.trapBubbledEvent(T.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in G)G.hasOwnProperty(n)&&e._wrapperState.listeners.push(N.trapBubbledEvent(T.topLevelTypes[n],G[n],t));break;case"source":e._wrapperState.listeners=[N.trapBubbledEvent(T.topLevelTypes.topError,"error",t)];break;case"img":e._wrapperState.listeners=[N.trapBubbledEvent(T.topLevelTypes.topError,"error",t),N.trapBubbledEvent(T.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[N.trapBubbledEvent(T.topLevelTypes.topReset,"reset",t),N.trapBubbledEvent(T.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[N.trapBubbledEvent(T.topLevelTypes.topInvalid,"invalid",t)]}}function p(){A.postUpdateWrapper(this)}function d(e){ee.call(J,e)||(Z.test(e)?void 0:m("65",e),J[e]=!0)}function f(e,t){return e.indexOf("-")>=0||null!=t.is}function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=e(143),v=e(176),g=e(1),y=e(4),C=e(8),b=e(9),_=e(10),E=e(11),T=e(16),x=e(17),P=e(18),N=e(28),w=e(41),S=e(43),k=e(44),M=e(50),R=e(51),A=e(52),O=e(56),D=(e(71),e(75)),I=e(90),L=(e(160),e(125)),U=(e(168),e(139),e(172)),F=(e(174),e(151),e(175),S),V=x.deleteListener,j=k.getNodeFromInstance,B=N.listenTo,W=P.registrationNameModules,H={string:!0,number:!0},q=U({style:null}),K=U({__html:null}),Y={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},z=11,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},Q={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},X={listing:!0,pre:!0,textarea:!0},$=v({menuitem:!0},Q),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,J={},ee={}.hasOwnProperty,te=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=te++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(c,this);break;case"button":i=w.getHostProps(this,i,t);break;case"input":M.mountWrapper(this,i,t),i=M.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"option":R.mountWrapper(this,i,t),i=R.getHostProps(this,i);break;case"select":A.mountWrapper(this,i,t),i=A.getHostProps(this,i),e.getReactMountReady().enqueue(c,this);break;case"textarea":O.mountWrapper(this,i,t),i=O.getHostProps(this,i),e.getReactMountReady().enqueue(c,this)}o(this,i);var a,p;null!=t?(a=t._namespaceURI,p=t._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===b.svg&&"foreignobject"===p)&&(a=b.html),a===b.html&&("svg"===this._tag?a=b.svg:"math"===this._tag&&(a=b.mathml)),this._namespaceURI=a;var d;if(e.useCreateElement){var f,h=n._ownerDocument;if(a===b.html)if("script"===this._tag){var m=h.createElement("div"),v=this._currentElement.type;m.innerHTML="<"+v+"></"+v+">",f=m.removeChild(m.firstChild)}else f=i.is?h.createElement(this._currentElement.type,i.is):h.createElement(this._currentElement.type);else f=h.createElementNS(a,this._currentElement.type);k.precacheNode(this,f),this._flags|=F.hasCachedChildNodes,this._hostParent||E.setAttributeForRoot(f),this._updateDOMProperties(null,i,e);var y=C(f);this._createInitialChildren(e,i,r,y),d=y}else{var _=this._createOpenTagMarkupAndPutListeners(e,i),T=this._createContentMarkup(e,i,r);d=!T&&Q[this._tag]?_+"/>":_+">"+T+"</"+this._currentElement.type+">"}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"button":i.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(l,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(W.hasOwnProperty(r))o&&i(this,r,o,e);else{r===q&&(o&&(o=this._previousStyleCopy=v({},t.style)),o=y.createMarkupForStyles(o,this));var a=null;null!=this._tag&&f(this._tag,t)?Y.hasOwnProperty(r)||(a=E.createMarkupForCustomAttribute(r,o)):a=E.createMarkupForProperty(r,o),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+E.createMarkupForRoot()),n+=" "+E.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=H[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=L(i);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return X[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&C.queueHTML(r,o.__html);else{var i=H[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)C.queueText(r,i);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u<s.length;u++)C.queueChild(r,s[u])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){var i=t.props,a=this._currentElement.props;switch(this._tag){case"button":i=w.getHostProps(this,i),a=w.getHostProps(this,a);break;case"input":i=M.getHostProps(this,i),a=M.getHostProps(this,a);break;case"option":i=R.getHostProps(this,i),a=R.getHostProps(this,a);break;case"select":i=A.getHostProps(this,i),a=A.getHostProps(this,a);break;case"textarea":i=O.getHostProps(this,i),a=O.getHostProps(this,a)}switch(o(this,a),this._updateDOMProperties(i,a,e),this._updateDOMChildren(i,a,e,r),this._tag){case"input":M.updateWrapper(this);break;case"textarea":O.updateWrapper(this);break;case"select":e.getReactMountReady().enqueue(p,this)}},_updateDOMProperties:function(e,t,n){var r,o,a;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if(r===q){var s=this._previousStyleCopy;for(o in s)s.hasOwnProperty(o)&&(a=a||{},a[o]="");this._previousStyleCopy=null}else W.hasOwnProperty(r)?e[r]&&V(this,r):f(this._tag,e)?Y.hasOwnProperty(r)||E.deleteValueForAttribute(j(this),r):(_.properties[r]||_.isCustomAttribute(r))&&E.deleteValueForProperty(j(this),r);for(r in t){var u=t[r],l=r===q?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&u!==l&&(null!=u||null!=l))if(r===q)if(u?u=this._previousStyleCopy=v({},u):this._previousStyleCopy=null,l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(a=a||{},
+a[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(a=a||{},a[o]=u[o])}else a=u;else if(W.hasOwnProperty(r))u?i(this,r,u,n):l&&V(this,r);else if(f(this._tag,t))Y.hasOwnProperty(r)||E.setValueForAttribute(j(this),r,u);else if(_.properties[r]||_.isCustomAttribute(r)){var c=j(this);null!=u?E.setValueForProperty(c,r,u):E.deleteValueForProperty(c,r)}}a&&y.setValueForStyles(j(this),a,this)},_updateDOMChildren:function(e,t,n,r){var o=H[typeof e.children]?e.children:null,i=H[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,l=null!=i?null:t.children,c=null!=o||null!=a,p=null!=i||null!=s;null!=u&&null==l?this.updateChildren(null,n,r):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=s?a!==s&&this.updateMarkup(""+s):null!=l&&this.updateChildren(l,n,r)},getHostNode:function(){return j(this)},unmountComponent:function(e){switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":m("66",this._tag)}this.unmountChildren(e),k.uncacheNode(this),x.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null},getPublicInstance:function(){return j(this)}},v(h.prototype,h.Mixin,D.Mixin),t.exports=h},{1:1,10:10,11:11,125:125,139:139,143:143,151:151,16:16,160:160,168:168,17:17,172:172,174:174,175:175,176:176,18:18,28:28,4:4,41:41,43:43,44:44,50:50,51:51,52:52,56:56,71:71,75:75,8:8,9:9,90:90}],43:[function(e,t,n){"use strict";var r={hasCachedChildNodes:1};t.exports=r},{}],44:[function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function o(e,t){var n=r(e);n._hostNode=t,t[m]=n}function i(e){var t=e._hostNode;t&&(delete t[m],e._hostNode=null)}function a(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,i=t.firstChild;e:for(var a in n)if(n.hasOwnProperty(a)){var s=n[a],u=r(s)._domID;if(0!==u){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(f)===String(u)||8===i.nodeType&&i.nodeValue===" react-text: "+u+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+u+" "){o(s,i);continue e}c("32",u)}}e._flags|=h.hasCachedChildNodes}}function s(e){if(e[m])return e[m];for(var t=[];!e[m];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[m]);e=t.pop())n=r,t.length&&a(r,e);return n}function u(e){var t=s(e);return null!=t&&t._hostNode===e?t:null}function l(e){if(void 0===e._hostNode?c("33"):void 0,e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent?void 0:c("34"),e=e._hostParent;for(;t.length;e=t.pop())a(e,e._hostNode);return e._hostNode}var c=e(143),p=e(10),d=e(43),f=(e(168),p.ID_ATTRIBUTE_NAME),h=d,m="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={getClosestInstanceFromNode:s,getInstanceFromNode:u,getNodeFromInstance:l,precacheChildNodes:a,precacheNode:o,uncacheNode:i};t.exports=v},{10:10,143:143,168:168,43:43}],45:[function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===o?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var o=(e(151),9);t.exports=r},{151:151}],46:[function(e,t,n){"use strict";var r=e(176),o=e(8),i=e(44),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(e.useCreateElement){var u=n._ownerDocument,l=u.createComment(s);return i.precacheNode(this,l),o(l)}return e.renderToStaticMarkup?"":"<!--"+s+"-->"},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),t.exports=a},{176:176,44:44,8:8}],47:[function(e,t,n){"use strict";var r=e(60),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};t.exports=i},{60:60}],48:[function(e,t,n){"use strict";var r={useCreateElement:!0};t.exports=r},{}],49:[function(e,t,n){"use strict";var r=e(7),o=e(44),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};t.exports=i},{44:44,7:7}],50:[function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);p.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var a=c.getNodeFromInstance(this),s=a;s.parentNode;)s=s.parentNode;for(var u=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;d<u.length;d++){var f=u[d];if(f!==a&&f.form===a.form){var h=c.getInstanceFromNode(f);h?void 0:i("90"),p.asap(r,h)}}}return n}var i=e(143),a=e(176),s=e(14),u=e(11),l=e(25),c=e(44),p=e(97),d=(e(168),e(175),{getHostProps:function(e,t){var n=l.getValue(t),r=l.getChecked(t),o=a({type:void 0,step:void 0,min:void 0,max:void 0},s.getHostProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return o},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&u.setValueForProperty(c.getNodeFromInstance(e),"checked",n||!1);var r=c.getNodeFromInstance(e),o=l.getValue(t);if(null!=o){var i=""+o;i!==r.value&&(r.value=i)}else null==t.value&&null!=t.defaultValue&&(r.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(r.defaultChecked=!!t.defaultChecked)},postMountWrapper:function(e){var t=e._currentElement.props,n=c.getNodeFromInstance(e);switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":n.value="",n.value=n.defaultValue;break;default:n.value=n.value}var r=n.name;""!==r&&(n.name=""),n.defaultChecked=!n.defaultChecked,n.defaultChecked=!n.defaultChecked,""!==r&&(n.name=r)}});t.exports=d},{11:11,14:14,143:143,168:168,175:175,176:176,25:25,44:44,97:97}],51:[function(e,t,n){"use strict";function r(e){var t="";return i.forEach(e,function(e){null!=e&&("string"==typeof e||"number"==typeof e?t+=e:u||(u=!0))}),t}var o=e(176),i=e(32),a=e(44),s=e(52),u=(e(175),!1),l={mountWrapper:function(e,t,n){var o=null;if(null!=n){var i=n;"optgroup"===i._tag&&(i=i._hostParent),null!=i&&"select"===i._tag&&(o=s.getSelectValueContext(i))}var a=null;if(null!=o){var u;if(u=null!=t.value?t.value+"":r(t.children),a=!1,Array.isArray(o)){for(var l=0;l<o.length;l++)if(""+o[l]===u){a=!0;break}}else a=""+o===u}e._wrapperState={selected:a}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=a.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getHostProps:function(e,t){var n=o({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var i=r(t.children);return i&&(n.children=i),n}};t.exports=l},{175:175,176:176,32:32,44:44,52:52}],52:[function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=u.getValue(e);null!=t&&o(this,Boolean(e.multiple),t)}}function o(e,t,n){var r,o,i=l.getNodeFromInstance(e).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<i.length;o++){var a=r.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(r=""+n,o=0;o<i.length;o++)if(i[o].value===r)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}function i(e){var t=this._currentElement.props,n=u.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),c.asap(r,this),n}var a=e(176),s=e(14),u=e(25),l=e(44),c=e(97),p=(e(175),!1),d={getHostProps:function(e,t){return a({},s.getHostProps(e,t),{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=u.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:i.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||p||(p=!0)},getSelectValueContext:function(e){return e._wrapperState.initialValue},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=u.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,o(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?o(e,Boolean(t.multiple),t.defaultValue):o(e,Boolean(t.multiple),t.multiple?[]:""))}};t.exports=d},{14:14,175:175,176:176,25:25,44:44,97:97}],53:[function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0);try{s.startContainer.nodeType,s.endContainer.nodeType}catch(e){return null}var u=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),l=u?0:s.toString().length,c=s.cloneRange();c.selectNodeContents(e),c.setEnd(s.startContainer,s.startOffset);var p=r(c.startContainer,c.startOffset,c.endContainer,c.endOffset),d=p?0:c.toString().length,f=d+l,h=document.createRange();h.setStart(n,o),h.setEnd(i,a);var m=h.collapsed;return{start:m?f:d,end:m?d:f}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();void 0===t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=l(e,o),u=l(e,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=e(154),l=e(135),c=e(136),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:i,setOffsets:p?a:s};t.exports=d},{135:135,136:136,154:154}],54:[function(e,t,n){"use strict";var r=e(59),o=e(89),i=e(98);r.inject();var a={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:i};t.exports=a},{59:59,89:89,98:98}],55:[function(e,t,n){"use strict";var r=e(143),o=e(176),i=e(7),a=e(8),s=e(44),u=e(125),l=(e(168),e(151),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,i=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(i),d=c.createComment(l),f=a(c.createDocumentFragment());return a.queueChild(f,a(p)),this._stringText&&a.queueChild(f,a(c.createTextNode(this._stringText))),a.queueChild(f,a(d)),s.precacheNode(this,p),this._closingComment=d,f}var h=u(this._stringText);return e.renderToStaticMarkup?h:"<!--"+i+"-->"+h+"<!--"+l+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),t.exports=l},{125:125,143:143,151:151,168:168,176:176,44:44,7:7,8:8}],56:[function(e,t,n){"use strict";function r(){this._rootNodeID&&p.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=u.executeOnChange(t,e);return c.asap(r,this),n}var i=e(143),a=e(176),s=e(14),u=e(25),l=e(44),c=e(97),p=(e(168),e(175),{getHostProps:function(e,t){null!=t.dangerouslySetInnerHTML?i("91"):void 0;var n=a({},s.getHostProps(e,t),{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=u.getValue(t),r=n;if(null==n){var a=t.defaultValue,s=t.children;null!=s&&(null!=a?i("92"):void 0,Array.isArray(s)&&(s.length<=1?void 0:i("93"),s=s[0]),a=""+s),null==a&&(a=""),r=a}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=l.getNodeFromInstance(e),r=u.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=l.getNodeFromInstance(e);t.value=t.textContent}});t.exports=p},{14:14,143:143,168:168,175:175,176:176,25:25,44:44,97:97}],57:[function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,i=t;i;i=i._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function i(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o<r.length;o++)t(r[o],!0,n)}function s(e,t,n,o,i){for(var a=e&&t?r(e,t):null,s=[];e&&e!==a;)s.push(e),e=e._hostParent;for(var u=[];t&&t!==a;)u.push(t),t=t._hostParent;var l;for(l=0;l<s.length;l++)n(s[l],!0,o);for(l=u.length;l-- >0;)n(u[l],!1,i)}var u=e(143);e(168);t.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:s}},{143:143,168:168}],58:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e(176),i=e(97),a=e(117),s=e(160),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[l,u];o(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=d.isBatchingUpdates;d.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};t.exports=d},{117:117,160:160,176:176,97:97}],59:[function(e,t,n){"use strict";function r(){E||(E=!0,g.EventEmitter.injectReactEventListener(v),g.EventPluginHub.injectEventPluginOrder(a),g.EventPluginUtils.injectComponentTree(p),g.EventPluginUtils.injectTreeTraversal(f),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:_,EnterLeaveEventPlugin:s,ChangeEventPlugin:i,SelectEventPlugin:b,BeforeInputEventPlugin:o}),g.HostComponent.injectGenericComponentClass(c),g.HostComponent.injectTextComponentClass(h),g.DOMProperty.injectDOMPropertyConfig(u),g.DOMProperty.injectDOMPropertyConfig(C),g.EmptyComponent.injectEmptyComponentFactory(function(e){return new d(e)}),g.Updates.injectReconcileTransaction(y),g.Updates.injectBatchingStrategy(m),g.Component.injectEnvironment(l))}var o=e(2),i=e(6),a=e(13),s=e(15),u=e(22),l=e(35),c=e(42),p=e(44),d=e(46),f=e(57),h=e(55),m=e(58),v=e(64),g=e(68),y=e(85),C=e(101),b=e(102),_=e(103),E=!1;t.exports={inject:r}},{101:101,102:102,103:103,13:13,15:15,2:2,22:22,35:35,42:42,44:44,46:46,55:55,57:57,58:58,6:6,64:64,68:68,85:85}],60:[function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i=e(176),a=e(39),s=(e(175),e(121),Object.prototype.hasOwnProperty),u="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,l={key:!0,ref:!0,__self:!0,__source:!0},c=function(e,t,n,r,o,i,a){var s={$$typeof:u,type:e,key:t,ref:n,props:a,_owner:i};return s};c.createElement=function(e,t,n){var i,u={},p=null,d=null,f=null,h=null;if(null!=t){r(t)&&(d=t.ref),o(t)&&(p=""+t.key),f=void 0===t.__self?null:t.__self,h=void 0===t.__source?null:t.__source;for(i in t)s.call(t,i)&&!l.hasOwnProperty(i)&&(u[i]=t[i])}var m=arguments.length-2;if(1===m)u.children=n;else if(m>1){for(var v=Array(m),g=0;g<m;g++)v[g]=arguments[g+2];u.children=v}if(e&&e.defaultProps){var y=e.defaultProps;for(i in y)void 0===u[i]&&(u[i]=y[i])}return c(e,p,d,f,h,a.current,u)},c.createFactory=function(e){var t=c.createElement.bind(null,e);return t.type=e,t},c.cloneAndReplaceKey=function(e,t){var n=c(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},c.cloneElement=function(e,t,n){var u,p=i({},e.props),d=e.key,f=e.ref,h=e._self,m=e._source,v=e._owner;if(null!=t){r(t)&&(f=t.ref,v=a.current),o(t)&&(d=""+t.key);var g;e.type&&e.type.defaultProps&&(g=e.type.defaultProps);for(u in t)s.call(t,u)&&!l.hasOwnProperty(u)&&(void 0===t[u]&&void 0!==g?p[u]=g[u]:p[u]=t[u])}var y=arguments.length-2;if(1===y)p.children=n;else if(y>1){for(var C=Array(y),b=0;b<y;b++)C[b]=arguments[b+2];p.children=C}return c(e.type,d,f,h,m,v,p)},c.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===u},c.REACT_ELEMENT_TYPE=u,t.exports=c},{121:121,175:175,176:176,39:39}],61:[function(e,t,n){"use strict";var r,o={injectEmptyComponentFactory:function(e){r=e}},i={create:function(e){return r(e)}};i.injection=o,t.exports=i},{}],62:[function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(e){return void(null===o&&(o=e))}}var o=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};t.exports=i},{}],63:[function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=e(17),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};t.exports=i},{17:17}],64:[function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=f(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var i=0;i<e.ancestors.length;i++)n=e.ancestors[i],m._handleTopLevel(e.topLevelType,n,e.nativeEvent,f(e.nativeEvent))}function a(e){var t=h(window);e(t)}var s=e(176),u=e(153),l=e(154),c=e(26),p=e(44),d=e(97),f=e(132),h=e(165);s(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(o,c.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:l.canUseDOM?window:null,setHandleTopLevel:function(e){m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?u.listen(r,t,m.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?u.capture(r,t,m.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);u.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(m._enabled){var n=o.getPooled(e,t);try{d.batchedUpdates(i,n)}finally{o.release(n)}}}};t.exports=m},{132:132,153:153,154:154,165:165,176:176,26:26,44:44,97:97}],65:[function(e,t,n){"use strict";var r={logTopLevelRenders:!1};t.exports=r},{}],66:[function(e,t,n){"use strict";var r=e(143),o=e(32),i=e(60),a=e(160),s=(e(168),e(175),{create:function(e){if("object"!=typeof e||!e||Array.isArray(e))return e;if(i.isValidElement(e))return e;1===e.nodeType?r("0"):void 0;var t=[];for(var n in e)o.mapIntoWithKeyPrefixInternal(e[n],t,n,a.thatReturnsArgument);return t}});t.exports=s},{143:143,160:160,168:168,175:175,32:32,60:60}],67:[function(e,t,n){"use strict";function r(e){return u?void 0:a("111",e.type),new u(e)}function o(e){return new c(e)}function i(e){return e instanceof c}var a=e(143),s=e(176),u=(e(168),null),l={},c=null,p={injectGenericComponentClass:function(e){u=e},injectTextComponentClass:function(e){c=e},injectComponentClasses:function(e){s(l,e)}},d={createInternalComponent:r,createInstanceForText:o,isTextComponent:i,injection:p};t.exports=d},{143:143,168:168,176:176}],68:[function(e,t,n){"use strict";var r=e(10),o=e(17),i=e(19),a=e(36),s=e(33),u=e(61),l=e(28),c=e(67),p=e(97),d={Component:a.injection,Class:s.injection,DOMProperty:r.injection,EmptyComponent:u.injection,EventPluginHub:o.injection,EventPluginUtils:i.injection,EventEmitter:l.injection,HostComponent:c.injection,Updates:p.injection};t.exports=d},{10:10,17:17,19:19,28:28,33:33,36:36,61:61,67:67,97:97}],69:[function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=e(53),i=e(157),a=e(162),s=e(163),u={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=s();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,o),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if(void 0===r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};t.exports=u},{157:157,162:162,163:163,53:53}],70:[function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=r},{}],71:[function(e,t,n){"use strict";var r=null;t.exports={debugTool:r}},{}],72:[function(e,t,n){"use strict";function r(e,t){this.value=e,this.requestChange=t}function o(e){var t={value:void 0===e?i.PropTypes.any.isRequired:e.isRequired,requestChange:i.PropTypes.func.isRequired};return i.PropTypes.shape(t)}var i=e(27);r.PropTypes={link:o},t.exports=r},{27:27}],73:[function(e,t,n){"use strict";var r=e(120),o=/\/?>/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=a},{120:120}],74:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===D?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(R)||""}function a(e,t,n,r,o){var i;if(_.logTopLevelRenders){var a=e._currentElement.props,s=a.type;i="React mount: "+("string"==typeof s?s:s.displayName||s.name),console.time(i)}var u=x.mountComponent(e,n,null,y(e,t),o,0);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,V._mountImageIntoNode(u,t,e,r,n)}function s(e,t,n,r){var o=N.ReactReconcileTransaction.getPooled(!n&&C.useCreateElement);o.perform(a,null,e,t,o,n,r),N.ReactReconcileTransaction.release(o)}function u(e,t,n){for(x.unmountComponent(e,n),t.nodeType===D&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function l(e){var t=o(e);if(t){var n=g.getInstanceFromNode(t);return!(!n||!n._hostParent)}}function c(e){return!(!e||e.nodeType!==O&&e.nodeType!==D&&e.nodeType!==I)}function p(e){var t=o(e),n=t&&g.getInstanceFromNode(t);return n&&!n._hostParent?n:null}function d(e){var t=p(e);return t?t._hostContainerInfo._topLevelWrapper:null}var f=e(143),h=e(8),m=e(10),v=e(28),g=(e(39),e(44)),y=e(45),C=e(48),b=e(60),_=e(65),E=e(70),T=(e(71),e(73)),x=e(86),P=e(96),N=e(97),w=e(161),S=e(138),k=(e(168),e(145)),M=e(148),R=(e(175),m.ID_ATTRIBUTE_NAME),A=m.ROOT_ATTRIBUTE_NAME,O=1,D=9,I=11,L={},U=1,F=function(){this.rootID=U++};F.prototype.isReactComponent={},F.prototype.render=function(){return this.props};var V={TopLevelWrapper:F,_instancesByReactRootID:L,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r,o){return V.scrollMonitor(r,function(){P.enqueueElementInternal(e,t,n),o&&P.enqueueCallbackInternal(e,o)}),e},_renderNewRootComponent:function(e,t,n,r){c(t)?void 0:f("37"),v.ensureScrollValueMonitoring();var o=S(e,!1);N.batchedUpdates(s,o,t,n,r);var i=o._instance.rootID;return L[i]=o,o},renderSubtreeIntoContainer:function(e,t,n,r){return null!=e&&E.has(e)?void 0:f("38"),V._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){P.validateCallback(r,"ReactDOM.render"),b.isValidElement(t)?void 0:f("39","string"==typeof t?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=b(F,null,null,null,null,null,t);if(e){var u=E.get(e);a=u._processChildContext(u._context)}else a=w;var c=d(n);if(c){var p=c._currentElement,h=p.props;if(M(h,t)){var m=c._renderedComponent.getPublicInstance(),v=r&&function(){r.call(m)};return V._updateRootComponent(c,s,a,n,v),m}V.unmountComponentAtNode(n)}var g=o(n),y=g&&!!i(g),C=l(n),_=y&&!c&&!C,T=V._renderNewRootComponent(s,n,_,a)._renderedComponent.getPublicInstance();return r&&r.call(T),T},render:function(e,t,n){return V._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){c(e)?void 0:f("40");var t=d(e);return t?(delete L[t._instance.rootID],N.batchedUpdates(u,t,e,!1),!0):(l(e),1===e.nodeType&&e.hasAttribute(A),!1)},_mountImageIntoNode:function(e,t,n,i,a){if(c(t)?void 0:f("41"),i){var s=o(t);if(T.canReuseMarkup(e,s))return void g.precacheNode(n,s);var u=s.getAttribute(T.CHECKSUM_ATTR_NAME);s.removeAttribute(T.CHECKSUM_ATTR_NAME);var l=s.outerHTML;s.setAttribute(T.CHECKSUM_ATTR_NAME,u);var p=e,d=r(p,l),m=" (client) "+p.substring(d-20,d+20)+"\n (server) "+l.substring(d-20,d+20);t.nodeType===D?f("42",m):void 0}if(t.nodeType===D?f("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else k(t,e),g.precacheNode(n,t.firstChild)}};t.exports=V},{10:10,138:138,143:143,145:145,148:148,161:161,168:168,175:175,28:28,39:39,44:44,45:45,48:48,60:60,65:65,70:70,71:71,73:73,8:8,86:86,96:96,97:97}],75:[function(e,t,n){"use strict";function r(e,t,n){return{type:d.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:d.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getHostNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:d.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:d.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e){return{type:d.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e,t){return t&&(e=e||[],e.push(t)),e}function l(e,t){p.processChildrenUpdates(e,t)}var c=e(143),p=e(36),d=(e(70),e(71),e(76)),f=(e(39),e(86)),h=e(31),m=(e(160),e(127)),v=(e(168),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return h.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,i){var a,s=0;return a=m(t,s),h.updateChildren(e,a,n,r,o,this,this._hostContainerInfo,i,s),a},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=0,l=f.mountComponent(s,t,this,this._hostContainerInfo,n,u);s._mountIndex=i++,o.push(l)}return o},updateTextContent:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[s(e)];l(this,r)},updateMarkup:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[a(e)];l(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=[],a=this._reconcilerUpdateChildren(r,e,i,o,t,n);if(a||r){var s,c=null,p=0,d=0,h=0,m=null;for(s in a)if(a.hasOwnProperty(s)){var v=r&&r[s],g=a[s];v===g?(c=u(c,this.moveChild(v,m,p,d)),d=Math.max(v._mountIndex,d),v._mountIndex=p):(v&&(d=Math.max(v._mountIndex,d)),c=u(c,this._mountChildAtIndex(g,i[h],m,p,t,n)),h++),p++,m=f.getHostNode(g)}for(s in o)o.hasOwnProperty(s)&&(c=u(c,this._unmountChild(r[s],o[s])));c&&l(this,c),this._renderedChildren=a}},unmountChildren:function(e){var t=this._renderedChildren;h.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){
+if(e._mountIndex<r)return o(e,t,n)},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return i(e,t)},_mountChildAtIndex:function(e,t,n,r,o,i){return e._mountIndex=r,this.createChild(e,n,t)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}});t.exports=v},{127:127,143:143,160:160,168:168,31:31,36:36,39:39,70:70,71:71,76:76,86:86}],76:[function(e,t,n){"use strict";var r=e(171),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});t.exports=o},{171:171}],77:[function(e,t,n){"use strict";var r=e(143),o=e(60),i=(e(168),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?i.EMPTY:o.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.HOST:void r("26",e)}});t.exports=i},{143:143,168:168,60:60}],78:[function(e,t,n){"use strict";function r(e,t){}var o=(e(175),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")}});t.exports=o},{175:175}],79:[function(e,t,n){"use strict";var r=e(143),o=(e(168),{isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){o.isValidOwner(n)?void 0:r("119"),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){o.isValidOwner(n)?void 0:r("120");var i=n.getPublicInstance();i&&i.refs[t]===e.getPublicInstance()&&n.detachRef(t)}});t.exports=o},{143:143,168:168}],80:[function(e,t,n){"use strict";var r={};t.exports=r},{}],81:[function(e,t,n){"use strict";var r=e(171),o=r({prop:null,context:null,childContext:null});t.exports=o},{171:171}],82:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function i(e){function t(t,n,r,i,a,s,u){if(i=i||N,s=s||r,null==n[r]){var l=E[a];return t?new o("Required "+l+" `"+s+"` was not specified in "+("`"+i+"`.")):null}return e(n,r,i,a,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){function t(t,n,r,i,a,s){var u=t[n],l=y(u);if(l!==e){var c=E[i],p=C(u);return new o("Invalid "+c+" `"+a+"` of type "+("`"+p+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return i(t)}function s(){return i(x.thatReturns(null))}function u(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var u=E[i],l=y(s);return new o("Invalid "+u+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<s.length;c++){var p=e(s,c,r,i,a+"["+c+"]",T);if(p instanceof Error)return p}return null}return i(t)}function l(){function e(e,t,n,r,i){var a=e[t];if(!_.isValidElement(a)){var s=E[r],u=y(a);return new o("Invalid "+s+" `"+i+"` of type "+("`"+u+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return i(e)}function c(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var s=E[i],u=e.name||N,l=b(t[n]);return new o("Invalid "+s+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return i(t)}function p(e){function t(t,n,i,a,s){for(var u=t[n],l=0;l<e.length;l++)if(r(u,e[l]))return null;var c=E[a],p=JSON.stringify(e);return new o("Invalid "+c+" `"+s+"` of value `"+u+"` "+("supplied to `"+i+"`, expected one of "+p+"."))}return Array.isArray(e)?i(t):x.thatReturnsNull}function d(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var s=t[n],u=y(s);if("object"!==u){var l=E[i];return new o("Invalid "+l+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var c in s)if(s.hasOwnProperty(c)){var p=e(s,c,r,i,a+"."+c,T);if(p instanceof Error)return p}return null}return i(t)}function f(e){function t(t,n,r,i,a){for(var s=0;s<e.length;s++){var u=e[s];if(null==u(t,n,r,i,a,T))return null}var l=E[i];return new o("Invalid "+l+" `"+a+"` supplied to "+("`"+r+"`."))}return Array.isArray(e)?i(t):x.thatReturnsNull}function h(){function e(e,t,n,r,i){if(!v(e[t])){var a=E[r];return new o("Invalid "+a+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return i(e)}function m(e){function t(t,n,r,i,a){var s=t[n],u=y(s);if("object"!==u){var l=E[i];return new o("Invalid "+l+" `"+a+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var c in e){var p=e[c];if(p){var d=p(s,c,r,i,a+"."+c,T);if(d)return d}}return null}return i(t)}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||_.isValidElement(e))return!0;var t=P(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function g(e,t){return"symbol"===e||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":g(t,e)?"symbol":t}function C(e){var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){return e.constructor&&e.constructor.name?e.constructor.name:N}var _=e(60),E=e(80),T=e(83),x=e(160),P=e(134),N=(e(175),"<<anonymous>>"),w={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:s(),arrayOf:u,element:l(),instanceOf:c,node:h(),objectOf:d,oneOf:p,oneOfType:f,shape:m};o.prototype=Error.prototype,t.exports=w},{134:134,160:160,175:175,60:60,80:80,83:83}],83:[function(e,t,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r},{}],84:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=u,this.updater=n||s}function o(){}var i=e(176),a=e(34),s=e(78),u=e(161);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,t.exports=r},{161:161,176:176,34:34,78:78}],85:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=e}var o=e(176),i=e(5),a=e(26),s=e(28),u=e(69),l=(e(71),e(117)),c=e(96),p={initialize:u.getSelectionInformation,close:u.restoreSelection},d={initialize:function(){var e=s.isEnabled();return s.setEnabled(!1),e},close:function(e){s.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,d,f],m={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return c},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,l.Mixin,m),a.addPoolingTo(r),t.exports=r},{117:117,176:176,26:26,28:28,5:5,69:69,71:71,96:96}],86:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e(87),i=(e(71),e(175),{mountComponent:function(e,t,n,o,i,a){var s=e.mountComponent(t,n,o,i,a);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),s},getHostNode:function(e){return e.getHostNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var s=o.shouldUpdateRefs(a,t);s&&o.detachRefs(e,a),e.receiveComponent(t,n,i),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){e._updateBatchNumber===n&&e.performUpdateIfNecessary(t)}});t.exports=i},{175:175,71:71,87:87}],87:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=e(79),a={};a.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t.ref!==e.ref||"string"==typeof t.ref&&t._owner!==e._owner},a.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},t.exports=a},{79:79}],88:[function(e,t,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(e){}};t.exports=r},{}],89:[function(e,t,n){"use strict";function r(e,t){var n;try{return h.injection.injectBatchingStrategy(d),n=f.getPooled(t),g++,n.perform(function(){var r=v(e,!0),o=p.mountComponent(r,n,null,s(),m,0);return t||(o=c.addChecksumToMarkup(o)),o},null)}finally{g--,f.release(n),g||h.injection.injectBatchingStrategy(u)}}function o(e){return l.isValidElement(e)?void 0:a("46"),r(e,!1)}function i(e){return l.isValidElement(e)?void 0:a("47"),r(e,!0)}var a=e(143),s=e(45),u=e(58),l=e(60),c=(e(71),e(73)),p=e(86),d=e(88),f=e(90),h=e(97),m=e(161),v=e(138),g=(e(168),0);t.exports={renderToString:o,renderToStaticMarkup:i}},{138:138,143:143,161:161,168:168,45:45,58:58,60:60,71:71,73:73,86:86,88:88,90:90,97:97}],90:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1,this.updateQueue=new s(this)}var o=e(176),i=e(26),a=e(117),s=(e(71),e(91)),u=[],l={enqueue:function(){}},c={getTransactionWrappers:function(){return u},getReactMountReady:function(){return l},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,a.Mixin,c),i.addPoolingTo(r),t.exports=r},{117:117,176:176,26:26,71:71,91:91}],91:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){}var i=e(96),a=(e(117),e(175),function(){function e(t){r(this,e),this.transaction=t}return e.prototype.isMounted=function(e){return!1},e.prototype.enqueueCallback=function(e,t,n){this.transaction.isInTransaction()&&i.enqueueCallback(e,t,n)},e.prototype.enqueueForceUpdate=function(e){this.transaction.isInTransaction()?i.enqueueForceUpdate(e):o(e,"forceUpdate")},e.prototype.enqueueReplaceState=function(e,t){this.transaction.isInTransaction()?i.enqueueReplaceState(e,t):o(e,"replaceState")},e.prototype.enqueueSetState=function(e,t){this.transaction.isInTransaction()?i.enqueueSetState(e,t):o(e,"setState")},e}());t.exports=a},{117:117,175:175,96:96}],92:[function(e,t,n){"use strict";function r(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}var o={createStateSetter:function(e,t){return function(n,r,o,i,a,s){var u=t.call(e,n,r,o,i,a,s);u&&e.setState(u)}},createStateKeySetter:function(e,t){var n=e.__keySetters||(e.__keySetters={});return n[t]||(n[t]=r(e,t))}};o.Mixin={createStateSetter:function(e){return o.createStateSetter(this,e)},createStateKeySetter:function(e){return o.createStateKeySetter(this,e)}},t.exports=o},{}],93:[function(e,t,n){"use strict";var r=e(127),o={getChildMapping:function(e,t){return e?r(e):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a<r[u].length;a++){var l=r[u][a];s[r[u][a]]=n(l)}s[u]=n(u)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}};t.exports=o},{127:127}],94:[function(e,t,n){"use strict";function r(){var e=s("animationend"),t=s("transitionend");e&&u.push(e),t&&u.push(t)}function o(e,t,n){e.addEventListener(t,n,!1)}function i(e,t,n){e.removeEventListener(t,n,!1)}var a=e(154),s=e(137),u=[];a.canUseDOM&&r();var l={addEndEventListener:function(e,t){return 0===u.length?void window.setTimeout(t,0):void u.forEach(function(n){o(e,n,t)})},removeEndEventListener:function(e,t){0!==u.length&&u.forEach(function(n){i(e,n,t)})}};t.exports=l},{137:137,154:154}],95:[function(e,t,n){"use strict";var r=e(176),o=e(27),i=(e(70),e(93)),a=e(160),s=o.createClass({displayName:"ReactTransitionGroup",propTypes:{component:o.PropTypes.any,childFactory:o.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:a.thatReturnsArgument}},getInitialState:function(){return{children:i.getChildMapping(this.props.children)}},componentWillMount:function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidMount:function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},componentWillReceiveProps:function(e){var t;t=i.getChildMapping(e.children);var n=this.state.children;this.setState({children:i.mergeChildMappings(n,t)});var r;for(r in t){var o=n&&n.hasOwnProperty(r);!t[r]||o||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n){var a=t&&t.hasOwnProperty(r);!n[r]||a||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performAppear:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)},_handleDoneAppearing:function(e){var t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e];var n;n=i.getChildMapping(this.props.children),n&&n.hasOwnProperty(e)||this.performLeave(e)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n;n=i.getChildMapping(this.props.children),n&&n.hasOwnProperty(e)||this.performLeave(e)},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n;n=i.getChildMapping(this.props.children),n&&n.hasOwnProperty(e)?this.performEnter(e):this.setState(function(t){var n=r({},t.children);return delete n[e],{children:n}})},render:function(){var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(o.cloneElement(this.props.childFactory(n),{ref:t,key:t}))}var i=r({},this.props);return delete i.transitionLeave,delete i.transitionName,delete i.transitionAppear,delete i.transitionEnter,delete i.childFactory,delete i.transitionLeaveTimeout,delete i.transitionEnterTimeout,delete i.transitionAppearTimeout,delete i.component,o.createElement(this.props.component,i,e)}});t.exports=s},{160:160,176:176,27:27,70:70,93:93}],96:[function(e,t,n){"use strict";function r(e){u.enqueueUpdate(e)}function o(e){var t=typeof e;if("object"!==t)return t;var n=e.constructor&&e.constructor.name||t,r=Object.keys(e);return r.length>0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(e,t){var n=s.get(e);return n?n:null}var a=e(143),s=(e(39),e(70)),u=(e(71),e(97)),l=(e(168),e(175),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var o=i(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,o(e)):void 0}});t.exports=l},{143:143,168:168,175:175,39:39,70:70,71:71,97:97}],97:[function(e,t,n){"use strict";function r(){w.ReactReconcileTransaction&&_?void 0:c("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=w.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,o,i,a){r(),_.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?c("124",t,g.length):void 0,g.sort(a),y++;for(var n=0;n<t;n++){var r=g[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(h.logTopLevelRenders){var s=r;r._currentElement.props===r._renderedComponent._currentElement&&(s=r._renderedComponent),i="React update: "+s.getName(),console.time(i)}if(m.performUpdateIfNecessary(r,e.reconcileTransaction,y),i&&console.timeEnd(i),o)for(var u=0;u<o.length;u++)e.callbackQueue.enqueue(o[u],r.getPublicInstance())}}function u(e){return r(),_.isBatchingUpdates?(g.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=y+1))):void _.batchedUpdates(u,e)}function l(e,t){_.isBatchingUpdates?void 0:c("125"),C.enqueue(e,t),b=!0}var c=e(143),p=e(176),d=e(5),f=e(26),h=e(65),m=e(86),v=e(117),g=(e(168),[]),y=0,C=d.getPooled(),b=!1,_=null,E={initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),P()):g.length=0}},T={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[E,T];p(o.prototype,v.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,d.release(this.callbackQueue),this.callbackQueue=null,w.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return v.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),f.addPoolingTo(o);var P=function(){for(;g.length||b;){if(g.length){var e=o.getPooled();e.perform(s,null,e),o.release(e)}if(b){b=!1;var t=C;C=d.getPooled(),t.notifyAll(),d.release(t)}}},N={injectReconcileTransaction:function(e){e?void 0:c("126"),w.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:c("127"),"function"!=typeof e.batchedUpdates?c("128"):void 0,"boolean"!=typeof e.isBatchingUpdates?c("129"):void 0,_=e}},w={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:u,flushBatchedUpdates:P,injection:N,asap:l};t.exports=w},{117:117,143:143,168:168,176:176,26:26,5:5,65:65,86:86}],98:[function(e,t,n){"use strict";t.exports="15.3.1"},{}],99:[function(e,t,n){"use strict";var r=e(24),o=e(27),i=e(37),a=e(29),s=e(66),u=e(95),l=e(147),c=e(150);o.addons={CSSTransitionGroup:a,LinkedStateMixin:r,PureRenderMixin:i,TransitionGroup:u,createFragment:s.create,shallowCompare:l,update:c},t.exports=o},{147:147,150:150,24:24,27:27,29:29,37:37,66:66,95:95}],100:[function(e,t,n){"use strict";var r=e(176),o=e(40),i=e(54),a=e(99),s=r({__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:o,__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:i},a);t.exports=s},{176:176,40:40,54:54,99:99}],101:[function(e,t,n){"use strict";var r={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:r.xlink,xlinkArcrole:r.xlink,xlinkHref:r.xlink,xlinkRole:r.xlink,xlinkShow:r.xlink,xlinkTitle:r.xlink,xlinkType:r.xlink,xmlBase:r.xml,xmlLang:r.xml,xmlSpace:r.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(e){i.Properties[e]=0,o[e]&&(i.DOMAttributeNames[e]=o[e])}),t.exports=i},{}],102:[function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&l.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(_||null==y||y!==p())return null;var n=r(y);if(!b||!h(b,n)){b=n;var o=c.getPooled(g.select,C,e,t);return o.type="select",o.target=y,a.accumulateTwoPhaseDispatches(o),o}return null}var i=e(16),a=e(20),s=e(154),u=e(44),l=e(69),c=e(108),p=e(163),d=e(140),f=e(172),h=e(174),m=i.topLevelTypes,v=s.canUseDOM&&"documentMode"in document&&document.documentMode<=11,g={select:{phasedRegistrationNames:{bubbled:f({onSelect:null}),captured:f({onSelectCapture:null})},dependencies:[m.topBlur,m.topContextMenu,m.topFocus,m.topKeyDown,m.topMouseDown,m.topMouseUp,m.topSelectionChange]}},y=null,C=null,b=null,_=!1,E=!1,T=f({onSelect:null}),x={eventTypes:g,extractEvents:function(e,t,n,r){if(!E)return null;var i=t?u.getNodeFromInstance(t):window;switch(e){case m.topFocus:(d(i)||"true"===i.contentEditable)&&(y=i,C=t,b=null);break;case m.topBlur:y=null,C=null,b=null;break;case m.topMouseDown:_=!0;break;case m.topContextMenu:case m.topMouseUp:return _=!1,o(n,r);case m.topSelectionChange:if(v)break;case m.topKeyDown:case m.topKeyUp:return o(n,r)}return null},didPutListener:function(e,t,n){t===T&&(E=!0)}};t.exports=x},{108:108,140:140,154:154,16:16,163:163,172:172,174:174,20:20,44:44,69:69}],103:[function(e,t,n){"use strict";function r(e){return"."+e._rootNodeID}var o=e(143),i=e(16),a=e(153),s=e(20),u=e(44),l=e(104),c=e(105),p=e(108),d=e(109),f=e(111),h=e(112),m=e(107),v=e(113),g=e(114),y=e(115),C=e(116),b=e(160),_=e(129),E=(e(168),e(172)),T=i.topLevelTypes,x={abort:{phasedRegistrationNames:{bubbled:E({onAbort:!0}),captured:E({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:E({onAnimationEnd:!0}),captured:E({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{bubbled:E({onAnimationIteration:!0}),captured:E({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:E({onAnimationStart:!0}),captured:E({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:E({onBlur:!0}),captured:E({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:E({onCanPlay:!0}),captured:E({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:E({onCanPlayThrough:!0}),captured:E({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:E({onClick:!0}),captured:E({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:E({onContextMenu:!0}),captured:E({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:E({onCopy:!0}),captured:E({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:E({onCut:!0}),captured:E({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:E({onDoubleClick:!0}),captured:E({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:E({onDrag:!0}),captured:E({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:E({onDragEnd:!0}),captured:E({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:E({onDragEnter:!0}),captured:E({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:E({onDragExit:!0}),captured:E({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:E({onDragLeave:!0}),captured:E({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:E({onDragOver:!0}),captured:E({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:E({onDragStart:!0}),captured:E({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:E({onDrop:!0}),captured:E({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:E({onDurationChange:!0}),captured:E({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:E({onEmptied:!0}),captured:E({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:E({onEncrypted:!0}),captured:E({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:E({onEnded:!0}),captured:E({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:E({onError:!0}),captured:E({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:E({onFocus:!0}),captured:E({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:E({onInput:!0}),captured:E({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:E({onInvalid:!0}),captured:E({onInvalidCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:E({onKeyDown:!0}),captured:E({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:E({onKeyPress:!0}),captured:E({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:E({onKeyUp:!0}),captured:E({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:E({onLoad:!0}),captured:E({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:E({onLoadedData:!0}),captured:E({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:E({onLoadedMetadata:!0}),captured:E({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:E({onLoadStart:!0}),captured:E({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:E({onMouseDown:!0}),captured:E({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:E({onMouseMove:!0}),captured:E({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:E({onMouseOut:!0}),captured:E({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:E({onMouseOver:!0}),captured:E({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:E({onMouseUp:!0}),captured:E({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:E({onPaste:!0}),captured:E({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:E({onPause:!0}),captured:E({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:E({onPlay:!0}),captured:E({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:E({onPlaying:!0}),captured:E({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:E({onProgress:!0}),captured:E({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:E({onRateChange:!0}),captured:E({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:E({onReset:!0}),captured:E({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:E({onScroll:!0}),captured:E({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:E({onSeeked:!0}),captured:E({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:E({onSeeking:!0}),captured:E({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:E({
+onStalled:!0}),captured:E({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:E({onSubmit:!0}),captured:E({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:E({onSuspend:!0}),captured:E({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:E({onTimeUpdate:!0}),captured:E({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:E({onTouchCancel:!0}),captured:E({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:E({onTouchEnd:!0}),captured:E({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:E({onTouchMove:!0}),captured:E({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:E({onTouchStart:!0}),captured:E({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:E({onTransitionEnd:!0}),captured:E({onTransitionEndCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:E({onVolumeChange:!0}),captured:E({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:E({onWaiting:!0}),captured:E({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:E({onWheel:!0}),captured:E({onWheelCapture:!0})}}},P={topAbort:x.abort,topAnimationEnd:x.animationEnd,topAnimationIteration:x.animationIteration,topAnimationStart:x.animationStart,topBlur:x.blur,topCanPlay:x.canPlay,topCanPlayThrough:x.canPlayThrough,topClick:x.click,topContextMenu:x.contextMenu,topCopy:x.copy,topCut:x.cut,topDoubleClick:x.doubleClick,topDrag:x.drag,topDragEnd:x.dragEnd,topDragEnter:x.dragEnter,topDragExit:x.dragExit,topDragLeave:x.dragLeave,topDragOver:x.dragOver,topDragStart:x.dragStart,topDrop:x.drop,topDurationChange:x.durationChange,topEmptied:x.emptied,topEncrypted:x.encrypted,topEnded:x.ended,topError:x.error,topFocus:x.focus,topInput:x.input,topInvalid:x.invalid,topKeyDown:x.keyDown,topKeyPress:x.keyPress,topKeyUp:x.keyUp,topLoad:x.load,topLoadedData:x.loadedData,topLoadedMetadata:x.loadedMetadata,topLoadStart:x.loadStart,topMouseDown:x.mouseDown,topMouseMove:x.mouseMove,topMouseOut:x.mouseOut,topMouseOver:x.mouseOver,topMouseUp:x.mouseUp,topPaste:x.paste,topPause:x.pause,topPlay:x.play,topPlaying:x.playing,topProgress:x.progress,topRateChange:x.rateChange,topReset:x.reset,topScroll:x.scroll,topSeeked:x.seeked,topSeeking:x.seeking,topStalled:x.stalled,topSubmit:x.submit,topSuspend:x.suspend,topTimeUpdate:x.timeUpdate,topTouchCancel:x.touchCancel,topTouchEnd:x.touchEnd,topTouchMove:x.touchMove,topTouchStart:x.touchStart,topTransitionEnd:x.transitionEnd,topVolumeChange:x.volumeChange,topWaiting:x.waiting,topWheel:x.wheel};for(var N in P)P[N].dependencies=[N];var w=E({onClick:null}),S={},k={eventTypes:x,extractEvents:function(e,t,n,r){var i=P[e];if(!i)return null;var a;switch(e){case T.topAbort:case T.topCanPlay:case T.topCanPlayThrough:case T.topDurationChange:case T.topEmptied:case T.topEncrypted:case T.topEnded:case T.topError:case T.topInput:case T.topInvalid:case T.topLoad:case T.topLoadedData:case T.topLoadedMetadata:case T.topLoadStart:case T.topPause:case T.topPlay:case T.topPlaying:case T.topProgress:case T.topRateChange:case T.topReset:case T.topSeeked:case T.topSeeking:case T.topStalled:case T.topSubmit:case T.topSuspend:case T.topTimeUpdate:case T.topVolumeChange:case T.topWaiting:a=p;break;case T.topKeyPress:if(0===_(n))return null;case T.topKeyDown:case T.topKeyUp:a=f;break;case T.topBlur:case T.topFocus:a=d;break;case T.topClick:if(2===n.button)return null;case T.topContextMenu:case T.topDoubleClick:case T.topMouseDown:case T.topMouseMove:case T.topMouseOut:case T.topMouseOver:case T.topMouseUp:a=h;break;case T.topDrag:case T.topDragEnd:case T.topDragEnter:case T.topDragExit:case T.topDragLeave:case T.topDragOver:case T.topDragStart:case T.topDrop:a=m;break;case T.topTouchCancel:case T.topTouchEnd:case T.topTouchMove:case T.topTouchStart:a=v;break;case T.topAnimationEnd:case T.topAnimationIteration:case T.topAnimationStart:a=l;break;case T.topTransitionEnd:a=g;break;case T.topScroll:a=y;break;case T.topWheel:a=C;break;case T.topCopy:case T.topCut:case T.topPaste:a=c}a?void 0:o("86",e);var u=a.getPooled(i,t,n,r);return s.accumulateTwoPhaseDispatches(u),u},didPutListener:function(e,t,n){if(t===w){var o=r(e),i=u.getNodeFromInstance(e);S[o]||(S[o]=a.listen(i,"click",b))}},willDeleteListener:function(e,t){if(t===w){var n=r(e);S[n].remove(),delete S[n]}}};t.exports=k},{104:104,105:105,107:107,108:108,109:109,111:111,112:112,113:113,114:114,115:115,116:116,129:129,143:143,153:153,16:16,160:160,168:168,172:172,20:20,44:44}],104:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(108),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),t.exports=r},{108:108}],105:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(108),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),t.exports=r},{108:108}],106:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(108),i={data:null};o.augmentClass(r,i),t.exports=r},{108:108}],107:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(112),i={dataTransfer:null};o.augmentClass(r,i),t.exports=r},{112:112}],108:[function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];s?this[i]=s(n):"target"===i?this.target=r:this[i]=n[i]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=e(176),i=e(26),a=e(160),s=(e(175),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),u={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<s.length;n++)this[s[n]]=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,e.prototype),e.prototype=a,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),t.exports=r},{160:160,175:175,176:176,26:26}],109:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(115),i={relatedTarget:null};o.augmentClass(r,i),t.exports=r},{115:115}],110:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(108),i={data:null};o.augmentClass(r,i),t.exports=r},{108:108}],111:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(115),i=e(129),a=e(130),s=e(131),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,u),t.exports=r},{115:115,129:129,130:130,131:131}],112:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(115),i=e(118),a=e(131),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,s),t.exports=r},{115:115,118:118,131:131}],113:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(115),i=e(131),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),t.exports=r},{115:115,131:131}],114:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(108),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),t.exports=r},{108:108}],115:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(108),i=e(132),a={view:function(e){if(e.view)return e.view;var t=i(e);if(t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),t.exports=r},{108:108,132:132}],116:[function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=e(112),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),t.exports=r},{112:112}],117:[function(e,t,n){"use strict";var r=e(143),o=(e(168),{reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,o,i,a,s,u){this.isInTransaction()?r("27"):void 0;var l,c;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,n,o,i,a,s,u),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(e){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=i.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(e){}}}},closeAll:function(e){this.isInTransaction()?void 0:r("28");for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,a=t[n],s=this.wrapperInitData[n];try{o=!0,s!==i.OBSERVED_ERROR&&a.close&&a.close.call(this,s),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(e){}}}this.wrapperInitData.length=0}}),i={Mixin:o,OBSERVED_ERROR:{}};t.exports=i},{143:143,168:168}],118:[function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};t.exports=r},{}],119:[function(e,t,n){"use strict";function r(e,t){return null==t?o("30"):void 0,null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}var o=e(143);e(168);t.exports=r},{143:143,168:168}],120:[function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0,i=e.length,a=i&-4;r<a;){for(var s=Math.min(r+4096,a);r<s;r+=4)n+=(t+=e.charCodeAt(r))+(t+=e.charCodeAt(r+1))+(t+=e.charCodeAt(r+2))+(t+=e.charCodeAt(r+3));t%=o,n%=o}for(;r<i;r++)n+=t+=e.charCodeAt(r);return t%=o,n%=o,t|n<<16}var o=65521;t.exports=r},{}],121:[function(e,t,n){"use strict";var r=!1;t.exports=r},{}],122:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r,u,l){for(var c in e)if(e.hasOwnProperty(c)){var p;try{"function"!=typeof e[c]?o("84",r||"React class",i[n],c):void 0,p=e[c](t,c,r,n,null,a)}catch(e){p=e}p instanceof Error&&!(p.message in s)&&(s[p.message]=!0)}}var o=e(143),i=e(80),a=e(83);e(168),e(175);"undefined"!=typeof n&&n.env,1;var s={};t.exports=r}).call(this,void 0)},{143:143,168:168,175:175,80:80,83:83}],123:[function(e,t,n){"use strict";var r=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};t.exports=r},{}],124:[function(e,t,n){"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var o=isNaN(t);return o||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=e(3),i=(e(175),o.isUnitlessNumber);t.exports=r},{175:175,3:3}],125:[function(e,t,n){"use strict";function r(e){var t=""+e,n=i.exec(t);if(!n)return t;var r,o="",a=0,s=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#x27;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==a&&(o+=t.substring(s,a)),s=a+1,o+=r}return s!==a?o+t.substring(s,a):o}function o(e){return"boolean"==typeof e||"number"==typeof e?""+e:r(e)}var i=/["'&<>]/;t.exports=o},{}],126:[function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=a.get(e);return t?(t=s(t),t?i.getNodeFromInstance(t):null):void("function"==typeof e.render?o("44"):o("45",Object.keys(e)))}var o=e(143),i=(e(39),e(44)),a=e(70),s=e(133);e(168),e(175);t.exports=r},{133:133,143:143,168:168,175:175,39:39,44:44,70:70}],127:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){if(e&&"object"==typeof e){var o=e,i=void 0===o[n];i&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return i(e,r,n),n}var i=(e(23),e(149));e(175);"undefined"!=typeof n&&n.env,t.exports=o}).call(this,void 0)},{149:149,175:175,23:23}],128:[function(e,t,n){"use strict";function r(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}t.exports=r},{}],129:[function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],130:[function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=e(129),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{129:129}],131:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return!!r&&!!n[r]}function o(e){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],132:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}t.exports=r},{}],133:[function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=e(77);t.exports=r},{77:77}],134:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},{}],135:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var n=r(e),i=0,a=0;n;){if(3===n.nodeType){if(a=i+n.textContent.length,i<=t&&a>=t)return{node:n,offset:t-i};i=a}n=r(o(n))}}t.exports=i},{}],136:[function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=e(154),i=null;t.exports=r},{154:154}],137:[function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return s[e]=t[n];return""}var i=e(154),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},u={};i.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),t.exports=o},{154:154}],138:[function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e,t){var n;if(null===e||e===!1)n=l.create(i);else if("object"==typeof e){var s=e;!s||"function"!=typeof s.type&&"string"!=typeof s.type?a("130",null==s.type?s.type:typeof s.type,r(s._owner)):void 0,"string"==typeof s.type?n=c.createInternalComponent(s):o(s.type)?(n=new s.type(s),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(s)}else"string"==typeof e||"number"==typeof e?n=c.createInstanceForText(e):a("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var a=e(143),s=e(176),u=e(38),l=e(61),c=e(67),p=(e(168),e(175),function(e){this.construct(e)});s(p.prototype,u.Mixin,{_instantiateReactComponent:i});t.exports=i},{143:143,168:168,175:175,176:176,38:38,61:61,67:67}],139:[function(e,t,n){"use strict";function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=e(154);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{154:154}],140:[function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!o[e.type]:"textarea"===t}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},{}],141:[function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o("143"),e}var o=e(143),i=e(60);e(168);t.exports=r},{143:143,168:168,60:60}],142:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e(125);t.exports=r},{125:125}],143:[function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=r},{}],144:[function(e,t,n){"use strict";var r=e(74);t.exports=r.renderSubtreeIntoContainer},{74:74}],145:[function(e,t,n){"use strict";var r,o=e(154),i=e(9),a=/^[ \r\n\t\f]/,s=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,u=e(123),l=u(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML="<svg>"+t+"</svg>";for(var n=r.firstChild.childNodes,o=0;o<n.length;o++)e.appendChild(n[o])}});if(o.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),c=null}t.exports=l},{123:123,154:154,9:9}],146:[function(e,t,n){"use strict";var r=e(154),o=e(125),i=e(145),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),t.exports=a},{125:125,145:145,154:154}],147:[function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=e(174);t.exports=r},{174:174}],148:[function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}t.exports=r},{}],149:[function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?l.escape(e.key):t.toString(36)}function o(e,t,n,i){var d=typeof e;if("undefined"!==d&&"boolean"!==d||(e=null),null===e||"string"===d||"number"===d||s.isValidElement(e))return n(i,e,""===t?c+r(e,0):t),1;var f,h,m=0,v=""===t?c:t+p;if(Array.isArray(e))for(var g=0;g<e.length;g++)f=e[g],h=v+r(f,g),m+=o(f,h,n,i);else{var y=u(e);if(y){var C,b=y.call(e);if(y!==e.entries)for(var _=0;!(C=b.next()).done;)f=C.value,h=v+r(f,_++),m+=o(f,h,n,i);else for(;!(C=b.next()).done;){var E=C.value;E&&(f=E[1],h=v+l.escape(E[0])+p+r(f,0),m+=o(f,h,n,i))}}else if("object"===d){var T="",x=String(e);a("31","[object Object]"===x?"object with keys {"+Object.keys(e).join(", ")+"}":x,T)}}return m}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=e(143),s=(e(39),e(60)),u=e(134),l=(e(168),e(23)),c=(e(175),"."),p=":";t.exports=i},{134:134,143:143,168:168,175:175,23:23,39:39,60:60}],150:[function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e.concat():e&&"object"==typeof e?s(new e.constructor,e):e}function o(e,t,n){Array.isArray(e)?void 0:a("1",n,e);var r=t[n];Array.isArray(r)?void 0:a("2",n,r)}function i(e,t){if("object"!=typeof t?a("3",v.join(", "),f):void 0,l.call(t,f))return 1!==Object.keys(t).length?a("4",f):void 0,t[f];var n=r(e);if(l.call(t,h)){var u=t[h];u&&"object"==typeof u?void 0:a("5",h,u),n&&"object"==typeof n?void 0:a("6",h,n),s(n,t[h])}l.call(t,c)&&(o(e,t,c),t[c].forEach(function(e){n.push(e)})),l.call(t,p)&&(o(e,t,p),t[p].forEach(function(e){n.unshift(e)})),l.call(t,d)&&(Array.isArray(e)?void 0:a("7",d,e),Array.isArray(t[d])?void 0:a("8",d,t[d]),t[d].forEach(function(e){Array.isArray(e)?void 0:a("8",d,t[d]),n.splice.apply(n,e)})),l.call(t,m)&&("function"!=typeof t[m]?a("9",m,t[m]):void 0,n=t[m](n));for(var y in t)g.hasOwnProperty(y)&&g[y]||(n[y]=i(e[y],t[y]));return n}var a=e(143),s=e(176),u=e(172),l=(e(168),{}.hasOwnProperty),c=u({$push:null}),p=u({$unshift:null}),d=u({$splice:null}),f=u({$set:null}),h=u({$merge:null}),m=u({$apply:null}),v=[c,p,d,f,h,m],g={};v.forEach(function(e){g[e]=!0}),t.exports=i},{143:143,168:168,172:172,176:176}],151:[function(e,t,n){"use strict";var r=(e(176),e(160)),o=(e(175),r);t.exports=o},{160:160,175:175,176:176}],152:[function(e,t,n){"use strict";function r(e,t){for(var n=e;n.parentNode;)n=n.parentNode;var r=n.querySelectorAll(t);return Array.prototype.indexOf.call(r,e)!==-1}var o=e(168),i={addClass:function(e,t){return/\s/.test(t)?o(!1):void 0,t&&(e.classList?e.classList.add(t):i.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return/\s/.test(t)?o(!1):void 0,t&&(e.classList?e.classList.remove(t):i.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?i.addClass:i.removeClass)(e,t)},hasClass:function(e,t){return/\s/.test(t)?o(!1):void 0,e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1},matchesSelector:function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(t){return r(e,t)};return n.call(e,t)}};t.exports=i},{168:168}],153:[function(e,t,n){"use strict";var r=e(160),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},{160:160}],154:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],155:[function(e,t,n){"use strict";function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;t.exports=r},{}],156:[function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=e(155),i=/^-ms-/;t.exports=r},{155:155}],157:[function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=e(170);t.exports=r},{170:170}],158:[function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}function o(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function i(e){return o(e)?Array.isArray(e)?e.slice():r(e):[e]}var a=e(168);t.exports=i},{168:168}],159:[function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=l;l?void 0:u(!1);var o=r(e),i=o&&s(o);if(i){n.innerHTML=i[1]+e+i[2];for(var c=i[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:u(!1),a(p).forEach(t));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var i=e(154),a=e(158),s=e(164),u=e(168),l=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},{154:154,158:158,164:164,168:168}],160:[function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],161:[function(e,t,n){"use strict";var r={};t.exports=r},{}],162:[function(e,t,n){"use strict";function r(e){try{e.focus()}catch(e){}}t.exports=r},{}],163:[function(e,t,n){"use strict";function r(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=r},{}],164:[function(e,t,n){"use strict";function r(e){return a?void 0:i(!1),d.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=e(154),i=e(168),a=o.canUseDOM?document.createElement("div"):null,s={},u=[1,'<select multiple="true">',"</select>"],l=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,s[e]=!0}),t.exports=r},{154:154,168:168}],165:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],166:[function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],167:[function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=e(166),i=/^ms-/;t.exports=r},{166:166}],168:[function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}t.exports=r},{}],169:[function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],170:[function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=e(169);t.exports=r},{169:169}],171:[function(e,t,n){"use strict";var r=e(168),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{168:168}],172:[function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],173:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],174:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;t.exports=o},{}],175:[function(e,t,n){"use strict";var r=e(160),o=r;t.exports=o},{160:160}],176:[function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=o()?Object.assign:function(e,t){for(var n,o,s=r(e),u=1;u<arguments.length;u++){n=Object(arguments[u]);for(var l in n)i.call(n,l)&&(s[l]=n[l]);if(Object.getOwnPropertySymbols){o=Object.getOwnPropertySymbols(n);for(var c=0;c<o.length;c++)a.call(n,o[c])&&(s[o[c]]=n[o[c]])}}return s}},{}]},{},[100])(100)});
diff --git a/devtools/client/inspector/markup/test/react_external_listeners.js b/devtools/client/inspector/markup/test/react_external_listeners.js
new file mode 100644
index 0000000000..6768c902e0
--- /dev/null
+++ b/devtools/client/inspector/markup/test/react_external_listeners.js
@@ -0,0 +1,10 @@
+"use strict";
+
+/* exported externalFunction, externalCapturingFunction */
+function externalFunction() {
+ alert("externalFunction");
+}
+
+function externalCapturingFunction() {
+ alert("externalCapturingFunction");
+}
diff --git a/devtools/client/inspector/markup/test/shadowdom_open_debugger.min.js b/devtools/client/inspector/markup/test/shadowdom_open_debugger.min.js
new file mode 100644
index 0000000000..6796d44f07
--- /dev/null
+++ b/devtools/client/inspector/markup/test/shadowdom_open_debugger.min.js
@@ -0,0 +1 @@
+"use strict";customElements.define("test-component",class extends HTMLElement{constructor(){super();let shadowRoot=this.attachShadow({mode:"open"});shadowRoot.innerHTML="<slot>some default content</slot>"}connectedCallback(){}disconnectedCallback(){}});
diff --git a/devtools/client/inspector/markup/utils.js b/devtools/client/inspector/markup/utils.js
new file mode 100644
index 0000000000..06609676a5
--- /dev/null
+++ b/devtools/client/inspector/markup/utils.js
@@ -0,0 +1,136 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+/**
+ * Apply a 'flashed' background and foreground color to elements. Intended
+ * to be used with flashElementOff as a way of drawing attention to an element.
+ *
+ * @param {Node} backgroundElt
+ * The element to set the highlighted background color on.
+ * @param {Object} options
+ * @param {Node} options.foregroundElt
+ * The element to set the matching foreground color on. This will equal
+ * backgroundElt if not set.
+ * @param {String} options.backgroundClass
+ * The background highlight color class to set on the element.
+ */
+function flashElementOn(
+ backgroundElt,
+ { foregroundElt = backgroundElt, backgroundClass = "theme-bg-contrast" } = {}
+) {
+ if (!backgroundElt || !foregroundElt) {
+ return;
+ }
+
+ // Make sure the animation class is not here
+ backgroundElt.classList.remove("flash-out");
+
+ // Change the background
+ backgroundElt.classList.add(backgroundClass);
+
+ foregroundElt.classList.add("theme-fg-contrast");
+ [].forEach.call(
+ foregroundElt.querySelectorAll("[class*=theme-fg-color]"),
+ span => span.classList.add("theme-fg-contrast")
+ );
+}
+
+/**
+ * Remove a 'flashed' background and foreground color to elements.
+ * See flashElementOn.
+ *
+ * @param {Node} backgroundElt
+ * The element to remove the highlighted background color on.
+ * @param {Object} options
+ * @param {Node} options.foregroundElt
+ * The element to remove the matching foreground color on. This will equal
+ * backgroundElt if not set.
+ * @param {String} options.backgroundClass
+ * The background highlight color class to remove on the element.
+ */
+function flashElementOff(
+ backgroundElt,
+ { foregroundElt = backgroundElt, backgroundClass = "theme-bg-contrast" } = {}
+) {
+ if (!backgroundElt || !foregroundElt) {
+ return;
+ }
+
+ // Add the animation class to smoothly remove the background
+ backgroundElt.classList.add("flash-out");
+
+ // Remove the background
+ backgroundElt.classList.remove(backgroundClass);
+
+ foregroundElt.classList.remove("theme-fg-contrast");
+ // Make sure the foreground animation class is removed
+ foregroundElt.classList.remove("flash-out");
+ [].forEach.call(
+ foregroundElt.querySelectorAll("[class*=theme-fg-color]"),
+ span => span.classList.remove("theme-fg-contrast")
+ );
+}
+
+/**
+ * Retrieve the available width between a provided element left edge and a container right
+ * edge. This used can be used as a max-width for inplace-editor (autocomplete) widgets
+ * replacing Editor elements of the the markup-view;
+ */
+function getAutocompleteMaxWidth(element, container) {
+ const elementRect = element.getBoundingClientRect();
+ const containerRect = container.getBoundingClientRect();
+ return containerRect.right - elementRect.left - 2;
+}
+
+/**
+ * Parse attribute names and values from a string.
+ *
+ * @param {String} attr
+ * The input string for which names/values are to be parsed.
+ * @param {HTMLDocument} doc
+ * A document that can be used to test valid attributes.
+ * @return {Array}
+ * An array of attribute names and their values.
+ */
+function parseAttributeValues(attr, doc) {
+ attr = attr.trim();
+
+ const parseAndGetNode = str => {
+ return new DOMParser().parseFromString(str, "text/html").body.childNodes[0];
+ };
+
+ // Handle bad user inputs by appending a " or ' if it fails to parse without
+ // them. Also note that a SVG tag is used to make sure the HTML parser
+ // preserves mixed-case attributes
+ const el =
+ parseAndGetNode("<svg " + attr + "></svg>") ||
+ parseAndGetNode("<svg " + attr + '"></svg>') ||
+ parseAndGetNode("<svg " + attr + "'></svg>");
+
+ const div = doc.createElement("div");
+ const attributes = [];
+ for (const { name, value } of el.attributes) {
+ // Try to set on an element in the document, throws exception on bad input.
+ // Prevents InvalidCharacterError - "String contains an invalid character".
+ try {
+ div.setAttribute(name, value);
+ attributes.push({ name, value });
+ } catch (e) {
+ // This may throw exceptions on bad input.
+ // Prevents InvalidCharacterError - "String contains an invalid
+ // character".
+ }
+ }
+
+ return attributes;
+}
+
+module.exports = {
+ flashElementOn,
+ flashElementOff,
+ getAutocompleteMaxWidth,
+ parseAttributeValues,
+};
diff --git a/devtools/client/inspector/markup/utils/l10n.js b/devtools/client/inspector/markup/utils/l10n.js
new file mode 100644
index 0000000000..649eb19f97
--- /dev/null
+++ b/devtools/client/inspector/markup/utils/l10n.js
@@ -0,0 +1,15 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
+const L10N = new LocalizationHelper(
+ "devtools/client/locales/inspector.properties"
+);
+
+module.exports = {
+ getStr: (...args) => L10N.getStr(...args),
+ getFormatStr: (...args) => L10N.getFormatStr(...args),
+};
diff --git a/devtools/client/inspector/markup/utils/moz.build b/devtools/client/inspector/markup/utils/moz.build
new file mode 100644
index 0000000000..ddee85b5f7
--- /dev/null
+++ b/devtools/client/inspector/markup/utils/moz.build
@@ -0,0 +1,9 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DevToolsModules(
+ "l10n.js",
+)
diff --git a/devtools/client/inspector/markup/views/element-container.js b/devtools/client/inspector/markup/views/element-container.js
new file mode 100644
index 0000000000..7aee2bd990
--- /dev/null
+++ b/devtools/client/inspector/markup/views/element-container.js
@@ -0,0 +1,257 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const MarkupContainer = require("resource://devtools/client/inspector/markup/views/markup-container.js");
+const ElementEditor = require("resource://devtools/client/inspector/markup/views/element-editor.js");
+const {
+ ELEMENT_NODE,
+} = require("resource://devtools/shared/dom-node-constants.js");
+const { extend } = require("resource://devtools/shared/extend.js");
+
+loader.lazyRequireGetter(
+ this,
+ "EventTooltip",
+ "resource://devtools/client/shared/widgets/tooltip/EventTooltipHelper.js",
+ true
+);
+loader.lazyRequireGetter(
+ this,
+ ["setImageTooltip", "setBrokenImageTooltip"],
+ "resource://devtools/client/shared/widgets/tooltip/ImageTooltipHelper.js",
+ true
+);
+loader.lazyRequireGetter(
+ this,
+ "clipboardHelper",
+ "resource://devtools/shared/platform/clipboard.js"
+);
+
+const PREVIEW_MAX_DIM_PREF = "devtools.inspector.imagePreviewTooltipSize";
+
+/**
+ * An implementation of MarkupContainer for Elements that can contain
+ * child nodes.
+ * Allows editing of tag name, attributes, expanding / collapsing.
+ *
+ * @param {MarkupView} markupView
+ * The markup view that owns this container.
+ * @param {NodeFront} node
+ * The node to display.
+ */
+function MarkupElementContainer(markupView, node) {
+ MarkupContainer.prototype.initialize.call(
+ this,
+ markupView,
+ node,
+ "elementcontainer"
+ );
+
+ if (node.nodeType === ELEMENT_NODE) {
+ this.editor = new ElementEditor(this, node);
+ } else {
+ throw new Error("Invalid node for MarkupElementContainer");
+ }
+
+ this.tagLine.appendChild(this.editor.elt);
+}
+
+MarkupElementContainer.prototype = extend(MarkupContainer.prototype, {
+ onContainerClick(event) {
+ if (!event.target.hasAttribute("data-event")) {
+ return;
+ }
+
+ this._buildEventTooltipContent(event.target);
+ },
+
+ async _buildEventTooltipContent(target) {
+ const tooltip = this.markup.eventDetailsTooltip;
+ await tooltip.hide();
+
+ const listenerInfo = await this.node.getEventListenerInfo();
+
+ const toolbox = this.markup.toolbox;
+
+ // Create the EventTooltip which will populate the tooltip content.
+ const eventTooltip = new EventTooltip(
+ tooltip,
+ listenerInfo,
+ toolbox,
+ this.node
+ );
+
+ // Add specific styling to the "event" badge when at least one event is disabled.
+ // The eventTooltip will take care of clearing the event listener when it's destroyed.
+ eventTooltip.on(
+ "event-tooltip-listener-toggled",
+ ({ hasDisabledEventListeners }) => {
+ const className = "has-disabled-events";
+ if (hasDisabledEventListeners) {
+ this.editor._eventBadge.classList.add(className);
+ } else {
+ this.editor._eventBadge.classList.remove(className);
+ }
+ }
+ );
+
+ // Disable the image preview tooltip while we display the event details
+ this.markup._disableImagePreviewTooltip();
+ tooltip.once("hidden", () => {
+ eventTooltip.destroy();
+
+ // Enable the image preview tooltip after closing the event details
+ this.markup._enableImagePreviewTooltip();
+
+ // Allow clicks on the event badge to display the event popup again
+ // (but allow the currently queued click event to run first).
+ this.markup.win.setTimeout(() => {
+ if (this.editor._eventBadge) {
+ this.editor._eventBadge.style.pointerEvents = "auto";
+ }
+ }, 0);
+ });
+
+ // Prevent clicks on the event badge to display the event popup again.
+ if (this.editor._eventBadge) {
+ this.editor._eventBadge.style.pointerEvents = "none";
+ }
+ tooltip.show(target);
+ },
+
+ /**
+ * Generates the an image preview for this Element. The element must be an
+ * image or canvas (@see isPreviewable).
+ *
+ * @return {Promise} that is resolved with an object of form
+ * { data, size: { naturalWidth, naturalHeight, resizeRatio } } where
+ * - data is the data-uri for the image preview.
+ * - size contains information about the original image size and if
+ * the preview has been resized.
+ *
+ * If this element is not previewable or the preview cannot be generated for
+ * some reason, the Promise is rejected.
+ */
+ _getPreview() {
+ if (!this.isPreviewable()) {
+ return Promise.reject("_getPreview called on a non-previewable element.");
+ }
+
+ if (this.tooltipDataPromise) {
+ // A preview request is already pending. Re-use that request.
+ return this.tooltipDataPromise;
+ }
+
+ // Fetch the preview from the server.
+ this.tooltipDataPromise = async function () {
+ const maxDim = Services.prefs.getIntPref(PREVIEW_MAX_DIM_PREF);
+ const preview = await this.node.getImageData(maxDim);
+ const data = await preview.data.string();
+
+ // Clear the pending preview request. We can't reuse the results later as
+ // the preview contents might have changed.
+ this.tooltipDataPromise = null;
+ return { data, size: preview.size };
+ }.bind(this)();
+
+ return this.tooltipDataPromise;
+ },
+
+ /**
+ * Executed by MarkupView._isImagePreviewTarget which is itself called when
+ * the mouse hovers over a target in the markup-view.
+ * Checks if the target is indeed something we want to have an image tooltip
+ * preview over and, if so, inserts content into the tooltip.
+ *
+ * @return {Promise} that resolves when the tooltip content is ready. Resolves
+ * true if the tooltip should be displayed, false otherwise.
+ */
+ async isImagePreviewTarget(target, tooltip) {
+ // Is this Element previewable.
+ if (!this.isPreviewable()) {
+ return false;
+ }
+
+ // If the Element has an src attribute, the tooltip is shown when hovering
+ // over the src url. If not, the tooltip is shown when hovering over the tag
+ // name.
+ const src = this.editor.getAttributeElement("src");
+ const expectedTarget = src ? src.querySelector(".link") : this.editor.tag;
+ if (target !== expectedTarget) {
+ return false;
+ }
+
+ try {
+ const { data, size } = await this._getPreview();
+ // The preview is ready.
+ const options = {
+ naturalWidth: size.naturalWidth,
+ naturalHeight: size.naturalHeight,
+ maxDim: Services.prefs.getIntPref(PREVIEW_MAX_DIM_PREF),
+ };
+
+ setImageTooltip(tooltip, this.markup.doc, data, options);
+ } catch (e) {
+ // Indicate the failure but show the tooltip anyway.
+ setBrokenImageTooltip(tooltip, this.markup.doc);
+ }
+ return true;
+ },
+
+ copyImageDataUri() {
+ // We need to send again a request to gettooltipData even if one was sent
+ // for the tooltip, because we want the full-size image
+ this.node.getImageData().then(data => {
+ data.data.string().then(str => {
+ clipboardHelper.copyString(str);
+ });
+ });
+ },
+
+ setInlineTextChild(inlineTextChild) {
+ this.inlineTextChild = inlineTextChild;
+ this.editor.updateTextEditor();
+ },
+
+ clearInlineTextChild() {
+ this.inlineTextChild = undefined;
+ this.editor.updateTextEditor();
+ },
+
+ /**
+ * Trigger new attribute field for input.
+ */
+ addAttribute() {
+ this.editor.newAttr.editMode();
+ },
+
+ /**
+ * Trigger attribute field for editing.
+ */
+ editAttribute(attrName) {
+ this.editor.attrElements.get(attrName).editMode();
+ },
+
+ /**
+ * Remove attribute from container.
+ * This is an undoable action.
+ */
+ removeAttribute(attrName) {
+ const doMods = this.editor._startModifyingAttributes();
+ const undoMods = this.editor._startModifyingAttributes();
+ this.editor._saveAttribute(attrName, undoMods);
+ doMods.removeAttribute(attrName);
+ this.undo.do(
+ () => {
+ doMods.apply();
+ },
+ () => {
+ undoMods.apply();
+ }
+ );
+ },
+});
+
+module.exports = MarkupElementContainer;
diff --git a/devtools/client/inspector/markup/views/element-editor.js b/devtools/client/inspector/markup/views/element-editor.js
new file mode 100644
index 0000000000..f5a97b3b84
--- /dev/null
+++ b/devtools/client/inspector/markup/views/element-editor.js
@@ -0,0 +1,1149 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const TextEditor = require("resource://devtools/client/inspector/markup/views/text-editor.js");
+const {
+ truncateString,
+} = require("resource://devtools/shared/inspector/utils.js");
+const {
+ editableField,
+ InplaceEditor,
+} = require("resource://devtools/client/shared/inplace-editor.js");
+const {
+ parseAttribute,
+} = require("resource://devtools/client/shared/node-attribute-parser.js");
+
+loader.lazyRequireGetter(
+ this,
+ [
+ "flashElementOn",
+ "flashElementOff",
+ "getAutocompleteMaxWidth",
+ "parseAttributeValues",
+ ],
+ "resource://devtools/client/inspector/markup/utils.js",
+ true
+);
+
+const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
+const INSPECTOR_L10N = new LocalizationHelper(
+ "devtools/client/locales/inspector.properties"
+);
+
+// Page size for pageup/pagedown
+const COLLAPSE_DATA_URL_REGEX = /^data.+base64/;
+const COLLAPSE_DATA_URL_LENGTH = 60;
+
+// Contains only void (without end tag) HTML elements
+const HTML_VOID_ELEMENTS = [
+ "area",
+ "base",
+ "br",
+ "col",
+ "command",
+ "embed",
+ "hr",
+ "img",
+ "input",
+ "keygen",
+ "link",
+ "meta",
+ "param",
+ "source",
+ "track",
+ "wbr",
+];
+
+// Contains only valid computed display property types of the node to display in the
+// element markup and their respective title tooltip text.
+const DISPLAY_TYPES = {
+ flex: INSPECTOR_L10N.getStr("markupView.display.flex.tooltiptext2"),
+ "inline-flex": INSPECTOR_L10N.getStr(
+ "markupView.display.inlineFlex.tooltiptext2"
+ ),
+ grid: INSPECTOR_L10N.getStr("markupView.display.grid.tooltiptext2"),
+ "inline-grid": INSPECTOR_L10N.getStr(
+ "markupView.display.inlineGrid.tooltiptext2"
+ ),
+ subgrid: INSPECTOR_L10N.getStr("markupView.display.subgrid.tooltiptiptext"),
+ "flow-root": INSPECTOR_L10N.getStr("markupView.display.flowRoot.tooltiptext"),
+ contents: INSPECTOR_L10N.getStr("markupView.display.contents.tooltiptext2"),
+};
+
+/**
+ * Creates an editor for an Element node.
+ *
+ * @param {MarkupContainer} container
+ * The container owning this editor.
+ * @param {NodeFront} node
+ * The NodeFront being edited.
+ */
+function ElementEditor(container, node) {
+ this.container = container;
+ this.node = node;
+ this.markup = this.container.markup;
+ this.doc = this.markup.doc;
+ this.inspector = this.markup.inspector;
+ this.highlighters = this.markup.highlighters;
+ this._cssProperties = this.inspector.cssProperties;
+
+ this.isOverflowDebuggingEnabled = Services.prefs.getBoolPref(
+ "devtools.overflow.debugging.enabled"
+ );
+
+ // If this is a scrollable element, this specifies whether or not its overflow causing
+ // elements are highlighted. Otherwise, it is null if the element is not scrollable.
+ this.highlightingOverflowCausingElements = this.node.isScrollable
+ ? false
+ : null;
+
+ this.attrElements = new Map();
+ this.animationTimers = {};
+
+ this.elt = null;
+ this.tag = null;
+ this.closeTag = null;
+ this.attrList = null;
+ this.newAttr = null;
+ this.closeElt = null;
+
+ this.onCustomBadgeClick = this.onCustomBadgeClick.bind(this);
+ this.onDisplayBadgeClick = this.onDisplayBadgeClick.bind(this);
+ this.onScrollableBadgeClick = this.onScrollableBadgeClick.bind(this);
+ this.onExpandBadgeClick = this.onExpandBadgeClick.bind(this);
+ this.onTagEdit = this.onTagEdit.bind(this);
+
+ this.buildMarkup();
+
+ const isVoidElement = HTML_VOID_ELEMENTS.includes(this.node.displayName);
+ if (node.isInHTMLDocument && isVoidElement) {
+ this.elt.classList.add("void-element");
+ }
+
+ this.update();
+ this.initialized = true;
+}
+
+ElementEditor.prototype = {
+ buildMarkup() {
+ this.elt = this.doc.createElement("span");
+ this.elt.classList.add("editor");
+
+ this.renderOpenTag();
+ this.renderEventBadge();
+ this.renderCloseTag();
+
+ // Make the tag name editable (unless this is a remote node or
+ // a document element)
+ if (!this.node.isDocumentElement) {
+ // Make the tag optionally tabbable but not by default.
+ this.tag.setAttribute("tabindex", "-1");
+ editableField({
+ element: this.tag,
+ multiline: true,
+ maxWidth: () => getAutocompleteMaxWidth(this.tag, this.container.elt),
+ trigger: "dblclick",
+ stopOnReturn: true,
+ done: this.onTagEdit,
+ cssProperties: this._cssProperties,
+ });
+ }
+ },
+
+ renderOpenTag() {
+ const open = this.doc.createElement("span");
+ open.classList.add("open");
+ open.appendChild(this.doc.createTextNode("<"));
+ this.elt.appendChild(open);
+
+ this.tag = this.doc.createElement("span");
+ this.tag.classList.add("tag", "theme-fg-color3");
+ this.tag.setAttribute("tabindex", "-1");
+ this.tag.textContent = this.node.displayName;
+ open.appendChild(this.tag);
+
+ this.renderAttributes(open);
+ this.renderNewAttributeEditor(open);
+
+ const closingBracket = this.doc.createElement("span");
+ closingBracket.classList.add("closing-bracket");
+ closingBracket.textContent = ">";
+ open.appendChild(closingBracket);
+ },
+
+ renderAttributes(containerEl) {
+ this.attrList = this.doc.createElement("span");
+ containerEl.appendChild(this.attrList);
+ },
+
+ renderNewAttributeEditor(containerEl) {
+ this.newAttr = this.doc.createElement("span");
+ this.newAttr.classList.add("newattr");
+ this.newAttr.setAttribute("tabindex", "-1");
+ this.newAttr.setAttribute(
+ "aria-label",
+ INSPECTOR_L10N.getStr("markupView.newAttribute.label")
+ );
+ containerEl.appendChild(this.newAttr);
+
+ // Make the new attribute space editable.
+ this.newAttr.editMode = editableField({
+ element: this.newAttr,
+ multiline: true,
+ maxWidth: () => getAutocompleteMaxWidth(this.newAttr, this.container.elt),
+ trigger: "dblclick",
+ stopOnReturn: true,
+ contentType: InplaceEditor.CONTENT_TYPES.CSS_MIXED,
+ popup: this.markup.popup,
+ done: (val, commit) => {
+ if (!commit) {
+ return;
+ }
+
+ const doMods = this._startModifyingAttributes();
+ const undoMods = this._startModifyingAttributes();
+ this._applyAttributes(val, null, doMods, undoMods);
+ this.container.undo.do(
+ () => {
+ doMods.apply();
+ },
+ function () {
+ undoMods.apply();
+ }
+ );
+ },
+ cssProperties: this._cssProperties,
+ });
+ },
+
+ renderEventBadge() {
+ this.expandBadge = this.doc.createElement("span");
+ this.expandBadge.classList.add("markup-expand-badge");
+ this.expandBadge.addEventListener("click", this.onExpandBadgeClick);
+ this.elt.appendChild(this.expandBadge);
+ },
+
+ renderCloseTag() {
+ const close = this.doc.createElement("span");
+ close.classList.add("close");
+ close.appendChild(this.doc.createTextNode("</"));
+ this.elt.appendChild(close);
+
+ this.closeTag = this.doc.createElement("span");
+ this.closeTag.classList.add("tag", "theme-fg-color3");
+ this.closeTag.textContent = this.node.displayName;
+ close.appendChild(this.closeTag);
+
+ close.appendChild(this.doc.createTextNode(">"));
+ },
+
+ get displayBadge() {
+ return this._displayBadge;
+ },
+
+ set selected(value) {
+ if (this.textEditor) {
+ this.textEditor.selected = value;
+ }
+ },
+
+ flashAttribute(attrName) {
+ if (this.animationTimers[attrName]) {
+ clearTimeout(this.animationTimers[attrName]);
+ }
+
+ flashElementOn(this.getAttributeElement(attrName), {
+ backgroundClass: "theme-bg-contrast",
+ });
+
+ this.animationTimers[attrName] = setTimeout(() => {
+ flashElementOff(this.getAttributeElement(attrName), {
+ backgroundClass: "theme-bg-contrast",
+ });
+ }, this.markup.CONTAINER_FLASHING_DURATION);
+ },
+
+ /**
+ * Returns information about node in the editor.
+ *
+ * @param {DOMNode} node
+ * The node to get information from.
+ * @return {Object} An object literal with the following information:
+ * {type: "attribute", name: "rel", value: "index", el: node}
+ */
+ getInfoAtNode(node) {
+ if (!node) {
+ return null;
+ }
+
+ let type = null;
+ let name = null;
+ let value = null;
+
+ // Attribute
+ const attribute = node.closest(".attreditor");
+ if (attribute) {
+ type = "attribute";
+ name = attribute.dataset.attr;
+ value = attribute.dataset.value;
+ }
+
+ return { type, name, value, el: node };
+ },
+
+ /**
+ * Update the state of the editor from the node.
+ */
+ update() {
+ const nodeAttributes = this.node.attributes || [];
+
+ // Keep the data model in sync with attributes on the node.
+ const currentAttributes = new Set(nodeAttributes.map(a => a.name));
+ for (const name of this.attrElements.keys()) {
+ if (!currentAttributes.has(name)) {
+ this.removeAttribute(name);
+ }
+ }
+
+ // Only loop through the current attributes on the node. Missing
+ // attributes have already been removed at this point.
+ for (const attr of nodeAttributes) {
+ const el = this.attrElements.get(attr.name);
+ const valueChanged = el && el.dataset.value !== attr.value;
+ const isEditing = el && el.querySelector(".editable").inplaceEditor;
+ const canSimplyShowEditor = el && (!valueChanged || isEditing);
+
+ if (canSimplyShowEditor) {
+ // Element already exists and doesn't need to be recreated.
+ // Just show it (it's hidden by default).
+ el.style.removeProperty("display");
+ } else {
+ // Create a new editor, because the value of an existing attribute
+ // has changed.
+ const attribute = this._createAttribute(attr, el);
+ attribute.style.removeProperty("display");
+
+ // Temporarily flash the attribute to highlight the change.
+ // But not if this is the first time the editor instance has
+ // been created.
+ if (this.initialized) {
+ this.flashAttribute(attr.name);
+ }
+ }
+ }
+
+ this.updateEventBadge();
+ this.updateDisplayBadge();
+ this.updateCustomBadge();
+ this.updateScrollableBadge();
+ this.updateTextEditor();
+ this.updateUnavailableChildren();
+ this.updateOverflowBadge();
+ this.updateOverflowHighlight();
+ },
+
+ updateEventBadge() {
+ const showEventBadge = this.node.hasEventListeners;
+ if (this._eventBadge && !showEventBadge) {
+ this._eventBadge.remove();
+ this._eventBadge = null;
+ } else if (showEventBadge && !this._eventBadge) {
+ this._createEventBadge();
+ }
+ },
+
+ _createEventBadge() {
+ this._eventBadge = this.doc.createElement("div");
+ this._eventBadge.className = "inspector-badge interactive";
+ this._eventBadge.dataset.event = "true";
+ this._eventBadge.textContent = "event";
+ this._eventBadge.title = INSPECTOR_L10N.getStr(
+ "markupView.event.tooltiptext"
+ );
+ // Badges order is [event][display][custom], insert event badge before others.
+ this.elt.insertBefore(
+ this._eventBadge,
+ this._displayBadge || this._customBadge
+ );
+ this.markup.emit("badge-added-event");
+ },
+
+ updateScrollableBadge() {
+ if (this.node.isScrollable && !this._scrollableBadge) {
+ this._createScrollableBadge();
+ } else if (this._scrollableBadge && !this.node.isScrollable) {
+ this._scrollableBadge.remove();
+ this._scrollableBadge = null;
+ }
+ },
+
+ _createScrollableBadge() {
+ const isInteractive =
+ this.isOverflowDebuggingEnabled &&
+ // Document elements cannot have interative scrollable badges since retrieval of their
+ // overflow causing elements is not supported.
+ !this.node.isDocumentElement;
+
+ this._scrollableBadge = this.doc.createElement("div");
+ this._scrollableBadge.className = `inspector-badge scrollable-badge ${
+ isInteractive ? "interactive" : ""
+ }`;
+ this._scrollableBadge.dataset.scrollable = "true";
+ this._scrollableBadge.textContent = INSPECTOR_L10N.getStr(
+ "markupView.scrollableBadge.label"
+ );
+ this._scrollableBadge.title = INSPECTOR_L10N.getStr(
+ isInteractive
+ ? "markupView.scrollableBadge.interactive.tooltip"
+ : "markupView.scrollableBadge.tooltip"
+ );
+
+ if (isInteractive) {
+ this._scrollableBadge.addEventListener(
+ "click",
+ this.onScrollableBadgeClick
+ );
+ }
+ this.elt.insertBefore(this._scrollableBadge, this._customBadge);
+ },
+
+ /**
+ * Update the markup display badge.
+ */
+ updateDisplayBadge() {
+ const displayType = this.node.displayType;
+ const showDisplayBadge = displayType in DISPLAY_TYPES;
+
+ if (this._displayBadge && !showDisplayBadge) {
+ this._displayBadge.remove();
+ this._displayBadge = null;
+ } else if (showDisplayBadge) {
+ if (!this._displayBadge) {
+ this._createDisplayBadge();
+ }
+
+ this._updateDisplayBadgeContent();
+ }
+ },
+
+ _createDisplayBadge() {
+ this._displayBadge = this.doc.createElement("div");
+ this._displayBadge.className = "inspector-badge";
+ this._displayBadge.addEventListener("click", this.onDisplayBadgeClick);
+ // Badges order is [event][display][custom], insert display badge before custom.
+ this.elt.insertBefore(this._displayBadge, this._customBadge);
+ },
+
+ _updateDisplayBadgeContent() {
+ const displayType = this.node.displayType;
+ this._displayBadge.textContent = displayType;
+ this._displayBadge.dataset.display = displayType;
+ this._displayBadge.title = DISPLAY_TYPES[displayType];
+
+ const isFlex = displayType === "flex" || displayType === "inline-flex";
+ const isGrid =
+ displayType === "grid" ||
+ displayType === "inline-grid" ||
+ displayType === "subgrid";
+
+ const isInteractive =
+ isFlex ||
+ (isGrid && this.highlighters.canGridHighlighterToggle(this.node));
+
+ this._displayBadge.classList.toggle("interactive", isInteractive);
+ },
+
+ updateOverflowBadge() {
+ if (!this.isOverflowDebuggingEnabled) {
+ return;
+ }
+
+ if (this.node.causesOverflow && !this._overflowBadge) {
+ this._createOverflowBadge();
+ } else if (!this.node.causesOverflow && this._overflowBadge) {
+ this._overflowBadge.remove();
+ this._overflowBadge = null;
+ }
+ },
+
+ _createOverflowBadge() {
+ this._overflowBadge = this.doc.createElement("div");
+ this._overflowBadge.className = "inspector-badge overflow-badge";
+ this._overflowBadge.textContent = INSPECTOR_L10N.getStr(
+ "markupView.overflowBadge.label"
+ );
+ this._overflowBadge.title = INSPECTOR_L10N.getStr(
+ "markupView.overflowBadge.tooltip"
+ );
+ this.elt.insertBefore(this._overflowBadge, this._customBadge);
+ },
+
+ /**
+ * Update the markup custom element badge.
+ */
+ updateCustomBadge() {
+ const showCustomBadge = !!this.node.customElementLocation;
+ if (this._customBadge && !showCustomBadge) {
+ this._customBadge.remove();
+ this._customBadge = null;
+ } else if (!this._customBadge && showCustomBadge) {
+ this._createCustomBadge();
+ }
+ },
+
+ _createCustomBadge() {
+ this._customBadge = this.doc.createElement("div");
+ this._customBadge.className = "inspector-badge interactive";
+ this._customBadge.dataset.custom = "true";
+ this._customBadge.textContent = "custom…";
+ this._customBadge.title = INSPECTOR_L10N.getStr(
+ "markupView.custom.tooltiptext"
+ );
+ this._customBadge.addEventListener("click", this.onCustomBadgeClick);
+ // Badges order is [event][display][custom], insert custom badge at the end.
+ this.elt.appendChild(this._customBadge);
+ },
+
+ /**
+ * If node causes overflow, toggle its overflow highlight if its scrollable ancestor's
+ * scrollable badge is active/inactive.
+ */
+ async updateOverflowHighlight() {
+ if (!this.isOverflowDebuggingEnabled) {
+ return;
+ }
+
+ let showOverflowHighlight = false;
+
+ if (this.node.causesOverflow) {
+ try {
+ const scrollableAncestor =
+ await this.node.walkerFront.getScrollableAncestorNode(this.node);
+ const markupContainer = scrollableAncestor
+ ? this.markup.getContainer(scrollableAncestor)
+ : null;
+
+ showOverflowHighlight =
+ !!markupContainer?.editor.highlightingOverflowCausingElements;
+ } catch (e) {
+ // This call might fail if called asynchrously after the toolbox is finished
+ // closing.
+ return;
+ }
+ }
+
+ this.setOverflowHighlight(showOverflowHighlight);
+ },
+
+ /**
+ * Show overflow highlight if showOverflowHighlight is true, otherwise hide it.
+ *
+ * @param {Boolean} showOverflowHighlight
+ */
+ setOverflowHighlight(showOverflowHighlight) {
+ this.container.tagState.classList.toggle(
+ "overflow-causing-highlighted",
+ showOverflowHighlight
+ );
+ },
+
+ /**
+ * Update the inline text editor in case of a single text child node.
+ */
+ updateTextEditor() {
+ const node = this.node.inlineTextChild;
+
+ if (this.textEditor && this.textEditor.node != node) {
+ this.elt.removeChild(this.textEditor.elt);
+ this.textEditor.destroy();
+ this.textEditor = null;
+ }
+
+ if (node && !this.textEditor) {
+ // Create a text editor added to this editor.
+ // This editor won't receive an update automatically, so we rely on
+ // child text editors to let us know that we need updating.
+ this.textEditor = new TextEditor(this.container, node, "text");
+ this.elt.insertBefore(
+ this.textEditor.elt,
+ this.elt.querySelector(".close")
+ );
+ }
+
+ if (this.textEditor) {
+ this.textEditor.update();
+ }
+ },
+
+ hasUnavailableChildren() {
+ return !!this.childrenUnavailableElt;
+ },
+
+ /**
+ * Update a special badge displayed for nodes which have children that can't
+ * be inspected by the current session (eg a parent-process only toolbox
+ * inspecting a content browser).
+ */
+ updateUnavailableChildren() {
+ const childrenUnavailable = this.node.childrenUnavailable;
+
+ if (this.childrenUnavailableElt) {
+ this.elt.removeChild(this.childrenUnavailableElt);
+ this.childrenUnavailableElt = null;
+ }
+
+ if (childrenUnavailable) {
+ this.childrenUnavailableElt = this.doc.createElement("div");
+ this.childrenUnavailableElt.className = "unavailable-children";
+ this.childrenUnavailableElt.dataset.label = INSPECTOR_L10N.getStr(
+ "markupView.unavailableChildren.label"
+ );
+ this.childrenUnavailableElt.title = INSPECTOR_L10N.getStr(
+ "markupView.unavailableChildren.title"
+ );
+ this.elt.insertBefore(
+ this.childrenUnavailableElt,
+ this.elt.querySelector(".close")
+ );
+ }
+ },
+
+ _startModifyingAttributes() {
+ return this.node.startModifyingAttributes();
+ },
+
+ /**
+ * Get the element used for one of the attributes of this element.
+ *
+ * @param {String} attrName
+ * The name of the attribute to get the element for
+ * @return {DOMNode}
+ */
+ getAttributeElement(attrName) {
+ return this.attrList.querySelector(
+ ".attreditor[data-attr=" + CSS.escape(attrName) + "] .attr-value"
+ );
+ },
+
+ /**
+ * Remove an attribute from the attrElements object and the DOM.
+ *
+ * @param {String} attrName
+ * The name of the attribute to remove
+ */
+ removeAttribute(attrName) {
+ const attr = this.attrElements.get(attrName);
+ if (attr) {
+ this.attrElements.delete(attrName);
+ attr.remove();
+ }
+ },
+
+ /**
+ * Creates and returns the DOM for displaying an attribute with the following DOM
+ * structure:
+ *
+ * dom.span(
+ * {
+ * className: "attreditor",
+ * "data-attr": attribute.name,
+ * "data-value": attribute.value,
+ * },
+ * " ",
+ * dom.span(
+ * { className: "editable", tabIndex: 0 },
+ * dom.span({ className: "attr-name theme-fg-color1" }, attribute.name),
+ * '="',
+ * dom.span({ className: "attr-value theme-fg-color2" }, attribute.value),
+ * '"'
+ * )
+ */
+ _createAttribute(attribute, before = null) {
+ const attr = this.doc.createElement("span");
+ attr.dataset.attr = attribute.name;
+ attr.dataset.value = attribute.value;
+ attr.classList.add("attreditor");
+ attr.style.display = "none";
+
+ attr.appendChild(this.doc.createTextNode(" "));
+
+ const inner = this.doc.createElement("span");
+ inner.classList.add("editable");
+ inner.setAttribute("tabindex", this.container.canFocus ? "0" : "-1");
+ attr.appendChild(inner);
+
+ const name = this.doc.createElement("span");
+ name.classList.add("attr-name");
+ name.classList.add("theme-fg-color1");
+ name.textContent = attribute.name;
+ inner.appendChild(name);
+
+ inner.appendChild(this.doc.createTextNode('="'));
+
+ const val = this.doc.createElement("span");
+ val.classList.add("attr-value");
+ val.classList.add("theme-fg-color2");
+ inner.appendChild(val);
+
+ inner.appendChild(this.doc.createTextNode('"'));
+
+ this._setupAttributeEditor(attribute, attr, inner, name, val);
+
+ // Figure out where we should place the attribute.
+ if (attribute.name == "id") {
+ before = this.attrList.firstChild;
+ } else if (attribute.name == "class") {
+ const idNode = this.attrElements.get("id");
+ before = idNode ? idNode.nextSibling : this.attrList.firstChild;
+ }
+ this.attrList.insertBefore(attr, before);
+
+ this.removeAttribute(attribute.name);
+ this.attrElements.set(attribute.name, attr);
+
+ this._appendAttributeValue(attribute, val);
+
+ return attr;
+ },
+
+ /**
+ * Setup the editable field for the given attribute.
+ *
+ * @param {Object} attribute
+ * An object containing the name and value of a DOM attribute.
+ * @param {Element} attrEditorEl
+ * The attribute container <span class="attreditor"> element.
+ * @param {Element} editableEl
+ * The editable <span class="editable"> element that is setup to be
+ * an editable field.
+ * @param {Element} attrNameEl
+ * The attribute name <span class="attr-name"> element.
+ * @param {Element} attrValueEl
+ * The attribute value <span class="attr-value"> element.
+ */
+ _setupAttributeEditor(
+ attribute,
+ attrEditorEl,
+ editableEl,
+ attrNameEl,
+ attrValueEl
+ ) {
+ // Double quotes need to be handled specially to prevent DOMParser failing.
+ // name="v"a"l"u"e" when editing -> name='v"a"l"u"e"'
+ // name="v'a"l'u"e" when editing -> name="v'a&quot;l'u&quot;e"
+ let editValueDisplayed = attribute.value || "";
+ const hasDoubleQuote = editValueDisplayed.includes('"');
+ const hasSingleQuote = editValueDisplayed.includes("'");
+ let initial = attribute.name + '="' + editValueDisplayed + '"';
+
+ // Can't just wrap value with ' since the value contains both " and '.
+ if (hasDoubleQuote && hasSingleQuote) {
+ editValueDisplayed = editValueDisplayed.replace(/\"/g, "&quot;");
+ initial = attribute.name + '="' + editValueDisplayed + '"';
+ }
+
+ // Wrap with ' since there are no single quotes in the attribute value.
+ if (hasDoubleQuote && !hasSingleQuote) {
+ initial = attribute.name + "='" + editValueDisplayed + "'";
+ }
+
+ // Make the attribute editable.
+ attrEditorEl.editMode = editableField({
+ element: editableEl,
+ trigger: "dblclick",
+ stopOnReturn: true,
+ selectAll: false,
+ initial,
+ multiline: true,
+ maxWidth: () => getAutocompleteMaxWidth(editableEl, this.container.elt),
+ contentType: InplaceEditor.CONTENT_TYPES.CSS_MIXED,
+ popup: this.markup.popup,
+ start: (editor, event) => {
+ // If the editing was started inside the name or value areas,
+ // select accordingly.
+ if (event?.target === attrNameEl) {
+ editor.input.setSelectionRange(0, attrNameEl.textContent.length);
+ } else if (event?.target.closest(".attr-value") === attrValueEl) {
+ const length = editValueDisplayed.length;
+ const editorLength = editor.input.value.length;
+ const start = editorLength - (length + 1);
+ editor.input.setSelectionRange(start, start + length);
+ } else {
+ editor.input.select();
+ }
+ },
+ done: (newValue, commit, direction) => {
+ if (!commit || newValue === initial) {
+ return;
+ }
+
+ const doMods = this._startModifyingAttributes();
+ const undoMods = this._startModifyingAttributes();
+
+ // Remove the attribute stored in this editor and re-add any attributes
+ // parsed out of the input element. Restore original attribute if
+ // parsing fails.
+ this.refocusOnEdit(attribute.name, attrEditorEl, direction);
+ this._saveAttribute(attribute.name, undoMods);
+ doMods.removeAttribute(attribute.name);
+ this._applyAttributes(newValue, attrEditorEl, doMods, undoMods);
+ this.container.undo.do(
+ () => {
+ doMods.apply();
+ },
+ () => {
+ undoMods.apply();
+ }
+ );
+ },
+ cssProperties: this._cssProperties,
+ });
+ },
+
+ /**
+ * Appends the attribute value to the given attribute value <span> element.
+ *
+ * @param {Object} attribute
+ * An object containing the name and value of a DOM attribute.
+ * @param {Element} attributeValueEl
+ * The attribute value <span class="attr-value"> element to append
+ * the parsed attribute values to.
+ */
+ _appendAttributeValue(attribute, attributeValueEl) {
+ // Parse the attribute value to detect whether there are linkable parts in
+ // it (make sure to pass a complete list of existing attributes to the
+ // parseAttribute function, by concatenating attribute, because this could
+ // be a newly added attribute not yet on this.node).
+ const attributes = this.node.attributes.filter(
+ existingAttribute => existingAttribute.name !== attribute.name
+ );
+ attributes.push(attribute);
+
+ const parsedLinksData = parseAttribute(
+ this.node.namespaceURI,
+ this.node.tagName,
+ attributes,
+ attribute.name,
+ attribute.value
+ );
+
+ attributeValueEl.innerHTML = "";
+
+ // Create links in the attribute value, and truncate long attribute values if
+ // needed.
+ for (const token of parsedLinksData) {
+ if (token.type === "string") {
+ attributeValueEl.appendChild(
+ this.doc.createTextNode(this._truncateAttributeValue(token.value))
+ );
+ } else {
+ const link = this.doc.createElement("span");
+ link.classList.add("link");
+ link.setAttribute("data-type", token.type);
+ link.setAttribute("data-link", token.value);
+ link.textContent = this._truncateAttributeValue(token.value);
+ attributeValueEl.appendChild(link);
+ }
+ }
+ },
+
+ /**
+ * Truncates the given attribute value if it is a base64 data URL or the
+ * collapse attributes pref is enabled.
+ *
+ * @param {String} value
+ * Attribute value.
+ * @return {String} truncated attribute value.
+ */
+ _truncateAttributeValue(value) {
+ if (value && value.match(COLLAPSE_DATA_URL_REGEX)) {
+ return truncateString(value, COLLAPSE_DATA_URL_LENGTH);
+ }
+
+ return this.markup.collapseAttributes
+ ? truncateString(value, this.markup.collapseAttributeLength)
+ : value;
+ },
+
+ /**
+ * Parse a user-entered attribute string and apply the resulting
+ * attributes to the node. This operation is undoable.
+ *
+ * @param {String} value
+ * The user-entered value.
+ * @param {DOMNode} attrNode
+ * The attribute editor that created this
+ * set of attributes, used to place new attributes where the
+ * user put them.
+ */
+ _applyAttributes(value, attrNode, doMods, undoMods) {
+ const attrs = parseAttributeValues(value, this.doc);
+ for (const attr of attrs) {
+ // Create an attribute editor next to the current attribute if needed.
+ this._createAttribute(attr, attrNode ? attrNode.nextSibling : null);
+ this._saveAttribute(attr.name, undoMods);
+ doMods.setAttribute(attr.name, attr.value);
+ }
+ },
+
+ /**
+ * Saves the current state of the given attribute into an attribute
+ * modification list.
+ */
+ _saveAttribute(name, undoMods) {
+ const node = this.node;
+ if (node.hasAttribute(name)) {
+ const oldValue = node.getAttribute(name);
+ undoMods.setAttribute(name, oldValue);
+ } else {
+ undoMods.removeAttribute(name);
+ }
+ },
+
+ /**
+ * Listen to mutations, and when the attribute list is regenerated
+ * try to focus on the attribute after the one that's being edited now.
+ * If the attribute order changes, go to the beginning of the attribute list.
+ */
+ refocusOnEdit(attrName, attrNode, direction) {
+ // Only allow one refocus on attribute change at a time, so when there's
+ // more than 1 request in parallel, the last one wins.
+ if (this._editedAttributeObserver) {
+ this.markup.inspector.off(
+ "markupmutation",
+ this._editedAttributeObserver
+ );
+ this._editedAttributeObserver = null;
+ }
+
+ const activeElement = this.markup.doc.activeElement;
+ if (!activeElement || !activeElement.inplaceEditor) {
+ // The focus was already removed from the current inplace editor, we should not
+ // refocus the editable attribute.
+ return;
+ }
+
+ const container = this.markup.getContainer(this.node);
+
+ const activeAttrs = [...this.attrList.childNodes].filter(
+ el => el.style.display != "none"
+ );
+ const attributeIndex = activeAttrs.indexOf(attrNode);
+
+ const onMutations = (this._editedAttributeObserver = mutations => {
+ let isDeletedAttribute = false;
+ let isNewAttribute = false;
+
+ for (const mutation of mutations) {
+ const inContainer =
+ this.markup.getContainer(mutation.target) === container;
+ if (!inContainer) {
+ continue;
+ }
+
+ const isOriginalAttribute = mutation.attributeName === attrName;
+
+ isDeletedAttribute =
+ isDeletedAttribute ||
+ (isOriginalAttribute && mutation.newValue === null);
+ isNewAttribute = isNewAttribute || mutation.attributeName !== attrName;
+ }
+
+ const isModifiedOrder = isDeletedAttribute && isNewAttribute;
+ this._editedAttributeObserver = null;
+
+ // "Deleted" attributes are merely hidden, so filter them out.
+ const visibleAttrs = [...this.attrList.childNodes].filter(
+ el => el.style.display != "none"
+ );
+ let activeEditor;
+ if (visibleAttrs.length) {
+ if (!direction) {
+ // No direction was given; stay on current attribute.
+ activeEditor = visibleAttrs[attributeIndex];
+ } else if (isModifiedOrder) {
+ // The attribute was renamed, reordering the existing attributes.
+ // So let's go to the beginning of the attribute list for consistency.
+ activeEditor = visibleAttrs[0];
+ } else {
+ let newAttributeIndex;
+ if (isDeletedAttribute) {
+ newAttributeIndex = attributeIndex;
+ } else if (direction == Services.focus.MOVEFOCUS_FORWARD) {
+ newAttributeIndex = attributeIndex + 1;
+ } else if (direction == Services.focus.MOVEFOCUS_BACKWARD) {
+ newAttributeIndex = attributeIndex - 1;
+ }
+
+ // The number of attributes changed (deleted), or we moved through
+ // the array so check we're still within bounds.
+ if (
+ newAttributeIndex >= 0 &&
+ newAttributeIndex <= visibleAttrs.length - 1
+ ) {
+ activeEditor = visibleAttrs[newAttributeIndex];
+ }
+ }
+ }
+
+ // Either we have no attributes left,
+ // or we just edited the last attribute and want to move on.
+ if (!activeEditor) {
+ activeEditor = this.newAttr;
+ }
+
+ // Refocus was triggered by tab or shift-tab.
+ // Continue in edit mode.
+ if (direction) {
+ activeEditor.editMode();
+ } else {
+ // Refocus was triggered by enter.
+ // Exit edit mode (but restore focus).
+ const editable =
+ activeEditor === this.newAttr
+ ? activeEditor
+ : activeEditor.querySelector(".editable");
+ editable.focus();
+ }
+
+ this.markup.emit("refocusedonedit");
+ });
+
+ // Start listening for mutations until we find an attributes change
+ // that modifies this attribute.
+ this.markup.inspector.once("markupmutation", onMutations);
+ },
+
+ /**
+ * Called when the display badge is clicked. Toggles on the flexbox/grid highlighter for
+ * the selected node if it is a grid container.
+ *
+ * Event handling for highlighter events is delegated up to the Markup view panel.
+ * When a flexbox/grid highlighter is shown or hidden, the corresponding badge will
+ * be marked accordingly. See MarkupView.handleHighlighterEvent()
+ */
+ async onDisplayBadgeClick(event) {
+ event.stopPropagation();
+
+ const target = event.target;
+
+ if (
+ target.dataset.display === "flex" ||
+ target.dataset.display === "inline-flex"
+ ) {
+ await this.highlighters.toggleFlexboxHighlighter(this.node, "markup");
+ }
+
+ if (
+ target.dataset.display === "grid" ||
+ target.dataset.display === "inline-grid" ||
+ target.dataset.display === "subgrid"
+ ) {
+ // Don't toggle the grid highlighter if the max number of new grid highlighters
+ // allowed has been reached.
+ if (!this.highlighters.canGridHighlighterToggle(this.node)) {
+ return;
+ }
+
+ await this.highlighters.toggleGridHighlighter(this.node, "markup");
+ }
+ },
+
+ async onCustomBadgeClick() {
+ const { url, line, column } = this.node.customElementLocation;
+
+ this.markup.toolbox.viewSourceInDebugger(
+ url,
+ line,
+ column,
+ null,
+ "show_custom_element"
+ );
+ },
+
+ onExpandBadgeClick() {
+ this.container.expandContainer();
+ },
+
+ /**
+ * Called when the scrollable badge is clicked. Shows the overflow causing elements and
+ * highlights their container if the scroll badge is active.
+ */
+ async onScrollableBadgeClick() {
+ this.highlightingOverflowCausingElements =
+ this._scrollableBadge.classList.toggle("active");
+
+ const { nodes } = await this.node.walkerFront.getOverflowCausingElements(
+ this.node
+ );
+
+ for (const node of nodes) {
+ if (this.highlightingOverflowCausingElements) {
+ await this.markup.showNode(node);
+ }
+
+ const markupContainer = this.markup.getContainer(node);
+
+ if (markupContainer) {
+ markupContainer.editor.setOverflowHighlight(
+ this.highlightingOverflowCausingElements
+ );
+ }
+ }
+
+ this.markup.telemetry.scalarAdd(
+ "devtools.markup.scrollable.badge.clicked",
+ 1
+ );
+ },
+
+ /**
+ * Called when the tag name editor has is done editing.
+ */
+ onTagEdit(newTagName, isCommit) {
+ if (
+ !isCommit ||
+ newTagName.toLowerCase() === this.node.tagName.toLowerCase() ||
+ !("editTagName" in this.markup.walker)
+ ) {
+ return;
+ }
+
+ // Changing the tagName removes the node. Make sure the replacing node gets
+ // selected afterwards.
+ this.markup.reselectOnRemoved(this.node, "edittagname");
+ this.node.walkerFront.editTagName(this.node, newTagName).catch(() => {
+ // Failed to edit the tag name, cancel the reselection.
+ this.markup.cancelReselectOnRemoved();
+ });
+ },
+
+ destroy() {
+ if (this._displayBadge) {
+ this._displayBadge.removeEventListener("click", this.onDisplayBadgeClick);
+ }
+
+ if (this._customBadge) {
+ this._customBadge.removeEventListener("click", this.onCustomBadgeClick);
+ }
+
+ if (this._scrollableBadge) {
+ this._scrollableBadge.removeEventListener(
+ "click",
+ this.onScrollableBadgeClick
+ );
+ }
+
+ this.expandBadge.removeEventListener("click", this.onExpandBadgeClick);
+
+ for (const key in this.animationTimers) {
+ clearTimeout(this.animationTimers[key]);
+ }
+ this.animationTimers = null;
+ },
+};
+
+module.exports = ElementEditor;
diff --git a/devtools/client/inspector/markup/views/html-editor.js b/devtools/client/inspector/markup/views/html-editor.js
new file mode 100644
index 0000000000..fbff0f3e2e
--- /dev/null
+++ b/devtools/client/inspector/markup/views/html-editor.js
@@ -0,0 +1,177 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const Editor = require("resource://devtools/client/shared/sourceeditor/editor.js");
+const EventEmitter = require("resource://devtools/shared/event-emitter.js");
+
+/**
+ * A wrapper around the Editor component, that allows editing of HTML.
+ *
+ * The main functionality this provides around the Editor is the ability
+ * to show/hide/position an editor inplace. It only appends once to the
+ * body, and uses CSS to position the editor. The reason it is done this
+ * way is that the editor is loaded in an iframe, and calling appendChild
+ * causes it to reload.
+ *
+ * Meant to be embedded inside of an HTML page, as in markup.xhtml.
+ *
+ * @param {HTMLDocument} htmlDocument
+ * The document to attach the editor to. Will also use this
+ * document as a basis for listening resize events.
+ */
+function HTMLEditor(htmlDocument) {
+ this.doc = htmlDocument;
+ this.container = this.doc.createElement("div");
+ this.container.className = "html-editor theme-body";
+ this.container.style.display = "none";
+ this.editorInner = this.doc.createElement("div");
+ this.editorInner.className = "html-editor-inner";
+ this.container.appendChild(this.editorInner);
+
+ this.doc.body.appendChild(this.container);
+ this.hide = this.hide.bind(this);
+ this.refresh = this.refresh.bind(this);
+
+ EventEmitter.decorate(this);
+
+ this.doc.defaultView.addEventListener("resize", this.refresh, true);
+
+ const config = {
+ mode: Editor.modes.html,
+ lineWrapping: true,
+ styleActiveLine: false,
+ extraKeys: {},
+ theme: "mozilla markup-view",
+ };
+
+ config.extraKeys[ctrl("Enter")] = this.hide;
+ config.extraKeys.F2 = this.hide;
+ config.extraKeys.Esc = this.hide.bind(this, false);
+
+ this.container.addEventListener("click", this.hide);
+ this.editorInner.addEventListener("click", stopPropagation);
+ this.editor = new Editor(config);
+
+ this.editor.appendToLocalElement(this.editorInner);
+ this.hide(false);
+}
+
+HTMLEditor.prototype = {
+ /**
+ * Need to refresh position by manually setting CSS values, so this will
+ * need to be called on resizes and other sizing changes.
+ */
+ refresh() {
+ const element = this._attachedElement;
+
+ if (element) {
+ this.container.style.top = element.offsetTop + "px";
+ this.container.style.left = element.offsetLeft + "px";
+ this.container.style.width = element.offsetWidth + "px";
+ this.container.style.height = element.parentNode.offsetHeight + "px";
+ this.editor.refresh();
+ }
+ },
+
+ /**
+ * Anchor the editor to a particular element.
+ *
+ * @param {DOMNode} element
+ * The element that the editor will be anchored to.
+ * Should belong to the HTMLDocument passed into the constructor.
+ */
+ _attach(element) {
+ this._detach();
+ this._attachedElement = element;
+ element.classList.add("html-editor-container");
+ this.refresh();
+ },
+
+ /**
+ * Unanchor the editor from an element.
+ */
+ _detach() {
+ if (this._attachedElement) {
+ this._attachedElement.classList.remove("html-editor-container");
+ this._attachedElement = undefined;
+ }
+ },
+
+ /**
+ * Anchor the editor to a particular element, and show the editor.
+ *
+ * @param {DOMNode} element
+ * The element that the editor will be anchored to.
+ * Should belong to the HTMLDocument passed into the constructor.
+ * @param {String} text
+ * Value to set the contents of the editor to
+ * @param {Function} cb
+ * The function to call when hiding
+ */
+ show(element, text) {
+ if (this._visible) {
+ return;
+ }
+
+ this._originalValue = text;
+ this.editor.setText(text);
+ this._attach(element);
+ this.container.style.display = "flex";
+ this._visible = true;
+
+ this.editor.refresh();
+ this.editor.focus();
+ this.editor.clearHistory();
+
+ this.emit("popupshown");
+ },
+
+ /**
+ * Hide the editor, optionally committing the changes
+ *
+ * @param {Boolean} shouldCommit
+ * A change will be committed by default. If this param
+ * strictly equals false, no change will occur.
+ */
+ hide(shouldCommit) {
+ if (!this._visible) {
+ return;
+ }
+
+ this.container.style.display = "none";
+ this._detach();
+
+ const newValue = this.editor.getText();
+ const valueHasChanged = this._originalValue !== newValue;
+ const preventCommit = shouldCommit === false || !valueHasChanged;
+ this._originalValue = undefined;
+ this._visible = undefined;
+ this.emit("popuphidden", !preventCommit, newValue);
+ },
+
+ /**
+ * Destroy this object and unbind all event handlers
+ */
+ destroy() {
+ this.doc.defaultView.removeEventListener("resize", this.refresh, true);
+ this.container.removeEventListener("click", this.hide);
+ this.editorInner.removeEventListener("click", stopPropagation);
+
+ this.hide(false);
+ this.container.remove();
+ this.editor.destroy();
+ },
+};
+
+function ctrl(k) {
+ return (Services.appinfo.OS == "Darwin" ? "Cmd-" : "Ctrl-") + k;
+}
+
+function stopPropagation(e) {
+ e.stopPropagation();
+}
+
+module.exports = HTMLEditor;
diff --git a/devtools/client/inspector/markup/views/markup-container.js b/devtools/client/inspector/markup/views/markup-container.js
new file mode 100644
index 0000000000..80e3a9f325
--- /dev/null
+++ b/devtools/client/inspector/markup/views/markup-container.js
@@ -0,0 +1,868 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const { KeyCodes } = require("resource://devtools/client/shared/keycodes.js");
+const {
+ flashElementOn,
+ flashElementOff,
+} = require("resource://devtools/client/inspector/markup/utils.js");
+
+loader.lazyRequireGetter(
+ this,
+ "wrapMoveFocus",
+ "resource://devtools/client/shared/focus.js",
+ true
+);
+
+const DRAG_DROP_MIN_INITIAL_DISTANCE = 10;
+const TYPES = {
+ TEXT_CONTAINER: "textcontainer",
+ ELEMENT_CONTAINER: "elementcontainer",
+ READ_ONLY_CONTAINER: "readonlycontainer",
+};
+
+/**
+ * The main structure for storing a document node in the markup
+ * tree. Manages creation of the editor for the node and
+ * a <ul> for placing child elements, and expansion/collapsing
+ * of the element.
+ *
+ * This should not be instantiated directly, instead use one of:
+ * MarkupReadOnlyContainer
+ * MarkupTextContainer
+ * MarkupElementContainer
+ */
+function MarkupContainer() {}
+
+/**
+ * Unique identifier used to set markup container node id.
+ * @type {Number}
+ */
+let markupContainerID = 0;
+
+MarkupContainer.prototype = {
+ // Get the UndoStack from the MarkupView.
+ get undo() {
+ // undo is a lazy getter in the MarkupView.
+ return this.markup.undo;
+ },
+
+ /*
+ * Initialize the MarkupContainer. Should be called while one
+ * of the other contain classes is instantiated.
+ *
+ * @param {MarkupView} markupView
+ * The markup view that owns this container.
+ * @param {NodeFront} node
+ * The node to display.
+ * @param {String} type
+ * The type of container to build. One of TYPES.TEXT_CONTAINER,
+ * TYPES.ELEMENT_CONTAINER, TYPES.READ_ONLY_CONTAINER
+ */
+ initialize(markupView, node, type) {
+ this.markup = markupView;
+ this.node = node;
+ this.type = type;
+ this.win = this.markup._frame.contentWindow;
+ this.id = "treeitem-" + markupContainerID++;
+ this.htmlElt = this.win.document.documentElement;
+
+ this.buildMarkup();
+
+ this.elt.container = this;
+
+ this._onMouseDown = this._onMouseDown.bind(this);
+ this._onToggle = this._onToggle.bind(this);
+ this._onKeyDown = this._onKeyDown.bind(this);
+
+ // Binding event listeners
+ this.elt.addEventListener("mousedown", this._onMouseDown);
+ this.elt.addEventListener("dblclick", this._onToggle);
+ if (this.expander) {
+ this.expander.addEventListener("click", this._onToggle);
+ }
+
+ // Marking the node as shown or hidden
+ this.updateIsDisplayed();
+
+ if (node.isShadowRoot) {
+ this.markup.telemetry.scalarSet(
+ "devtools.shadowdom.shadow_root_displayed",
+ true
+ );
+ }
+ },
+
+ buildMarkup() {
+ this.elt = this.win.document.createElement("li");
+ this.elt.classList.add("child", "collapsed");
+ this.elt.setAttribute("role", "presentation");
+
+ this.tagLine = this.win.document.createElement("div");
+ this.tagLine.setAttribute("id", this.id);
+ this.tagLine.classList.add("tag-line");
+ this.tagLine.setAttribute("role", "treeitem");
+ this.tagLine.setAttribute("aria-level", this.level);
+ this.tagLine.setAttribute("aria-grabbed", this.isDragging);
+ this.elt.appendChild(this.tagLine);
+
+ this.mutationMarker = this.win.document.createElement("div");
+ this.mutationMarker.classList.add("markup-tag-mutation-marker");
+ this.mutationMarker.style.setProperty("--markup-level", this.level);
+ this.tagLine.appendChild(this.mutationMarker);
+
+ this.tagState = this.win.document.createElement("span");
+ this.tagState.classList.add("tag-state");
+ this.tagState.setAttribute("role", "presentation");
+ this.tagLine.appendChild(this.tagState);
+
+ if (this.type !== TYPES.TEXT_CONTAINER) {
+ this.expander = this.win.document.createElement("span");
+ this.expander.classList.add("theme-twisty", "expander");
+ this.expander.setAttribute("role", "presentation");
+ this.tagLine.appendChild(this.expander);
+ }
+
+ this.children = this.win.document.createElement("ul");
+ this.children.classList.add("children");
+ this.children.setAttribute("role", "group");
+ this.elt.appendChild(this.children);
+ },
+
+ toString() {
+ return "[MarkupContainer for " + this.node + "]";
+ },
+
+ isPreviewable() {
+ if (this.node.tagName && !this.node.isPseudoElement) {
+ const tagName = this.node.tagName.toLowerCase();
+ const srcAttr = this.editor.getAttributeElement("src");
+ const isImage = tagName === "img" && srcAttr;
+ const isCanvas = tagName === "canvas";
+
+ return isImage || isCanvas;
+ }
+
+ return false;
+ },
+
+ /**
+ * Show whether the element is displayed or not
+ * If an element has the attribute `display: none` or has been hidden with
+ * the H key, it is not displayed (faded in markup view).
+ * Otherwise, it is displayed.
+ */
+ updateIsDisplayed() {
+ this.elt.classList.remove("not-displayed");
+ if (!this.node.isDisplayed || this.node.hidden) {
+ this.elt.classList.add("not-displayed");
+ }
+ },
+
+ /**
+ * True if the current node has children. The MarkupView
+ * will set this attribute for the MarkupContainer.
+ */
+ _hasChildren: false,
+
+ get hasChildren() {
+ return this._hasChildren;
+ },
+
+ set hasChildren(value) {
+ this._hasChildren = value;
+ this.updateExpander();
+ },
+
+ /**
+ * A list of all elements with tabindex that are not in container's children.
+ */
+ get focusableElms() {
+ return [...this.tagLine.querySelectorAll("[tabindex]")];
+ },
+
+ /**
+ * An indicator that the container internals are focusable.
+ */
+ get canFocus() {
+ return this._canFocus;
+ },
+
+ /**
+ * Toggle focusable state for container internals.
+ */
+ set canFocus(value) {
+ if (this._canFocus === value) {
+ return;
+ }
+
+ this._canFocus = value;
+
+ if (value) {
+ this.tagLine.addEventListener("keydown", this._onKeyDown, true);
+ this.focusableElms.forEach(elm => elm.setAttribute("tabindex", "0"));
+ } else {
+ this.tagLine.removeEventListener("keydown", this._onKeyDown, true);
+ // Exclude from tab order.
+ this.focusableElms.forEach(elm => elm.setAttribute("tabindex", "-1"));
+ }
+ },
+
+ /**
+ * If conatiner and its contents are focusable, exclude them from tab order,
+ * and, if necessary, remove focus.
+ */
+ clearFocus() {
+ if (!this.canFocus) {
+ return;
+ }
+
+ this.canFocus = false;
+ const doc = this.markup.doc;
+
+ if (!doc.activeElement || doc.activeElement === doc.body) {
+ return;
+ }
+
+ let parent = doc.activeElement;
+
+ while (parent && parent !== this.elt) {
+ parent = parent.parentNode;
+ }
+
+ if (parent) {
+ doc.activeElement.blur();
+ }
+ },
+
+ /**
+ * True if the current node can be expanded.
+ */
+ get canExpand() {
+ return this._hasChildren && !this.node.inlineTextChild;
+ },
+
+ /**
+ * True if this is the root <html> element and can't be collapsed.
+ */
+ get mustExpand() {
+ return this.node._parent === this.markup.walker.rootNode;
+ },
+
+ /**
+ * True if current node can be expanded and collapsed.
+ */
+ get showExpander() {
+ return this.canExpand && !this.mustExpand;
+ },
+
+ updateExpander() {
+ if (!this.expander) {
+ return;
+ }
+
+ if (this.showExpander) {
+ this.elt.classList.add("expandable");
+ this.expander.style.visibility = "visible";
+ // Update accessibility expanded state.
+ this.tagLine.setAttribute("aria-expanded", this.expanded);
+ } else {
+ this.elt.classList.remove("expandable");
+ this.expander.style.visibility = "hidden";
+ // No need for accessible expanded state indicator when expander is not
+ // shown.
+ this.tagLine.removeAttribute("aria-expanded");
+ }
+ },
+
+ /**
+ * If current node has no children, ignore them. Otherwise, consider them a
+ * group from the accessibility point of view.
+ */
+ setChildrenRole() {
+ this.children.setAttribute(
+ "role",
+ this.hasChildren ? "group" : "presentation"
+ );
+ },
+
+ /**
+ * Set an appropriate DOM tree depth level for a node and its subtree.
+ */
+ updateLevel() {
+ // ARIA level should already be set when the container markup is created.
+ const currentLevel = this.tagLine.getAttribute("aria-level");
+ const newLevel = this.level;
+ if (currentLevel === newLevel) {
+ // If level did not change, ignore this node and its subtree.
+ return;
+ }
+
+ this.tagLine.setAttribute("aria-level", newLevel);
+ const childContainers = this.getChildContainers();
+ if (childContainers) {
+ childContainers.forEach(container => container.updateLevel());
+ }
+ },
+
+ /**
+ * If the node has children, return the list of containers for all these
+ * children.
+ */
+ getChildContainers() {
+ if (!this.hasChildren) {
+ return null;
+ }
+
+ return [...this.children.children]
+ .filter(node => node.container)
+ .map(node => node.container);
+ },
+
+ /**
+ * True if the node has been visually expanded in the tree.
+ */
+ get expanded() {
+ return !this.elt.classList.contains("collapsed");
+ },
+
+ setExpanded(value) {
+ if (!this.expander) {
+ return;
+ }
+
+ if (!this.canExpand) {
+ value = false;
+ }
+
+ if (this.mustExpand) {
+ value = true;
+ }
+
+ if (value && this.elt.classList.contains("collapsed")) {
+ this.showCloseTagLine();
+
+ this.elt.classList.remove("collapsed");
+ this.expander.setAttribute("open", "");
+ this.hovered = false;
+ this.markup.emit("expanded");
+ } else if (!value) {
+ this.hideCloseTagLine();
+
+ this.elt.classList.add("collapsed");
+ this.expander.removeAttribute("open");
+ this.markup.emit("collapsed");
+ }
+
+ if (this.showExpander) {
+ this.tagLine.setAttribute("aria-expanded", this.expanded);
+ }
+
+ if (this.node.isShadowRoot) {
+ this.markup.telemetry.scalarSet(
+ "devtools.shadowdom.shadow_root_expanded",
+ true
+ );
+ }
+ },
+
+ /**
+ * Expanding a node means cloning its "inline" closing tag into a new
+ * tag-line that the user can interact with and showing the children.
+ */
+ showCloseTagLine() {
+ // Only element containers display a closing tag line. #document has no closing line.
+ if (this.type !== TYPES.ELEMENT_CONTAINER) {
+ return;
+ }
+
+ // Retrieve the closest .close node for this container.
+ const closingTag = this.elt.querySelector(".close");
+ if (!closingTag) {
+ return;
+ }
+
+ // Create the closing tag-line element if not already created.
+ if (!this.closeTagLine) {
+ const line = this.markup.doc.createElement("div");
+ line.classList.add("tag-line");
+ // Closing tag is not important for accessibility.
+ line.setAttribute("role", "presentation");
+
+ const tagState = this.markup.doc.createElement("div");
+ tagState.classList.add("tag-state");
+ line.appendChild(tagState);
+
+ line.appendChild(closingTag.cloneNode(true));
+
+ flashElementOff(line);
+ this.closeTagLine = line;
+ }
+ this.elt.appendChild(this.closeTagLine);
+ },
+
+ /**
+ * Hide the closing tag-line element which should only be displayed when the container
+ * is expanded.
+ */
+ hideCloseTagLine() {
+ if (!this.closeTagLine) {
+ return;
+ }
+
+ this.elt.removeChild(this.closeTagLine);
+ this.closeTagLine = undefined;
+ },
+
+ parentContainer() {
+ return this.elt.parentNode ? this.elt.parentNode.container : null;
+ },
+
+ /**
+ * Determine tree depth level of a given node. This is used to specify ARIA
+ * level for node tree items and to give them better semantic context.
+ */
+ get level() {
+ let level = 1;
+ let parent = this.node.parentNode();
+ while (parent && parent !== this.markup.walker.rootNode) {
+ level++;
+ parent = parent.parentNode();
+ }
+ return level;
+ },
+
+ _isDragging: false,
+ _dragStartY: 0,
+
+ set isDragging(isDragging) {
+ const rootElt = this.markup.getContainer(this.markup._rootNode).elt;
+ this._isDragging = isDragging;
+ this.markup.isDragging = isDragging;
+ this.tagLine.setAttribute("aria-grabbed", isDragging);
+
+ if (isDragging) {
+ this.htmlElt.classList.add("dragging");
+ this.elt.classList.add("dragging");
+ this.markup.doc.body.classList.add("dragging");
+ rootElt.setAttribute("aria-dropeffect", "move");
+ } else {
+ this.htmlElt.classList.remove("dragging");
+ this.elt.classList.remove("dragging");
+ this.markup.doc.body.classList.remove("dragging");
+ rootElt.setAttribute("aria-dropeffect", "none");
+ }
+ },
+
+ get isDragging() {
+ return this._isDragging;
+ },
+
+ /**
+ * Check if element is draggable.
+ */
+ isDraggable() {
+ const tagName = this.node.tagName && this.node.tagName.toLowerCase();
+
+ return (
+ !this.node.isPseudoElement &&
+ !this.node.isAnonymous &&
+ !this.node.isDocumentElement &&
+ tagName !== "body" &&
+ tagName !== "head" &&
+ this.win.getSelection().isCollapsed &&
+ this.node.parentNode() &&
+ this.node.parentNode().tagName !== null
+ );
+ },
+
+ isSlotted() {
+ return false;
+ },
+
+ _onKeyDown(event) {
+ const { target, keyCode, shiftKey } = event;
+ const isInput = this.markup._isInputOrTextarea(target);
+
+ // Ignore all keystrokes that originated in editors except for when 'Tab' is
+ // pressed.
+ if (isInput && keyCode !== KeyCodes.DOM_VK_TAB) {
+ return;
+ }
+
+ switch (keyCode) {
+ case KeyCodes.DOM_VK_TAB:
+ // Only handle 'Tab' if tabbable element is on the edge (first or last).
+ if (isInput) {
+ // Corresponding tabbable element is editor's next sibling.
+ const next = wrapMoveFocus(
+ this.focusableElms,
+ target.nextSibling,
+ shiftKey
+ );
+ if (next) {
+ event.preventDefault();
+ // Keep the editing state if possible.
+ if (next._editable) {
+ const e = this.markup.doc.createEvent("Event");
+ e.initEvent(next._trigger, true, true);
+ next.dispatchEvent(e);
+ }
+ }
+ } else {
+ const next = wrapMoveFocus(this.focusableElms, target, shiftKey);
+ if (next) {
+ event.preventDefault();
+ }
+ }
+ break;
+ case KeyCodes.DOM_VK_ESCAPE:
+ this.clearFocus();
+ this.markup.getContainer(this.markup._rootNode).elt.focus();
+ if (this.isDragging) {
+ // Escape when dragging is handled by markup view itself.
+ return;
+ }
+ event.preventDefault();
+ break;
+ default:
+ return;
+ }
+ event.stopPropagation();
+ },
+
+ _onMouseDown(event) {
+ const { target, button, metaKey, ctrlKey } = event;
+ const isLeftClick = button === 0;
+ const isMiddleClick = button === 1;
+ const isMetaClick = isLeftClick && (metaKey || ctrlKey);
+
+ // The "show more nodes" button already has its onclick, so early return.
+ if (target.nodeName === "button") {
+ return;
+ }
+
+ // Bail out when clicking on arrow expanders to avoid selecting the row.
+ if (target.classList.contains("expander")) {
+ return;
+ }
+
+ // target is the MarkupContainer itself.
+ this.hovered = false;
+ this.markup.navigate(this);
+ // Make container tabbable descendants tabbable and focus in.
+ this.canFocus = true;
+ this.focus();
+ event.stopPropagation();
+
+ // Preventing the default behavior will avoid the body to gain focus on
+ // mouseup (through bubbling) when clicking on a non focusable node in the
+ // line. So, if the click happened outside of a focusable element, do
+ // prevent the default behavior, so that the tagname or textcontent gains
+ // focus.
+ if (!target.closest(".editor [tabindex]")) {
+ event.preventDefault();
+ }
+
+ // Middle clicks will trigger the scroll lock feature to turn on.
+ // The toolbox is normally responsible for calling preventDefault when
+ // needed, but we prevent markup-view mousedown events from bubbling up (via
+ // stopPropagation). So we have to preventDefault here as well in order to
+ // avoid this issue.
+ if (isMiddleClick) {
+ event.preventDefault();
+ }
+
+ // Follow attribute links if middle or meta click.
+ if (isMiddleClick || isMetaClick) {
+ const link = target.dataset.link;
+ const type = target.dataset.type;
+ // Make container tabbable descendants not tabbable (by default).
+ this.canFocus = false;
+ this.markup.followAttributeLink(type, link);
+ return;
+ }
+
+ // Start node drag & drop (if the mouse moved, see _onMouseMove).
+ if (isLeftClick && this.isDraggable()) {
+ this._isPreDragging = true;
+ this._dragStartY = event.pageY;
+ this.markup._draggedContainer = this;
+ }
+ },
+
+ /**
+ * On mouse up, stop dragging.
+ * This handler is called from the markup view, to reduce number of listeners.
+ */
+ async onMouseUp() {
+ this._isPreDragging = false;
+ this.markup._draggedContainer = null;
+
+ if (this.isDragging) {
+ this.cancelDragging();
+
+ if (!this.markup.dropTargetNodes) {
+ return;
+ }
+
+ const { nextSibling, parent } = this.markup.dropTargetNodes;
+ const { walkerFront } = parent;
+ await walkerFront.insertBefore(this.node, parent, nextSibling);
+ this.markup.emit("drop-completed");
+ }
+ },
+
+ /**
+ * On mouse move, move the dragged element and indicate the drop target.
+ * This handler is called from the markup view, to reduce number of listeners.
+ */
+ onMouseMove(event) {
+ // If this is the first move after mousedown, only start dragging after the
+ // mouse has travelled a few pixels and then indicate the start position.
+ const initialDiff = Math.abs(event.pageY - this._dragStartY);
+ if (this._isPreDragging && initialDiff >= DRAG_DROP_MIN_INITIAL_DISTANCE) {
+ this._isPreDragging = false;
+ this.isDragging = true;
+
+ // If this is the last child, use the closing <div.tag-line> of parent as
+ // indicator.
+ const position =
+ this.elt.nextElementSibling ||
+ this.markup.getContainer(this.node.parentNode()).closeTagLine;
+ this.markup.indicateDragTarget(position);
+ }
+
+ if (this.isDragging) {
+ const x = 0;
+ let y = event.pageY - this.win.scrollY;
+
+ // Ensure we keep the dragged element within the markup view.
+ if (y < 0) {
+ y = 0;
+ } else if (y >= this.markup.doc.body.offsetHeight - this.win.scrollY) {
+ y = this.markup.doc.body.offsetHeight - this.win.scrollY - 1;
+ }
+
+ const diff = y - this._dragStartY + this.win.scrollY;
+ this.elt.style.top = diff + "px";
+
+ const el = this.markup.doc.elementFromPoint(x, y);
+ this.markup.indicateDropTarget(el);
+ }
+ },
+
+ cancelDragging() {
+ if (!this.isDragging) {
+ return;
+ }
+
+ this._isPreDragging = false;
+ this.isDragging = false;
+ this.elt.style.removeProperty("top");
+ },
+
+ /**
+ * Temporarily flash the container to attract attention.
+ * Used for markup mutations.
+ */
+ flashMutation() {
+ if (!this.selected) {
+ flashElementOn(this.tagState, {
+ foregroundElt: this.editor.elt,
+ backgroundClass: "theme-bg-contrast",
+ });
+ if (this._flashMutationTimer) {
+ clearTimeout(this._flashMutationTimer);
+ this._flashMutationTimer = null;
+ }
+ this._flashMutationTimer = setTimeout(() => {
+ flashElementOff(this.tagState, {
+ foregroundElt: this.editor.elt,
+ backgroundClass: "theme-bg-contrast",
+ });
+ }, this.markup.CONTAINER_FLASHING_DURATION);
+ }
+ },
+
+ _hovered: false,
+
+ /**
+ * Highlight the currently hovered tag + its closing tag if necessary
+ * (that is if the tag is expanded)
+ */
+ set hovered(value) {
+ this.tagState.classList.remove("flash-out");
+ this._hovered = value;
+ if (value) {
+ if (!this.selected) {
+ this.tagState.classList.add("tag-hover");
+ }
+ if (this.closeTagLine) {
+ this.closeTagLine
+ .querySelector(".tag-state")
+ .classList.add("tag-hover");
+ }
+ } else {
+ this.tagState.classList.remove("tag-hover");
+ if (this.closeTagLine) {
+ this.closeTagLine
+ .querySelector(".tag-state")
+ .classList.remove("tag-hover");
+ }
+ }
+ },
+
+ /**
+ * True if the container is visible in the markup tree.
+ */
+ get visible() {
+ return this.elt.getBoundingClientRect().height > 0;
+ },
+
+ /**
+ * True if the container is currently selected.
+ */
+ _selected: false,
+
+ get selected() {
+ return this._selected;
+ },
+
+ set selected(value) {
+ this.tagState.classList.remove("flash-out");
+ this._selected = value;
+ this.editor.selected = value;
+ // Markup tree item should have accessible selected state.
+ this.tagLine.setAttribute("aria-selected", value);
+ if (this._selected) {
+ const container = this.markup.getContainer(this.markup._rootNode);
+ if (container) {
+ container.elt.setAttribute("aria-activedescendant", this.id);
+ }
+ this.tagLine.setAttribute("selected", "");
+ this.tagState.classList.add("theme-selected");
+ } else {
+ this.tagLine.removeAttribute("selected");
+ this.tagState.classList.remove("theme-selected");
+ }
+ },
+
+ /**
+ * Update the container's editor to the current state of the
+ * viewed node.
+ */
+ update(mutationBreakpoints) {
+ if (this.node.pseudoClassLocks.length) {
+ this.elt.classList.add("pseudoclass-locked");
+ } else {
+ this.elt.classList.remove("pseudoclass-locked");
+ }
+
+ if (mutationBreakpoints) {
+ const allMutationsDisabled = Array.from(
+ mutationBreakpoints.values()
+ ).every(element => element === false);
+
+ if (mutationBreakpoints.size > 0) {
+ this.mutationMarker.classList.add("has-mutations");
+ this.mutationMarker.classList.toggle(
+ "mutation-breakpoint-disabled",
+ allMutationsDisabled
+ );
+ } else {
+ this.mutationMarker.classList.remove("has-mutations");
+ }
+ }
+
+ this.updateIsDisplayed();
+
+ if (this.editor.update) {
+ this.editor.update();
+ }
+ },
+
+ /**
+ * Try to put keyboard focus on the current editor.
+ */
+ focus() {
+ // Elements with tabindex of -1 are not focusable.
+ const focusable = this.editor.elt.querySelector("[tabindex='0']");
+ if (focusable) {
+ focusable.focus();
+ }
+ },
+
+ _onToggle(event) {
+ event.stopPropagation();
+
+ // Prevent the html tree from expanding when an event bubble, display or scrollable
+ // node is clicked.
+ if (
+ event.target.dataset.event ||
+ event.target.dataset.display ||
+ event.target.dataset.scrollable
+ ) {
+ return;
+ }
+
+ this.expandContainer(event.altKey);
+ },
+
+ /**
+ * Expands the markup container if it has children.
+ *
+ * @param {Boolean} applyToDescendants
+ * Whether all descendants should also be expanded/collapsed
+ */
+ expandContainer(applyToDescendants) {
+ if (this.hasChildren) {
+ this.markup.setNodeExpanded(
+ this.node,
+ !this.expanded,
+ applyToDescendants
+ );
+ }
+ },
+
+ /**
+ * Get rid of event listeners and references, when the container is no longer
+ * needed
+ */
+ destroy() {
+ // Remove event listeners
+ this.elt.removeEventListener("mousedown", this._onMouseDown);
+ this.elt.removeEventListener("dblclick", this._onToggle);
+ this.tagLine.removeEventListener("keydown", this._onKeyDown, true);
+
+ if (this.markup._draggedContainer === this) {
+ this.markup._draggedContainer = null;
+ }
+
+ this.win = null;
+ this.htmlElt = null;
+
+ if (this.expander) {
+ this.expander.removeEventListener("click", this._onToggle);
+ }
+
+ // Recursively destroy children containers
+ let firstChild = this.children.firstChild;
+ while (firstChild) {
+ // Not all children of a container are containers themselves
+ // ("show more nodes" button is one example)
+ if (firstChild.container) {
+ firstChild.container.destroy();
+ }
+ this.children.removeChild(firstChild);
+ firstChild = this.children.firstChild;
+ }
+
+ this.editor.destroy();
+ },
+};
+
+module.exports = MarkupContainer;
diff --git a/devtools/client/inspector/markup/views/moz.build b/devtools/client/inspector/markup/views/moz.build
new file mode 100644
index 0000000000..9be0f159ee
--- /dev/null
+++ b/devtools/client/inspector/markup/views/moz.build
@@ -0,0 +1,19 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DevToolsModules(
+ "element-container.js",
+ "element-editor.js",
+ "html-editor.js",
+ "markup-container.js",
+ "read-only-container.js",
+ "read-only-editor.js",
+ "root-container.js",
+ "slotted-node-container.js",
+ "slotted-node-editor.js",
+ "text-container.js",
+ "text-editor.js",
+)
diff --git a/devtools/client/inspector/markup/views/read-only-container.js b/devtools/client/inspector/markup/views/read-only-container.js
new file mode 100644
index 0000000000..b48aad88a1
--- /dev/null
+++ b/devtools/client/inspector/markup/views/read-only-container.js
@@ -0,0 +1,36 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const ReadOnlyEditor = require("resource://devtools/client/inspector/markup/views/read-only-editor.js");
+const MarkupContainer = require("resource://devtools/client/inspector/markup/views/markup-container.js");
+const { extend } = require("resource://devtools/shared/extend.js");
+
+/**
+ * An implementation of MarkupContainer for Pseudo Elements,
+ * Doctype nodes, or any other type generic node that doesn't
+ * fit for other editors.
+ * Does not allow any editing, just viewing / selecting.
+ *
+ * @param {MarkupView} markupView
+ * The markup view that owns this container.
+ * @param {NodeFront} node
+ * The node to display.
+ */
+function MarkupReadOnlyContainer(markupView, node) {
+ MarkupContainer.prototype.initialize.call(
+ this,
+ markupView,
+ node,
+ "readonlycontainer"
+ );
+
+ this.editor = new ReadOnlyEditor(this, node);
+ this.tagLine.appendChild(this.editor.elt);
+}
+
+MarkupReadOnlyContainer.prototype = extend(MarkupContainer.prototype, {});
+
+module.exports = MarkupReadOnlyContainer;
diff --git a/devtools/client/inspector/markup/views/read-only-editor.js b/devtools/client/inspector/markup/views/read-only-editor.js
new file mode 100644
index 0000000000..009abd5af0
--- /dev/null
+++ b/devtools/client/inspector/markup/views/read-only-editor.js
@@ -0,0 +1,82 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const nodeConstants = require("resource://devtools/shared/dom-node-constants.js");
+
+/**
+ * Creates an editor for non-editable nodes.
+ */
+function ReadOnlyEditor(container, node) {
+ this.container = container;
+ this.markup = this.container.markup;
+ this.buildMarkup();
+
+ if (node.isPseudoElement) {
+ this.tag.classList.add("theme-fg-color3");
+ if (node.isMarkerPseudoElement) {
+ this.tag.textContent = "::marker";
+ } else if (node.isBeforePseudoElement) {
+ this.tag.textContent = "::before";
+ } else if (node.isAfterPseudoElement) {
+ this.tag.textContent = "::after";
+ }
+ } else if (node.nodeType == nodeConstants.DOCUMENT_TYPE_NODE) {
+ this.elt.classList.add("comment", "doctype");
+ this.tag.textContent = node.doctypeString;
+ } else if (node.isShadowRoot) {
+ this.tag.textContent = `#shadow-root (${node.shadowRootMode})`;
+ } else {
+ this.tag.textContent = node.nodeName;
+ }
+
+ // Make the "tag" part of this editor focusable.
+ this.tag.setAttribute("tabindex", "-1");
+}
+
+ReadOnlyEditor.prototype = {
+ buildMarkup() {
+ const doc = this.markup.doc;
+
+ this.elt = doc.createElement("span");
+ this.elt.classList.add("editor");
+
+ this.tag = doc.createElement("span");
+ this.tag.classList.add("tag");
+ this.elt.appendChild(this.tag);
+ },
+
+ destroy() {
+ // We might be already destroyed.
+ if (!this.elt) {
+ return;
+ }
+
+ this.elt.remove();
+ this.elt = null;
+ this.tag = null;
+ },
+
+ /**
+ * Show overflow highlight if showOverflowHighlight is true, otherwise hide it.
+ *
+ * @param {Boolean} showOverflowHighlight
+ */
+ setOverflowHighlight(showOverflowHighlight) {
+ this.container.tagState.classList.toggle(
+ "overflow-causing-highlighted",
+ showOverflowHighlight
+ );
+ },
+
+ /**
+ * Stub method for consistency with ElementEditor.
+ */
+ getInfoAtNode() {
+ return null;
+ },
+};
+
+module.exports = ReadOnlyEditor;
diff --git a/devtools/client/inspector/markup/views/root-container.js b/devtools/client/inspector/markup/views/root-container.js
new file mode 100644
index 0000000000..8b34b85843
--- /dev/null
+++ b/devtools/client/inspector/markup/views/root-container.js
@@ -0,0 +1,60 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+/**
+ * Dummy container node used for the root document element.
+ */
+function RootContainer(markupView, node) {
+ this.doc = markupView.doc;
+ this.elt = this.doc.createElement("ul");
+ // Root container has tree semantics for accessibility.
+ this.elt.setAttribute("role", "tree");
+ this.elt.setAttribute("tabindex", "0");
+ this.elt.setAttribute("aria-dropeffect", "none");
+ this.elt.container = this;
+ this.children = this.elt;
+ this.node = node;
+ this.toString = () => "[root container]";
+}
+
+RootContainer.prototype = {
+ hasChildren: true,
+ expanded: true,
+ update() {},
+ destroy() {},
+
+ /**
+ * If the node has children, return the list of containers for all these children.
+ * @return {Array} An array of child containers or null.
+ */
+ getChildContainers() {
+ return [...this.children.children]
+ .filter(node => node.container)
+ .map(node => node.container);
+ },
+
+ /**
+ * Set the expanded state of the container node.
+ * @param {Boolean} value
+ */
+ setExpanded() {},
+
+ /**
+ * Set an appropriate role of the container's children node.
+ */
+ setChildrenRole() {},
+
+ /**
+ * Set an appropriate DOM tree depth level for a node and its subtree.
+ */
+ updateLevel() {},
+
+ isSlotted() {
+ return false;
+ },
+};
+
+module.exports = RootContainer;
diff --git a/devtools/client/inspector/markup/views/slotted-node-container.js b/devtools/client/inspector/markup/views/slotted-node-container.js
new file mode 100644
index 0000000000..6d128cfc39
--- /dev/null
+++ b/devtools/client/inspector/markup/views/slotted-node-container.js
@@ -0,0 +1,76 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const SlottedNodeEditor = require("resource://devtools/client/inspector/markup/views/slotted-node-editor.js");
+const MarkupContainer = require("resource://devtools/client/inspector/markup/views/markup-container.js");
+const { extend } = require("resource://devtools/shared/extend.js");
+
+function SlottedNodeContainer(markupView, node) {
+ MarkupContainer.prototype.initialize.call(
+ this,
+ markupView,
+ node,
+ "slottednodecontainer"
+ );
+
+ this.editor = new SlottedNodeEditor(this, node);
+ this.tagLine.appendChild(this.editor.elt);
+ this.hasChildren = false;
+}
+
+SlottedNodeContainer.prototype = extend(MarkupContainer.prototype, {
+ _onMouseDown(event) {
+ if (event.target.classList.contains("reveal-link")) {
+ event.stopPropagation();
+ event.preventDefault();
+ return;
+ }
+ MarkupContainer.prototype._onMouseDown.call(this, event);
+ },
+
+ /**
+ * Slotted node containers never display children and should not react to toggle.
+ */
+ _onToggle(event) {
+ event.stopPropagation();
+ },
+
+ _revealFromSlot() {
+ const reason = "reveal-from-slot";
+ this.markup.inspector.selection.setNodeFront(this.node, { reason });
+ this.markup.telemetry.scalarSet(
+ "devtools.shadowdom.reveal_link_clicked",
+ true
+ );
+ },
+
+ _onKeyDown(event) {
+ MarkupContainer.prototype._onKeyDown.call(this, event);
+
+ const isActionKey = event.code == "Enter" || event.code == "Space";
+ if (event.target.classList.contains("reveal-link") && isActionKey) {
+ this._revealFromSlot();
+ }
+ },
+
+ async onContainerClick(event) {
+ if (!event.target.classList.contains("reveal-link")) {
+ return;
+ }
+
+ this._revealFromSlot();
+ },
+
+ isDraggable() {
+ return false;
+ },
+
+ isSlotted() {
+ return true;
+ },
+});
+
+module.exports = SlottedNodeContainer;
diff --git a/devtools/client/inspector/markup/views/slotted-node-editor.js b/devtools/client/inspector/markup/views/slotted-node-editor.js
new file mode 100644
index 0000000000..d70311e4dc
--- /dev/null
+++ b/devtools/client/inspector/markup/views/slotted-node-editor.js
@@ -0,0 +1,63 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const { LocalizationHelper } = require("resource://devtools/shared/l10n.js");
+const INSPECTOR_L10N = new LocalizationHelper(
+ "devtools/client/locales/inspector.properties"
+);
+
+function SlottedNodeEditor(container, node) {
+ this.container = container;
+ this.markup = this.container.markup;
+ this.buildMarkup();
+ this.tag.textContent = "<" + node.nodeName.toLowerCase() + ">";
+
+ // Make the "tag" part of this editor focusable.
+ this.tag.setAttribute("tabindex", "-1");
+}
+
+SlottedNodeEditor.prototype = {
+ buildMarkup() {
+ const doc = this.markup.doc;
+
+ this.elt = doc.createElement("span");
+ this.elt.classList.add("editor");
+
+ this.tag = doc.createElement("span");
+ this.tag.classList.add("tag");
+ this.elt.appendChild(this.tag);
+
+ this.revealLink = doc.createElement("span");
+ this.revealLink.setAttribute("role", "link");
+ this.revealLink.setAttribute("tabindex", -1);
+ this.revealLink.title = INSPECTOR_L10N.getStr(
+ "markupView.revealLink.tooltip"
+ );
+ this.revealLink.classList.add("reveal-link");
+ this.elt.appendChild(this.revealLink);
+ },
+
+ destroy() {
+ // We might be already destroyed.
+ if (!this.elt) {
+ return;
+ }
+
+ this.elt.remove();
+ this.elt = null;
+ this.tag = null;
+ this.revealLink = null;
+ },
+
+ /**
+ * Stub method for consistency with ElementEditor.
+ */
+ getInfoAtNode() {
+ return null;
+ },
+};
+
+module.exports = SlottedNodeEditor;
diff --git a/devtools/client/inspector/markup/views/text-container.js b/devtools/client/inspector/markup/views/text-container.js
new file mode 100644
index 0000000000..1b240cb1df
--- /dev/null
+++ b/devtools/client/inspector/markup/views/text-container.js
@@ -0,0 +1,44 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const nodeConstants = require("resource://devtools/shared/dom-node-constants.js");
+const TextEditor = require("resource://devtools/client/inspector/markup/views/text-editor.js");
+const MarkupContainer = require("resource://devtools/client/inspector/markup/views/markup-container.js");
+const { extend } = require("resource://devtools/shared/extend.js");
+
+/**
+ * An implementation of MarkupContainer for text node and comment nodes.
+ * Allows basic text editing in a textarea.
+ *
+ * @param {MarkupView} markupView
+ * The markup view that owns this container.
+ * @param {NodeFront} node
+ * The node to display.
+ * @param {Inspector} inspector
+ * The inspector tool container the markup-view
+ */
+function MarkupTextContainer(markupView, node) {
+ MarkupContainer.prototype.initialize.call(
+ this,
+ markupView,
+ node,
+ "textcontainer"
+ );
+
+ if (node.nodeType == nodeConstants.TEXT_NODE) {
+ this.editor = new TextEditor(this, node, "text");
+ } else if (node.nodeType == nodeConstants.COMMENT_NODE) {
+ this.editor = new TextEditor(this, node, "comment");
+ } else {
+ throw new Error("Invalid node for MarkupTextContainer");
+ }
+
+ this.tagLine.appendChild(this.editor.elt);
+}
+
+MarkupTextContainer.prototype = extend(MarkupContainer.prototype, {});
+
+module.exports = MarkupTextContainer;
diff --git a/devtools/client/inspector/markup/views/text-editor.js b/devtools/client/inspector/markup/views/text-editor.js
new file mode 100644
index 0000000000..62b59c74cd
--- /dev/null
+++ b/devtools/client/inspector/markup/views/text-editor.js
@@ -0,0 +1,143 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const {
+ createFactory,
+} = require("resource://devtools/client/shared/vendor/react.js");
+
+const TextNode = createFactory(
+ require("resource://devtools/client/inspector/markup/components/TextNode.js")
+);
+
+loader.lazyRequireGetter(
+ this,
+ "getAutocompleteMaxWidth",
+ "resource://devtools/client/inspector/markup/utils.js",
+ true
+);
+loader.lazyRequireGetter(
+ this,
+ "getLongString",
+ "resource://devtools/client/inspector/shared/utils.js",
+ true
+);
+loader.lazyRequireGetter(
+ this,
+ "InplaceEditor",
+ "resource://devtools/client/shared/inplace-editor.js",
+ true
+);
+
+/**
+ * Creates a simple text editor node, used for TEXT and COMMENT
+ * nodes.
+ *
+ * @param {MarkupContainer} container
+ * The container owning this editor.
+ * @param {DOMNode} node
+ * The node being edited.
+ * @param {String} type
+ * The type of editor to build. This can be either 'text' or 'comment'.
+ */
+function TextEditor(container, node, type) {
+ this.container = container;
+ this.markup = this.container.markup;
+ this.node = node;
+ this._selected = false;
+
+ this.showTextEditor = this.showTextEditor.bind(this);
+
+ this.buildMarkup(type);
+}
+
+TextEditor.prototype = {
+ buildMarkup(type) {
+ const doc = this.markup.doc;
+
+ this.elt = doc.createElement("span");
+ this.elt.classList.add("editor", type);
+
+ getLongString(this.node.getNodeValue()).then(value => {
+ this.textNode = this.ReactDOM.render(
+ TextNode({
+ showTextEditor: this.showTextEditor,
+ type,
+ value,
+ }),
+ this.elt
+ );
+ });
+ },
+
+ get ReactDOM() {
+ // Reuse the toolbox's ReactDOM to avoid loading react-dom.js again in the
+ // Inspector's BrowserLoader.
+ return this.container.markup.inspector.ReactDOM;
+ },
+
+ get selected() {
+ return this._selected;
+ },
+
+ set selected(value) {
+ if (value === this._selected) {
+ return;
+ }
+ this._selected = value;
+ this.update();
+ },
+
+ showTextEditor(element) {
+ new InplaceEditor({
+ cssProperties: this.markup.inspector.cssProperties,
+ done: (val, commit) => {
+ if (!commit) {
+ return;
+ }
+ getLongString(this.node.getNodeValue()).then(oldValue => {
+ this.container.undo.do(
+ () => {
+ this.node.setNodeValue(val);
+ },
+ () => {
+ this.node.setNodeValue(oldValue);
+ }
+ );
+ });
+ },
+ element,
+ maxWidth: () => getAutocompleteMaxWidth(element, this.container.elt),
+ multiline: true,
+ stopOnReturn: true,
+ trimOutput: false,
+ });
+ },
+
+ async update() {
+ try {
+ const value = await getLongString(this.node.getNodeValue());
+
+ if (this.textNode.state.value !== value) {
+ this.textNode.setState({ value });
+ }
+ } catch (e) {
+ console.error(e);
+ }
+ },
+
+ destroy() {
+ this.ReactDOM.unmountComponentAtNode(this.elt);
+ },
+
+ /**
+ * Stub method for consistency with ElementEditor.
+ */
+ getInfoAtNode() {
+ return null;
+ },
+};
+
+module.exports = TextEditor;