yattho_view_components 0.0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (447) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -0
  3. data/app/assets/javascripts/yattho_view_components.js +1 -1
  4. data/app/assets/javascripts/yattho_view_components.js.map +1 -1
  5. data/app/assets/styles/yattho_view_components.css +3 -5958
  6. data/app/assets/styles/yattho_view_components.css.map +1 -1
  7. data/app/components/yattho/alpha/action_list.css +1 -697
  8. data/app/components/yattho/alpha/action_list.css.json +1 -1
  9. data/app/components/yattho/alpha/action_list.css.map +1 -1
  10. data/app/components/yattho/alpha/auto_complete.css +1 -130
  11. data/app/components/yattho/alpha/auto_complete.css.json +1 -1
  12. data/app/components/yattho/alpha/auto_complete.css.map +1 -1
  13. data/app/components/yattho/alpha/banner.css +1 -131
  14. data/app/components/yattho/alpha/banner.css.json +1 -1
  15. data/app/components/yattho/alpha/banner.css.map +1 -1
  16. data/app/components/yattho/alpha/button_marketing.css +1 -211
  17. data/app/components/yattho/alpha/button_marketing.css.json +1 -1
  18. data/app/components/yattho/alpha/button_marketing.css.map +1 -1
  19. data/app/components/yattho/alpha/dialog.css +1 -613
  20. data/app/components/yattho/alpha/dialog.css.json +1 -1
  21. data/app/components/yattho/alpha/dialog.css.map +1 -1
  22. data/app/components/yattho/alpha/dropdown.css +1 -264
  23. data/app/components/yattho/alpha/dropdown.css.json +1 -1
  24. data/app/components/yattho/alpha/dropdown.css.map +1 -1
  25. data/app/components/yattho/alpha/layout.css +1 -398
  26. data/app/components/yattho/alpha/layout.css.json +1 -1
  27. data/app/components/yattho/alpha/layout.css.map +1 -1
  28. data/app/components/yattho/alpha/menu.css +1 -117
  29. data/app/components/yattho/alpha/menu.css.json +1 -1
  30. data/app/components/yattho/alpha/menu.css.map +1 -1
  31. data/app/components/yattho/alpha/modal_dialog.js +2 -0
  32. data/app/components/yattho/alpha/segmented_control.css +1 -164
  33. data/app/components/yattho/alpha/segmented_control.css.json +1 -1
  34. data/app/components/yattho/alpha/segmented_control.css.map +1 -1
  35. data/app/components/yattho/alpha/tab_nav.css +1 -106
  36. data/app/components/yattho/alpha/tab_nav.css.json +1 -1
  37. data/app/components/yattho/alpha/tab_nav.css.map +1 -1
  38. data/app/components/yattho/alpha/text_field.css +3 -836
  39. data/app/components/yattho/alpha/text_field.css.json +1 -1
  40. data/app/components/yattho/alpha/text_field.css.map +1 -1
  41. data/app/components/yattho/alpha/toggle_switch.css +1 -253
  42. data/app/components/yattho/alpha/toggle_switch.css.json +1 -1
  43. data/app/components/yattho/alpha/toggle_switch.css.map +1 -1
  44. data/app/components/yattho/alpha/underline_nav.css +1 -148
  45. data/app/components/yattho/alpha/underline_nav.css.json +1 -1
  46. data/app/components/yattho/alpha/underline_nav.css.map +1 -1
  47. data/app/components/yattho/beta/avatar.css +1 -74
  48. data/app/components/yattho/beta/avatar.css.json +1 -1
  49. data/app/components/yattho/beta/avatar.css.map +1 -1
  50. data/app/components/yattho/beta/avatar_stack.css +1 -138
  51. data/app/components/yattho/beta/avatar_stack.css.json +1 -1
  52. data/app/components/yattho/beta/avatar_stack.css.map +1 -1
  53. data/app/components/yattho/beta/blankslate.css +1 -90
  54. data/app/components/yattho/beta/blankslate.css.map +1 -1
  55. data/app/components/yattho/beta/border_box.css +1 -279
  56. data/app/components/yattho/beta/border_box.css.json +1 -1
  57. data/app/components/yattho/beta/border_box.css.map +1 -1
  58. data/app/components/yattho/beta/breadcrumbs.css +1 -27
  59. data/app/components/yattho/beta/breadcrumbs.css.json +1 -1
  60. data/app/components/yattho/beta/breadcrumbs.css.map +1 -1
  61. data/app/components/yattho/beta/button.css +1 -365
  62. data/app/components/yattho/beta/button.css.json +1 -1
  63. data/app/components/yattho/beta/button.css.map +1 -1
  64. data/app/components/yattho/beta/counter.css +1 -36
  65. data/app/components/yattho/beta/counter.css.map +1 -1
  66. data/app/components/yattho/beta/flash.css +1 -150
  67. data/app/components/yattho/beta/flash.css.json +1 -1
  68. data/app/components/yattho/beta/flash.css.map +1 -1
  69. data/app/components/yattho/beta/label.css +1 -105
  70. data/app/components/yattho/beta/label.css.json +1 -1
  71. data/app/components/yattho/beta/label.css.map +1 -1
  72. data/app/components/yattho/beta/link.css +1 -62
  73. data/app/components/yattho/beta/link.css.json +1 -1
  74. data/app/components/yattho/beta/link.css.map +1 -1
  75. data/app/components/yattho/beta/popover.css +1 -235
  76. data/app/components/yattho/beta/popover.css.json +1 -1
  77. data/app/components/yattho/beta/popover.css.map +1 -1
  78. data/app/components/yattho/beta/progress_bar.css +1 -26
  79. data/app/components/yattho/beta/progress_bar.css.json +1 -1
  80. data/app/components/yattho/beta/progress_bar.css.map +1 -1
  81. data/app/components/yattho/beta/state.css +1 -50
  82. data/app/components/yattho/beta/state.css.json +1 -1
  83. data/app/components/yattho/beta/state.css.map +1 -1
  84. data/app/components/yattho/beta/subhead.css +1 -54
  85. data/app/components/yattho/beta/subhead.css.json +1 -1
  86. data/app/components/yattho/beta/subhead.css.map +1 -1
  87. data/app/components/yattho/beta/timeline_item.css +1 -95
  88. data/app/components/yattho/beta/timeline_item.css.json +1 -1
  89. data/app/components/yattho/beta/timeline_item.css.map +1 -1
  90. data/app/components/yattho/beta/truncate.css +1 -37
  91. data/app/components/yattho/beta/truncate.css.json +1 -1
  92. data/app/components/yattho/beta/truncate.css.map +1 -1
  93. data/app/components/yattho/truncate.css +1 -30
  94. data/app/components/yattho/truncate.css.json +1 -1
  95. data/app/components/yattho/truncate.css.map +1 -1
  96. data/lib/yattho/view_components/version.rb +1 -1
  97. metadata +3 -353
  98. data/previews/docs/alpha_auto_complete_item_preview/default.html.erb +0 -10
  99. data/previews/docs/alpha_auto_complete_item_preview.rb +0 -7
  100. data/previews/docs/alpha_auto_complete_preview/default.html.erb +0 -1
  101. data/previews/docs/alpha_auto_complete_preview/with_clear_button.html.erb +0 -1
  102. data/previews/docs/alpha_auto_complete_preview/with_custom_classes_for_the_input.html.erb +0 -3
  103. data/previews/docs/alpha_auto_complete_preview/with_custom_classes_for_the_results.html.erb +0 -10
  104. data/previews/docs/alpha_auto_complete_preview/with_icon.html.erb +0 -1
  105. data/previews/docs/alpha_auto_complete_preview/with_icon_and_non_visible_label.html.erb +0 -1
  106. data/previews/docs/alpha_auto_complete_preview/with_inline_label.html.erb +0 -1
  107. data/previews/docs/alpha_auto_complete_preview/with_non_visible_label.html.erb +0 -1
  108. data/previews/docs/alpha_auto_complete_preview.rb +0 -21
  109. data/previews/docs/alpha_banner_preview/custom_icon.html.erb +0 -1
  110. data/previews/docs/alpha_banner_preview/dismissible.html.erb +0 -1
  111. data/previews/docs/alpha_banner_preview/full_width.html.erb +0 -1
  112. data/previews/docs/alpha_banner_preview/schemes.html.erb +0 -6
  113. data/previews/docs/alpha_banner_preview/with_action_button.html.erb +0 -4
  114. data/previews/docs/alpha_banner_preview/with_custom_action.html.erb +0 -6
  115. data/previews/docs/alpha_banner_preview.rb +0 -17
  116. data/previews/docs/alpha_button_marketing_preview/schemes.html.erb +0 -6
  117. data/previews/docs/alpha_button_marketing_preview/sizes.html.erb +0 -2
  118. data/previews/docs/alpha_button_marketing_preview.rb +0 -9
  119. data/previews/docs/alpha_dialog_preview/dialog_with_cancel_and_submit_buttons.html.erb +0 -13
  120. data/previews/docs/alpha_dialog_preview.rb +0 -7
  121. data/previews/docs/alpha_dropdown_preview/customizing_menu_items.html.erb +0 -11
  122. data/previews/docs/alpha_dropdown_preview/customizing_the_button.html.erb +0 -12
  123. data/previews/docs/alpha_dropdown_preview/default.html.erb +0 -11
  124. data/previews/docs/alpha_dropdown_preview/menu_as_list.html.erb +0 -13
  125. data/previews/docs/alpha_dropdown_preview/with_caret.html.erb +0 -12
  126. data/previews/docs/alpha_dropdown_preview/with_direction.html.erb +0 -12
  127. data/previews/docs/alpha_dropdown_preview/with_dividers.html.erb +0 -16
  128. data/previews/docs/alpha_dropdown_preview.rb +0 -19
  129. data/previews/docs/alpha_hellip_button_preview/default.html.erb +0 -1
  130. data/previews/docs/alpha_hellip_button_preview/inline.html.erb +0 -1
  131. data/previews/docs/alpha_hellip_button_preview/styling_the_button.html.erb +0 -1
  132. data/previews/docs/alpha_hellip_button_preview.rb +0 -11
  133. data/previews/docs/alpha_hidden_text_expander_preview/default.html.erb +0 -1
  134. data/previews/docs/alpha_hidden_text_expander_preview/inline.html.erb +0 -1
  135. data/previews/docs/alpha_hidden_text_expander_preview/styling_the_button.html.erb +0 -1
  136. data/previews/docs/alpha_hidden_text_expander_preview.rb +0 -11
  137. data/previews/docs/alpha_image_crop_preview/cropper_with_a_custom_loader.html.erb +0 -3
  138. data/previews/docs/alpha_image_crop_preview/simple_cropper.html.erb +0 -1
  139. data/previews/docs/alpha_image_crop_preview/square_cropper.html.erb +0 -1
  140. data/previews/docs/alpha_image_crop_preview.rb +0 -11
  141. data/previews/docs/alpha_image_preview/custom_size.html.erb +0 -2
  142. data/previews/docs/alpha_image_preview/default.html.erb +0 -2
  143. data/previews/docs/alpha_image_preview/helper.html.erb +0 -2
  144. data/previews/docs/alpha_image_preview/lazy_loading.html.erb +0 -2
  145. data/previews/docs/alpha_image_preview.rb +0 -13
  146. data/previews/docs/alpha_layout_preview/changing_when_to_render_layout_as_columns.html.erb +0 -12
  147. data/previews/docs/alpha_layout_preview/default.html.erb +0 -5
  148. data/previews/docs/alpha_layout_preview/main_widths.html.erb +0 -16
  149. data/previews/docs/alpha_layout_preview/sidebar_placement.html.erb +0 -8
  150. data/previews/docs/alpha_layout_preview/sidebar_placement_as_row.html.erb +0 -12
  151. data/previews/docs/alpha_layout_preview/sidebar_widths.html.erb +0 -12
  152. data/previews/docs/alpha_layout_preview.rb +0 -17
  153. data/previews/docs/alpha_menu_preview/default.html.erb +0 -17
  154. data/previews/docs/alpha_menu_preview.rb +0 -7
  155. data/previews/docs/alpha_nav_list_preview/expandable_sub_items.html.erb +0 -24
  156. data/previews/docs/alpha_nav_list_preview/items_and_headings.html.erb +0 -12
  157. data/previews/docs/alpha_nav_list_preview/leading_and_trailing_visuals.html.erb +0 -17
  158. data/previews/docs/alpha_nav_list_preview/trailing_action.html.erb +0 -12
  159. data/previews/docs/alpha_nav_list_preview.rb +0 -13
  160. data/previews/docs/alpha_octicon_symbols_preview/symbol_dictionary.html.erb +0 -4
  161. data/previews/docs/alpha_octicon_symbols_preview.rb +0 -7
  162. data/previews/docs/alpha_segmented_control_preview/basic_usage.html.erb +0 -6
  163. data/previews/docs/alpha_segmented_control_preview/fill_width_of_parent.html.erb +0 -5
  164. data/previews/docs/alpha_segmented_control_preview/small.html.erb +0 -6
  165. data/previews/docs/alpha_segmented_control_preview/with_icons.html.erb +0 -5
  166. data/previews/docs/alpha_segmented_control_preview/with_icons_only.html.erb +0 -5
  167. data/previews/docs/alpha_segmented_control_preview.rb +0 -15
  168. data/previews/docs/alpha_tab_container_preview/default.html.erb +0 -16
  169. data/previews/docs/alpha_tab_container_preview.rb +0 -7
  170. data/previews/docs/alpha_tab_nav_preview/adding_extra_content_after_the_tabs.html.erb +0 -10
  171. data/previews/docs/alpha_tab_nav_preview/customizing_the_body.html.erb +0 -5
  172. data/previews/docs/alpha_tab_nav_preview/default_with_div.html.erb +0 -5
  173. data/previews/docs/alpha_tab_nav_preview/default_with_nav.html.erb +0 -5
  174. data/previews/docs/alpha_tab_nav_preview/with_extra_content.html.erb +0 -8
  175. data/previews/docs/alpha_tab_nav_preview/with_icons_and_counters.html.erb +0 -15
  176. data/previews/docs/alpha_tab_nav_preview.rb +0 -17
  177. data/previews/docs/alpha_tab_panels_preview/default.html.erb +0 -14
  178. data/previews/docs/alpha_tab_panels_preview.rb +0 -7
  179. data/previews/docs/alpha_text_field_preview/default.html.erb +0 -1
  180. data/previews/docs/alpha_text_field_preview/disabled.html.erb +0 -7
  181. data/previews/docs/alpha_text_field_preview/full_width.html.erb +0 -7
  182. data/previews/docs/alpha_text_field_preview/invalid.html.erb +0 -7
  183. data/previews/docs/alpha_text_field_preview/with_a_caption.html.erb +0 -7
  184. data/previews/docs/alpha_text_field_preview/with_a_clear_button.html.erb +0 -7
  185. data/previews/docs/alpha_text_field_preview/with_a_leading_visual.html.erb +0 -9
  186. data/previews/docs/alpha_text_field_preview/with_a_validation_message.html.erb +0 -7
  187. data/previews/docs/alpha_text_field_preview.rb +0 -21
  188. data/previews/docs/alpha_toggle_switch_preview/checked.html.erb +0 -1
  189. data/previews/docs/alpha_toggle_switch_preview/checked_and_disabled.html.erb +0 -1
  190. data/previews/docs/alpha_toggle_switch_preview/default.html.erb +0 -1
  191. data/previews/docs/alpha_toggle_switch_preview/disabled.html.erb +0 -1
  192. data/previews/docs/alpha_toggle_switch_preview/small.html.erb +0 -1
  193. data/previews/docs/alpha_toggle_switch_preview/with_status_label_positioned_at_the_end.html.erb +0 -1
  194. data/previews/docs/alpha_toggle_switch_preview.rb +0 -17
  195. data/previews/docs/alpha_tooltip_preview/as_a_label_for_an_iconbutton.html.erb +0 -1
  196. data/previews/docs/alpha_tooltip_preview/as_a_supplementary_description_for_a_button.html.erb +0 -4
  197. data/previews/docs/alpha_tooltip_preview/as_a_supplementary_description_for_an_iconbutton.html.erb +0 -1
  198. data/previews/docs/alpha_tooltip_preview/directly_using_tooltip.html.erb +0 -4
  199. data/previews/docs/alpha_tooltip_preview/with_direction.html.erb +0 -32
  200. data/previews/docs/alpha_tooltip_preview.rb +0 -15
  201. data/previews/docs/alpha_underline_nav_preview/align_right.html.erb +0 -11
  202. data/previews/docs/alpha_underline_nav_preview/customizing_the_body.html.erb +0 -5
  203. data/previews/docs/alpha_underline_nav_preview/default_with_nav.html.erb +0 -7
  204. data/previews/docs/alpha_underline_nav_preview/with_div.html.erb +0 -7
  205. data/previews/docs/alpha_underline_nav_preview/with_icons_and_counters.html.erb +0 -18
  206. data/previews/docs/alpha_underline_nav_preview.rb +0 -15
  207. data/previews/docs/alpha_underline_panels_preview/default.html.erb +0 -17
  208. data/previews/docs/alpha_underline_panels_preview.rb +0 -7
  209. data/previews/docs/beta_auto_complete_item_preview/default.html.erb +0 -6
  210. data/previews/docs/beta_auto_complete_item_preview.rb +0 -7
  211. data/previews/docs/beta_auto_complete_preview/full_width_field.html.erb +0 -3
  212. data/previews/docs/beta_auto_complete_preview/inset_variant.html.erb +0 -3
  213. data/previews/docs/beta_auto_complete_preview/leading_visual.html.erb +0 -3
  214. data/previews/docs/beta_auto_complete_preview/monospace_variant.html.erb +0 -3
  215. data/previews/docs/beta_auto_complete_preview/trailing_action.html.erb +0 -1
  216. data/previews/docs/beta_auto_complete_preview/visually_hidden_label.html.erb +0 -3
  217. data/previews/docs/beta_auto_complete_preview/with_custom_classes_for_the_input.html.erb +0 -3
  218. data/previews/docs/beta_auto_complete_preview/with_custom_classes_for_the_results.html.erb +0 -3
  219. data/previews/docs/beta_auto_complete_preview.rb +0 -21
  220. data/previews/docs/beta_avatar_preview/default.html.erb +0 -1
  221. data/previews/docs/beta_avatar_preview/link.html.erb +0 -1
  222. data/previews/docs/beta_avatar_preview/square.html.erb +0 -1
  223. data/previews/docs/beta_avatar_preview/with_size.html.erb +0 -7
  224. data/previews/docs/beta_avatar_preview.rb +0 -13
  225. data/previews/docs/beta_avatar_stack_preview/align_right.html.erb +0 -5
  226. data/previews/docs/beta_avatar_stack_preview/default.html.erb +0 -5
  227. data/previews/docs/beta_avatar_stack_preview/with_tooltip.html.erb +0 -5
  228. data/previews/docs/beta_avatar_stack_preview.rb +0 -11
  229. data/previews/docs/beta_base_button_preview/block.html.erb +0 -2
  230. data/previews/docs/beta_base_button_preview.rb +0 -7
  231. data/previews/docs/beta_blankslate_preview/basic.html.erb +0 -4
  232. data/previews/docs/beta_blankslate_preview/custom_content.html.erb +0 -6
  233. data/previews/docs/beta_blankslate_preview/icon.html.erb +0 -5
  234. data/previews/docs/beta_blankslate_preview/loading.html.erb +0 -5
  235. data/previews/docs/beta_blankslate_preview/primary_action.html.erb +0 -6
  236. data/previews/docs/beta_blankslate_preview/primary_and_secondary_actions.html.erb +0 -7
  237. data/previews/docs/beta_blankslate_preview/secondary_action.html.erb +0 -6
  238. data/previews/docs/beta_blankslate_preview/using_an_image.html.erb +0 -5
  239. data/previews/docs/beta_blankslate_preview/variations.html.erb +0 -8
  240. data/previews/docs/beta_blankslate_preview/with_border.html.erb +0 -5
  241. data/previews/docs/beta_blankslate_preview.rb +0 -25
  242. data/previews/docs/beta_border_box_header_preview/default.html.erb +0 -4
  243. data/previews/docs/beta_border_box_header_preview/with_title.html.erb +0 -3
  244. data/previews/docs/beta_border_box_header_preview.rb +0 -9
  245. data/previews/docs/beta_border_box_preview/header_with_title_body_rows_and_footer.html.erb +0 -21
  246. data/previews/docs/beta_border_box_preview/padding_density.html.erb +0 -14
  247. data/previews/docs/beta_border_box_preview/row_colors.html.erb +0 -14
  248. data/previews/docs/beta_border_box_preview.rb +0 -11
  249. data/previews/docs/beta_breadcrumbs_preview/basic.html.erb +0 -5
  250. data/previews/docs/beta_breadcrumbs_preview.rb +0 -7
  251. data/previews/docs/beta_button_group_preview/default.html.erb +0 -8
  252. data/previews/docs/beta_button_group_preview/sizes.html.erb +0 -7
  253. data/previews/docs/beta_button_group_preview.rb +0 -9
  254. data/previews/docs/beta_button_preview/full_width.html.erb +0 -2
  255. data/previews/docs/beta_button_preview/schemes.html.erb +0 -4
  256. data/previews/docs/beta_button_preview/sizes.html.erb +0 -2
  257. data/previews/docs/beta_button_preview/with_leading_and_trailing_visuals.html.erb +0 -5
  258. data/previews/docs/beta_button_preview/with_leading_visual.html.erb +0 -4
  259. data/previews/docs/beta_button_preview/with_tooltip.html.erb +0 -4
  260. data/previews/docs/beta_button_preview/with_trailing_visual.html.erb +0 -4
  261. data/previews/docs/beta_button_preview.rb +0 -19
  262. data/previews/docs/beta_clipboard_copy_preview/copying_from_an_element.html.erb +0 -2
  263. data/previews/docs/beta_clipboard_copy_preview/default.html.erb +0 -1
  264. data/previews/docs/beta_clipboard_copy_preview/with_text_instead_of_icons.html.erb +0 -3
  265. data/previews/docs/beta_clipboard_copy_preview.rb +0 -11
  266. data/previews/docs/beta_close_button_preview/default.html.erb +0 -1
  267. data/previews/docs/beta_close_button_preview.rb +0 -7
  268. data/previews/docs/beta_counter_preview/default.html.erb +0 -1
  269. data/previews/docs/beta_counter_preview/schemes.html.erb +0 -2
  270. data/previews/docs/beta_counter_preview.rb +0 -9
  271. data/previews/docs/beta_details_preview/default.html.erb +0 -9
  272. data/previews/docs/beta_details_preview.rb +0 -7
  273. data/previews/docs/beta_flash_preview/dismissible.html.erb +0 -1
  274. data/previews/docs/beta_flash_preview/full_width.html.erb +0 -1
  275. data/previews/docs/beta_flash_preview/icon.html.erb +0 -1
  276. data/previews/docs/beta_flash_preview/schemes.html.erb +0 -4
  277. data/previews/docs/beta_flash_preview/with_actions.html.erb +0 -6
  278. data/previews/docs/beta_flash_preview.rb +0 -15
  279. data/previews/docs/beta_heading_preview/default.html.erb +0 -6
  280. data/previews/docs/beta_heading_preview.rb +0 -7
  281. data/previews/docs/beta_icon_button_preview/custom_tooltip_direction.html.erb +0 -2
  282. data/previews/docs/beta_icon_button_preview/default.html.erb +0 -2
  283. data/previews/docs/beta_icon_button_preview/schemes.html.erb +0 -3
  284. data/previews/docs/beta_icon_button_preview/with_an_aria_description.html.erb +0 -1
  285. data/previews/docs/beta_icon_button_preview.rb +0 -13
  286. data/previews/docs/beta_label_preview/inline.html.erb +0 -2
  287. data/previews/docs/beta_label_preview/schemes.html.erb +0 -10
  288. data/previews/docs/beta_label_preview/sizes.html.erb +0 -2
  289. data/previews/docs/beta_label_preview.rb +0 -11
  290. data/previews/docs/beta_link_preview/default.html.erb +0 -1
  291. data/previews/docs/beta_link_preview/muted.html.erb +0 -1
  292. data/previews/docs/beta_link_preview/schemes.html.erb +0 -2
  293. data/previews/docs/beta_link_preview/with_tooltip.html.erb +0 -4
  294. data/previews/docs/beta_link_preview/without_underline.html.erb +0 -1
  295. data/previews/docs/beta_link_preview.rb +0 -15
  296. data/previews/docs/beta_markdown_preview/default.html.erb +0 -260
  297. data/previews/docs/beta_markdown_preview.rb +0 -7
  298. data/previews/docs/beta_octicon_preview/default.html.erb +0 -2
  299. data/previews/docs/beta_octicon_preview/helper.html.erb +0 -1
  300. data/previews/docs/beta_octicon_preview/medium.html.erb +0 -1
  301. data/previews/docs/beta_octicon_preview.rb +0 -11
  302. data/previews/docs/beta_popover_preview/caret_position.html.erb +0 -8
  303. data/previews/docs/beta_popover_preview/default.html.erb +0 -8
  304. data/previews/docs/beta_popover_preview/large.html.erb +0 -8
  305. data/previews/docs/beta_popover_preview/with_multiple_elements_in_the_body.html.erb +0 -11
  306. data/previews/docs/beta_popover_preview.rb +0 -13
  307. data/previews/docs/beta_progress_bar_preview/default.html.erb +0 -3
  308. data/previews/docs/beta_progress_bar_preview/large.html.erb +0 -3
  309. data/previews/docs/beta_progress_bar_preview/multiple_items.html.erb +0 -5
  310. data/previews/docs/beta_progress_bar_preview/small.html.erb +0 -3
  311. data/previews/docs/beta_progress_bar_preview.rb +0 -13
  312. data/previews/docs/beta_relative_time_preview/default.html.erb +0 -1
  313. data/previews/docs/beta_relative_time_preview/elapsed_time.html.erb +0 -1
  314. data/previews/docs/beta_relative_time_preview/past_time.html.erb +0 -1
  315. data/previews/docs/beta_relative_time_preview.rb +0 -11
  316. data/previews/docs/beta_spinner_preview/default.html.erb +0 -1
  317. data/previews/docs/beta_spinner_preview/large.html.erb +0 -1
  318. data/previews/docs/beta_spinner_preview/small.html.erb +0 -1
  319. data/previews/docs/beta_spinner_preview.rb +0 -11
  320. data/previews/docs/beta_state_preview/default.html.erb +0 -1
  321. data/previews/docs/beta_state_preview/schemes.html.erb +0 -4
  322. data/previews/docs/beta_state_preview/sizes.html.erb +0 -2
  323. data/previews/docs/beta_state_preview.rb +0 -11
  324. data/previews/docs/beta_subhead_preview/default.html.erb +0 -8
  325. data/previews/docs/beta_subhead_preview/with_actions.html.erb +0 -15
  326. data/previews/docs/beta_subhead_preview/with_dangerous_heading.html.erb +0 -8
  327. data/previews/docs/beta_subhead_preview/with_long_description.html.erb +0 -6
  328. data/previews/docs/beta_subhead_preview/without_border.html.erb +0 -8
  329. data/previews/docs/beta_subhead_preview.rb +0 -15
  330. data/previews/docs/beta_text_preview/default.html.erb +0 -2
  331. data/previews/docs/beta_text_preview.rb +0 -7
  332. data/previews/docs/beta_timeline_item_preview/default.html.erb +0 -7
  333. data/previews/docs/beta_timeline_item_preview.rb +0 -7
  334. data/previews/docs/beta_truncate_preview/advanced_multiple_items.html.erb +0 -9
  335. data/previews/docs/beta_truncate_preview/default.html.erb +0 -1
  336. data/previews/docs/beta_truncate_preview/expand_on_hover_or_focus.html.erb +0 -6
  337. data/previews/docs/beta_truncate_preview/max_widths.html.erb +0 -5
  338. data/previews/docs/beta_truncate_preview/max_widths_on_new_lines.html.erb +0 -11
  339. data/previews/docs/beta_truncate_preview/multiple_items.html.erb +0 -6
  340. data/previews/docs/beta_truncate_preview.rb +0 -17
  341. data/previews/docs/blankslate_component_preview/action_button.html.erb +0 -8
  342. data/previews/docs/blankslate_component_preview/basic.html.erb +0 -4
  343. data/previews/docs/blankslate_component_preview/custom_content.html.erb +0 -5
  344. data/previews/docs/blankslate_component_preview/icon.html.erb +0 -5
  345. data/previews/docs/blankslate_component_preview/link.html.erb +0 -7
  346. data/previews/docs/blankslate_component_preview/loading.html.erb +0 -6
  347. data/previews/docs/blankslate_component_preview/variations.html.erb +0 -8
  348. data/previews/docs/blankslate_component_preview.rb +0 -19
  349. data/previews/docs/box_preview/color_and_padding.html.erb +0 -1
  350. data/previews/docs/box_preview/default.html.erb +0 -1
  351. data/previews/docs/box_preview.rb +0 -9
  352. data/previews/docs/button_component_preview/block.html.erb +0 -2
  353. data/previews/docs/button_component_preview/schemes.html.erb +0 -6
  354. data/previews/docs/button_component_preview/sizes.html.erb +0 -2
  355. data/previews/docs/button_component_preview/with_dropdown_caret.html.erb +0 -3
  356. data/previews/docs/button_component_preview/with_leading_and_trailing_visuals.html.erb +0 -5
  357. data/previews/docs/button_component_preview/with_leading_visual.html.erb +0 -4
  358. data/previews/docs/button_component_preview/with_tooltip.html.erb +0 -4
  359. data/previews/docs/button_component_preview/with_trailing_visual.html.erb +0 -4
  360. data/previews/docs/button_component_preview.rb +0 -21
  361. data/previews/docs/dropdown_preview/customizing_menu_items.html.erb +0 -11
  362. data/previews/docs/dropdown_preview/customizing_the_button.html.erb +0 -12
  363. data/previews/docs/dropdown_preview/default.html.erb +0 -11
  364. data/previews/docs/dropdown_preview/menu_as_list.html.erb +0 -13
  365. data/previews/docs/dropdown_preview/with_caret.html.erb +0 -12
  366. data/previews/docs/dropdown_preview/with_direction.html.erb +0 -12
  367. data/previews/docs/dropdown_preview/with_dividers.html.erb +0 -16
  368. data/previews/docs/dropdown_preview.rb +0 -19
  369. data/previews/docs/hellip_button_preview/default.html.erb +0 -1
  370. data/previews/docs/hellip_button_preview/inline.html.erb +0 -1
  371. data/previews/docs/hellip_button_preview/styling_the_button.html.erb +0 -1
  372. data/previews/docs/hellip_button_preview.rb +0 -11
  373. data/previews/docs/icon_button_preview/custom_tooltip_direction.html.erb +0 -2
  374. data/previews/docs/icon_button_preview/default.html.erb +0 -2
  375. data/previews/docs/icon_button_preview/in_a_borderbox.html.erb +0 -7
  376. data/previews/docs/icon_button_preview/schemes.html.erb +0 -3
  377. data/previews/docs/icon_button_preview/with_an_aria_description.html.erb +0 -1
  378. data/previews/docs/icon_button_preview.rb +0 -15
  379. data/previews/docs/label_component_preview/inline.html.erb +0 -2
  380. data/previews/docs/label_component_preview/schemes.html.erb +0 -10
  381. data/previews/docs/label_component_preview/sizes.html.erb +0 -2
  382. data/previews/docs/label_component_preview.rb +0 -11
  383. data/previews/docs/layout_component_preview/default.html.erb +0 -4
  384. data/previews/docs/layout_component_preview/left_sidebar.html.erb +0 -4
  385. data/previews/docs/layout_component_preview.rb +0 -9
  386. data/previews/docs/link_component_preview/default.html.erb +0 -1
  387. data/previews/docs/link_component_preview/muted.html.erb +0 -1
  388. data/previews/docs/link_component_preview/schemes.html.erb +0 -2
  389. data/previews/docs/link_component_preview/with_tooltip.html.erb +0 -4
  390. data/previews/docs/link_component_preview/without_underline.html.erb +0 -1
  391. data/previews/docs/link_component_preview.rb +0 -15
  392. data/previews/docs/local_time_preview/all_the_options.html.erb +0 -1
  393. data/previews/docs/local_time_preview/default.html.erb +0 -1
  394. data/previews/docs/local_time_preview/with_initial_content.html.erb +0 -4
  395. data/previews/docs/local_time_preview.rb +0 -11
  396. data/previews/docs/markdown_preview/default.html.erb +0 -260
  397. data/previews/docs/markdown_preview.rb +0 -7
  398. data/previews/docs/menu_component_preview/default.html.erb +0 -17
  399. data/previews/docs/menu_component_preview.rb +0 -7
  400. data/previews/docs/navigation_tab_component_preview/default.html.erb +0 -6
  401. data/previews/docs/navigation_tab_component_preview/inside_a_list.html.erb +0 -3
  402. data/previews/docs/navigation_tab_component_preview/with_custom_html.html.erb +0 -5
  403. data/previews/docs/navigation_tab_component_preview/with_icons_and_counters.html.erb +0 -13
  404. data/previews/docs/navigation_tab_component_preview.rb +0 -13
  405. data/previews/docs/octicon_component_preview/default.html.erb +0 -2
  406. data/previews/docs/octicon_component_preview/helper.html.erb +0 -1
  407. data/previews/docs/octicon_component_preview/medium.html.erb +0 -1
  408. data/previews/docs/octicon_component_preview.rb +0 -11
  409. data/previews/docs/octicon_symbols_component_preview/symbol_dictionary.html.erb +0 -4
  410. data/previews/docs/octicon_symbols_component_preview.rb +0 -7
  411. data/previews/docs/popover_component_preview/caret_position.html.erb +0 -8
  412. data/previews/docs/popover_component_preview/default.html.erb +0 -8
  413. data/previews/docs/popover_component_preview/large.html.erb +0 -8
  414. data/previews/docs/popover_component_preview/with_multiple_elements_in_the_body.html.erb +0 -11
  415. data/previews/docs/popover_component_preview.rb +0 -13
  416. data/previews/docs/spinner_component_preview/default.html.erb +0 -1
  417. data/previews/docs/spinner_component_preview/large.html.erb +0 -1
  418. data/previews/docs/spinner_component_preview/small.html.erb +0 -1
  419. data/previews/docs/spinner_component_preview.rb +0 -11
  420. data/previews/docs/state_component_preview/default.html.erb +0 -1
  421. data/previews/docs/state_component_preview/schemes.html.erb +0 -4
  422. data/previews/docs/state_component_preview/sizes.html.erb +0 -2
  423. data/previews/docs/state_component_preview.rb +0 -11
  424. data/previews/docs/subhead_component_preview/default.html.erb +0 -8
  425. data/previews/docs/subhead_component_preview/with_actions.html.erb +0 -15
  426. data/previews/docs/subhead_component_preview/with_dangerous_heading.html.erb +0 -8
  427. data/previews/docs/subhead_component_preview/with_long_description.html.erb +0 -6
  428. data/previews/docs/subhead_component_preview/without_border.html.erb +0 -8
  429. data/previews/docs/subhead_component_preview.rb +0 -15
  430. data/previews/docs/tab_container_component_preview/default.html.erb +0 -16
  431. data/previews/docs/tab_container_component_preview.rb +0 -7
  432. data/previews/docs/time_ago_component_preview/default.html.erb +0 -1
  433. data/previews/docs/time_ago_component_preview.rb +0 -7
  434. data/previews/docs/timeline_item_component_preview/default.html.erb +0 -7
  435. data/previews/docs/timeline_item_component_preview.rb +0 -7
  436. data/previews/docs/tooltip_preview/default.html.erb +0 -3
  437. data/previews/docs/tooltip_preview/with_a_direction.html.erb +0 -3
  438. data/previews/docs/tooltip_preview/with_an_alignment.html.erb +0 -3
  439. data/previews/docs/tooltip_preview/without_a_delay.html.erb +0 -3
  440. data/previews/docs/tooltip_preview/wrapping_another_component.html.erb +0 -5
  441. data/previews/docs/tooltip_preview.rb +0 -15
  442. data/previews/docs/truncate_preview/custom_size.html.erb +0 -1
  443. data/previews/docs/truncate_preview/default.html.erb +0 -3
  444. data/previews/docs/truncate_preview/expandable.html.erb +0 -1
  445. data/previews/docs/truncate_preview/inline.html.erb +0 -1
  446. data/previews/docs/truncate_preview/with_html_content.html.erb +0 -3
  447. data/previews/docs/truncate_preview.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '090ea34362d2785265bd58345bd022fcb51c7b3c679ac56f60369ca2e06712f5'
4
- data.tar.gz: 34024170f98225657f2444d3fa5e25ed26bc69817df081c308d1052f6cbb2ab6
3
+ metadata.gz: fc1b79b6968ac4f69f0c92f42a79bac972b82c8b0cf37d9adc0deb94d8c25bbf
4
+ data.tar.gz: 8eec21653a0ec6823d8c324fefd5b27e0e2c50dd1c9c5491a56855229952f1ac
5
5
  SHA512:
6
- metadata.gz: 5e4838f0f9484575bea4fcb662c46bce7c404310c71f74fe486aee0e99a098ac746f10c8f8674e7217e9214773fd89630d2c02e962d119ba0e4c9fe6417e2b06
7
- data.tar.gz: e273d7418a0552745a0901e6a6ab0bf34311688fc03a27f9fff700ee6f04bc5de53ac0890f388fc6a7cc9865d3f6cca9c299aa1c4093efe9756480b1cd3d4e0a
6
+ metadata.gz: 91d677af74ba55072612300450a6b23af4e255c134832b981e964f758c319bf6fe1fc4f37f8bd4a64152f37825a5e7bc696a53a2175eecb51784873c1c19021e
7
+ data.tar.gz: d00f5d95c78e34723a971a225ecdd14a04aa1121a6308dbb20f87693c966f4ae196f2e1d5fb4dd84ae277b84493497c37cd9ba098b5677449142175152c41491
data/CHANGELOG.md CHANGED
@@ -0,0 +1,45 @@
1
+ # @yattho/view-components
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#8](https://github.com/nearchx-yattho/view_components/pull/8) [`b4a1f0d`](https://github.com/nearchx-yattho/view_components/commit/b4a1f0df1b4dd50dbde92505e2c5fdb001165fb7) Thanks [@marcelolx](https://github.com/marcelolx)! - Fix tokens used in workflows
8
+
9
+ ## 0.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`7f23f0e`](https://github.com/nearchx-yattho/view_components/commit/7f23f0e0a426f7ccca71e6245f850cbb339c926c) Thanks [@marcelolx](https://github.com/marcelolx)! - Wiring up changes to initial release of view-components using yattho/css
14
+
15
+ ### Patch Changes
16
+
17
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`6ddfdfb`](https://github.com/nearchx-yattho/view_components/commit/6ddfdfbb6aa34c864cbab7e8c3af90d54dd6f8b0) Thanks [@marcelolx](https://github.com/marcelolx)! - Fix bug where clicking inside dialog, but finishing click outside, dismisses dialog
18
+
19
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`a28d28a`](https://github.com/nearchx-yattho/view_components/commit/a28d28a0caf1d8a8c28810cdfd6303f1e9d2c954) Thanks [@marcelolx](https://github.com/marcelolx)! - Use ViewComponent 3.0.0.rc1
20
+
21
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`eb4a03b`](https://github.com/nearchx-yattho/view_components/commit/eb4a03b6a55dc333acdcaeb8ed6cef16841f3b2e) Thanks [@marcelolx](https://github.com/marcelolx)! - Show error messages when toggle switches fail
22
+
23
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`83b01e4`](https://github.com/nearchx-yattho/view_components/commit/83b01e4f85436a8b083fc36dcb7d5efb4bd6f31c) Thanks [@marcelolx](https://github.com/marcelolx)! - Removing deprecated Yattho::ClipboardCopy component and clipboard_copy.rb file
24
+
25
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`63c0127`](https://github.com/nearchx-yattho/view_components/commit/63c0127f6898dc6fae60700892a673150f89df63) Thanks [@marcelolx](https://github.com/marcelolx)! - Bug fix: Adjust the body tag padding-right when an overlay is open to avoid page shift
26
+
27
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`6268c8e`](https://github.com/nearchx-yattho/view_components/commit/6268c8e8674de1bcb498b85132c69d4c01d2902d) Thanks [@marcelolx](https://github.com/marcelolx)! - Adding `:auto` to size option to Dialog component
28
+
29
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`59d8058`](https://github.com/nearchx-yattho/view_components/commit/59d80584af105723ce9bbb359ab1f3e073ee33fe) Thanks [@marcelolx](https://github.com/marcelolx)! - Prefer Yattho::Beta::Button in ERBLint::Linters::ButtonComponentMigrationCounter
30
+
31
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`b2acc5e`](https://github.com/nearchx-yattho/view_components/commit/b2acc5e45353c496520b5932e61e22c88105aad9) Thanks [@marcelolx](https://github.com/marcelolx)! - Use a bash script to check for changesets
32
+
33
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`ba98054`](https://github.com/nearchx-yattho/view_components/commit/ba98054ad95d14203188ab139e4bfe4311041aee) Thanks [@marcelolx](https://github.com/marcelolx)! - Update `axe-core` scanning in system tests
34
+
35
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`e62053a`](https://github.com/nearchx-yattho/view_components/commit/e62053a84790903b2beb627f991f95005b50b7cb) Thanks [@marcelolx](https://github.com/marcelolx)! - Standardize how we generate ids for HTML
36
+
37
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`d4ce09c`](https://github.com/nearchx-yattho/view_components/commit/d4ce09cf275cc5d7d9653caa7f9ef045c6e68862) Thanks [@marcelolx](https://github.com/marcelolx)! - Add RuboCop::Cop::Yattho::TestSelector to encourage use of the test_selector argument
38
+
39
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`0f9f2cd`](https://github.com/nearchx-yattho/view_components/commit/0f9f2cdd30059af11b6e52e644e93f1ed1dc52b8) Thanks [@marcelolx](https://github.com/marcelolx)! - Fix media query typo in Button
40
+
41
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`8c1e9f7`](https://github.com/nearchx-yattho/view_components/commit/8c1e9f7d3e6468dccb500a3fd19490a915660893) Thanks [@marcelolx](https://github.com/marcelolx)! - Remove the deprecated DropdownMenuComponent
42
+
43
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`6f951a9`](https://github.com/nearchx-yattho/view_components/commit/6f951a9c2e59777e73e85832dcb4f64b61d9c14a) Thanks [@marcelolx](https://github.com/marcelolx)! - Update `with_show_button` slot to use `Yattho::Beta::Button` instead of `Yattho::ButtonComponent`.
44
+
45
+ - [#4](https://github.com/nearchx-yattho/view_components/pull/4) [`2107ee3`](https://github.com/nearchx-yattho/view_components/commit/2107ee37b8c8e23037e0179a45be2b29447cbd92) Thanks [@marcelolx](https://github.com/marcelolx)! - Bump view_component to v2.81.0 to fix issue with Rails main
@@ -1,2 +1,2 @@
1
- !function(){"use strict";class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const o=this.parentElement;if(!o)return;const c=o.querySelector("summary");c&&(c.setAttribute("aria-haspopup","menu"),c.hasAttribute("role")||c.setAttribute("role","button"));const f=[n(o,"compositionstart",(t=>h(this,t))),n(o,"compositionend",(t=>h(this,t))),n(o,"click",(t=>l(o,t))),n(o,"change",(t=>l(o,t))),n(o,"keydown",(e=>function(e,n,i){if(!(i instanceof KeyboardEvent))return;if(e.querySelector("details[open]"))return;const s=t.get(n);if(!s||s.isComposing)return;const o=i.target instanceof Element&&"SUMMARY"===i.target.tagName;switch(i.key){case"Escape":e.hasAttribute("open")&&(d(e),i.preventDefault(),i.stopPropagation());break;case"ArrowDown":{o&&!e.hasAttribute("open")&&e.setAttribute("open","");const t=r(e,!0);t&&t.focus(),i.preventDefault()}break;case"ArrowUp":{o&&!e.hasAttribute("open")&&e.setAttribute("open","");const t=r(e,!1);t&&t.focus(),i.preventDefault()}break;case"n":if(a&&i.ctrlKey){const t=r(e,!0);t&&t.focus(),i.preventDefault()}break;case"p":if(a&&i.ctrlKey){const t=r(e,!1);t&&t.focus(),i.preventDefault()}break;case" ":case"Enter":{const t=document.activeElement;t instanceof HTMLElement&&u(t)&&t.closest("details")===e&&(i.preventDefault(),i.stopPropagation(),t.click())}}}(o,this,e))),n(o,"toggle",(()=>i(o,this)),{once:!0}),n(o,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const n=e.closest("details");n&&n!==t&&!n.contains(t)&&n.removeAttribute("open")}}(o))),this.preload?n(o,"mouseover",(()=>i(o,this)),{once:!0}):e,...s(o)];t.set(this,{subscriptions:f,loaded:!1,isComposing:!1})}disconnectedCallback(){const e=t.get(this);if(e){t.delete(this);for(const t of e.subscriptions)t.unsubscribe()}}}const t=new WeakMap,e={unsubscribe(){}};function n(t,e,n,i=!1){return t.addEventListener(e,n,i),{unsubscribe:()=>{t.removeEventListener(e,n,i)}}}function i(e,n){const i=n.getAttribute("src");if(!i)return;const s=t.get(n);if(!s)return;if(s.loaded)return;s.loaded=!0;const r=n.querySelector("include-fragment");r&&!r.hasAttribute("src")&&(r.addEventListener("loadend",(()=>o(e))),r.setAttribute("src",i))}function s(t){let e=!1;return[n(t,"mousedown",(()=>e=!0)),n(t,"keydown",(()=>e=!1)),n(t,"toggle",(()=>{t.hasAttribute("open")&&(o(t)||e||function(t){const e=document.activeElement;if(e&&u(e)&&t.contains(e))return;const n=r(t,!0);n&&n.focus()}(t))}))]}function o(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function r(t,e){const n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),i=document.activeElement,s=i instanceof HTMLElement?n.indexOf(i):-1,o=e?n[s+1]:n[s-1],r=e?n[0]:n[n.length-1];return o||r}const a=navigator.userAgent.match(/Macintosh/);function l(t,e){const n=e.target;if(n instanceof Element&&n.closest("details")===t)if("click"===e.type){const e=n.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const i=e.querySelector("input");if("LABEL"===e.tagName&&n===i)return;"LABEL"===e.tagName&&i&&!i.checked||c(e,t)}else if("change"===e.type){const e=n.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&c(e,t)}}function c(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const n=t.closest("details-menu");if(!n)return;n.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const n=e.querySelector("[data-menu-button]");if(!n)return;const i=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(i)n.textContent=i;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(n.innerHTML=e)}}(t,e),function(t,e){for(const n of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=n.querySelector('input[type="radio"], input[type="checkbox"]');let i=(n===t).toString();e instanceof HTMLInputElement&&(i=e.indeterminate?"mixed":e.checked.toString()),n.setAttribute("aria-checked",i)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&d(e),n.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function u(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function d(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function h(e,n){const i=t.get(e);i&&(i.isComposing="compositionstart"===n.type)}window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const f=new WeakMap,m=new WeakMap,p=new WeakMap;function b(t){const e=t.currentTarget;if(!(e instanceof ImageCropElement))return;const{box:n,image:i}=p.get(e)||{};if(!n||!i)return;let s=0,o=0;if(t instanceof KeyboardEvent)"ArrowUp"===t.key?o=-1:"ArrowDown"===t.key?o=1:"ArrowLeft"===t.key?s=-1:"ArrowRight"===t.key&&(s=1);else if(m.has(e)&&t instanceof MouseEvent){const n=m.get(e);s=t.pageX-n.dragStartX,o=t.pageY-n.dragStartY}else if(m.has(e)&&t instanceof TouchEvent){const{pageX:n,pageY:i}=t.changedTouches[0],{dragStartX:r,dragStartY:a}=m.get(e);s=n-r,o=i-a}if(0!==s||0!==o){const t=Math.min(Math.max(0,n.offsetLeft+s),i.width-n.offsetWidth),r=Math.min(Math.max(0,n.offsetTop+o),i.height-n.offsetHeight);n.style.left=`${t}px`,n.style.top=`${r}px`,k(e,{x:t,y:r,width:n.offsetWidth,height:n.offsetHeight})}if(t instanceof MouseEvent)m.set(e,{dragStartX:t.pageX,dragStartY:t.pageY});else if(t instanceof TouchEvent){const{pageX:n,pageY:i}=t.changedTouches[0];m.set(e,{dragStartX:n,dragStartY:i})}}function g(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=w(e);if(!(n instanceof ImageCropElement))return;const{box:i}=p.get(n)||{};if(!i)return;const s=n.getBoundingClientRect();let o,r,a;if(t instanceof KeyboardEvent){if("Escape"===t.key)return E(n);if("-"===t.key&&(a=-10),"="===t.key&&(a=10),!a)return;o=i.offsetWidth+a,r=i.offsetHeight+a,f.set(n,{startX:i.offsetLeft,startY:i.offsetTop})}else if(t instanceof MouseEvent){const e=f.get(n);if(!e)return;o=t.pageX-e.startX-s.left-window.pageXOffset,r=t.pageY-e.startY-s.top-window.pageYOffset}else if(t instanceof TouchEvent){const e=f.get(n);if(!e)return;o=t.changedTouches[0].pageX-e.startX-s.left-window.pageXOffset,r=t.changedTouches[0].pageY-e.startY-s.top-window.pageYOffset}o&&r&&y(n,o,r,!(t instanceof KeyboardEvent))}function w(t){const e=t.getRootNode();return e instanceof ShadowRoot?e.host:t}function v(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;const n=w(e);if(!(n instanceof ImageCropElement))return;const{box:i}=p.get(n)||{};if(!i)return;const s=t.target;if(s instanceof HTMLElement)if(s.hasAttribute("data-direction")){const e=s.getAttribute("data-direction")||"";n.addEventListener("mousemove",g),n.addEventListener("touchmove",g,{passive:!0}),["nw","se"].indexOf(e)>=0&&n.classList.add("nwse"),["ne","sw"].indexOf(e)>=0&&n.classList.add("nesw"),f.set(n,{startX:i.offsetLeft+(["se","ne"].indexOf(e)>=0?0:i.offsetWidth),startY:i.offsetTop+(["se","sw"].indexOf(e)>=0?0:i.offsetHeight)}),g(t)}else n.addEventListener("mousemove",b),n.addEventListener("touchmove",b,{passive:!0})}function y(t,e,n,i=!0){let s=Math.max(Math.abs(e),Math.abs(n),10);const o=f.get(t);if(!o)return;const{box:r,image:a}=p.get(t)||{};if(!r||!a)return;s=Math.min(s,n>0?a.height-o.startY:o.startY,e>0?a.width-o.startX:o.startX);const l=i?Math.round(Math.max(0,e>0?o.startX:o.startX-s)):r.offsetLeft,c=i?Math.round(Math.max(0,n>0?o.startY:o.startY-s)):r.offsetTop;r.style.left=`${l}px`,r.style.top=`${c}px`,r.style.width=`${s}px`,r.style.height=`${s}px`,k(t,{x:l,y:c,width:s,height:s})}function E(t){const{image:e}=p.get(t)||{};if(!e)return;const n=Math.round(e.clientWidth>e.clientHeight?e.clientHeight:e.clientWidth);f.set(t,{startX:(e.clientWidth-n)/2,startY:(e.clientHeight-n)/2}),y(t,n,n)}function A(t){const e=t.currentTarget;e instanceof ImageCropElement&&(m.delete(e),e.classList.remove("nwse","nesw"),e.removeEventListener("mousemove",g),e.removeEventListener("mousemove",b),e.removeEventListener("touchmove",g),e.removeEventListener("touchmove",b))}function k(t,e){const{image:n}=p.get(t)||{};if(!n)return;const i=n.naturalWidth/n.width;for(const n in e){const s=Math.round(e[n]*i);e[n]=s;const o=t.querySelector(`[data-image-crop-input='${n}']`);o instanceof HTMLInputElement&&(o.value=s.toString())}t.dispatchEvent(new CustomEvent("image-crop-change",{bubbles:!0,detail:e}))}class ImageCropElement extends HTMLElement{connectedCallback(){if(p.has(this))return;const t=this.attachShadow({mode:"open"});t.innerHTML='\n<style>\n :host { touch-action: none; display: block; }\n :host(.nesw) { cursor: nesw-resize; }\n :host(.nwse) { cursor: nwse-resize; }\n :host(.nesw) .crop-box, :host(.nwse) .crop-box { cursor: inherit; }\n :host([loaded]) .crop-image { display: block; }\n :host([loaded]) ::slotted([data-loading-slot]), .crop-image { display: none; }\n\n .crop-wrapper {\n position: relative;\n font-size: 0;\n }\n .crop-container {\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n overflow: hidden;\n z-index: 1;\n top: 0;\n width: 100%;\n height: 100%;\n }\n\n :host([rounded]) .crop-box {\n border-radius: 50%;\n box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.3);\n }\n .crop-box {\n position: absolute;\n border: 1px dashed #fff;\n box-sizing: border-box;\n cursor: move;\n }\n\n :host([rounded]) .crop-outline {\n outline: none;\n }\n .crop-outline {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n outline: 4000px solid rgba(0, 0, 0, .3);\n }\n\n .handle { position: absolute; }\n :host([rounded]) .handle::before { border-radius: 50%; }\n .handle:before {\n position: absolute;\n display: block;\n padding: 4px;\n transform: translate(-50%, -50%);\n content: \' \';\n background: #fff;\n border: 1px solid #767676;\n }\n .ne { top: 0; right: 0; cursor: nesw-resize; }\n .nw { top: 0; left: 0; cursor: nwse-resize; }\n .se { bottom: 0; right: 0; cursor: nwse-resize; }\n .sw { bottom: 0; left: 0; cursor: nesw-resize; }\n</style>\n<slot></slot>\n<div class="crop-wrapper">\n <img width="100%" class="crop-image" alt="">\n <div class="crop-container">\n <div data-crop-box class="crop-box">\n <div class="crop-outline"></div>\n <div data-direction="nw" class="handle nw"></div>\n <div data-direction="ne" class="handle ne"></div>\n <div data-direction="sw" class="handle sw"></div>\n <div data-direction="se" class="handle se"></div>\n </div>\n </div>\n</div>\n';const e=t.querySelector("[data-crop-box]");if(!(e instanceof HTMLElement))return;const n=t.querySelector("img");n instanceof HTMLImageElement&&(p.set(this,{box:e,image:n}),n.addEventListener("load",(()=>{this.loaded=!0,E(this)})),this.addEventListener("mouseleave",A),this.addEventListener("touchend",A),this.addEventListener("mouseup",A),e.addEventListener("mousedown",v),e.addEventListener("touchstart",v,{passive:!0}),this.addEventListener("keydown",b),this.addEventListener("keydown",g),this.src&&(n.src=this.src))}static get observedAttributes(){return["src"]}get src(){return this.getAttribute("src")}set src(t){t?this.setAttribute("src",t):this.removeAttribute("src")}get loaded(){return this.hasAttribute("loaded")}set loaded(t){t?this.setAttribute("loaded",""):this.removeAttribute("loaded")}attributeChangedCallback(t,e,n){const{image:i}=p.get(this)||{};"src"===t&&(this.loaded=!1,i&&(i.src=n))}}function T(t,e,n,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,n,r):s(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r}function M(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function x(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n}window.customElements.get("image-crop")||(window.ImageCropElement=ImageCropElement,window.customElements.define("image-crop",ImageCropElement));const C={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},L={start:["end","center"],end:["start","center"],center:["end","start"]};function S(t,e,n={}){const i=function(t){let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),s=function(t){let e=t;for(;null!==e&&e!==document.body;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const n=e!==document.body&&e instanceof HTMLElement?e:document.body,i=n.getBoundingClientRect(),s=getComputedStyle(n),[o,r,a,l]=[s.borderTopWidth,s.borderLeftWidth,s.borderRightWidth,s.borderBottomWidth].map((t=>parseInt(t,10)||0));return{top:i.top+o,left:i.left+r,width:i.width-a-r,height:Math.max(i.height-o-l,n===document.body?window.innerHeight:-1/0)}}(i),o=getComputedStyle(i),r=i.getBoundingClientRect(),[a,l]=[o.borderTopWidth,o.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,n,i,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let u=F(n,i,s,o,a,l),d=s,h=o;if(u.top-=e.top,u.left-=e.left,!r){const r=C[s];let f=0;if(r){let t=s;for(;f<r.length&&P(t,u,c,n);){const s=r[f++];t=s,u=F(n,i,s,o,a,l),u.top-=e.top,u.left-=e.left,d=s}}const m=L[o];let p=0;if(m){let t=o;for(;p<m.length&&q(t,u,c,n);){const s=m[p++];t=s,u=F(n,i,d,s,a,l),u.top-=e.top,u.left-=e.left,h=s}}u.top<c.top&&(u.top=c.top),u.left<c.left&&(u.left=c.left),u.left+n.width>t.width+c.left&&(u.left=t.width+c.left-n.width),r&&f<r.length&&u.top+n.height>t.height+c.top&&(u.top=t.height+c.top-n.height)}return Object.assign(Object.assign({},u),{anchorSide:d,anchorAlign:h})}(s,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,n,i,s,o;const r=null!==(e=t.side)&&void 0!==e?e:D,a=null!==(n=t.align)&&void 0!==n?n:I;return{side:r,align:a,anchorOffset:null!==(i=t.anchorOffset)&&void 0!==i?i:"inside-center"===r?0:H,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==a&&r.startsWith("inside")?O:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:R}}(n))}const D="outside-bottom",I="start",H=4,O=4,R=!1;function F(t,e,n,i,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===n?l=e.top-s-t.height:"outside-bottom"===n?l=a+s:"outside-left"===n?c=e.left-s-t.width:"outside-right"===n&&(c=r+s),"outside-top"!==n&&"outside-bottom"!==n||(c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==n&&"outside-right"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===n?l=e.top+s:"inside-bottom"===n?l=a-s-t.height:"inside-left"===n?c=e.left+s:"inside-right"===n?c=r-s-t.width:"inside-center"===n&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===n||"inside-bottom"===n?c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==n&&"inside-right"!==n&&"inside-center"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function P(t,e,n,i){return"outside-top"===t||"outside-bottom"===t?e.top<n.top||e.top+i.height>n.height+n.top:e.left<n.left||e.left+i.width>n.width+n.left}function q(t,e,n,i){return"end"===t?e.left<n.left:"start"===t||"center"===t?e.left+i.width>n.left+n.width||e.left<n.left:void 0}function $(t,e=!1){return function*(t,e={}){var n,i;const s=null!==(n=e.strict)&&void 0!==n&&n,o=null!==(i=e.onlyTabbable)&&void 0!==i&&i?N:W,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function W(t,e=!1){const n=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,i=t.hidden,s=t instanceof HTMLInputElement&&"hidden"===t.type,o=t.classList.contains("sentinel");if(n||i||s||o)return!1;if(e){const e=0===t.offsetWidth||0===t.offsetHeight,n=["hidden","collapse"].includes(getComputedStyle(t).visibility),i=0===t.getClientRects().length;if(e||n||i)return!1}return null!=t.getAttribute("tabindex")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex}function N(t,e=!1){return W(t,e)&&"-1"!==t.getAttribute("tabindex")}let B=!1;function Y(){}try{const t=Object.create({},{signal:{get(){B=!0}}});window.addEventListener("test",Y,t),window.removeEventListener("test",Y,t)}catch(t){}B||(function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,i){return"object"==typeof i&&"signal"in i&&i.signal instanceof AbortSignal&&t.call(i.signal,"abort",(()=>{this.removeEventListener(e,n,i)})),t.call(this,e,n,i)}}(),B=!0);const j=[];let X;function K(t,e,n){const i=new AbortController,s=null!=n?n:i.signal;t.setAttribute("data-focus-trap","active");const o=document.createElement("span");o.setAttribute("class","sentinel"),o.setAttribute("tabindex","0"),o.setAttribute("aria-hidden","true"),o.onfocus=()=>{const e=$(t,!0);null==e||e.focus()};const r=document.createElement("span");let a;function l(n){if(n instanceof HTMLElement&&document.contains(t)){if(t.contains(n))return void(a=n);if(a&&N(a)&&t.contains(a))return void a.focus();if(e&&t.contains(e))return void e.focus();{const e=$(t);return void(null==e||e.focus())}}}r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=$(t);null==e||e.focus()},t.prepend(o),t.append(r);const c=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(s);if(X){const t=X;X.container.setAttribute("data-focus-trap","suspended"),X.controller.abort(),j.push(t)}c.signal.addEventListener("abort",(()=>{X=void 0})),s.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const n=j.findIndex((e=>e.container===t));n>=0&&j.splice(n,1),function(){const t=j.pop();t&&K(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{l(t.target)}),{signal:c.signal,capture:!0}),l(document.activeElement),X={container:t,controller:c,initialFocus:e,originalSignal:s};const u=j.findIndex((e=>e.container===t));if(u>=0&&j.splice(u,1),!n)return i}var V,z,U,Z;function _(t){document.activeElement!==t&&(null==t||t.focus())}const G=[];function J(t){const e=t.target,n=null==e?void 0:e.closest("button");if(!n)return;let i=null==n?void 0:n.getAttribute("data-show-dialog-id");if(i){t.stopPropagation();const e=document.getElementById(i);if(e instanceof ModalDialogElement)return e.openButton=n,void e.show()}const s=G[G.length-1];s&&(i=n.getAttribute("data-close-dialog-id"),i===s.id&&(G.pop(),s.close()),i=n.getAttribute("data-submit-dialog-id"),i===s.id&&(G.pop(),s.close(!0)))}function Q(t){const e=t.target;if(null==e?void 0:e.closest("button"))return;const n=G[G.length-1];if(!n)return;!e.closest(`#${n.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(G.pop(),n.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),V.add(this),z.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){var e,n,i,s;if(t){if(this.open)return;this.setAttribute("open",""),null===(e=M(this,V,"a",U))||void 0===e||e.classList.remove("Overlay--hidden"),document.body.style.overflow="hidden",M(this,z,"f").signal.aborted&&x(this,z,new AbortController,"f"),K(this,void 0,M(this,z,"f").signal),G.push(this)}else{if(!this.open)return;this.removeAttribute("open"),null===(n=M(this,V,"a",U))||void 0===n||n.classList.add("Overlay--hidden"),document.body.style.overflow="initial",M(this,z,"f").abort();const t=(null===(i=this.openButton)||void 0===i?void 0:i.closest("details"))||(null===(s=this.openButton)||void 0===s?void 0:s.closest("action-menu"));_(t?$(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",J),document.addEventListener("mousedown",Q),this.addEventListener("keydown",(t=>M(this,V,"m",Z).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}z=new WeakMap,V=new WeakSet,U=function(){var t;return(null===(t=this.parentElement)||void 0===t?void 0:t.hasAttribute("data-modal-dialog-overlay"))?this.parentElement:null},Z=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&"Escape"===t.key)this.open&&(this.close(),t.preventDefault(),t.stopPropagation())},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));const tt=new WeakSet;function et(t){st(t),it(t)}const nt=new WeakMap;function it(t=document){if(nt.has(t))return nt.get(t);let e=!1;const n=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)at(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&st(t)}));n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const i={get closed(){return e},unsubscribe(){e=!0,nt.delete(t),n.disconnect()}};return nt.set(t,i),i}function st(t){for(const e of t.querySelectorAll("[data-action]"))at(e);t instanceof Element&&t.hasAttribute("data-action")&&at(t)}function ot(t){const e=t.currentTarget;for(const n of rt(e))if(t.type===n.type){const i=e.closest(n.tag);tt.has(i)&&"function"==typeof i[n.method]&&i[n.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&tt.has(s.host)&&s.host.matches(n.tag)){const e=s.host;"function"==typeof e[n.method]&&e[n.method](t)}}}function*rt(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),n=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||"handleEvent"}||"handleEvent"}}function at(t){for(const e of rt(t))t.addEventListener(e.type,ot)}const lt=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),ct=(t,e="property")=>{const n=lt(t);if(!n.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return n};const ut="attr",dt=new WeakSet;function ht(t,e){if(dt.has(t))return;dt.add(t);const n=Object.getPrototypeOf(t),i=n?.constructor?.attrPrefix??"data-";e||(e=pt(n,ut));for(const n of e){const e=t[n],s=ct(`${i}${n}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,n,o),n in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const ft=Symbol.for("catalyst");class mt{constructor(t){const e=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,n)};const i=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,i)};const s=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,n,i){e.attributeChangedCallback(this,t,n,i,s)};let o=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return e.observedAttributes(this,o)},set(t){o=t}}),function(t){let e=t.observedAttributes||[];const n=t.attrPrefix??"data-",i=t=>ct(`${n}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...pt(t.prototype,ut)].map(i).concat(e),set(t){e=t}})}(t),function(t){const e=lt(t.name).replace(/-element$/,"");try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),ht(t),function(t){tt.add(t),t.shadowRoot&&et(t.shadowRoot),st(t),it(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&et(t.shadowRoot)}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,i,s){ht(t),"data-catalyst"!==e&&s&&s.call(t,e,n,i)}}function pt(t,e){if(!Object.prototype.hasOwnProperty.call(t,ft)){const e=t[ft],n=t[ft]=new Map;if(e)for(const[t,i]of e)n.set(t,new Set(i))}const n=t[ft];return n.has(e)||n.set(e,new Set),n.get(e)}function bt(t,e){pt(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase();if(t.shadowRoot)for(const i of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!i.closest(n))return i;for(const i of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(i.closest(n)===t)return i}(this,e)}})}function gt(t,e){pt(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase(),i=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)||i.push(s);for(const s of t.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)===t&&i.push(s);return i}(this,e)}})}function wt(t){new mt(t)}new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const n={once:!0,passive:!0,signal:e.signal},i=()=>e.abort();document.addEventListener("mousedown",i,n),document.addEventListener("touchstart",i,n),document.addEventListener("keydown",i,n),document.addEventListener("pointerdown",i,n)}));let vt=class NavListElement extends HTMLElement{connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}expandItem(t){var e;null===(e=t.nextElementSibling)||void 0===e||e.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){var e;null===(e=t.nextElementSibling)||void 0===e||e.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false")}itemIsExpanded(t){return"A"===(null==t?void 0:t.tagName)||"true"===(null==t?void 0:t.getAttribute("aria-expanded"))}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=e.closest("button");n&&(this.itemIsExpanded(n)?this.collapseItem(n):this.expandItem(n),t.stopPropagation())}async showMore(t){var e,n;if(t.preventDefault(),this.showMoreDisabled)return;let i;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const e=await fetch(t);if(!e.ok)return;i=await e.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const s=this.parseHTML(document,i);null===(e=null==s?void 0:s.querySelector("li > a"))||void 0===e||e.setAttribute("data-targets","nav-list.focusMarkers"),this.list.insertBefore(s,this.showMoreItem),null===(n=this.focusMarkers.pop())||void 0===n||n.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}parseHTML(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)}};var yt,Et;T([bt],vt.prototype,"list",void 0),T([bt],vt.prototype,"showMoreItem",void 0),T([gt],vt.prototype,"focusMarkers",void 0),vt=T([wt],vt);let At=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),yt.add(this)}connectedCallback(){M(this,yt,"m",Et).call(this)}select(t){var e,n;const i=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),null===(e=t.querySelector("[aria-current]"))||void 0===e||e.setAttribute("aria-current","false");null===(n=i.closest("li.SegmentedControl-item"))||void 0===n||n.classList.add("SegmentedControl-item--selected"),i.setAttribute("aria-current","true")}};function kt(t,e=0,{start:n=!1,middle:i=!1,once:s=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:s=!1}={}){let o,r=0,a=!1;function l(...c){if(a)return;const u=Date.now()-r;r=Date.now(),n?(n=!1,t.apply(this,c),s&&l.cancel()):(i&&u<e||!i)&&(clearTimeout(o),o=setTimeout((()=>{r=Date.now(),t.apply(this,c),s&&l.cancel()}),i?e-u:e))}return l.cancel=()=>{clearTimeout(o),a=!0},l}(t,e,{start:n,middle:i,once:s})}yt=new WeakSet,Et=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},T([gt],At.prototype,"items",void 0),At=T([wt],At),window.customElements.get("segmented-control")||(window.SegmentedControlElement=At,window.customElements.define("segmented-control",At));let Tt=class ToggleSwitchElement extends HTMLElement{get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}toggle(){this.isDisabled()||(this.isRemote()?(this.setLoadingState(),this.submitForm()):this.performToggle())}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-checked","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-checked","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-checked")}isOff(){return!this.isOn()}isDisabled(){return"true"===this.switch.getAttribute("aria-disabled")}disable(){this.switch.setAttribute("aria-disabled","true")}enable(){this.switch.setAttribute("aria-disabled","false")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.disable(),this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden")}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden"),this.enable()}async submitForm(){const t=new FormData;this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"0":"1");try{if(!this.src)throw new Error("invalid src");let e;try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:{"Requested-With":"XMLHttpRequest"},body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());this.setSuccessState(),this.performToggle()}catch(t){t instanceof Error&&this.setErrorState(t.message||"An error occurred, please try again.")}}};var Mt,xt,Ct,Lt,St,Dt,It,Ht,Ot;T([bt],Tt.prototype,"switch",void 0),T([bt],Tt.prototype,"loadingSpinner",void 0),T([bt],Tt.prototype,"errorIcon",void 0),T([function(t=0,e={}){return(n,i,s)=>{if(!s||"function"!=typeof s.value)throw new Error("debounce can only decorate functions");const o=s.value;s.value=kt(o,t,e),Object.defineProperty(n,i,s)}}(300)],Tt.prototype,"submitForm",null),Tt=T([wt],Tt),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=Tt,window.customElements.define("toggle-switch",Tt));const Rt="tooltip-open",Ft="sr-only",Pt=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];class ToolTipElement extends HTMLElement{constructor(){super(...arguments),Mt.add(this),xt.set(this,void 0),Ct.set(this,"center"),Lt.set(this,"outside-bottom"),St.set(this,!1)}styles(){return`\n :host {\n position: absolute;\n z-index: 1000000;\n padding: .5em .75em;\n font: normal normal 11px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";\n -webkit-font-smoothing: subpixel-antialiased;\n color: var(--color-fg-on-emphasis);\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--color-neutral-emphasis-plus);\n border-radius: 6px;\n opacity: 0;\n max-width: 250px;\n word-wrap: break-word;\n white-space: normal;\n width: max-content;\n }\n :host:before{\n position: absolute;\n z-index: 1000001;\n color: var(--color-neutral-emphasis-plus);\n content: "";\n border: 6px solid transparent;\n opacity: 0\n }\n @keyframes tooltip-appear {\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n }\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: 12px;\n content: ""\n }\n :host(.${Rt}),\n :host(.${Rt}):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: .4s\n }\n :host(.tooltip-s):before,\n :host(.tooltip-n):before {\n right: 50%;\n margin-right: -6px;\n }\n :host(.tooltip-s):before,\n :host(.tooltip-se):before,\n :host(.tooltip-sw):before {\n bottom: 100%;\n border-bottom-color: var(--color-neutral-emphasis-plus)\n }\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n :host(.tooltip-n):before,\n :host(.tooltip-ne):before,\n :host(.tooltip-nw):before {\n top: 100%;\n border-top-color: var(--color-neutral-emphasis-plus)\n }\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%\n }\n :host(.tooltip-se):before,\n :host(.tooltip-ne):before {\n left: 0;\n margin-left: 6px;\n }\n :host(.tooltip-sw):before,\n :host(.tooltip-nw):before {\n right: 0;\n margin-right: 6px;\n }\n :host(.tooltip-w):before {\n top: 50%;\n bottom: 50%;\n left: 100%;\n margin-top: -6px;\n border-left-color: var(--color-neutral-emphasis-plus)\n }\n :host(.tooltip-e):before {\n top: 50%;\n right: 100%;\n bottom: 50%;\n margin-top: -6px;\n border-right-color: var(--color-neutral-emphasis-plus)\n }\n `}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){this.classList.toggle(Ft,t),this.isConnected&&M(this,Mt,"m",Dt).call(this)}get hiddenFromView(){return this.classList.contains(Ft)}connectedCallback(){var t;if(M(this,Mt,"m",It).call(this),M(this,Mt,"m",Ht).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}if(this.hiddenFromView=!0,x(this,St,!0,"f"),!this.control)return;this.setAttribute("role","tooltip"),null===(t=M(this,xt,"f"))||void 0===t||t.abort(),x(this,xt,new AbortController,"f");const{signal:e}=M(this,xt,"f");this.addEventListener("mouseleave",this,{signal:e}),this.control.addEventListener("mouseenter",this,{signal:e}),this.control.addEventListener("mouseleave",this,{signal:e}),this.control.addEventListener("focus",this,{signal:e}),this.control.addEventListener("blur",this,{signal:e}),this.ownerDocument.addEventListener("keydown",this,{signal:e}),M(this,Mt,"m",Dt).call(this)}disconnectedCallback(){var t;null===(t=M(this,xt,"f"))||void 0===t||t.abort()}handleEvent(t){this.control&&("mouseenter"!==t.type&&"focus"!==t.type||!this.hiddenFromView?"blur"===t.type||"mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this?this.hiddenFromView=!0:"keydown"!==t.type||"Escape"!==t.key||this.hiddenFromView||(this.hiddenFromView=!0):this.hiddenFromView=!1)}attributeChangedCallback(t){this.isConnected&&("id"===t||"data-type"===t?M(this,Mt,"m",It).call(this):"data-direction"===t&&M(this,Mt,"m",Ht).call(this))}}xt=new WeakMap,Ct=new WeakMap,Lt=new WeakMap,St=new WeakMap,Mt=new WeakSet,Dt=function(){if(this.hiddenFromView)this.classList.remove(Rt,...Pt);else{this.classList.add(Rt);for(const t of this.ownerDocument.querySelectorAll(this.tagName))t!==this&&(t.hiddenFromView=!0);M(this,Mt,"m",Ot).call(this)}},It=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},Ht=function(){this.classList.remove(...Pt);const t=this.direction;"n"===t?(x(this,Ct,"center","f"),x(this,Lt,"outside-top","f")):"ne"===t?(x(this,Ct,"start","f"),x(this,Lt,"outside-top","f")):"e"===t?(x(this,Ct,"center","f"),x(this,Lt,"outside-right","f")):"se"===t?(x(this,Ct,"start","f"),x(this,Lt,"outside-bottom","f")):"s"===t?(x(this,Ct,"center","f"),x(this,Lt,"outside-bottom","f")):"sw"===t?(x(this,Ct,"end","f"),x(this,Lt,"outside-bottom","f")):"w"===t?(x(this,Ct,"center","f"),x(this,Lt,"outside-left","f")):"nw"===t&&(x(this,Ct,"end","f"),x(this,Lt,"outside-top","f"))},Ot=function(){if(!this.control)return;if(!M(this,St,"f")||this.hiddenFromView)return;this.style.left="0px";const t=S(this,this.control,{side:M(this,Lt,"f"),align:M(this,Ct,"f"),anchorOffset:10}),e=t.anchorSide,n=t.anchorAlign;this.style.top=`${t.top}px`,this.style.left=`${t.left}px`;let i="s";i="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===n?"n":"start"===n?"ne":"nw":"center"===n?"s":"start"===n?"se":"sw",this.classList.add(`tooltip-${i}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let qt=class XBannerElement extends HTMLElement{dismiss(){if(this.shouldReappear())return this.style.setProperty("visibility","hidden"),void setTimeout((()=>{this.style.setProperty("visibility","visible")}),2e3);const t=this.parentElement;t&&t.removeChild(this)}shouldReappear(){return"true"===this.getAttribute("data-reappear")}};T([bt],qt.prototype,"titleText",void 0),qt=T([wt],qt),window.customElements.get("x-banner")||(window.XBannerElement=qt,window.customElements.define("x-banner",qt));class $t{constructor(t,e,{tabInsertsSuggestions:n,defaultFirstOption:i}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.defaultFirstOption=null!=i&&i,this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":Nt(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Nt(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const n=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!n)return;e.clearSelection()}(t,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",Wt),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",Wt)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Bt)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Bt)[0],n=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Bt),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:n.length-1;if(e&&i>=0){const e=i+t;e>=0&&e<n.length&&(s=e)}const o=n[s];if(o)for(const t of n)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),Yt(this.list,o)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function Wt(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0}))}(e)}function Nt(t,e){const n=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!n&&("true"===n.getAttribute("aria-disabled")||n.click(),!0)}function Bt(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function Yt(t,e){(function(t,e){const n=t.scrollTop,i=n+t.clientHeight,s=e.offsetTop,o=s+e.clientHeight;return s>=n&&o<=i})(t,e)||(t.scrollTop=e.offsetTop)}const jt=window.testScreenReaderDelay||100;class Xt{constructor(t,e,n,i=!1){var s;if(this.container=t,this.input=e,this.results=n,this.combobox=new $t(e,n),this.feedback=document.getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=i,this.clearButton=document.getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=n.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.hidden=!0,this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=function(t,e=0){let n;return function(...i){clearTimeout(n),n=window.setTimeout((()=>{clearTimeout(n),t(...i)}),e)}}(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),null===(s=this.clearButton)||void 0===s||s.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),"true"===this.input.getAttribute("aria-expanded")&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.container.open=!1}onKeydown(t){if("Enter"===t.key&&this.container.open&&this.autoselectEnabled){const e=this.results.children[0];e&&(t.stopPropagation(),t.preventDefault(),this.onCommit({target:e}))}if("Escape"===t.key&&this.container.open)this.container.open=!1,t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.container.open=!1,t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!this.container.open){if(!this.input.value.trim())return;this.container.open=!0,t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.fetchResults()}onInputBlur(){this.interactingWithList?this.interactingWithList=!1:this.container.open=!1}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement))return;if(this.container.open=!1,e instanceof HTMLAnchorElement)return;const n=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=n,n||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout((()=>{this.feedback&&(this.feedback.textContent=t)}),jt)}fetchResults(){const t=this.input.value.trim();if(!t)return void(this.container.open=!1);const e=this.container.src;if(!e)return;const n=new URL(e,window.location.href),i=new URLSearchParams(n.search.slice(1));i.append("q",t),n.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(this.input,n.toString()).then((t=>{this.results.innerHTML=t,this.identifyOptions();const e=this.results.querySelectorAll('[role="option"]'),n=!!e.length,i=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${i} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${i||"No"} results.`),this.container.open=n,this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))})).catch((()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))}))}open(){this.results.hidden&&(this.combobox.start(),this.results.hidden=!1)}close(){this.results.hidden||(this.combobox.stop(),this.results.hidden=!0)}}class Kt extends CustomEvent{constructor(t,e){super(t,e),this.relatedTarget=e.relatedTarget}}const Vt=new WeakMap;function zt(t,e){const n=new XMLHttpRequest;return n.open("GET",e,!0),n.setRequestHeader("Accept","text/fragment+html"),function(t,e){const n=Vt.get(t);n&&n.abort();Vt.set(t,e);const i=()=>Vt.delete(t),s=function(t){return new Promise(((e,n)=>{t.onload=function(){t.status>=200&&t.status<300?e(t.responseText):n(new Error(t.responseText))},t.onerror=n,t.send()}))}(e);return s.then(i,i),s}(t,n)}const Ut=new WeakMap;class AutocompleteElement extends HTMLElement{constructor(){super(...arguments),this.fetchResult=zt}connectedCallback(){const t=this.getAttribute("for");if(!t)return;const e=this.querySelector("input"),n=document.getElementById(t);if(!(e instanceof HTMLInputElement&&n))return;const i="true"===this.getAttribute("data-autoselect");Ut.set(this,new Xt(this,e,n,i)),n.setAttribute("role","listbox")}disconnectedCallback(){const t=Ut.get(this);t&&(t.destroy(),Ut.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}static get observedAttributes(){return["open","value"]}attributeChangedCallback(t,e,n){if(e===n)return;const i=Ut.get(this);if(i)switch(t){case"open":null===n?i.close():i.open();break;case"value":null!==n&&(i.input.value=n),this.dispatchEvent(new Kt("auto-complete-change",{bubbles:!0,relatedTarget:i.input}))}}}function Zt(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent);const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const n=document.createRange();return n.selectNodeContents(t),e.addRange(n),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function _t(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(n),Zt(n),e.removeChild(n),Promise.resolve()}function Gt(t){const e=t.getAttribute("for"),n=t.getAttribute("value");function i(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}if(n)_t(n).then(i);else if(e){const n="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(n instanceof Document||"ShadowRoot"in window&&n instanceof ShadowRoot))return;const o=n.getElementById(e);o&&(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?_t(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?_t(s.href):Zt(s)).then(i)}var s}function Jt(t){const e=t.currentTarget;e instanceof HTMLElement&&Gt(e)}function Qt(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),Gt(e))}}function te(t){t.currentTarget.addEventListener("keydown",Qt)}function ee(t){t.currentTarget.removeEventListener("keydown",Qt)}window.customElements.get("auto-complete")||(window.AutocompleteElement=AutocompleteElement,window.customElements.define("auto-complete",AutocompleteElement));class ClipboardCopyElement extends HTMLElement{constructor(){super(),this.addEventListener("click",Jt),this.addEventListener("focus",te),this.addEventListener("blur",ee)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}window.customElements.get("clipboard-copy")||(window.ClipboardCopyElement=ClipboardCopyElement,window.customElements.define("clipboard-copy",ClipboardCopyElement));function ne(t){t.style.display="inline-block"}function ie(t){t.style.display="none"}const se=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=se.get(t);e?(clearTimeout(e),se.delete(t)):function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ie(e),ne(n))}(t),se.set(t,setTimeout((()=>{!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ne(e),ie(n))}(t),se.delete(t)}),2e3))}));var oe,re=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},ae=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};const le="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const n of t)e.push({type:"element",value:n}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},ce=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],ue={minimumIntegerDigits:2};class de{constructor(t,e={}){oe.set(this,void 0);let n=String(e.style||"short");"long"!==n&&"short"!==n&&"narrow"!==n&&"digital"!==n&&(n="short");let i="digital"===n?"numeric":n;const s=e.hours||i;i="2-digit"===s?"numeric":s;const o=e.minutes||i;i="2-digit"===o?"numeric":o;const r=e.seconds||i;i="2-digit"===r?"numeric":r;const a=e.milliseconds||i;re(this,oe,{locale:t,style:n,years:e.years||"digital"===n?"short":n,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===n?"short":n,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===n?"short":n,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===n?"short":n,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===n?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===n?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===n?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return ae(this,oe,"f")}formatToParts(t){const e=[],n=ae(this,oe,"f"),i=n.style,s=n.locale;for(const[i,o]of ce){const r=t[i];if("auto"===n[`${i}Display`]&&!r)continue;const a=n[i],l="2-digit"===a?ue:"numeric"===a?{}:{style:"unit",unit:o,unitDisplay:a};e.push(new Intl.NumberFormat(s,l).format(r))}return new le(s,{type:"unit",style:"digital"===i?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}oe=new WeakMap;const he=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,fe=["year","month","week","day","hour","minute","second","millisecond"];class me{constructor(t=0,e=0,n=0,i=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=n,this.days=i,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=0===this.sign}abs(){return new me(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if("string"==typeof t){const n=String(t).trim(),i=n.startsWith("-")?-1:1,s=null===(e=n.match(he))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*i));return s?new me(...s):new me}if("object"==typeof t){const{years:e,months:n,weeks:i,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new me(e,n,i,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const n=Date.now(),i=Math.abs(pe(n,me.from(t)).getTime()-n),s=Math.abs(pe(n,me.from(e)).getTime()-n);return i>s?-1:i<s?1:0}toLocaleString(t,e){return new de(t,e).format(this)}}function pe(t,e){const n=new Date(t);return n.setFullYear(n.getFullYear()+e.years),n.setMonth(n.getMonth()+e.months),n.setDate(n.getDate()+7*e.weeks+e.days),n.setHours(n.getHours()+e.hours),n.setMinutes(n.getMinutes()+e.minutes),n.setSeconds(n.getSeconds()+e.seconds),n}function be(t){if(t.blank)return t;let e=Math.abs(t.years),n=Math.abs(t.months),i=Math.abs(t.weeks),s=Math.abs(t.days),o=Math.abs(t.hours),r=Math.abs(t.minutes),a=Math.abs(t.seconds),l=Math.abs(t.milliseconds);l>=900&&(a+=Math.round(l/1e3)),(a||r||o||s||i||n||e)&&(l=0),a>=55&&(r+=Math.round(a/60)),(r||o||s||i||n||e)&&(a=0),r>=55&&(o+=Math.round(r/60)),(o||s||i||n||e)&&(r=0),o>=21&&(s+=Math.round(o/24)),(s||i||n||e)&&(o=0),s>=6&&(i+=Math.round(s/7)),(i||n||e)&&(s=0),i>=4&&(n+=Math.round(i/4)),(n||e)&&(i=0),n>=11&&(e+=Math.round(n/12)),e&&(n=0);const c=t.sign;return new me(e*c,n*c,i*c,s*c,o*c,r*c,a*c,l*c)}var ge,we,ve,ye,Ee,Ae,ke,Te,Me,xe,Ce=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Le=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const Se=("undefined"!=typeof globalThis?globalThis:window).HTMLElement||null,De=new me,Ie=new me(0,0,0,0,0,1);class He extends Event{constructor(t,e,n,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=n,this.newTitle=i}}function Oe(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const Re=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=Oe(t),n=Date.now()+e;n<this.time&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=n)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,Oe(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Se{constructor(){super(...arguments),ge.add(this),we.set(this,!1),ve.set(this,!1),Ee.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this)}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","datetime","lang","title"]}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("day",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,he.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return fe.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){Re.unobserve(this)}attributeChangedCallback(t,e,n){e!==n&&("title"===t&&Le(this,we,null!==n&&(this.date&&Ce(this,ge,"m",Ae).call(this,this.date))!==n,"f"),Ce(this,ve,"f")||"title"===t&&Ce(this,we,"f")||Le(this,ve,(async()=>{await Promise.resolve(),this.update()})(),"f"))}update(){const t=Ce(this,Ee,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let n=e;const i=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!i)return void(Ce(this,Ee,"f").textContent=t);const s=Date.now();Ce(this,we,"f")||(n=Ce(this,ge,"m",Ae).call(this,i)||"",n&&this.setAttribute("title",n));const o=function(t,e="second",n=Date.now()){const i=t.getTime()-n;if(0===i)return new me;const s=Math.sign(i),o=Math.abs(i),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),u=Math.floor(c/30),d=Math.floor(u/12),h=fe.indexOf(e)||fe.length;return new me(h>=0?d*s:0,h>=1?(u-12*d)*s:0,0,h>=3?(c-30*u)*s:0,h>=4?(l-24*c)*s:0,h>=5?(a-60*l)*s:0,h>=6?(r-60*a)*s:0,h>=7?(o-1e3*r)*s:0)}(i,this.precision,s),r=Ce(this,ge,"m",ke).call(this,o);let a=t;a="duration"===r?Ce(this,ge,"m",Te).call(this,o):"relative"===r?Ce(this,ge,"m",Me).call(this,o):Ce(this,ge,"m",xe).call(this,i),a?Ce(this,Ee,"f").textContent=a:this.shadowRoot===Ce(this,Ee,"f")&&this.textContent&&(Ce(this,Ee,"f").textContent=this.textContent),a===t&&n===e||this.dispatchEvent(new He(t,a,e,n)),"relative"===r||"duration"===r?Re.observe(this):Re.unobserve(this),Le(this,ve,!1,"f")}}we=new WeakMap,ve=new WeakMap,Ee=new WeakMap,ge=new WeakSet,ye=function(){var t;return(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang")||"default"},Ae=function(t){return new Intl.DateTimeFormat(Ce(this,ge,"a",ye),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},ke=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===me.compare(t,this.threshold))return"relative"}return"datetime"},Te=function(t){const e=Ce(this,ge,"a",ye),n=this.format,i=this.formatStyle,s=this.tense;let o=De;"micro"===n?(t=be(t),o=Ie,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=Ie)):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:i,[r]:"always"}):t.abs().toLocaleString(e,{style:i})},Me=function(t){const e=new Intl.RelativeTimeFormat(Ce(this,ge,"a",ye),{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=De),"past"===n&&-1!==t.sign&&(t=De);const[i,s]=function(t){const e=be(t);if(e.blank)return[0,"second"];for(const t of fe){if("millisecond"===t)continue;const n=e[`${t}s`];if(n)return[n,t]}return[0,"second"]}(t);return"second"===s&&i<10?e.format(0,"second"):e.format(i,s)},xe=function(t){const e=new Intl.DateTimeFormat(Ce(this,ge,"a",ye),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${e.format(t)}`.trim()};const Fe="undefined"!=typeof globalThis?globalThis:window;try{customElements.define("relative-time",RelativeTimeElement),Fe.RelativeTimeElement=RelativeTimeElement}catch(t){if(!(Fe.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Pe(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{constructor(){super(),this.addEventListener("keydown",(t=>{const e=t.target;if(!(e instanceof HTMLElement))return;if(e.closest(this.tagName)!==this)return;if("tab"!==e.getAttribute("role")&&!e.closest('[role="tablist"]'))return;const n=Pe(this),i=n.indexOf(n.find((t=>t.matches('[aria-selected="true"]')))),[s,o]="vertical"===e.closest('[role="tablist"]')?.getAttribute("aria-orientation")?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(s.some((e=>t.code===e))){let t=i+1;t>=n.length&&(t=0),this.selectTab(t)}else if(o.some((e=>t.code===e))){let t=i-1;t<0&&(t=n.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(n.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Pe(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const n=t.target.closest('[role="tab"]');if(!(n instanceof HTMLElement&&n.closest('[role="tablist"]')))return;const i=e.indexOf(n);this.selectTab(i)}))}connectedCallback(){for(const t of Pe(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Pe(this),n=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const i=e[t],s=n[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:s}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of n)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");i.setAttribute("aria-selected","true"),i.setAttribute("tabindex","0"),i.focus(),s.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:s}}))}}}window.customElements.get("tab-container")||(window.TabContainerElement=TabContainerElement,window.customElements.define("tab-container",TabContainerElement));let qe=class YatthoMultiInputElement extends HTMLElement{activateField(t){var e,n;const i=this.findField(t);if(i){for(const t of this.fields)t!==i&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),null===(e=t.parentElement)||void 0===e||e.setAttribute("hidden","hidden"));i.removeAttribute("disabled"),i.removeAttribute("hidden"),null===(n=i.parentElement)||void 0===n||n.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function $e(t,e=0,{start:n=!1,middle:i=!1,once:s=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:s=!1}={}){var o,r=0,a=!1,l=function l(...c){if(!a){var u=Date.now()-r;r=Date.now(),n?(n=!1,t(...c),s&&l.cancel()):(i&&u<e||!i)&&(clearTimeout(o),o=setTimeout((function(){r=Date.now(),t(...c),s&&l.cancel()}),i?e-u:e))}};return l.cancel=function(){clearTimeout(o),a=!0},l}(t,e,{start:n,middle:i,once:s})}T([gt],qe.prototype,"fields",void 0),qe=T([wt],qe),window.customElements.get("yattho-multi-input")||(Object.assign(window,{YatthoMultiInputElement:qe}),window.customElements.define("yattho-multi-input",qe));const We=new WeakMap;class AutoCheckElement extends HTMLElement{connectedCallback(){const t=this.input;if(!t)return;const e=$e(Be.bind(null,this),300),n={check:e,controller:null};We.set(this,n),t.addEventListener("input",Ne),t.addEventListener("input",e),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=We.get(this);e&&(We.delete(this),t.removeEventListener("input",Ne),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}}function Ne(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const n=e.closest("auto-check");if(!(n instanceof AutoCheckElement))return;const i=n.src,s=n.csrf,o=We.get(n);if(!i||!s||!o)return;let r="Verifying…";e.dispatchEvent(new CustomEvent("auto-check-start",{bubbles:!0,detail:{setValidity:t=>r=t}})),n.required&&e.setCustomValidity(r)}async function Be(t){const e=t.input;if(!e)return;const n=t.csrfField,i=t.src,s=t.csrf,o=We.get(t);if(!i||!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const r=new FormData;r.append(n,s),r.append("value",e.value),e.dispatchEvent(new CustomEvent("auto-check-send",{bubbles:!0,detail:{body:r}})),o.controller?o.controller.abort():t.dispatchEvent(new CustomEvent("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};try{const n=await async function(t,e,n){try{const i=await fetch(e,n);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),i}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,i,{credentials:"same-origin",signal:o.controller.signal,method:"POST",body:r});n.ok?function(t,e,n){n&&e.setCustomValidity("");e.dispatchEvent(new CustomEvent("auto-check-success",{bubbles:!0,detail:{response:t.clone()}}))}(n,e,t.required):function(t,e,n){let i="Validation failed";const s=t=>i=t;e.dispatchEvent(new CustomEvent("auto-check-error",{bubbles:!0,detail:{response:t.clone(),setValidity:s}})),n&&e.setCustomValidity(i)}(n,e,t.required),o.controller=null,e.dispatchEvent(new CustomEvent("auto-check-complete",{bubbles:!0}))}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new CustomEvent("auto-check-complete",{bubbles:!0})))}}var Ye;window.customElements.get("auto-check")||(window.AutoCheckElement=AutoCheckElement,window.customElements.define("auto-check",AutoCheckElement));let je=class YatthoTextFieldElement extends HTMLElement{constructor(){super(...arguments),Ye.set(this,void 0)}connectedCallback(){var t;null===(t=M(this,Ye,"f"))||void 0===t||t.abort();const{signal:e}=x(this,Ye,new AbortController,"f");this.inputElement.addEventListener("auto-check-success",(()=>{this.clearError()}),{signal:e}),this.inputElement.addEventListener("auto-check-error",(t=>{t.detail.response.text().then((t=>{this.setError(t)}))}),{signal:e})}disconnectedCallback(){var t;null===(t=M(this,Ye,"f"))||void 0===t||t.abort()}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.innerText=""}setError(t){this.validationMessageElement.innerText=t,this.validationElement.hidden=!1,this.inputElement.setAttribute("invalid","true")}};Ye=new WeakMap,T([bt],je.prototype,"inputElement",void 0),T([bt],je.prototype,"validationElement",void 0),T([bt],je.prototype,"validationMessageElement",void 0),je=T([wt],je);let Xe=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.innerText=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.innerText="",this.validationElement.setAttribute("hidden","hidden")}))}};T([bt],Xe.prototype,"validationElement",void 0),T([bt],Xe.prototype,"validationMessageElement",void 0),Xe=T([wt],Xe)}();
1
+ !function(){"use strict";class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const o=this.parentElement;if(!o)return;const c=o.querySelector("summary");c&&(c.setAttribute("aria-haspopup","menu"),c.hasAttribute("role")||c.setAttribute("role","button"));const f=[n(o,"compositionstart",(t=>h(this,t))),n(o,"compositionend",(t=>h(this,t))),n(o,"click",(t=>l(o,t))),n(o,"change",(t=>l(o,t))),n(o,"keydown",(e=>function(e,n,i){if(!(i instanceof KeyboardEvent))return;if(e.querySelector("details[open]"))return;const s=t.get(n);if(!s||s.isComposing)return;const o=i.target instanceof Element&&"SUMMARY"===i.target.tagName;switch(i.key){case"Escape":e.hasAttribute("open")&&(d(e),i.preventDefault(),i.stopPropagation());break;case"ArrowDown":{o&&!e.hasAttribute("open")&&e.setAttribute("open","");const t=r(e,!0);t&&t.focus(),i.preventDefault()}break;case"ArrowUp":{o&&!e.hasAttribute("open")&&e.setAttribute("open","");const t=r(e,!1);t&&t.focus(),i.preventDefault()}break;case"n":if(a&&i.ctrlKey){const t=r(e,!0);t&&t.focus(),i.preventDefault()}break;case"p":if(a&&i.ctrlKey){const t=r(e,!1);t&&t.focus(),i.preventDefault()}break;case" ":case"Enter":{const t=document.activeElement;t instanceof HTMLElement&&u(t)&&t.closest("details")===e&&(i.preventDefault(),i.stopPropagation(),t.click())}}}(o,this,e))),n(o,"toggle",(()=>i(o,this)),{once:!0}),n(o,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const n=e.closest("details");n&&n!==t&&!n.contains(t)&&n.removeAttribute("open")}}(o))),this.preload?n(o,"mouseover",(()=>i(o,this)),{once:!0}):e,...s(o)];t.set(this,{subscriptions:f,loaded:!1,isComposing:!1})}disconnectedCallback(){const e=t.get(this);if(e){t.delete(this);for(const t of e.subscriptions)t.unsubscribe()}}}const t=new WeakMap,e={unsubscribe(){}};function n(t,e,n,i=!1){return t.addEventListener(e,n,i),{unsubscribe:()=>{t.removeEventListener(e,n,i)}}}function i(e,n){const i=n.getAttribute("src");if(!i)return;const s=t.get(n);if(!s)return;if(s.loaded)return;s.loaded=!0;const r=n.querySelector("include-fragment");r&&!r.hasAttribute("src")&&(r.addEventListener("loadend",(()=>o(e))),r.setAttribute("src",i))}function s(t){let e=!1;return[n(t,"mousedown",(()=>e=!0)),n(t,"keydown",(()=>e=!1)),n(t,"toggle",(()=>{t.hasAttribute("open")&&(o(t)||e||function(t){const e=document.activeElement;if(e&&u(e)&&t.contains(e))return;const n=r(t,!0);n&&n.focus()}(t))}))]}function o(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function r(t,e){const n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),i=document.activeElement,s=i instanceof HTMLElement?n.indexOf(i):-1,o=e?n[s+1]:n[s-1],r=e?n[0]:n[n.length-1];return o||r}const a=navigator.userAgent.match(/Macintosh/);function l(t,e){const n=e.target;if(n instanceof Element&&n.closest("details")===t)if("click"===e.type){const e=n.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const i=e.querySelector("input");if("LABEL"===e.tagName&&n===i)return;"LABEL"===e.tagName&&i&&!i.checked||c(e,t)}else if("change"===e.type){const e=n.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&c(e,t)}}function c(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const n=t.closest("details-menu");if(!n)return;n.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const n=e.querySelector("[data-menu-button]");if(!n)return;const i=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(i)n.textContent=i;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(n.innerHTML=e)}}(t,e),function(t,e){for(const n of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=n.querySelector('input[type="radio"], input[type="checkbox"]');let i=(n===t).toString();e instanceof HTMLInputElement&&(i=e.indeterminate?"mixed":e.checked.toString()),n.setAttribute("aria-checked",i)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&d(e),n.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function u(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function d(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function h(e,n){const i=t.get(e);i&&(i.isComposing="compositionstart"===n.type)}window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const f=new WeakMap,m=new WeakMap,p=new WeakMap;function b(t){const e=t.currentTarget;if(!(e instanceof ImageCropElement))return;const{box:n,image:i}=p.get(e)||{};if(!n||!i)return;let s=0,o=0;if(t instanceof KeyboardEvent)"ArrowUp"===t.key?o=-1:"ArrowDown"===t.key?o=1:"ArrowLeft"===t.key?s=-1:"ArrowRight"===t.key&&(s=1);else if(m.has(e)&&t instanceof MouseEvent){const n=m.get(e);s=t.pageX-n.dragStartX,o=t.pageY-n.dragStartY}else if(m.has(e)&&t instanceof TouchEvent){const{pageX:n,pageY:i}=t.changedTouches[0],{dragStartX:r,dragStartY:a}=m.get(e);s=n-r,o=i-a}if(0!==s||0!==o){const t=Math.min(Math.max(0,n.offsetLeft+s),i.width-n.offsetWidth),r=Math.min(Math.max(0,n.offsetTop+o),i.height-n.offsetHeight);n.style.left=`${t}px`,n.style.top=`${r}px`,k(e,{x:t,y:r,width:n.offsetWidth,height:n.offsetHeight})}if(t instanceof MouseEvent)m.set(e,{dragStartX:t.pageX,dragStartY:t.pageY});else if(t instanceof TouchEvent){const{pageX:n,pageY:i}=t.changedTouches[0];m.set(e,{dragStartX:n,dragStartY:i})}}function g(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=w(e);if(!(n instanceof ImageCropElement))return;const{box:i}=p.get(n)||{};if(!i)return;const s=n.getBoundingClientRect();let o,r,a;if(t instanceof KeyboardEvent){if("Escape"===t.key)return E(n);if("-"===t.key&&(a=-10),"="===t.key&&(a=10),!a)return;o=i.offsetWidth+a,r=i.offsetHeight+a,f.set(n,{startX:i.offsetLeft,startY:i.offsetTop})}else if(t instanceof MouseEvent){const e=f.get(n);if(!e)return;o=t.pageX-e.startX-s.left-window.pageXOffset,r=t.pageY-e.startY-s.top-window.pageYOffset}else if(t instanceof TouchEvent){const e=f.get(n);if(!e)return;o=t.changedTouches[0].pageX-e.startX-s.left-window.pageXOffset,r=t.changedTouches[0].pageY-e.startY-s.top-window.pageYOffset}o&&r&&y(n,o,r,!(t instanceof KeyboardEvent))}function w(t){const e=t.getRootNode();return e instanceof ShadowRoot?e.host:t}function v(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;const n=w(e);if(!(n instanceof ImageCropElement))return;const{box:i}=p.get(n)||{};if(!i)return;const s=t.target;if(s instanceof HTMLElement)if(s.hasAttribute("data-direction")){const e=s.getAttribute("data-direction")||"";n.addEventListener("mousemove",g),n.addEventListener("touchmove",g,{passive:!0}),["nw","se"].indexOf(e)>=0&&n.classList.add("nwse"),["ne","sw"].indexOf(e)>=0&&n.classList.add("nesw"),f.set(n,{startX:i.offsetLeft+(["se","ne"].indexOf(e)>=0?0:i.offsetWidth),startY:i.offsetTop+(["se","sw"].indexOf(e)>=0?0:i.offsetHeight)}),g(t)}else n.addEventListener("mousemove",b),n.addEventListener("touchmove",b,{passive:!0})}function y(t,e,n,i=!0){let s=Math.max(Math.abs(e),Math.abs(n),10);const o=f.get(t);if(!o)return;const{box:r,image:a}=p.get(t)||{};if(!r||!a)return;s=Math.min(s,n>0?a.height-o.startY:o.startY,e>0?a.width-o.startX:o.startX);const l=i?Math.round(Math.max(0,e>0?o.startX:o.startX-s)):r.offsetLeft,c=i?Math.round(Math.max(0,n>0?o.startY:o.startY-s)):r.offsetTop;r.style.left=`${l}px`,r.style.top=`${c}px`,r.style.width=`${s}px`,r.style.height=`${s}px`,k(t,{x:l,y:c,width:s,height:s})}function E(t){const{image:e}=p.get(t)||{};if(!e)return;const n=Math.round(e.clientWidth>e.clientHeight?e.clientHeight:e.clientWidth);f.set(t,{startX:(e.clientWidth-n)/2,startY:(e.clientHeight-n)/2}),y(t,n,n)}function A(t){const e=t.currentTarget;e instanceof ImageCropElement&&(m.delete(e),e.classList.remove("nwse","nesw"),e.removeEventListener("mousemove",g),e.removeEventListener("mousemove",b),e.removeEventListener("touchmove",g),e.removeEventListener("touchmove",b))}function k(t,e){const{image:n}=p.get(t)||{};if(!n)return;const i=n.naturalWidth/n.width;for(const n in e){const s=Math.round(e[n]*i);e[n]=s;const o=t.querySelector(`[data-image-crop-input='${n}']`);o instanceof HTMLInputElement&&(o.value=s.toString())}t.dispatchEvent(new CustomEvent("image-crop-change",{bubbles:!0,detail:e}))}class ImageCropElement extends HTMLElement{connectedCallback(){if(p.has(this))return;const t=this.attachShadow({mode:"open"});t.innerHTML='\n<style>\n :host { touch-action: none; display: block; }\n :host(.nesw) { cursor: nesw-resize; }\n :host(.nwse) { cursor: nwse-resize; }\n :host(.nesw) .crop-box, :host(.nwse) .crop-box { cursor: inherit; }\n :host([loaded]) .crop-image { display: block; }\n :host([loaded]) ::slotted([data-loading-slot]), .crop-image { display: none; }\n\n .crop-wrapper {\n position: relative;\n font-size: 0;\n }\n .crop-container {\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n position: absolute;\n overflow: hidden;\n z-index: 1;\n top: 0;\n width: 100%;\n height: 100%;\n }\n\n :host([rounded]) .crop-box {\n border-radius: 50%;\n box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.3);\n }\n .crop-box {\n position: absolute;\n border: 1px dashed #fff;\n box-sizing: border-box;\n cursor: move;\n }\n\n :host([rounded]) .crop-outline {\n outline: none;\n }\n .crop-outline {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n outline: 4000px solid rgba(0, 0, 0, .3);\n }\n\n .handle { position: absolute; }\n :host([rounded]) .handle::before { border-radius: 50%; }\n .handle:before {\n position: absolute;\n display: block;\n padding: 4px;\n transform: translate(-50%, -50%);\n content: \' \';\n background: #fff;\n border: 1px solid #767676;\n }\n .ne { top: 0; right: 0; cursor: nesw-resize; }\n .nw { top: 0; left: 0; cursor: nwse-resize; }\n .se { bottom: 0; right: 0; cursor: nwse-resize; }\n .sw { bottom: 0; left: 0; cursor: nesw-resize; }\n</style>\n<slot></slot>\n<div class="crop-wrapper">\n <img width="100%" class="crop-image" alt="">\n <div class="crop-container">\n <div data-crop-box class="crop-box">\n <div class="crop-outline"></div>\n <div data-direction="nw" class="handle nw"></div>\n <div data-direction="ne" class="handle ne"></div>\n <div data-direction="sw" class="handle sw"></div>\n <div data-direction="se" class="handle se"></div>\n </div>\n </div>\n</div>\n';const e=t.querySelector("[data-crop-box]");if(!(e instanceof HTMLElement))return;const n=t.querySelector("img");n instanceof HTMLImageElement&&(p.set(this,{box:e,image:n}),n.addEventListener("load",(()=>{this.loaded=!0,E(this)})),this.addEventListener("mouseleave",A),this.addEventListener("touchend",A),this.addEventListener("mouseup",A),e.addEventListener("mousedown",v),e.addEventListener("touchstart",v,{passive:!0}),this.addEventListener("keydown",b),this.addEventListener("keydown",g),this.src&&(n.src=this.src))}static get observedAttributes(){return["src"]}get src(){return this.getAttribute("src")}set src(t){t?this.setAttribute("src",t):this.removeAttribute("src")}get loaded(){return this.hasAttribute("loaded")}set loaded(t){t?this.setAttribute("loaded",""):this.removeAttribute("loaded")}attributeChangedCallback(t,e,n){const{image:i}=p.get(this)||{};"src"===t&&(this.loaded=!1,i&&(i.src=n))}}function T(t,e,n,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,n,r):s(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r}function M(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function x(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n}window.customElements.get("image-crop")||(window.ImageCropElement=ImageCropElement,window.customElements.define("image-crop",ImageCropElement));const C={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},L={start:["end","center"],end:["start","center"],center:["end","start"]};function S(t,e,n={}){const i=function(t){let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),s=function(t){let e=t;for(;null!==e&&e!==document.body;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const n=e!==document.body&&e instanceof HTMLElement?e:document.body,i=n.getBoundingClientRect(),s=getComputedStyle(n),[o,r,a,l]=[s.borderTopWidth,s.borderLeftWidth,s.borderRightWidth,s.borderBottomWidth].map((t=>parseInt(t,10)||0));return{top:i.top+o,left:i.left+r,width:i.width-a-r,height:Math.max(i.height-o-l,n===document.body?window.innerHeight:-1/0)}}(i),o=getComputedStyle(i),r=i.getBoundingClientRect(),[a,l]=[o.borderTopWidth,o.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,n,i,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let u=F(n,i,s,o,a,l),d=s,h=o;if(u.top-=e.top,u.left-=e.left,!r){const r=C[s];let f=0;if(r){let t=s;for(;f<r.length&&P(t,u,c,n);){const s=r[f++];t=s,u=F(n,i,s,o,a,l),u.top-=e.top,u.left-=e.left,d=s}}const m=L[o];let p=0;if(m){let t=o;for(;p<m.length&&q(t,u,c,n);){const s=m[p++];t=s,u=F(n,i,d,s,a,l),u.top-=e.top,u.left-=e.left,h=s}}u.top<c.top&&(u.top=c.top),u.left<c.left&&(u.left=c.left),u.left+n.width>t.width+c.left&&(u.left=t.width+c.left-n.width),r&&f<r.length&&u.top+n.height>t.height+c.top&&(u.top=t.height+c.top-n.height)}return Object.assign(Object.assign({},u),{anchorSide:d,anchorAlign:h})}(s,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,n,i,s,o;const r=null!==(e=t.side)&&void 0!==e?e:D,a=null!==(n=t.align)&&void 0!==n?n:I;return{side:r,align:a,anchorOffset:null!==(i=t.anchorOffset)&&void 0!==i?i:"inside-center"===r?0:H,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==a&&r.startsWith("inside")?R:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:O}}(n))}const D="outside-bottom",I="start",H=4,R=4,O=!1;function F(t,e,n,i,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===n?l=e.top-s-t.height:"outside-bottom"===n?l=a+s:"outside-left"===n?c=e.left-s-t.width:"outside-right"===n&&(c=r+s),"outside-top"!==n&&"outside-bottom"!==n||(c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==n&&"outside-right"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===n?l=e.top+s:"inside-bottom"===n?l=a-s-t.height:"inside-left"===n?c=e.left+s:"inside-right"===n?c=r-s-t.width:"inside-center"===n&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===n||"inside-bottom"===n?c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==n&&"inside-right"!==n&&"inside-center"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function P(t,e,n,i){return"outside-top"===t||"outside-bottom"===t?e.top<n.top||e.top+i.height>n.height+n.top:e.left<n.left||e.left+i.width>n.width+n.left}function q(t,e,n,i){return"end"===t?e.left<n.left:"start"===t||"center"===t?e.left+i.width>n.left+n.width||e.left<n.left:void 0}function $(t,e=!1){return function*(t,e={}){var n,i;const s=null!==(n=e.strict)&&void 0!==n&&n,o=null!==(i=e.onlyTabbable)&&void 0!==i&&i?N:W,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function W(t,e=!1){const n=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,i=t.hidden,s=t instanceof HTMLInputElement&&"hidden"===t.type,o=t.classList.contains("sentinel");if(n||i||s||o)return!1;if(e){const e=0===t.offsetWidth||0===t.offsetHeight,n=["hidden","collapse"].includes(getComputedStyle(t).visibility),i=0===t.getClientRects().length;if(e||n||i)return!1}return null!=t.getAttribute("tabindex")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex}function N(t,e=!1){return W(t,e)&&"-1"!==t.getAttribute("tabindex")}let B=!1;function Y(){}try{const t=Object.create({},{signal:{get(){B=!0}}});window.addEventListener("test",Y,t),window.removeEventListener("test",Y,t)}catch(t){}B||(function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,i){return"object"==typeof i&&"signal"in i&&i.signal instanceof AbortSignal&&t.call(i.signal,"abort",(()=>{this.removeEventListener(e,n,i)})),t.call(this,e,n,i)}}(),B=!0);const j=[];let X;function K(t,e,n){const i=new AbortController,s=null!=n?n:i.signal;t.setAttribute("data-focus-trap","active");const o=document.createElement("span");o.setAttribute("class","sentinel"),o.setAttribute("tabindex","0"),o.setAttribute("aria-hidden","true"),o.onfocus=()=>{const e=$(t,!0);null==e||e.focus()};const r=document.createElement("span");let a;function l(n){if(n instanceof HTMLElement&&document.contains(t)){if(t.contains(n))return void(a=n);if(a&&N(a)&&t.contains(a))return void a.focus();if(e&&t.contains(e))return void e.focus();{const e=$(t);return void(null==e||e.focus())}}}r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=$(t);null==e||e.focus()},t.prepend(o),t.append(r);const c=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(s);if(X){const t=X;X.container.setAttribute("data-focus-trap","suspended"),X.controller.abort(),j.push(t)}c.signal.addEventListener("abort",(()=>{X=void 0})),s.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const n=j.findIndex((e=>e.container===t));n>=0&&j.splice(n,1),function(){const t=j.pop();t&&K(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{l(t.target)}),{signal:c.signal,capture:!0}),l(document.activeElement),X={container:t,controller:c,initialFocus:e,originalSignal:s};const u=j.findIndex((e=>e.container===t));if(u>=0&&j.splice(u,1),!n)return i}var V,z,U,Z;function _(t){document.activeElement!==t&&(null==t||t.focus())}const G=[];function J(t){const e=t.target,n=null==e?void 0:e.closest("button");if(!n)return;let i=null==n?void 0:n.getAttribute("data-show-dialog-id");if(i){t.stopPropagation();const e=document.getElementById(i);if(e instanceof ModalDialogElement)return e.openButton=n,void e.show()}const s=G[G.length-1];s&&(i=n.getAttribute("data-close-dialog-id"),i===s.id&&(G.pop(),s.close()),i=n.getAttribute("data-submit-dialog-id"),i===s.id&&(G.pop(),s.close(!0)))}function Q(t){const e=t.target;if(null==e?void 0:e.closest("button"))return;const n=G[G.length-1];if(!n)return;!e.closest(`#${n.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(G.pop(),n.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),V.add(this),z.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){var e,n,i,s;if(t){if(this.open)return;this.setAttribute("open",""),null===(e=M(this,V,"a",U))||void 0===e||e.classList.remove("Overlay--hidden"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",M(this,z,"f").signal.aborted&&x(this,z,new AbortController,"f"),K(this,void 0,M(this,z,"f").signal),G.push(this)}else{if(!this.open)return;this.removeAttribute("open"),null===(n=M(this,V,"a",U))||void 0===n||n.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",M(this,z,"f").abort();const t=(null===(i=this.openButton)||void 0===i?void 0:i.closest("details"))||(null===(s=this.openButton)||void 0===s?void 0:s.closest("action-menu"));_(t?$(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",J),document.addEventListener("mousedown",Q),this.addEventListener("keydown",(t=>M(this,V,"m",Z).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}z=new WeakMap,V=new WeakSet,U=function(){var t;return(null===(t=this.parentElement)||void 0===t?void 0:t.hasAttribute("data-modal-dialog-overlay"))?this.parentElement:null},Z=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&"Escape"===t.key)this.open&&(this.close(),t.preventDefault(),t.stopPropagation())},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));const tt=new WeakSet;function et(t){st(t),it(t)}const nt=new WeakMap;function it(t=document){if(nt.has(t))return nt.get(t);let e=!1;const n=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)at(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&st(t)}));n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const i={get closed(){return e},unsubscribe(){e=!0,nt.delete(t),n.disconnect()}};return nt.set(t,i),i}function st(t){for(const e of t.querySelectorAll("[data-action]"))at(e);t instanceof Element&&t.hasAttribute("data-action")&&at(t)}function ot(t){const e=t.currentTarget;for(const n of rt(e))if(t.type===n.type){const i=e.closest(n.tag);tt.has(i)&&"function"==typeof i[n.method]&&i[n.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&tt.has(s.host)&&s.host.matches(n.tag)){const e=s.host;"function"==typeof e[n.method]&&e[n.method](t)}}}function*rt(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),n=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||"handleEvent"}||"handleEvent"}}function at(t){for(const e of rt(t))t.addEventListener(e.type,ot)}const lt=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),ct=(t,e="property")=>{const n=lt(t);if(!n.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return n};const ut="attr",dt=new WeakSet;function ht(t,e){if(dt.has(t))return;dt.add(t);const n=Object.getPrototypeOf(t),i=n?.constructor?.attrPrefix??"data-";e||(e=pt(n,ut));for(const n of e){const e=t[n],s=ct(`${i}${n}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,n,o),n in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const ft=Symbol.for("catalyst");class mt{constructor(t){const e=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,n)};const i=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,i)};const s=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,n,i){e.attributeChangedCallback(this,t,n,i,s)};let o=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return e.observedAttributes(this,o)},set(t){o=t}}),function(t){let e=t.observedAttributes||[];const n=t.attrPrefix??"data-",i=t=>ct(`${n}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...pt(t.prototype,ut)].map(i).concat(e),set(t){e=t}})}(t),function(t){const e=lt(t.name).replace(/-element$/,"");try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),ht(t),function(t){tt.add(t),t.shadowRoot&&et(t.shadowRoot),st(t),it(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&et(t.shadowRoot)}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,i,s){ht(t),"data-catalyst"!==e&&s&&s.call(t,e,n,i)}}function pt(t,e){if(!Object.prototype.hasOwnProperty.call(t,ft)){const e=t[ft],n=t[ft]=new Map;if(e)for(const[t,i]of e)n.set(t,new Set(i))}const n=t[ft];return n.has(e)||n.set(e,new Set),n.get(e)}function bt(t,e){pt(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase();if(t.shadowRoot)for(const i of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!i.closest(n))return i;for(const i of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(i.closest(n)===t)return i}(this,e)}})}function gt(t,e){pt(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase(),i=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)||i.push(s);for(const s of t.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)===t&&i.push(s);return i}(this,e)}})}function wt(t){new mt(t)}new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const n={once:!0,passive:!0,signal:e.signal},i=()=>e.abort();document.addEventListener("mousedown",i,n),document.addEventListener("touchstart",i,n),document.addEventListener("keydown",i,n),document.addEventListener("pointerdown",i,n)}));let vt=class NavListElement extends HTMLElement{connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}expandItem(t){var e;null===(e=t.nextElementSibling)||void 0===e||e.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){var e;null===(e=t.nextElementSibling)||void 0===e||e.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false")}itemIsExpanded(t){return"A"===(null==t?void 0:t.tagName)||"true"===(null==t?void 0:t.getAttribute("aria-expanded"))}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=e.closest("button");n&&(this.itemIsExpanded(n)?this.collapseItem(n):this.expandItem(n),t.stopPropagation())}async showMore(t){var e,n;if(t.preventDefault(),this.showMoreDisabled)return;let i;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const e=await fetch(t);if(!e.ok)return;i=await e.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const s=this.parseHTML(document,i);null===(e=null==s?void 0:s.querySelector("li > a"))||void 0===e||e.setAttribute("data-targets","nav-list.focusMarkers"),this.list.insertBefore(s,this.showMoreItem),null===(n=this.focusMarkers.pop())||void 0===n||n.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}parseHTML(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)}};var yt,Et;T([bt],vt.prototype,"list",void 0),T([bt],vt.prototype,"showMoreItem",void 0),T([gt],vt.prototype,"focusMarkers",void 0),vt=T([wt],vt);let At=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),yt.add(this)}connectedCallback(){M(this,yt,"m",Et).call(this)}select(t){var e,n;const i=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),null===(e=t.querySelector("[aria-current]"))||void 0===e||e.setAttribute("aria-current","false");null===(n=i.closest("li.SegmentedControl-item"))||void 0===n||n.classList.add("SegmentedControl-item--selected"),i.setAttribute("aria-current","true")}};function kt(t,e=0,{start:n=!1,middle:i=!1,once:s=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:s=!1}={}){let o,r=0,a=!1;function l(...c){if(a)return;const u=Date.now()-r;r=Date.now(),n?(n=!1,t.apply(this,c),s&&l.cancel()):(i&&u<e||!i)&&(clearTimeout(o),o=setTimeout((()=>{r=Date.now(),t.apply(this,c),s&&l.cancel()}),i?e-u:e))}return l.cancel=()=>{clearTimeout(o),a=!0},l}(t,e,{start:n,middle:i,once:s})}yt=new WeakSet,Et=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},T([gt],At.prototype,"items",void 0),At=T([wt],At),window.customElements.get("segmented-control")||(window.SegmentedControlElement=At,window.customElements.define("segmented-control",At));let Tt=class ToggleSwitchElement extends HTMLElement{get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}toggle(){this.isDisabled()||(this.isRemote()?(this.setLoadingState(),this.submitForm()):this.performToggle())}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-checked","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-checked","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-checked")}isOff(){return!this.isOn()}isDisabled(){return"true"===this.switch.getAttribute("aria-disabled")}disable(){this.switch.setAttribute("aria-disabled","true")}enable(){this.switch.setAttribute("aria-disabled","false")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.disable(),this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden")}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden"),this.enable()}async submitForm(){const t=new FormData;this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"0":"1");try{if(!this.src)throw new Error("invalid src");let e;try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:{"Requested-With":"XMLHttpRequest"},body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());this.setSuccessState(),this.performToggle()}catch(t){t instanceof Error&&this.setErrorState(t.message||"An error occurred, please try again.")}}};var Mt,xt,Ct,Lt,St,Dt,It,Ht,Rt;T([bt],Tt.prototype,"switch",void 0),T([bt],Tt.prototype,"loadingSpinner",void 0),T([bt],Tt.prototype,"errorIcon",void 0),T([function(t=0,e={}){return(n,i,s)=>{if(!s||"function"!=typeof s.value)throw new Error("debounce can only decorate functions");const o=s.value;s.value=kt(o,t,e),Object.defineProperty(n,i,s)}}(300)],Tt.prototype,"submitForm",null),Tt=T([wt],Tt),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=Tt,window.customElements.define("toggle-switch",Tt));const Ot="tooltip-open",Ft="sr-only",Pt=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];class ToolTipElement extends HTMLElement{constructor(){super(...arguments),Mt.add(this),xt.set(this,void 0),Ct.set(this,"center"),Lt.set(this,"outside-bottom"),St.set(this,!1)}styles(){return`\n :host {\n position: absolute;\n z-index: 1000000;\n padding: .5em .75em;\n font: normal normal 11px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";\n -webkit-font-smoothing: subpixel-antialiased;\n color: var(--color-fg-on-emphasis);\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--color-neutral-emphasis-plus);\n border-radius: 6px;\n opacity: 0;\n max-width: 250px;\n word-wrap: break-word;\n white-space: normal;\n width: max-content;\n }\n :host:before{\n position: absolute;\n z-index: 1000001;\n color: var(--color-neutral-emphasis-plus);\n content: "";\n border: 6px solid transparent;\n opacity: 0\n }\n @keyframes tooltip-appear {\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n }\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: 12px;\n content: ""\n }\n :host(.${Ot}),\n :host(.${Ot}):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: .4s\n }\n :host(.tooltip-s):before,\n :host(.tooltip-n):before {\n right: 50%;\n margin-right: -6px;\n }\n :host(.tooltip-s):before,\n :host(.tooltip-se):before,\n :host(.tooltip-sw):before {\n bottom: 100%;\n border-bottom-color: var(--color-neutral-emphasis-plus)\n }\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n :host(.tooltip-n):before,\n :host(.tooltip-ne):before,\n :host(.tooltip-nw):before {\n top: 100%;\n border-top-color: var(--color-neutral-emphasis-plus)\n }\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%\n }\n :host(.tooltip-se):before,\n :host(.tooltip-ne):before {\n left: 0;\n margin-left: 6px;\n }\n :host(.tooltip-sw):before,\n :host(.tooltip-nw):before {\n right: 0;\n margin-right: 6px;\n }\n :host(.tooltip-w):before {\n top: 50%;\n bottom: 50%;\n left: 100%;\n margin-top: -6px;\n border-left-color: var(--color-neutral-emphasis-plus)\n }\n :host(.tooltip-e):before {\n top: 50%;\n right: 100%;\n bottom: 50%;\n margin-top: -6px;\n border-right-color: var(--color-neutral-emphasis-plus)\n }\n `}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){this.classList.toggle(Ft,t),this.isConnected&&M(this,Mt,"m",Dt).call(this)}get hiddenFromView(){return this.classList.contains(Ft)}connectedCallback(){var t;if(M(this,Mt,"m",It).call(this),M(this,Mt,"m",Ht).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}if(this.hiddenFromView=!0,x(this,St,!0,"f"),!this.control)return;this.setAttribute("role","tooltip"),null===(t=M(this,xt,"f"))||void 0===t||t.abort(),x(this,xt,new AbortController,"f");const{signal:e}=M(this,xt,"f");this.addEventListener("mouseleave",this,{signal:e}),this.control.addEventListener("mouseenter",this,{signal:e}),this.control.addEventListener("mouseleave",this,{signal:e}),this.control.addEventListener("focus",this,{signal:e}),this.control.addEventListener("blur",this,{signal:e}),this.ownerDocument.addEventListener("keydown",this,{signal:e}),M(this,Mt,"m",Dt).call(this)}disconnectedCallback(){var t;null===(t=M(this,xt,"f"))||void 0===t||t.abort()}handleEvent(t){this.control&&("mouseenter"!==t.type&&"focus"!==t.type||!this.hiddenFromView?"blur"===t.type||"mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this?this.hiddenFromView=!0:"keydown"!==t.type||"Escape"!==t.key||this.hiddenFromView||(this.hiddenFromView=!0):this.hiddenFromView=!1)}attributeChangedCallback(t){this.isConnected&&("id"===t||"data-type"===t?M(this,Mt,"m",It).call(this):"data-direction"===t&&M(this,Mt,"m",Ht).call(this))}}xt=new WeakMap,Ct=new WeakMap,Lt=new WeakMap,St=new WeakMap,Mt=new WeakSet,Dt=function(){if(this.hiddenFromView)this.classList.remove(Ot,...Pt);else{this.classList.add(Ot);for(const t of this.ownerDocument.querySelectorAll(this.tagName))t!==this&&(t.hiddenFromView=!0);M(this,Mt,"m",Rt).call(this)}},It=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},Ht=function(){this.classList.remove(...Pt);const t=this.direction;"n"===t?(x(this,Ct,"center","f"),x(this,Lt,"outside-top","f")):"ne"===t?(x(this,Ct,"start","f"),x(this,Lt,"outside-top","f")):"e"===t?(x(this,Ct,"center","f"),x(this,Lt,"outside-right","f")):"se"===t?(x(this,Ct,"start","f"),x(this,Lt,"outside-bottom","f")):"s"===t?(x(this,Ct,"center","f"),x(this,Lt,"outside-bottom","f")):"sw"===t?(x(this,Ct,"end","f"),x(this,Lt,"outside-bottom","f")):"w"===t?(x(this,Ct,"center","f"),x(this,Lt,"outside-left","f")):"nw"===t&&(x(this,Ct,"end","f"),x(this,Lt,"outside-top","f"))},Rt=function(){if(!this.control)return;if(!M(this,St,"f")||this.hiddenFromView)return;this.style.left="0px";const t=S(this,this.control,{side:M(this,Lt,"f"),align:M(this,Ct,"f"),anchorOffset:10}),e=t.anchorSide,n=t.anchorAlign;this.style.top=`${t.top}px`,this.style.left=`${t.left}px`;let i="s";i="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===n?"n":"start"===n?"ne":"nw":"center"===n?"s":"start"===n?"se":"sw",this.classList.add(`tooltip-${i}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let qt=class XBannerElement extends HTMLElement{dismiss(){if(this.shouldReappear())return this.style.setProperty("visibility","hidden"),void setTimeout((()=>{this.style.setProperty("visibility","visible")}),2e3);const t=this.parentElement;t&&t.removeChild(this)}shouldReappear(){return"true"===this.getAttribute("data-reappear")}};T([bt],qt.prototype,"titleText",void 0),qt=T([wt],qt),window.customElements.get("x-banner")||(window.XBannerElement=qt,window.customElements.define("x-banner",qt));class $t{constructor(t,e,{tabInsertsSuggestions:n,defaultFirstOption:i}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.defaultFirstOption=null!=i&&i,this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":Nt(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Nt(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const n=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!n)return;e.clearSelection()}(t,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",Wt),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",Wt)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Bt)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Bt)[0],n=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Bt),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:n.length-1;if(e&&i>=0){const e=i+t;e>=0&&e<n.length&&(s=e)}const o=n[s];if(o)for(const t of n)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),Yt(this.list,o)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function Wt(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0}))}(e)}function Nt(t,e){const n=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!n&&("true"===n.getAttribute("aria-disabled")||n.click(),!0)}function Bt(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function Yt(t,e){(function(t,e){const n=t.scrollTop,i=n+t.clientHeight,s=e.offsetTop,o=s+e.clientHeight;return s>=n&&o<=i})(t,e)||(t.scrollTop=e.offsetTop)}const jt=window.testScreenReaderDelay||100;class Xt{constructor(t,e,n,i=!1){var s;if(this.container=t,this.input=e,this.results=n,this.combobox=new $t(e,n),this.feedback=document.getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=i,this.clearButton=document.getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=n.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.hidden=!0,this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=function(t,e=0){let n;return function(...i){clearTimeout(n),n=window.setTimeout((()=>{clearTimeout(n),t(...i)}),e)}}(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),null===(s=this.clearButton)||void 0===s||s.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),"true"===this.input.getAttribute("aria-expanded")&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.container.open=!1}onKeydown(t){if("Enter"===t.key&&this.container.open&&this.autoselectEnabled){const e=this.results.children[0];e&&(t.stopPropagation(),t.preventDefault(),this.onCommit({target:e}))}if("Escape"===t.key&&this.container.open)this.container.open=!1,t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.container.open=!1,t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!this.container.open){if(!this.input.value.trim())return;this.container.open=!0,t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.fetchResults()}onInputBlur(){this.interactingWithList?this.interactingWithList=!1:this.container.open=!1}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement))return;if(this.container.open=!1,e instanceof HTMLAnchorElement)return;const n=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=n,n||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout((()=>{this.feedback&&(this.feedback.textContent=t)}),jt)}fetchResults(){const t=this.input.value.trim();if(!t)return void(this.container.open=!1);const e=this.container.src;if(!e)return;const n=new URL(e,window.location.href),i=new URLSearchParams(n.search.slice(1));i.append("q",t),n.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(this.input,n.toString()).then((t=>{this.results.innerHTML=t,this.identifyOptions();const e=this.results.querySelectorAll('[role="option"]'),n=!!e.length,i=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${i} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${i||"No"} results.`),this.container.open=n,this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))})).catch((()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))}))}open(){this.results.hidden&&(this.combobox.start(),this.results.hidden=!1)}close(){this.results.hidden||(this.combobox.stop(),this.results.hidden=!0)}}class Kt extends CustomEvent{constructor(t,e){super(t,e),this.relatedTarget=e.relatedTarget}}const Vt=new WeakMap;function zt(t,e){const n=new XMLHttpRequest;return n.open("GET",e,!0),n.setRequestHeader("Accept","text/fragment+html"),function(t,e){const n=Vt.get(t);n&&n.abort();Vt.set(t,e);const i=()=>Vt.delete(t),s=function(t){return new Promise(((e,n)=>{t.onload=function(){t.status>=200&&t.status<300?e(t.responseText):n(new Error(t.responseText))},t.onerror=n,t.send()}))}(e);return s.then(i,i),s}(t,n)}const Ut=new WeakMap;class AutocompleteElement extends HTMLElement{constructor(){super(...arguments),this.fetchResult=zt}connectedCallback(){const t=this.getAttribute("for");if(!t)return;const e=this.querySelector("input"),n=document.getElementById(t);if(!(e instanceof HTMLInputElement&&n))return;const i="true"===this.getAttribute("data-autoselect");Ut.set(this,new Xt(this,e,n,i)),n.setAttribute("role","listbox")}disconnectedCallback(){const t=Ut.get(this);t&&(t.destroy(),Ut.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}static get observedAttributes(){return["open","value"]}attributeChangedCallback(t,e,n){if(e===n)return;const i=Ut.get(this);if(i)switch(t){case"open":null===n?i.close():i.open();break;case"value":null!==n&&(i.input.value=n),this.dispatchEvent(new Kt("auto-complete-change",{bubbles:!0,relatedTarget:i.input}))}}}function Zt(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent);const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const n=document.createRange();return n.selectNodeContents(t),e.addRange(n),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function _t(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(n),Zt(n),e.removeChild(n),Promise.resolve()}function Gt(t){const e=t.getAttribute("for"),n=t.getAttribute("value");function i(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}if(n)_t(n).then(i);else if(e){const n="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(n instanceof Document||"ShadowRoot"in window&&n instanceof ShadowRoot))return;const o=n.getElementById(e);o&&(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?_t(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?_t(s.href):Zt(s)).then(i)}var s}function Jt(t){const e=t.currentTarget;e instanceof HTMLElement&&Gt(e)}function Qt(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),Gt(e))}}function te(t){t.currentTarget.addEventListener("keydown",Qt)}function ee(t){t.currentTarget.removeEventListener("keydown",Qt)}window.customElements.get("auto-complete")||(window.AutocompleteElement=AutocompleteElement,window.customElements.define("auto-complete",AutocompleteElement));class ClipboardCopyElement extends HTMLElement{constructor(){super(),this.addEventListener("click",Jt),this.addEventListener("focus",te),this.addEventListener("blur",ee)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}window.customElements.get("clipboard-copy")||(window.ClipboardCopyElement=ClipboardCopyElement,window.customElements.define("clipboard-copy",ClipboardCopyElement));function ne(t){t.style.display="inline-block"}function ie(t){t.style.display="none"}const se=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=se.get(t);e?(clearTimeout(e),se.delete(t)):function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ie(e),ne(n))}(t),se.set(t,setTimeout((()=>{!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ne(e),ie(n))}(t),se.delete(t)}),2e3))}));var oe,re=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},ae=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};const le="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const n of t)e.push({type:"element",value:n}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},ce=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],ue={minimumIntegerDigits:2};class de{constructor(t,e={}){oe.set(this,void 0);let n=String(e.style||"short");"long"!==n&&"short"!==n&&"narrow"!==n&&"digital"!==n&&(n="short");let i="digital"===n?"numeric":n;const s=e.hours||i;i="2-digit"===s?"numeric":s;const o=e.minutes||i;i="2-digit"===o?"numeric":o;const r=e.seconds||i;i="2-digit"===r?"numeric":r;const a=e.milliseconds||i;re(this,oe,{locale:t,style:n,years:e.years||"digital"===n?"short":n,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===n?"short":n,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===n?"short":n,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===n?"short":n,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===n?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===n?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===n?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return ae(this,oe,"f")}formatToParts(t){const e=[],n=ae(this,oe,"f"),i=n.style,s=n.locale;for(const[i,o]of ce){const r=t[i];if("auto"===n[`${i}Display`]&&!r)continue;const a=n[i],l="2-digit"===a?ue:"numeric"===a?{}:{style:"unit",unit:o,unitDisplay:a};e.push(new Intl.NumberFormat(s,l).format(r))}return new le(s,{type:"unit",style:"digital"===i?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}oe=new WeakMap;const he=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,fe=["year","month","week","day","hour","minute","second","millisecond"];class me{constructor(t=0,e=0,n=0,i=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=n,this.days=i,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=0===this.sign}abs(){return new me(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if("string"==typeof t){const n=String(t).trim(),i=n.startsWith("-")?-1:1,s=null===(e=n.match(he))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*i));return s?new me(...s):new me}if("object"==typeof t){const{years:e,months:n,weeks:i,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new me(e,n,i,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const n=Date.now(),i=Math.abs(pe(n,me.from(t)).getTime()-n),s=Math.abs(pe(n,me.from(e)).getTime()-n);return i>s?-1:i<s?1:0}toLocaleString(t,e){return new de(t,e).format(this)}}function pe(t,e){const n=new Date(t);return n.setFullYear(n.getFullYear()+e.years),n.setMonth(n.getMonth()+e.months),n.setDate(n.getDate()+7*e.weeks+e.days),n.setHours(n.getHours()+e.hours),n.setMinutes(n.getMinutes()+e.minutes),n.setSeconds(n.getSeconds()+e.seconds),n}function be(t){if(t.blank)return t;let e=Math.abs(t.years),n=Math.abs(t.months),i=Math.abs(t.weeks),s=Math.abs(t.days),o=Math.abs(t.hours),r=Math.abs(t.minutes),a=Math.abs(t.seconds),l=Math.abs(t.milliseconds);l>=900&&(a+=Math.round(l/1e3)),(a||r||o||s||i||n||e)&&(l=0),a>=55&&(r+=Math.round(a/60)),(r||o||s||i||n||e)&&(a=0),r>=55&&(o+=Math.round(r/60)),(o||s||i||n||e)&&(r=0),o>=21&&(s+=Math.round(o/24)),(s||i||n||e)&&(o=0),s>=6&&(i+=Math.round(s/7)),(i||n||e)&&(s=0),i>=4&&(n+=Math.round(i/4)),(n||e)&&(i=0),n>=11&&(e+=Math.round(n/12)),e&&(n=0);const c=t.sign;return new me(e*c,n*c,i*c,s*c,o*c,r*c,a*c,l*c)}var ge,we,ve,ye,Ee,Ae,ke,Te,Me,xe,Ce=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Le=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const Se=("undefined"!=typeof globalThis?globalThis:window).HTMLElement||null,De=new me,Ie=new me(0,0,0,0,0,1);class He extends Event{constructor(t,e,n,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=n,this.newTitle=i}}function Re(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const Oe=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=Re(t),n=Date.now()+e;n<this.time&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=n)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,Re(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Se{constructor(){super(...arguments),ge.add(this),we.set(this,!1),ve.set(this,!1),Ee.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this)}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","datetime","lang","title"]}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("day",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,he.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return fe.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){Oe.unobserve(this)}attributeChangedCallback(t,e,n){e!==n&&("title"===t&&Le(this,we,null!==n&&(this.date&&Ce(this,ge,"m",Ae).call(this,this.date))!==n,"f"),Ce(this,ve,"f")||"title"===t&&Ce(this,we,"f")||Le(this,ve,(async()=>{await Promise.resolve(),this.update()})(),"f"))}update(){const t=Ce(this,Ee,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let n=e;const i=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!i)return void(Ce(this,Ee,"f").textContent=t);const s=Date.now();Ce(this,we,"f")||(n=Ce(this,ge,"m",Ae).call(this,i)||"",n&&this.setAttribute("title",n));const o=function(t,e="second",n=Date.now()){const i=t.getTime()-n;if(0===i)return new me;const s=Math.sign(i),o=Math.abs(i),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),u=Math.floor(c/30),d=Math.floor(u/12),h=fe.indexOf(e)||fe.length;return new me(h>=0?d*s:0,h>=1?(u-12*d)*s:0,0,h>=3?(c-30*u)*s:0,h>=4?(l-24*c)*s:0,h>=5?(a-60*l)*s:0,h>=6?(r-60*a)*s:0,h>=7?(o-1e3*r)*s:0)}(i,this.precision,s),r=Ce(this,ge,"m",ke).call(this,o);let a=t;a="duration"===r?Ce(this,ge,"m",Te).call(this,o):"relative"===r?Ce(this,ge,"m",Me).call(this,o):Ce(this,ge,"m",xe).call(this,i),a?Ce(this,Ee,"f").textContent=a:this.shadowRoot===Ce(this,Ee,"f")&&this.textContent&&(Ce(this,Ee,"f").textContent=this.textContent),a===t&&n===e||this.dispatchEvent(new He(t,a,e,n)),"relative"===r||"duration"===r?Oe.observe(this):Oe.unobserve(this),Le(this,ve,!1,"f")}}we=new WeakMap,ve=new WeakMap,Ee=new WeakMap,ge=new WeakSet,ye=function(){var t;return(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang")||"default"},Ae=function(t){return new Intl.DateTimeFormat(Ce(this,ge,"a",ye),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},ke=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===me.compare(t,this.threshold))return"relative"}return"datetime"},Te=function(t){const e=Ce(this,ge,"a",ye),n=this.format,i=this.formatStyle,s=this.tense;let o=De;"micro"===n?(t=be(t),o=Ie,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=Ie)):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:i,[r]:"always"}):t.abs().toLocaleString(e,{style:i})},Me=function(t){const e=new Intl.RelativeTimeFormat(Ce(this,ge,"a",ye),{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=De),"past"===n&&-1!==t.sign&&(t=De);const[i,s]=function(t){const e=be(t);if(e.blank)return[0,"second"];for(const t of fe){if("millisecond"===t)continue;const n=e[`${t}s`];if(n)return[n,t]}return[0,"second"]}(t);return"second"===s&&i<10?e.format(0,"second"):e.format(i,s)},xe=function(t){const e=new Intl.DateTimeFormat(Ce(this,ge,"a",ye),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${e.format(t)}`.trim()};const Fe="undefined"!=typeof globalThis?globalThis:window;try{customElements.define("relative-time",RelativeTimeElement),Fe.RelativeTimeElement=RelativeTimeElement}catch(t){if(!(Fe.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Pe(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{constructor(){super(),this.addEventListener("keydown",(t=>{const e=t.target;if(!(e instanceof HTMLElement))return;if(e.closest(this.tagName)!==this)return;if("tab"!==e.getAttribute("role")&&!e.closest('[role="tablist"]'))return;const n=Pe(this),i=n.indexOf(n.find((t=>t.matches('[aria-selected="true"]')))),[s,o]="vertical"===e.closest('[role="tablist"]')?.getAttribute("aria-orientation")?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(s.some((e=>t.code===e))){let t=i+1;t>=n.length&&(t=0),this.selectTab(t)}else if(o.some((e=>t.code===e))){let t=i-1;t<0&&(t=n.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(n.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Pe(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const n=t.target.closest('[role="tab"]');if(!(n instanceof HTMLElement&&n.closest('[role="tablist"]')))return;const i=e.indexOf(n);this.selectTab(i)}))}connectedCallback(){for(const t of Pe(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Pe(this),n=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const i=e[t],s=n[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:s}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of n)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");i.setAttribute("aria-selected","true"),i.setAttribute("tabindex","0"),i.focus(),s.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:s}}))}}}window.customElements.get("tab-container")||(window.TabContainerElement=TabContainerElement,window.customElements.define("tab-container",TabContainerElement));let qe=class YatthoMultiInputElement extends HTMLElement{activateField(t){var e,n;const i=this.findField(t);if(i){for(const t of this.fields)t!==i&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),null===(e=t.parentElement)||void 0===e||e.setAttribute("hidden","hidden"));i.removeAttribute("disabled"),i.removeAttribute("hidden"),null===(n=i.parentElement)||void 0===n||n.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function $e(t,e=0,{start:n=!1,middle:i=!1,once:s=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:s=!1}={}){var o,r=0,a=!1,l=function l(...c){if(!a){var u=Date.now()-r;r=Date.now(),n?(n=!1,t(...c),s&&l.cancel()):(i&&u<e||!i)&&(clearTimeout(o),o=setTimeout((function(){r=Date.now(),t(...c),s&&l.cancel()}),i?e-u:e))}};return l.cancel=function(){clearTimeout(o),a=!0},l}(t,e,{start:n,middle:i,once:s})}T([gt],qe.prototype,"fields",void 0),qe=T([wt],qe),window.customElements.get("yattho-multi-input")||(Object.assign(window,{YatthoMultiInputElement:qe}),window.customElements.define("yattho-multi-input",qe));const We=new WeakMap;class AutoCheckElement extends HTMLElement{connectedCallback(){const t=this.input;if(!t)return;const e=$e(Be.bind(null,this),300),n={check:e,controller:null};We.set(this,n),t.addEventListener("input",Ne),t.addEventListener("input",e),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=We.get(this);e&&(We.delete(this),t.removeEventListener("input",Ne),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}}function Ne(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const n=e.closest("auto-check");if(!(n instanceof AutoCheckElement))return;const i=n.src,s=n.csrf,o=We.get(n);if(!i||!s||!o)return;let r="Verifying…";e.dispatchEvent(new CustomEvent("auto-check-start",{bubbles:!0,detail:{setValidity:t=>r=t}})),n.required&&e.setCustomValidity(r)}async function Be(t){const e=t.input;if(!e)return;const n=t.csrfField,i=t.src,s=t.csrf,o=We.get(t);if(!i||!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const r=new FormData;r.append(n,s),r.append("value",e.value),e.dispatchEvent(new CustomEvent("auto-check-send",{bubbles:!0,detail:{body:r}})),o.controller?o.controller.abort():t.dispatchEvent(new CustomEvent("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};try{const n=await async function(t,e,n){try{const i=await fetch(e,n);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),i}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,i,{credentials:"same-origin",signal:o.controller.signal,method:"POST",body:r});n.ok?function(t,e,n){n&&e.setCustomValidity("");e.dispatchEvent(new CustomEvent("auto-check-success",{bubbles:!0,detail:{response:t.clone()}}))}(n,e,t.required):function(t,e,n){let i="Validation failed";const s=t=>i=t;e.dispatchEvent(new CustomEvent("auto-check-error",{bubbles:!0,detail:{response:t.clone(),setValidity:s}})),n&&e.setCustomValidity(i)}(n,e,t.required),o.controller=null,e.dispatchEvent(new CustomEvent("auto-check-complete",{bubbles:!0}))}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new CustomEvent("auto-check-complete",{bubbles:!0})))}}var Ye;window.customElements.get("auto-check")||(window.AutoCheckElement=AutoCheckElement,window.customElements.define("auto-check",AutoCheckElement));let je=class YatthoTextFieldElement extends HTMLElement{constructor(){super(...arguments),Ye.set(this,void 0)}connectedCallback(){var t;null===(t=M(this,Ye,"f"))||void 0===t||t.abort();const{signal:e}=x(this,Ye,new AbortController,"f");this.inputElement.addEventListener("auto-check-success",(()=>{this.clearError()}),{signal:e}),this.inputElement.addEventListener("auto-check-error",(t=>{t.detail.response.text().then((t=>{this.setError(t)}))}),{signal:e})}disconnectedCallback(){var t;null===(t=M(this,Ye,"f"))||void 0===t||t.abort()}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.innerText=""}setError(t){this.validationMessageElement.innerText=t,this.validationElement.hidden=!1,this.inputElement.setAttribute("invalid","true")}};Ye=new WeakMap,T([bt],je.prototype,"inputElement",void 0),T([bt],je.prototype,"validationElement",void 0),T([bt],je.prototype,"validationMessageElement",void 0),je=T([wt],je);let Xe=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.innerText=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.innerText="",this.validationElement.setAttribute("hidden","hidden")}))}};T([bt],Xe.prototype,"validationElement",void 0),T([bt],Xe.prototype,"validationMessageElement",void 0),Xe=T([wt],Xe)}();
2
2
  //# sourceMappingURL=yattho_view_components.js.map