rails_mini_profiler 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/rails_mini_profiler/profiled_requests_controller.rb +13 -10
  3. data/app/javascript/images/check.svg +3 -0
  4. data/app/javascript/images/chevron.svg +3 -0
  5. data/app/javascript/images/filter.svg +1 -0
  6. data/app/javascript/images/logo_variant.svg +2 -2
  7. data/app/javascript/images/search.svg +4 -5
  8. data/app/javascript/js/checklist_controller.js +48 -0
  9. data/app/javascript/js/enable_controller.js +24 -0
  10. data/app/javascript/js/filter_controller.js +44 -0
  11. data/app/javascript/js/search_controller.js +18 -0
  12. data/app/javascript/js/select_controller.js +47 -0
  13. data/app/javascript/packs/rails-mini-profiler.js +23 -15
  14. data/app/javascript/stylesheets/components/page_header/page_header.scss +3 -0
  15. data/app/javascript/stylesheets/components/pagination.scss +14 -13
  16. data/app/javascript/stylesheets/components/profiled_request_table/placeholder.scss +33 -0
  17. data/app/javascript/stylesheets/components/profiled_request_table/profiled_request_table.scss +179 -0
  18. data/app/javascript/stylesheets/flamegraph.scss +3 -2
  19. data/app/javascript/stylesheets/flashes.scss +3 -5
  20. data/app/javascript/stylesheets/navbar.scss +7 -13
  21. data/app/javascript/stylesheets/profiled_requests.scss +35 -120
  22. data/app/javascript/stylesheets/rails-mini-profiler.scss +90 -61
  23. data/app/javascript/stylesheets/traces.scss +17 -17
  24. data/app/presenters/rails_mini_profiler/profiled_request_presenter.rb +8 -15
  25. data/app/search/rails_mini_profiler/base_search.rb +67 -0
  26. data/app/search/rails_mini_profiler/profiled_request_search.rb +34 -0
  27. data/app/views/rails_mini_profiler/badge.html.erb +2 -2
  28. data/app/views/rails_mini_profiler/profiled_requests/index.html.erb +8 -58
  29. data/app/views/rails_mini_profiler/profiled_requests/shared/header/_header.erb +20 -0
  30. data/app/views/rails_mini_profiler/profiled_requests/shared/table/_placeholder.erb +12 -0
  31. data/app/views/rails_mini_profiler/profiled_requests/shared/table/_table.erb +14 -0
  32. data/app/views/rails_mini_profiler/profiled_requests/shared/table/_table_head.erb +125 -0
  33. data/app/views/rails_mini_profiler/profiled_requests/shared/table/_table_row.erb +21 -0
  34. data/app/views/rails_mini_profiler/profiled_requests/show.html.erb +1 -1
  35. data/lib/rails_mini_profiler/configuration.rb +3 -0
  36. data/lib/rails_mini_profiler/engine.rb +12 -8
  37. data/lib/rails_mini_profiler/middleware.rb +3 -3
  38. data/lib/rails_mini_profiler/tracing/controller_tracer.rb +15 -0
  39. data/lib/rails_mini_profiler/tracing/null_trace.rb +7 -0
  40. data/lib/rails_mini_profiler/tracing/sequel_tracer.rb +37 -0
  41. data/lib/rails_mini_profiler/tracing/sequel_tracker.rb +37 -0
  42. data/lib/rails_mini_profiler/tracing/subscriptions.rb +34 -0
  43. data/lib/rails_mini_profiler/{models → tracing}/trace.rb +10 -2
  44. data/lib/rails_mini_profiler/tracing/trace_factory.rb +37 -0
  45. data/lib/rails_mini_profiler/tracing/tracer.rb +31 -0
  46. data/lib/rails_mini_profiler/tracing/view_tracer.rb +12 -0
  47. data/lib/rails_mini_profiler/tracing.rb +11 -0
  48. data/lib/rails_mini_profiler/version.rb +1 -1
  49. data/lib/rails_mini_profiler.rb +4 -8
  50. data/vendor/assets/images/check.svg +3 -0
  51. data/vendor/assets/images/chevron.svg +3 -0
  52. data/vendor/assets/images/filter.svg +1 -0
  53. data/vendor/assets/images/logo_variant.svg +2 -2
  54. data/vendor/assets/images/search.svg +4 -5
  55. data/vendor/assets/javascripts/rails-mini-profiler.css +1 -1
  56. data/vendor/assets/javascripts/rails-mini-profiler.js +1 -1
  57. metadata +33 -4
  58. data/lib/rails_mini_profiler/tracers.rb +0 -85
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsMiniProfiler
4
+ module Tracing
5
+ class Subscriptions
6
+ DEFAULT_SUBSCRIPTIONS = %w[
7
+ sql.active_record
8
+ instantiation.active_record
9
+ render_template.action_view
10
+ render_partial.action_view
11
+ process_action.action_controller
12
+ rails_mini_profiler.total_time
13
+ ].freeze
14
+
15
+ class << self
16
+ def setup!(&callback)
17
+ DEFAULT_SUBSCRIPTIONS.each do |event|
18
+ subscribe(event, &callback)
19
+ end
20
+ end
21
+
22
+ private
23
+
24
+ def subscribe(*subscriptions, &callback)
25
+ subscriptions.each do |subscription|
26
+ ActiveSupport::Notifications.subscribe(subscription) do |event|
27
+ callback.call(event)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
- module Models
4
+ module Tracing
5
5
  # A simplified representation of a trace.
6
6
  #
7
7
  # Is transformed into [RailsMiniProfiler::Trace] when recording has finished.
@@ -30,8 +30,16 @@ module RailsMiniProfiler
30
30
  # @return [DateTime] the last updated date
31
31
  #
32
32
  # @api private
33
- class Trace < BaseModel
33
+ class Trace < RailsMiniProfiler::Models::BaseModel
34
34
  attr_accessor :id, :name, :start, :finish, :duration, :payload, :backtrace, :allocations, :created_at, :updated_at
35
+
36
+ def ignore?
37
+ false
38
+ end
39
+
40
+ def transform!
41
+ self
42
+ end
35
43
  end
36
44
  end
37
45
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsMiniProfiler
4
+ module Tracing
5
+ class TraceFactory
6
+ class << self
7
+ def create(event)
8
+ factory = new(event)
9
+ factory.create
10
+ end
11
+ end
12
+
13
+ def initialize(event)
14
+ @event = event
15
+ end
16
+
17
+ def create
18
+ trace_class.new(@event).trace
19
+ end
20
+
21
+ private
22
+
23
+ def trace_class
24
+ case @event.name
25
+ when 'sql.active_record'
26
+ SequelTracer
27
+ when 'render_template.action_view', 'render_partial.action_view'
28
+ ViewTracer
29
+ when 'process_action.action_controller'
30
+ ControllerTracer
31
+ else
32
+ Tracer
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsMiniProfiler
4
+ module Tracing
5
+ class Tracer
6
+ def initialize(event)
7
+ @event = event_data(event)
8
+ end
9
+
10
+ def trace
11
+ Trace.new(**@event)
12
+ end
13
+
14
+ private
15
+
16
+ def event_data(event)
17
+ start = (event.time.to_f * 100_000).to_i
18
+ finish = (event.end.to_f * 100_000).to_i
19
+ {
20
+ name: event.name,
21
+ start: start,
22
+ finish: finish,
23
+ duration: finish - start,
24
+ allocations: event.allocations,
25
+ backtrace: Rails.backtrace_cleaner.clean(caller),
26
+ payload: event.payload
27
+ }
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsMiniProfiler
4
+ module Tracing
5
+ class ViewTracer < Tracer
6
+ def trace
7
+ @event[:payload].slice!(:identifier, :count)
8
+ super
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails_mini_profiler/tracing/subscriptions'
4
+ require 'rails_mini_profiler/tracing/trace'
5
+ require 'rails_mini_profiler/tracing/tracer'
6
+ require 'rails_mini_profiler/tracing/controller_tracer'
7
+ require 'rails_mini_profiler/tracing/sequel_tracker'
8
+ require 'rails_mini_profiler/tracing/sequel_tracer'
9
+ require 'rails_mini_profiler/tracing/view_tracer'
10
+ require 'rails_mini_profiler/tracing/null_trace'
11
+ require 'rails_mini_profiler/tracing/trace_factory'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsMiniProfiler
4
- VERSION = '0.4.0'
4
+ VERSION = '0.5.0'
5
5
  end
@@ -7,23 +7,19 @@ require 'pagy'
7
7
  require 'rails_mini_profiler/version'
8
8
  require 'rails_mini_profiler/engine'
9
9
 
10
- require 'rails_mini_profiler/user'
11
- require 'rails_mini_profiler/request_context'
12
-
13
10
  require 'rails_mini_profiler/models/base_model'
14
- require 'rails_mini_profiler/models/trace'
11
+ require 'rails_mini_profiler/tracing'
12
+ require 'rails_mini_profiler/configuration'
15
13
 
14
+ require 'rails_mini_profiler/user'
15
+ require 'rails_mini_profiler/request_context'
16
16
  require 'rails_mini_profiler/logger'
17
- require 'rails_mini_profiler/configuration'
18
- require 'rails_mini_profiler/configuration/storage'
19
- require 'rails_mini_profiler/configuration/user_interface'
20
17
  require 'rails_mini_profiler/request_wrapper'
21
18
  require 'rails_mini_profiler/response_wrapper'
22
19
  require 'rails_mini_profiler/guard'
23
20
  require 'rails_mini_profiler/flamegraph_guard'
24
21
  require 'rails_mini_profiler/redirect'
25
22
  require 'rails_mini_profiler/badge'
26
- require 'rails_mini_profiler/tracers'
27
23
  require 'rails_mini_profiler/middleware'
28
24
 
29
25
  # Main namespace for Rails Mini Profiler
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
2
+ <path fill="currentColor" d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 407.437 407.437">
2
+ <path fill="currentColor" d="M386.258 91.567l-182.54 181.945L21.179 91.567 0 112.815 203.718 315.87l203.719-203.055z"/>
3
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-filter"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon></svg>
@@ -1,5 +1,5 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1070" height="1070" viewBox="0 0 1070 1070" version="1.1">
2
- <style>path{fill:none;stroke-width:64;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4}</style>
1
+ <svg id="logo-variant" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1070" height="1070" viewBox="0 0 1070 1070" version="1.1">
2
+ <style>#logo-variant path{fill:none;stroke-width:64;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4}</style>
3
3
  <defs>
4
4
  <linearGradient id="lightShadow">
5
5
  <stop offset="0" style="stop-color:#c22121;stop-opacity:1"/>
@@ -1,10 +1,9 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>Iconly/Bulk/Search</title>
4
- <g id="Iconly/Bulk/Search" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
5
- <g id="Search" transform="translate(2.000000, 2.000000)" fill="#000000" fill-rule="nonzero">
3
+ <g id="Iconly/Bulk/Search" stroke="none" stroke-width="1" fill="currentColor" fill-rule="evenodd">
4
+ <g id="Search" transform="translate(2.000000, 2.000000)" fill="currentColor" fill-rule="nonzero">
6
5
  <ellipse id="Ellipse_746" cx="8.59921927" cy="8.65324385" rx="8.59921927" ry="8.65324385"></ellipse>
7
- <path d="M18.674623,19.9552573 C18.3405833,19.9444414 18.0229443,19.8069986 17.7853553,19.5704698 L15.7489321,17.1901566 C15.3123366,16.7908936 15.2766365,16.1123232 15.668898,15.6689038 L15.668898,15.6689038 C15.8525005,15.4831065 16.1021409,15.3786387 16.3625268,15.3786387 C16.6229128,15.3786387 16.8725531,15.4831065 17.0561557,15.6689038 L19.6172468,17.7181208 C19.9861582,18.0957076 20.0999999,18.656254 19.9078887,19.1492153 C19.7157774,19.6421767 19.2536179,19.9754211 18.7279791,20 L18.674623,19.9552573 Z" id="Path_34202" opacity="0.400000006"></path>
6
+ <path fill="currentColor" d="M18.674623,19.9552573 C18.3405833,19.9444414 18.0229443,19.8069986 17.7853553,19.5704698 L15.7489321,17.1901566 C15.3123366,16.7908936 15.2766365,16.1123232 15.668898,15.6689038 L15.668898,15.6689038 C15.8525005,15.4831065 16.1021409,15.3786387 16.3625268,15.3786387 C16.6229128,15.3786387 16.8725531,15.4831065 17.0561557,15.6689038 L19.6172468,17.7181208 C19.9861582,18.0957076 20.0999999,18.656254 19.9078887,19.1492153 C19.7157774,19.6421767 19.2536179,19.9754211 18.7279791,20 L18.674623,19.9552573 Z" id="Path_34202" opacity="0.400000006"></path>
8
7
  </g>
9
8
  </g>
10
- </svg>
9
+ </svg>
@@ -1 +1 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");.flash{margin-top:1rem;padding:1rem;border-radius:5px}.flash-error{color:#fff;background:var(--red-500)}.flash-notice{color:#fff;background:var(--green-400)}#wrapper{height:100vh;width:100%}#speedscope-iframe{width:100%;height:100%;border:none}.header{margin:0;padding:1.5rem 0;display:flex;justify-content:center;box-shadow:0 0 20px 0 rgba(0,0,0,.2);background:var(--primary)}.header a{color:#fff;text-decoration:none}.nav{width:var(--main-width);justify-content:space-between}.home,.nav{display:flex}.home{align-items:center;text-decoration:none}.home-logo{width:64px;height:64px}.home-title{padding:0 0 0 1rem;margin:0}.header-links{margin:0;padding:0;list-style:none;display:flex;align-items:center;font-weight:700}main{width:100%;display:flex;justify-content:center}.main-section{width:var(--main-width)}.placeholder{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:450px}.placeholder-image{height:30%;width:30%;-webkit-filter:grayscale(1) brightness(2.5)}.placeholder-text{text-align:center;color:var(--grey-400)}.profiled-requests-actions{display:flex;padding:1rem 0;justify-content:space-between;align-items:center}.search-field{padding:.5rem;border-radius:.25em;border:1px solid var(--grey-400);color:var(--grey-700)}.clear-action button{background:var(--red-500);color:#fff}.table{width:100%;border-collapse:collapse;border-radius:5px;border:1px hidden var(--border-color);box-shadow:0 0 0 1px var(--border-color)}.table thead tr{color:var(--grey-400)}.table thead th{font-weight:400}.table tr{border:1px solid var(--border-color);color:var(--grey-700);cursor:pointer}.table tr:nth-child(2n){background:var(--grey-50)}.table tbody tr:hover{background:var(--grey-100)}.table td,.table th{padding:.5rem 1rem}.request-path{max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.request-buttons{z-index:1;text-align:right}.request-buttons a{text-decoration:none;padding:0 .25rem;color:var(--grey-700)}.request-buttons a:active,.request-buttons a:focus-visible,.request-buttons a:hover{color:var(--blue-500)}.request-buttons a.link-disabled{cursor:default;pointer-events:none;text-decoration:none;color:var(--grey-200)}.request-details-data{display:flex;margin:0;padding:0}.data-item{display:flex;flex-direction:column;align-items:flex-start;list-style:none;margin-right:3rem;padding:0}.data-item small{color:var(--grey-400)}.data-item span{margin:.25rem 0}[class*=request-method-get],[class*=request-status-2]{color:#fff;background:var(--green-400)!important}[class*=request-method-patch],[class*=request-method-put],[class*=request-status-4]{color:#fff;background:var(--yellow-400)!important}[class*=request-method-delete],[class*=request-status-5]{color:#fff;background:var(--red-500)!important}.request-details-actions{margin:0;padding:2em 0;display:flex;align-items:center;justify-content:space-between}.flamegraph-button button{background:var(--grey-200)}.trace-list{margin:0;padding:0}.trace{list-style:none;display:flex;padding:.25em 0;align-items:center;justify-content:flex-start}.trace:nth-child(odd){background:var(--grey-100)}.trace .trace-bar{position:relative;margin:0;height:16px;padding:0;cursor:pointer;background:linear-gradient(to top right,var(--grey-500),var(--grey-400))}.instantiation-trace .trace-bar{background:linear-gradient(to top right,var(--green-400),var(--green-300))}.sequel-trace .trace-bar{background:linear-gradient(to top right,var(--green-500),var(--green-400))}.controller-trace .trace-bar{background:linear-gradient(to top right,var(--yellow-500),var(--yellow-400))}.render-partial-trace .trace-bar,.render-template-trace .trace-bar{background:linear-gradient(to top right,var(--blue-500),var(--blue-400))}.trace-name{margin:0;box-sizing:border-box;padding:0 .5em;overflow:hidden;font-size:14px;text-align:right;text-overflow:ellipsis;color:var(--grey-400)}.trace-payload{margin:0}.sequel-trace-query{padding:1em;background:var(--grey-100)}.sequel-trace-binds,.sequel-trace-query{overflow:auto;max-height:100px;white-space:pre-wrap}.sequel-trace-binds{margin:0 0 1em;padding:.5em 1em;font-size:12px;background:var(--grey-50)}.trace-table{margin-top:1em;width:100%;border-collapse:collapse;border:1px hidden var(--border-color)}.pagy-nav{display:flex;align-items:center;justify-content:center;padding:1em 0}.pagy-nav>.page.active,.pagy-nav>.page.disabled,.pagy-nav>.page>a{padding:.5rem 1rem;color:var(--grey-900);background:#fff;border:1px solid var(--border-color);border-right:none;text-decoration:none;cursor:pointer}.pagy-nav>.page.active:hover,.pagy-nav>.page.disabled:hover,.pagy-nav>.page>a:hover{background:var(--grey-100)}.pagy-nav>.page.prev.disabled,.pagy-nav>.page.prev a{border-radius:5px 0 0 5px}.pagy-nav>.page.next.disabled,.pagy-nav>.page.next a{border-radius:0 5px 5px 0;border-right:1px solid var(--border-color)}.pagy-nav>.page.active{cursor:default;border-color:var(--red-500);color:#fff}.pagy-nav>.page.active,.pagy-nav>.page.active:hover{background:var(--red-500)}.pagy-nav>.page.disabled{cursor:default;color:var(--grey-500)}.pagy-nav>.page.disabled:hover{background:#fff}@font-face{font-family:Open Sans;font-weight:400;font-style:normal}@font-face{font-family:Open Sans;font-weight:600;font-style:normal}@font-face{font-family:Open Sans;font-weight:700;font-style:normal}html{--grey-50:#f9fafb;--grey-100:#f3f4f6;--grey-200:#e5e7eb;--grey-400:#9ca3af;--grey-500:#6b7280;--grey-700:#374151;--grey-900:#111827;--red-400:#f87171;--red-500:#ef4444;--red-600:#dc2626;--yellow-400:#fbbf24;--yellow-500:#f59e0b;--green-300:#6ee7b7;--green-400:#34d399;--green-500:#10b981;--blue-400:#60a5fa;--blue-500:#3b82f6;--main-width:1056px;--primary:var(--red-600);--border-color:var(--grey-200);--text-color:var(--grey-900);font-family:Open Sans,monospace}body,html{width:100%;height:100%;margin:0;padding:0}body{color:var(--text-color)}h1{padding:2rem 0 1rem}button{border:none;border-radius:.25rem;padding:.5em;text-align:center;text-decoration:none;display:inline-block;font-size:1rem;cursor:pointer}button:hover{box-shadow:0 .25rem .25rem 0 var(--grey-50)}.text-left{text-align:left}.text-right{text-align:right}.pill{margin:.2rem 0;padding:.1rem .4rem;border-radius:5px;font-size:.9rem;font-weight:600;letter-spacing:.1rem;background:var(--grey-200)}.popover{display:flex;flex-direction:column;width:600px;padding:1em;color:#000}.popover-header{display:flex;padding-bottom:1em;flex-direction:row;justify-content:space-between;align-items:center}.popover-description{margin:0;padding:0}.popover-close{background:transparent;padding:0;font-weight:700;font-size:20px;color:var(--grey-400)}.popover-body{padding:1em 0}.popover-footer{border-top:1px solid var(--grey-50)}.tippy-box[data-theme~=rmp]{background:#fff;box-shadow:8px 0 30px 4px rgba(0,0,0,.2),8px 4px 10px 0 rgba(0,0,0,.05);border-radius:3px;transition:all .2s cubic-bezier(.19,1,.22,1)}.tippy-box[data-theme~=rmp][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}
1
+ @import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");.flash{padding:1rem;margin-top:1rem;border-radius:5px}.flash-error{background:var(--red-500);color:#fff}.flash-notice{background:var(--green-400);color:#fff}#wrapper{width:100%;height:100vh}#speedscope-iframe{width:100%;height:100%;border:none}.header{display:flex;justify-content:center;padding:1.5rem 0;margin:0;background:var(--primary);box-shadow:0 0 20px 0 rgba(0,0,0,.2)}.header a{color:#fff;text-decoration:none}.nav{width:var(--main-width);justify-content:space-between}.home,.nav{display:flex}.home{align-items:center;text-decoration:none}.home-logo{width:64px;height:64px}.home-title{padding:0 0 0 1rem;margin:0}.header-links{padding:0;margin:0;font-weight:700;list-style:none}.header-links,.placeholder{display:flex;align-items:center}.placeholder{width:100%;flex-direction:column;justify-content:center;padding-bottom:2rem}.placeholder-image{width:30%;height:30%;-webkit-filter:grayscale(1) brightness(2.5)}.placeholder-text{padding:1rem 0;text-align:center}.placeholder-link,.placeholder-link:visited,.placeholder-text{color:var(--grey-400)}.placeholder-link:hover{color:var(--grey-900)}.table{width:100%;border:1px hidden var(--border-color);border-collapse:collapse;border-radius:5px;box-shadow:0 0 0 1px var(--border-color);table-layout:fixed}.table td,.table th{padding:.5rem 1rem}.table thead tr{border:1px hidden var(--border-color);box-shadow:0 0 0 1px var(--border-color);color:var(--grey-400)}.table tr:nth-child(2n){background:var(--grey-50)}.table thead th{font-weight:400}.table-filter-icon{width:14px;margin-left:.5rem}.table tbody tr:not(.no-row){border:1px solid var(--border-color);color:var(--grey-700);cursor:pointer}.table tbody tr:not(.no-row):hover{background:var(--grey-100)}.request-checkbox{z-index:1;width:1rem;height:1rem}.dropdown-body{padding:.33rem .5rem}.dropdown-search-field{padding:.5rem;border:1px solid var(--grey-400);border-radius:5px;color:var(--grey-700)}.dropdown-toggle{display:flex;align-items:center;color:inherit}.dropdown-toggle:hover{color:var(--grey-900)}.dropdown-container{position:absolute;z-index:1;overflow:hidden;min-width:240px;box-sizing:border-box;border:1px solid var(--grey-200);margin-top:.3em;background:#fff;border-radius:5px;box-shadow:0 8px 30px rgba(0,0,0,.12);color:var(--grey-400);cursor:default}.dropdown-container,.dropdown-search,.dropdown-search button{display:flex;flex-direction:column}.dropdown-entry{display:flex;padding:.33rem 1rem;text-decoration:none}.dropdown-entry:hover{background:var(--grey-100);color:var(--grey-900)}.dropdown-entry input{margin-right:.5em}.dropdown-header{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;border-bottom:1px solid var(--grey-200);background:var(--grey-100);font-size:.833rem;text-align:left}.dropdown-header button{padding:0;border:none;background:none;color:var(--grey-500);font-size:.833rem;outline:none;text-decoration:underline}.dropdown-header button:hover{box-shadow:none;color:var(--grey-900)}.dropdown-footer{width:100%;padding:.5rem;border:none;background:var(--red-500);border-radius:0;color:#fff;font-weight:600;outline:none}.dropdown-footer:hover{background:var(--red-600)}.dropdown-search-button{display:inline-block;padding:.5em;border:none;background:var(--red-500);border-radius:5px;color:#fff;cursor:pointer;font-size:1rem;font-weight:600;text-align:center;text-decoration:none}.dropdown-search-button:hover{background:var(--red-600)}.request-path{overflow:hidden;max-width:280px;text-overflow:ellipsis;white-space:nowrap}main{display:flex;width:100%;justify-content:center}.main-section{width:var(--main-width)}.search-field{box-sizing:border-box;padding:.5rem;border:1px solid var(--grey-400);border-radius:5px}.request-details-data{display:flex;padding:1rem 0}.request-details-actions{display:flex;align-items:center;justify-content:space-between;padding:0 0 1rem;margin:0}.data-item{display:flex;flex-direction:column;align-items:flex-start;padding:0;margin-right:3rem;list-style:none}.data-item small{color:var(--grey-400)}.data-item span{margin:.25rem 0}[class*=request-method-get],[class*=request-status-2]{background:var(--green-400)!important;color:#fff}[class*=request-method-patch],[class*=request-method-put],[class*=request-status-4]{background:var(--yellow-400)!important;color:#fff}[class*=request-method-delete],[class*=request-status-5]{background:var(--red-500)!important;color:#fff}.flamegraph-button button{background:var(--grey-200)}.clear-action button{background:var(--red-500);color:#fff;font-weight:600}.clear-action button:hover{background:var(--red-600)}.profiled-requests-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.trace-list{padding:0;margin:0}.trace{display:flex;align-items:center;justify-content:flex-start;padding:.25em 0;list-style:none}.trace:nth-child(odd){background:var(--grey-100)}.trace .trace-bar{position:relative;height:16px;padding:0;margin:0;background:linear-gradient(to top right,var(--grey-500),var(--grey-400));cursor:pointer}.instantiation-trace .trace-bar{background:linear-gradient(to top right,var(--green-400),var(--green-300))}.sequel-trace .trace-bar{background:linear-gradient(to top right,var(--green-500),var(--green-400))}.controller-trace .trace-bar{background:linear-gradient(to top right,var(--yellow-500),var(--yellow-400))}.render-partial-trace .trace-bar,.render-template-trace .trace-bar{background:linear-gradient(to top right,var(--blue-500),var(--blue-400))}.trace-name{overflow:hidden;box-sizing:border-box;padding:0 .5em;margin:0;color:var(--grey-400);font-size:14px;text-align:right;text-overflow:ellipsis}.trace-payload{margin:0}.sequel-trace-query{padding:1em;background:var(--grey-100)}.sequel-trace-binds,.sequel-trace-query{overflow:auto;max-height:100px;white-space:pre-wrap}.sequel-trace-binds{padding:.5em 1em;margin:0 0 1em;background:var(--grey-50);font-size:12px}.trace-table{width:100%;border:1px hidden var(--border-color);margin-top:1em;border-collapse:collapse}.pagy-nav{display:flex;align-items:center;justify-content:center;padding:1em 0}.pagy-nav>.page.active,.pagy-nav>.page.disabled,.pagy-nav>.page>a{padding:.5rem 1rem;border:1px solid var(--border-color);border-right:none;background:#fff;color:var(--grey-900);cursor:pointer;text-decoration:none}.pagy-nav>.page.prev.disabled,.pagy-nav>.page.prev a{border-radius:5px 0 0 5px}.pagy-nav>.page.next.disabled,.pagy-nav>.page.next a{border-right:1px solid var(--border-color);border-radius:0 5px 5px 0}.pagy-nav>.page.active{border-color:var(--red-500);color:#fff;cursor:default}.pagy-nav>.page.active,.pagy-nav>.page.active:hover{background:var(--red-500)}.pagy-nav>.page.disabled{color:var(--grey-500);cursor:default}.pagy-nav>.page.disabled:hover{background:#fff}.pagy-nav>.page.active:hover,.pagy-nav>.page.disabled:hover,.pagy-nav>.page>a:hover{background:var(--grey-100)}.page-header{padding:2rem 0}@font-face{font-family:Open Sans;font-style:normal;font-weight:400}@font-face{font-family:Open Sans;font-style:normal;font-weight:600}@font-face{font-family:Open Sans;font-style:normal;font-weight:700}html{width:100%;height:100%;font-family:Open Sans,monospace;--grey-50:#f9fafb;--grey-100:#f3f4f6;--grey-200:#e5e7eb;--grey-400:#9ca3af;--grey-500:#6b7280;--grey-700:#374151;--grey-900:#111827;--red-400:#f87171;--red-500:#ef4444;--red-600:#dc2626;--yellow-400:#fbbf24;--yellow-500:#fbbf24;--yellow-600:#d97706;--yellow-700:#b45309;--green-300:#6ee7b7;--green-400:#34d399;--green-500:#10b981;--blue-400:#60a5fa;--blue-500:#3b82f6;--main-width:1056px;--primary:var(--red-600);--border-color:var(--grey-200);--text-color:var(--grey-900)}*,body,html{padding:0;margin:0}body{width:100%;height:100%;color:var(--text-color)}.button,button{display:inline-block;padding:.5em;border:none;border-radius:.25rem;cursor:pointer;font-size:1rem;text-align:center;text-decoration:none}.button:disabled,button:disabled{background:var(--grey-200);cursor:not-allowed}button:hover{box-shadow:0 .25rem .25rem 0 var(--grey-50)}button.none{padding:0;border:none;background:none;outline:none}button.none:hover{box-shadow:none}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.hidden{display:none}.flex-row{display:flex;flex-direction:row}.flex-column{display:flex;flex-direction:column}.pill{padding:.1rem .4rem;margin:.2rem 0;background:var(--grey-200);border-radius:5px;font-size:.9rem;font-weight:600;letter-spacing:.1rem}.popover{display:flex;width:600px;flex-direction:column;padding:1em;color:#000}.popover-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding-bottom:1em}.popover-description{padding:0;margin:0}.popover-close{padding:0;background:transparent;color:var(--grey-400);font-size:20px;font-weight:700}.popover-body{padding:1em 0}.popover-footer{border-top:1px solid var(--grey-50)}.tippy-box[data-theme~=rmp]{background:#fff;border-radius:5px;box-shadow:8px 0 30px 4px rgba(0,0,0,.2),8px 4px 10px 0 rgba(0,0,0,.05);transition:all .2s cubic-bezier(.19,1,.22,1)}.tippy-box[data-theme~=rmp][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=rmp][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}
@@ -1 +1 @@
1
- !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e="top",t="bottom",n="right",r="left",o="auto",i=[e,t,n,r],a="start",s="end",c="viewport",u="popper",f=i.reduce((function(e,t){return e.concat([t+"-"+a,t+"-"+s])}),[]),p=[].concat(i,[o]).reduce((function(e,t){return e.concat([t,t+"-"+a,t+"-"+s])}),[]),d=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function l(e){return e?(e.nodeName||"").toLowerCase():null}function m(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function v(e){return e instanceof m(e).Element||e instanceof Element}function h(e){return e instanceof m(e).HTMLElement||e instanceof HTMLElement}function g(e){return"undefined"!=typeof ShadowRoot&&(e instanceof m(e).ShadowRoot||e instanceof ShadowRoot)}var b={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];h(o)&&l(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});h(r)&&l(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function y(e){return e.split("-")[0]}var w=Math.round;function x(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;return h(e)&&t&&(r=n.width/e.offsetWidth||1,o=n.height/e.offsetHeight||1),{width:w(n.width/r),height:w(n.height/o),top:w(n.top/o),right:w(n.right/r),bottom:w(n.bottom/o),left:w(n.left/r),x:w(n.left/r),y:w(n.top/o)}}function O(e){var t=x(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function E(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&g(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function T(e){return m(e).getComputedStyle(e)}function A(e){return["table","td","th"].indexOf(l(e))>=0}function D(e){return((v(e)?e.ownerDocument:e.document)||window.document).documentElement}function L(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(g(e)?e.host:null)||D(e)}function j(e){return h(e)&&"fixed"!==T(e).position?e.offsetParent:null}function k(e){for(var t=m(e),n=j(e);n&&A(n)&&"static"===T(n).position;)n=j(n);return n&&("html"===l(n)||"body"===l(n)&&"static"===T(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&h(e)&&"fixed"===T(e).position)return null;for(var n=L(e);h(n)&&["html","body"].indexOf(l(n))<0;){var r=T(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function C(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var M=Math.max,S=Math.min,B=Math.round;function H(e,t,n){return M(e,S(t,n))}function W(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function I(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var V={top:"auto",right:"auto",bottom:"auto",left:"auto"};function P(o){var i,a=o.popper,s=o.popperRect,c=o.placement,u=o.offsets,f=o.position,p=o.gpuAcceleration,d=o.adaptive,l=o.roundOffsets,v=!0===l?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:B(B(t*r)/r)||0,y:B(B(n*r)/r)||0}}(u):"function"==typeof l?l(u):u,h=v.x,g=void 0===h?0:h,b=v.y,y=void 0===b?0:b,w=u.hasOwnProperty("x"),x=u.hasOwnProperty("y"),O=r,E=e,A=window;if(d){var L=k(a),j="clientHeight",C="clientWidth";L===m(a)&&"static"!==T(L=D(a)).position&&(j="scrollHeight",C="scrollWidth"),L=L,c===e&&(E=t,y-=L[j]-s.height,y*=p?1:-1),c===r&&(O=n,g-=L[C]-s.width,g*=p?1:-1)}var M,S=Object.assign({position:f},d&&V);return p?Object.assign({},S,((M={})[E]=x?"0":"",M[O]=w?"0":"",M.transform=(A.devicePixelRatio||1)<2?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",M)):Object.assign({},S,((i={})[E]=x?y+"px":"",i[O]=w?g+"px":"",i.transform="",i))}var R={passive:!0};var q={left:"right",right:"left",bottom:"top",top:"bottom"};function N(e){return e.replace(/left|right|bottom|top/g,(function(e){return q[e]}))}var U={start:"end",end:"start"};function _(e){return e.replace(/start|end/g,(function(e){return U[e]}))}function F(e){var t=m(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function z(e){return x(D(e)).left+F(e).scrollLeft}function $(e){var t=T(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function X(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:h(e)&&$(e)?e:X(L(e))}function Y(e,t){var n;void 0===t&&(t=[]);var r=X(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=m(r),a=o?[i].concat(i.visualViewport||[],$(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Y(L(a)))}function J(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function G(e,t){return t===c?J(function(e){var t=m(e),n=D(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,s=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:o,height:i,x:a+z(e),y:s}}(e)):h(t)?function(e){var t=x(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):J(function(e){var t,n=D(e),r=F(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=M(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=M(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+z(e),c=-r.scrollTop;return"rtl"===T(o||n).direction&&(s+=M(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}(D(e)))}function K(e,t,n){var r="clippingParents"===t?function(e){var t=Y(L(e)),n=["absolute","fixed"].indexOf(T(e).position)>=0&&h(e)?k(e):e;return v(n)?t.filter((function(e){return v(e)&&E(e,n)&&"body"!==l(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=G(e,n);return t.top=M(r.top,t.top),t.right=S(r.right,t.right),t.bottom=S(r.bottom,t.bottom),t.left=M(r.left,t.left),t}),G(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Q(e){return e.split("-")[1]}function Z(o){var i,c=o.reference,u=o.element,f=o.placement,p=f?y(f):null,d=f?Q(f):null,l=c.x+c.width/2-u.width/2,m=c.y+c.height/2-u.height/2;switch(p){case e:i={x:l,y:c.y-u.height};break;case t:i={x:l,y:c.y+c.height};break;case n:i={x:c.x+c.width,y:m};break;case r:i={x:c.x-u.width,y:m};break;default:i={x:c.x,y:c.y}}var v=p?C(p):null;if(null!=v){var h="y"===v?"height":"width";switch(d){case a:i[v]=i[v]-(c[h]/2-u[h]/2);break;case s:i[v]=i[v]+(c[h]/2-u[h]/2)}}return i}function ee(r,o){void 0===o&&(o={});var a=o,s=a.placement,f=void 0===s?r.placement:s,p=a.boundary,d=void 0===p?"clippingParents":p,l=a.rootBoundary,m=void 0===l?c:l,h=a.elementContext,g=void 0===h?u:h,b=a.altBoundary,y=void 0!==b&&b,w=a.padding,O=void 0===w?0:w,E=W("number"!=typeof O?O:I(O,i)),T=g===u?"reference":u,A=r.elements.reference,L=r.rects.popper,j=r.elements[y?T:g],k=K(v(j)?j:j.contextElement||D(r.elements.popper),d,m),C=x(A),M=Z({reference:C,element:L,strategy:"absolute",placement:f}),S=J(Object.assign({},L,M)),B=g===u?S:C,H={top:k.top-B.top+E.top,bottom:B.bottom-k.bottom+E.bottom,left:k.left-B.left+E.left,right:B.right-k.right+E.right},V=r.modifiersData.offset;if(g===u&&V){var P=V[f];Object.keys(H).forEach((function(r){var o=[n,t].indexOf(r)>=0?1:-1,i=[e,t].indexOf(r)>=0?"y":"x";H[r]+=P[i]*o}))}return H}function te(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,s=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,d=void 0===u?p:u,l=Q(r),m=l?c?f:f.filter((function(e){return Q(e)===l})):i,v=m.filter((function(e){return d.indexOf(e)>=0}));0===v.length&&(v=m);var h=v.reduce((function(t,n){return t[n]=ee(e,{placement:n,boundary:o,rootBoundary:a,padding:s})[y(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}function ne(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function re(o){return[e,n,t,r].some((function(e){return o[e]>=0}))}function oe(e,t,n){void 0===n&&(n=!1);var r,o,i=h(t),a=h(t)&&function(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return 1!==n||1!==r}(t),s=D(t),c=x(e,a),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&(("body"!==l(t)||$(s))&&(u=(r=t)!==m(r)&&h(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:F(r)),h(t)?((f=x(t,!0)).x+=t.clientLeft,f.y+=t.clientTop):s&&(f.x=z(s))),{x:c.left+u.scrollLeft-f.x,y:c.top+u.scrollTop-f.y,width:c.width,height:c.height}}function ie(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var ae={placement:"bottom",modifiers:[],strategy:"absolute"};function se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ce(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?ae:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},ae,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,f={state:s,setOptions:function(n){p(),s.options=Object.assign({},i,s.options,n),s.scrollParents={reference:v(e)?Y(e):e.contextElement?Y(e.contextElement):[],popper:Y(t)};var o,a,u=function(e){var t=ie(e);return d.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((o=[].concat(r,s.options.modifiers),a=o.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(a).map((function(e){return a[e]}))));return s.orderedModifiers=u.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:f,options:r}),a=function(){};c.push(i||a)}})),f.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(se(t,n)){s.rects={reference:oe(t,k(n),"fixed"===s.options.strategy),popper:O(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,c=void 0===a?{}:a,p=o.name;"function"==typeof i&&(s=i({state:s,options:c,name:p,instance:f})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){f.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){p(),u=!0}};if(!se(e,t))return f;function p(){c.forEach((function(e){return e()})),c=[]}return f.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),f}}var ue=ce({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,c=m(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach((function(e){e.addEventListener("scroll",n.update,R)})),s&&c.addEventListener("resize",n.update,R),function(){i&&u.forEach((function(e){e.removeEventListener("scroll",n.update,R)})),s&&c.removeEventListener("resize",n.update,R)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,c=void 0===s||s,u={placement:y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,P(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,P(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},b,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var o=t.state,i=t.options,a=t.name,s=i.offset,c=void 0===s?[0,0]:s,u=p.reduce((function(t,i){return t[i]=function(t,o,i){var a=y(t),s=[r,e].indexOf(a)>=0?-1:1,c="function"==typeof i?i(Object.assign({},o,{placement:t})):i,u=c[0],f=c[1];return u=u||0,f=(f||0)*s,[r,n].indexOf(a)>=0?{x:f,y:u}:{x:u,y:f}}(i,o.rects,c),t}),{}),f=u[o.placement],d=f.x,l=f.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=d,o.modifiersData.popperOffsets.y+=l),o.modifiersData[a]=u}},{name:"flip",enabled:!0,phase:"main",fn:function(i){var s=i.state,c=i.options,u=i.name;if(!s.modifiersData[u]._skip){for(var f=c.mainAxis,p=void 0===f||f,d=c.altAxis,l=void 0===d||d,m=c.fallbackPlacements,v=c.padding,h=c.boundary,g=c.rootBoundary,b=c.altBoundary,w=c.flipVariations,x=void 0===w||w,O=c.allowedAutoPlacements,E=s.options.placement,T=y(E),A=m||(T===E||!x?[N(E)]:function(e){if(y(e)===o)return[];var t=N(e);return[_(e),t,_(t)]}(E)),D=[E].concat(A).reduce((function(e,t){return e.concat(y(t)===o?te(s,{placement:t,boundary:h,rootBoundary:g,padding:v,flipVariations:x,allowedAutoPlacements:O}):t)}),[]),L=s.rects.reference,j=s.rects.popper,k=new Map,C=!0,M=D[0],S=0;S<D.length;S++){var B=D[S],H=y(B),W=Q(B)===a,I=[e,t].indexOf(H)>=0,V=I?"width":"height",P=ee(s,{placement:B,boundary:h,rootBoundary:g,altBoundary:b,padding:v}),R=I?W?n:r:W?t:e;L[V]>j[V]&&(R=N(R));var q=N(R),U=[];if(p&&U.push(P[H]<=0),l&&U.push(P[R]<=0,P[q]<=0),U.every((function(e){return e}))){M=B,C=!1;break}k.set(B,U)}if(C)for(var F=function(e){var t=D.find((function(t){var n=k.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return M=t,"break"},z=x?3:1;z>0;z--){if("break"===F(z))break}s.placement!==M&&(s.modifiersData[u]._skip=!0,s.placement=M,s.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(o){var i=o.state,s=o.options,c=o.name,u=s.mainAxis,f=void 0===u||u,p=s.altAxis,d=void 0!==p&&p,l=s.boundary,m=s.rootBoundary,v=s.altBoundary,h=s.padding,g=s.tether,b=void 0===g||g,w=s.tetherOffset,x=void 0===w?0:w,E=ee(i,{boundary:l,rootBoundary:m,padding:h,altBoundary:v}),T=y(i.placement),A=Q(i.placement),D=!A,L=C(T),j="x"===L?"y":"x",B=i.modifiersData.popperOffsets,W=i.rects.reference,I=i.rects.popper,V="function"==typeof x?x(Object.assign({},i.rects,{placement:i.placement})):x,P={x:0,y:0};if(B){if(f||d){var R="y"===L?e:r,q="y"===L?t:n,N="y"===L?"height":"width",U=B[L],_=B[L]+E[R],F=B[L]-E[q],z=b?-I[N]/2:0,$=A===a?W[N]:I[N],X=A===a?-I[N]:-W[N],Y=i.elements.arrow,J=b&&Y?O(Y):{width:0,height:0},G=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=G[R],Z=G[q],te=H(0,W[N],J[N]),ne=D?W[N]/2-z-te-K-V:$-te-K-V,re=D?-W[N]/2+z+te+Z+V:X+te+Z+V,oe=i.elements.arrow&&k(i.elements.arrow),ie=oe?"y"===L?oe.clientTop||0:oe.clientLeft||0:0,ae=i.modifiersData.offset?i.modifiersData.offset[i.placement][L]:0,se=B[L]+ne-ae-ie,ce=B[L]+re-ae;if(f){var ue=H(b?S(_,se):_,U,b?M(F,ce):F);B[L]=ue,P[L]=ue-U}if(d){var fe="x"===L?e:r,pe="x"===L?t:n,de=B[j],le=de+E[fe],me=de-E[pe],ve=H(b?S(le,se):le,de,b?M(me,ce):me);B[j]=ve,P[j]=ve-de}}i.modifiersData[c]=P}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(o){var a,s=o.state,c=o.name,u=o.options,f=s.elements.arrow,p=s.modifiersData.popperOffsets,d=y(s.placement),l=C(d),m=[r,n].indexOf(d)>=0?"height":"width";if(f&&p){var v=function(e,t){return W("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:I(e,i))}(u.padding,s),h=O(f),g="y"===l?e:r,b="y"===l?t:n,w=s.rects.reference[m]+s.rects.reference[l]-p[l]-s.rects.popper[m],x=p[l]-s.rects.reference[l],E=k(f),T=E?"y"===l?E.clientHeight||0:E.clientWidth||0:0,A=w/2-x/2,D=v[g],L=T-h[m]-v[b],j=T/2-h[m]/2+A,M=H(D,j,L),S=l;s.modifiersData[c]=((a={})[S]=M,a.centerOffset=M-j,a)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&E(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ee(t,{elementContext:"reference"}),s=ee(t,{altBoundary:!0}),c=ne(a,r),u=ne(s,o,i),f=re(c),p=re(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}}]}),fe="tippy-content",pe="tippy-arrow",de="tippy-svg-arrow",le={passive:!0,capture:!0};function me(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ve(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function he(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ge(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function be(e){return[].concat(e)}function ye(e,t){-1===e.indexOf(t)&&e.push(t)}function we(e){return[].slice.call(e)}function xe(){return document.createElement("div")}function Oe(e){return["Element","Fragment"].some((function(t){return ve(e,t)}))}function Ee(e){return Oe(e)?[e]:function(e){return ve(e,"NodeList")}(e)?we(e):Array.isArray(e)?e:we(document.querySelectorAll(e))}function Te(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Ae(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function De(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Le={isTouch:!1},je=0;function ke(){Le.isTouch||(Le.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ce))}function Ce(){var e=performance.now();e-je<20&&(Le.isTouch=!1,document.removeEventListener("mousemove",Ce)),je=e}function Me(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Se="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Be=/MSIE |Trident\//.test(Se),He=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),We=Object.keys(He);function Ie(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,o=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:o),t}),{});return Object.assign({},e,{},t)}function Ve(e,t){var n=Object.assign({},t,{content:he(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ie(Object.assign({},He,{plugins:t}))):We).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},He.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Pe(e,t){e.innerHTML=t}function Re(e){var t=xe();return!0===e?t.className=pe:(t.className=de,Oe(e)?t.appendChild(e):Pe(t,e)),t}function qe(e,t){Oe(t.content)?(Pe(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Pe(e,t.content):e.textContent=t.content)}function Ne(e){var t=e.firstElementChild,n=we(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(fe)})),arrow:n.find((function(e){return e.classList.contains(pe)||e.classList.contains(de)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Ue(e){var t=xe(),n=xe();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=xe();function o(n,r){var o=Ne(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||qe(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(Re(r.arrow))):i.appendChild(Re(r.arrow)):s&&i.removeChild(s)}return r.className=fe,r.setAttribute("data-state","hidden"),qe(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}Ue.$$tippy=!0;var _e=1,Fe=[],ze=[];function $e(e,t){var n,r,o,i,a,s,c,u,f,p=Ve(e,Object.assign({},He,{},Ie((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),d=!1,l=!1,m=!1,v=!1,h=[],g=ge(Y,p.interactiveDebounce),b=_e++,y=(f=p.plugins).filter((function(e,t){return f.indexOf(e)===t})),w={id:b,reference:e,popper:xe(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)},setProps:function(t){if(w.state.isDestroyed)return;H("onBeforeUpdate",[w,t]),$();var n=w.props,r=Ve(e,Object.assign({},w.props,{},t,{ignoreAttributes:!0}));w.props=r,z(),n.interactiveDebounce!==r.interactiveDebounce&&(V(),g=ge(Y,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?be(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");I(),B(),E&&E(n,r);w.popperInstance&&(Q(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));H("onAfterUpdate",[w,t])},setContent:function(e){w.setProps({content:e})},show:function(){var e=w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,r=Le.isTouch&&!w.props.touch,o=me(w.props.duration,0,He.duration);if(e||t||n||r)return;if(k().hasAttribute("disabled"))return;if(H("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,j()&&(O.style.visibility="visible");B(),N(),w.state.isMounted||(O.style.transition="none");if(j()){var i=M(),a=i.box,s=i.content;Te([a,s],0)}c=function(){var e;if(w.state.isVisible&&!v){if(v=!0,O.offsetHeight,O.style.transition=w.props.moveTransition,j()&&w.props.animation){var t=M(),n=t.box,r=t.content;Te([n,r],o),Ae([n,r],"visible")}W(),I(),ye(ze,w),null==(e=w.popperInstance)||e.forceUpdate(),w.state.isMounted=!0,H("onMount",[w]),w.props.animation&&j()&&function(e,t){_(e,t)}(o,(function(){w.state.isShown=!0,H("onShown",[w])}))}},function(){var e,t=w.props.appendTo,n=k();e=w.props.interactive&&t===He.appendTo||"parent"===t?n.parentNode:he(t,[n]);e.contains(O)||e.appendChild(O);Q()}()},hide:function(){var e=!w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,r=me(w.props.duration,1,He.duration);if(e||t||n)return;if(H("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,v=!1,d=!1,j()&&(O.style.visibility="hidden");if(V(),U(),B(),j()){var o=M(),i=o.box,a=o.content;w.props.animation&&(Te([i,a],r),Ae([i,a],"hidden"))}W(),I(),w.props.animation?j()&&function(e,t){_(e,(function(){!w.state.isVisible&&O.parentNode&&O.parentNode.contains(O)&&t()}))}(r,w.unmount):w.unmount()},hideWithInteractivity:function(e){C().addEventListener("mousemove",g),ye(Fe,g),g(e)},enable:function(){w.state.isEnabled=!0},disable:function(){w.hide(),w.state.isEnabled=!1},unmount:function(){w.state.isVisible&&w.hide();if(!w.state.isMounted)return;Z(),ee().forEach((function(e){e._tippy.unmount()})),O.parentNode&&O.parentNode.removeChild(O);ze=ze.filter((function(e){return e!==w})),w.state.isMounted=!1,H("onHidden",[w])},destroy:function(){if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),$(),delete e._tippy,w.state.isDestroyed=!0,H("onDestroy",[w])}};if(!p.render)return w;var x=p.render(w),O=x.popper,E=x.onUpdate;O.setAttribute("data-tippy-root",""),O.id="tippy-"+w.id,w.popper=O,e._tippy=w,O._tippy=w;var T=y.map((function(e){return e.fn(w)})),A=e.hasAttribute("aria-expanded");return z(),I(),B(),H("onCreate",[w]),p.showOnCreate&&te(),O.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),O.addEventListener("mouseleave",(function(e){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(C().addEventListener("mousemove",g),g(e))})),w;function D(){var e=w.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===D()[0]}function j(){var e;return!!(null==(e=w.props.render)?void 0:e.$$tippy)}function k(){return u||e}function C(){var e,t,n=k().parentNode;return n?(null==(t=be(n)[0])||null==(e=t.ownerDocument)?void 0:e.body)?t.ownerDocument:document:document}function M(){return Ne(O)}function S(e){return w.state.isMounted&&!w.state.isVisible||Le.isTouch||a&&"focus"===a.type?0:me(w.props.delay,e?0:1,He.delay)}function B(){O.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",O.style.zIndex=""+w.props.zIndex}function H(e,t,n){var r;(void 0===n&&(n=!0),T.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=w.props)[e].apply(r,t)}function W(){var t=w.props.aria;if(t.content){var n="aria-"+t.content,r=O.id;be(w.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(w.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function I(){!A&&w.props.aria.expanded&&be(w.props.triggerTarget||e).forEach((function(e){w.props.interactive?e.setAttribute("aria-expanded",w.state.isVisible&&e===k()?"true":"false"):e.removeAttribute("aria-expanded")}))}function V(){C().removeEventListener("mousemove",g),Fe=Fe.filter((function(e){return e!==g}))}function P(e){if(!(Le.isTouch&&(m||"mousedown"===e.type)||w.props.interactive&&O.contains(e.target))){if(k().contains(e.target)){if(Le.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else H("onClickOutside",[w,e]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),l=!0,setTimeout((function(){l=!1})),w.state.isMounted||U())}}function R(){m=!0}function q(){m=!1}function N(){var e=C();e.addEventListener("mousedown",P,!0),e.addEventListener("touchend",P,le),e.addEventListener("touchstart",q,le),e.addEventListener("touchmove",R,le)}function U(){var e=C();e.removeEventListener("mousedown",P,!0),e.removeEventListener("touchend",P,le),e.removeEventListener("touchstart",q,le),e.removeEventListener("touchmove",R,le)}function _(e,t){var n=M().box;function r(e){e.target===n&&(De(n,"remove",r),t())}if(0===e)return t();De(n,"remove",s),De(n,"add",r),s=r}function F(t,n,r){void 0===r&&(r=!1),be(w.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})}))}function z(){var e;L()&&(F("touchstart",X,{passive:!0}),F("touchend",J,{passive:!0})),(e=w.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(F(e,X),e){case"mouseenter":F("mouseleave",J);break;case"focus":F(Be?"focusout":"blur",G);break;case"focusin":F("focusout",G)}}))}function $(){h.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),h=[]}function X(e){var t,n=!1;if(w.state.isEnabled&&!K(e)&&!l){var r="focus"===(null==(t=a)?void 0:t.type);a=e,u=e.currentTarget,I(),!w.state.isVisible&&ve(e,"MouseEvent")&&Fe.forEach((function(t){return t(e)})),"click"===e.type&&(w.props.trigger.indexOf("mouseenter")<0||d)&&!1!==w.props.hideOnClick&&w.state.isVisible?n=!0:te(e),"click"===e.type&&(d=!n),n&&!r&&ne(e)}}function Y(e){var t=e.target,n=k().contains(t)||O.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=o.placement.split("-")[0],s=o.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,f="right"===a?s.left.x:0,p="left"===a?s.right.x:0,d=t.top-r+c>i,l=r-t.bottom-u>i,m=t.left-n+f>i,v=n-t.right-p>i;return d||l||m||v}))}(ee().concat(O).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:p}:null})).filter(Boolean),e)&&(V(),ne(e))}function J(e){K(e)||w.props.trigger.indexOf("click")>=0&&d||(w.props.interactive?w.hideWithInteractivity(e):ne(e))}function G(e){w.props.trigger.indexOf("focusin")<0&&e.target!==k()||w.props.interactive&&e.relatedTarget&&O.contains(e.relatedTarget)||ne(e)}function K(e){return!!Le.isTouch&&L()!==e.type.indexOf("touch")>=0}function Q(){Z();var t=w.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,s=j()?Ne(O).arrow:null,u=i?{getBoundingClientRect:i,contextElement:i.contextElement||k()}:e,f=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(j()){var n=M().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];j()&&s&&f.push({name:"arrow",options:{element:s,padding:3}}),f.push.apply(f,(null==n?void 0:n.modifiers)||[]),w.popperInstance=ue(u,O,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:f}))}function Z(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function ee(){return we(O.querySelectorAll("[data-tippy-root]"))}function te(e){w.clearDelayTimeouts(),e&&H("onTrigger",[w,e]),N();var t=S(!0),n=D(),o=n[0],i=n[1];Le.isTouch&&"hold"===o&&i&&(t=i),t?r=setTimeout((function(){w.show()}),t):w.show()}function ne(e){if(w.clearDelayTimeouts(),H("onUntrigger",[w,e]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=S(!1);t?o=setTimeout((function(){w.state.isVisible&&w.hide()}),t):i=requestAnimationFrame((function(){w.hide()}))}}else U()}}function Xe(e,t){void 0===t&&(t={});var n=He.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",ke,le),window.addEventListener("blur",Me);var r=Object.assign({},t,{plugins:n}),o=Ee(e).reduce((function(e,t){var n=t&&$e(t,r);return n&&e.push(n),e}),[]);return Oe(e)?o[0]:o}Xe.defaultProps=He,Xe.setDefaultProps=function(e){Object.keys(e).forEach((function(t){He[t]=e[t]}))},Xe.currentInput=Le,Object.assign({},b,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Xe.setDefaultProps({render:Ue}),document.addEventListener("DOMContentLoaded",(function(){var e,t;!function(){var e=document.getElementById("profiled-requests-table");if(e)for(var t=e.getElementsByTagName("tr"),n=function(t){var n=e.rows[t],r=n.dataset.link;n.onclick=function(){window.location.href=r}},r=0;r<t.length;r++)n(r)}(),(e=document.getElementById("profiled-request-search"))&&e.addEventListener("keyup",(function(e){"Enter"===e.key&&(e.preventDefault(),document.getElementById("profiled-request-search-form").submit())})),document.querySelectorAll(".trace-bar").forEach((function(e){Xe(e,{trigger:"click",content:e.children[0],theme:"rmp",maxWidth:"700px",placement:"bottom",interactive:!0,onShow:function(e){e.popper.querySelector(".popover-close").addEventListener("click",(function(){e.hide()}))},onHide:function(e){e.popper.querySelector(".popover-close").removeEventListener("click",(function(){e.hide()}))}})})),(t=document.getElementById("trace-search"))&&t.addEventListener("keyup",(function(e){"Enter"===e.key&&(e.preventDefault(),document.getElementById("trace-form").submit())}))}),!1)}));
1
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e="top",t="bottom",n="right",r="left",i="auto",o=[e,t,n,r],s="start",a="end",c="viewport",u="popper",l=o.reduce((function(e,t){return e.concat([t+"-"+s,t+"-"+a])}),[]),f=[].concat(o,[i]).reduce((function(e,t){return e.concat([t,t+"-"+s,t+"-"+a])}),[]),p=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function d(e){return e?(e.nodeName||"").toLowerCase():null}function h(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function m(e){return e instanceof h(e).Element||e instanceof Element}function g(e){return e instanceof h(e).HTMLElement||e instanceof HTMLElement}function y(e){return"undefined"!=typeof ShadowRoot&&(e instanceof h(e).ShadowRoot||e instanceof ShadowRoot)}var v={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];g(i)&&d(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});g(r)&&d(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function b(e){return e.split("-")[0]}var w=Math.round;function O(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;return g(e)&&t&&(r=n.width/e.offsetWidth||1,i=n.height/e.offsetHeight||1),{width:w(n.width/r),height:w(n.height/i),top:w(n.top/i),right:w(n.right/r),bottom:w(n.bottom/i),left:w(n.left/r),x:w(n.left/r),y:w(n.top/i)}}function E(e){var t=O(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function T(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&y(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function A(e){return h(e).getComputedStyle(e)}function k(e){return["table","td","th"].indexOf(d(e))>=0}function x(e){return((m(e)?e.ownerDocument:e.document)||window.document).documentElement}function C(e){return"html"===d(e)?e:e.assignedSlot||e.parentNode||(y(e)?e.host:null)||x(e)}function L(e){return g(e)&&"fixed"!==A(e).position?e.offsetParent:null}function j(e){for(var t=h(e),n=L(e);n&&k(n)&&"static"===A(n).position;)n=L(n);return n&&("html"===d(n)||"body"===d(n)&&"static"===A(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&g(e)&&"fixed"===A(e).position)return null;for(var n=C(e);g(n)&&["html","body"].indexOf(d(n))<0;){var r=A(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function P(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var M=Math.max,B=Math.min,S=Math.round;function _(e,t,n){return M(e,B(t,n))}function D(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function N(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var V={top:"auto",right:"auto",bottom:"auto",left:"auto"};function I(i){var o,s=i.popper,a=i.popperRect,c=i.placement,u=i.offsets,l=i.position,f=i.gpuAcceleration,p=i.adaptive,d=i.roundOffsets,m=!0===d?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:S(S(t*r)/r)||0,y:S(S(n*r)/r)||0}}(u):"function"==typeof d?d(u):u,g=m.x,y=void 0===g?0:g,v=m.y,b=void 0===v?0:v,w=u.hasOwnProperty("x"),O=u.hasOwnProperty("y"),E=r,T=e,k=window;if(p){var C=j(s),L="clientHeight",P="clientWidth";C===h(s)&&"static"!==A(C=x(s)).position&&(L="scrollHeight",P="scrollWidth"),C=C,c===e&&(T=t,b-=C[L]-a.height,b*=f?1:-1),c===r&&(E=n,y-=C[P]-a.width,y*=f?1:-1)}var M,B=Object.assign({position:l},p&&V);return f?Object.assign({},B,((M={})[T]=O?"0":"",M[E]=w?"0":"",M.transform=(k.devicePixelRatio||1)<2?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",M)):Object.assign({},B,((o={})[T]=O?b+"px":"",o[E]=w?y+"px":"",o.transform="",o))}var F={passive:!0};var R={left:"right",right:"left",bottom:"top",top:"bottom"};function K(e){return e.replace(/left|right|bottom|top/g,(function(e){return R[e]}))}var W={start:"end",end:"start"};function U(e){return e.replace(/start|end/g,(function(e){return W[e]}))}function H(e){var t=h(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function q(e){return O(x(e)).left+H(e).scrollLeft}function z(e){var t=A(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $(e){return["html","body","#document"].indexOf(d(e))>=0?e.ownerDocument.body:g(e)&&z(e)?e:$(C(e))}function Y(e,t){var n;void 0===t&&(t=[]);var r=$(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=h(r),s=i?[o].concat(o.visualViewport||[],z(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Y(C(s)))}function J(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function X(e,t){return t===c?J(function(e){var t=h(e),n=x(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+q(e),y:a}}(e)):g(t)?function(e){var t=O(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):J(function(e){var t,n=x(e),r=H(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=M(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=M(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+q(e),c=-r.scrollTop;return"rtl"===A(i||n).direction&&(a+=M(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:c}}(x(e)))}function Q(e,t,n){var r="clippingParents"===t?function(e){var t=Y(C(e)),n=["absolute","fixed"].indexOf(A(e).position)>=0&&g(e)?j(e):e;return m(n)?t.filter((function(e){return m(e)&&T(e,n)&&"body"!==d(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],s=i.reduce((function(t,n){var r=X(e,n);return t.top=M(r.top,t.top),t.right=B(r.right,t.right),t.bottom=B(r.bottom,t.bottom),t.left=M(r.left,t.left),t}),X(e,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function G(e){return e.split("-")[1]}function Z(i){var o,c=i.reference,u=i.element,l=i.placement,f=l?b(l):null,p=l?G(l):null,d=c.x+c.width/2-u.width/2,h=c.y+c.height/2-u.height/2;switch(f){case e:o={x:d,y:c.y-u.height};break;case t:o={x:d,y:c.y+c.height};break;case n:o={x:c.x+c.width,y:h};break;case r:o={x:c.x-u.width,y:h};break;default:o={x:c.x,y:c.y}}var m=f?P(f):null;if(null!=m){var g="y"===m?"height":"width";switch(p){case s:o[m]=o[m]-(c[g]/2-u[g]/2);break;case a:o[m]=o[m]+(c[g]/2-u[g]/2)}}return o}function ee(r,i){void 0===i&&(i={});var s=i,a=s.placement,l=void 0===a?r.placement:a,f=s.boundary,p=void 0===f?"clippingParents":f,d=s.rootBoundary,h=void 0===d?c:d,g=s.elementContext,y=void 0===g?u:g,v=s.altBoundary,b=void 0!==v&&v,w=s.padding,E=void 0===w?0:w,T=D("number"!=typeof E?E:N(E,o)),A=y===u?"reference":u,k=r.elements.reference,C=r.rects.popper,L=r.elements[b?A:y],j=Q(m(L)?L:L.contextElement||x(r.elements.popper),p,h),P=O(k),M=Z({reference:P,element:C,strategy:"absolute",placement:l}),B=J(Object.assign({},C,M)),S=y===u?B:P,_={top:j.top-S.top+T.top,bottom:S.bottom-j.bottom+T.bottom,left:j.left-S.left+T.left,right:S.right-j.right+T.right},V=r.modifiersData.offset;if(y===u&&V){var I=V[l];Object.keys(_).forEach((function(r){var i=[n,t].indexOf(r)>=0?1:-1,o=[e,t].indexOf(r)>=0?"y":"x";_[r]+=I[o]*i}))}return _}function te(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,s=n.rootBoundary,a=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,p=void 0===u?f:u,d=G(r),h=d?c?l:l.filter((function(e){return G(e)===d})):o,m=h.filter((function(e){return p.indexOf(e)>=0}));0===m.length&&(m=h);var g=m.reduce((function(t,n){return t[n]=ee(e,{placement:n,boundary:i,rootBoundary:s,padding:a})[b(n)],t}),{});return Object.keys(g).sort((function(e,t){return g[e]-g[t]}))}function ne(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function re(i){return[e,n,t,r].some((function(e){return i[e]>=0}))}function ie(e,t,n){void 0===n&&(n=!1);var r,i,o=g(t),s=g(t)&&function(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return 1!==n||1!==r}(t),a=x(t),c=O(e,s),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!n)&&(("body"!==d(t)||z(a))&&(u=(r=t)!==h(r)&&g(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:H(r)),g(t)?((l=O(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=q(a))),{x:c.left+u.scrollLeft-l.x,y:c.top+u.scrollTop-l.y,width:c.width,height:c.height}}function oe(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var se={placement:"bottom",modifiers:[],strategy:"absolute"};function ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ce(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?se:i;return function(e,t,n){void 0===n&&(n=o);var i,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},se,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,l={state:a,setOptions:function(n){f(),a.options=Object.assign({},o,a.options,n),a.scrollParents={reference:m(e)?Y(e):e.contextElement?Y(e.contextElement):[],popper:Y(t)};var i,s,u=function(e){var t=oe(e);return p.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((i=[].concat(r,a.options.modifiers),s=i.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(s).map((function(e){return s[e]}))));return a.orderedModifiers=u.filter((function(e){return e.enabled})),a.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:a,name:t,instance:l,options:r}),s=function(){};c.push(o||s)}})),l.update()},forceUpdate:function(){if(!u){var e=a.elements,t=e.reference,n=e.popper;if(ae(t,n)){a.rects={reference:ie(t,j(n),"fixed"===a.options.strategy),popper:E(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(e){return a.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<a.orderedModifiers.length;r++)if(!0!==a.reset){var i=a.orderedModifiers[r],o=i.fn,s=i.options,c=void 0===s?{}:s,f=i.name;"function"==typeof o&&(a=o({state:a,options:c,name:f,instance:l})||a)}else a.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){l.forceUpdate(),e(a)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){f(),u=!0}};if(!ae(e,t))return l;function f(){c.forEach((function(e){return e()})),c=[]}return l.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var ue=ce({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,c=h(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,F)})),a&&c.addEventListener("resize",n.update,F),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,F)})),a&&c.removeEventListener("resize",n.update,F)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Z({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,c=void 0===a||a,u={placement:b(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,I(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,I(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},v,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var i=t.state,o=t.options,s=t.name,a=o.offset,c=void 0===a?[0,0]:a,u=f.reduce((function(t,o){return t[o]=function(t,i,o){var s=b(t),a=[r,e].indexOf(s)>=0?-1:1,c="function"==typeof o?o(Object.assign({},i,{placement:t})):o,u=c[0],l=c[1];return u=u||0,l=(l||0)*a,[r,n].indexOf(s)>=0?{x:l,y:u}:{x:u,y:l}}(o,i.rects,c),t}),{}),l=u[i.placement],p=l.x,d=l.y;null!=i.modifiersData.popperOffsets&&(i.modifiersData.popperOffsets.x+=p,i.modifiersData.popperOffsets.y+=d),i.modifiersData[s]=u}},{name:"flip",enabled:!0,phase:"main",fn:function(o){var a=o.state,c=o.options,u=o.name;if(!a.modifiersData[u]._skip){for(var l=c.mainAxis,f=void 0===l||l,p=c.altAxis,d=void 0===p||p,h=c.fallbackPlacements,m=c.padding,g=c.boundary,y=c.rootBoundary,v=c.altBoundary,w=c.flipVariations,O=void 0===w||w,E=c.allowedAutoPlacements,T=a.options.placement,A=b(T),k=h||(A===T||!O?[K(T)]:function(e){if(b(e)===i)return[];var t=K(e);return[U(e),t,U(t)]}(T)),x=[T].concat(k).reduce((function(e,t){return e.concat(b(t)===i?te(a,{placement:t,boundary:g,rootBoundary:y,padding:m,flipVariations:O,allowedAutoPlacements:E}):t)}),[]),C=a.rects.reference,L=a.rects.popper,j=new Map,P=!0,M=x[0],B=0;B<x.length;B++){var S=x[B],_=b(S),D=G(S)===s,N=[e,t].indexOf(_)>=0,V=N?"width":"height",I=ee(a,{placement:S,boundary:g,rootBoundary:y,altBoundary:v,padding:m}),F=N?D?n:r:D?t:e;C[V]>L[V]&&(F=K(F));var R=K(F),W=[];if(f&&W.push(I[_]<=0),d&&W.push(I[F]<=0,I[R]<=0),W.every((function(e){return e}))){M=S,P=!1;break}j.set(S,W)}if(P)for(var H=function(e){var t=x.find((function(t){var n=j.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return M=t,"break"},q=O?3:1;q>0;q--){if("break"===H(q))break}a.placement!==M&&(a.modifiersData[u]._skip=!0,a.placement=M,a.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(i){var o=i.state,a=i.options,c=i.name,u=a.mainAxis,l=void 0===u||u,f=a.altAxis,p=void 0!==f&&f,d=a.boundary,h=a.rootBoundary,m=a.altBoundary,g=a.padding,y=a.tether,v=void 0===y||y,w=a.tetherOffset,O=void 0===w?0:w,T=ee(o,{boundary:d,rootBoundary:h,padding:g,altBoundary:m}),A=b(o.placement),k=G(o.placement),x=!k,C=P(A),L="x"===C?"y":"x",S=o.modifiersData.popperOffsets,D=o.rects.reference,N=o.rects.popper,V="function"==typeof O?O(Object.assign({},o.rects,{placement:o.placement})):O,I={x:0,y:0};if(S){if(l||p){var F="y"===C?e:r,R="y"===C?t:n,K="y"===C?"height":"width",W=S[C],U=S[C]+T[F],H=S[C]-T[R],q=v?-N[K]/2:0,z=k===s?D[K]:N[K],$=k===s?-N[K]:-D[K],Y=o.elements.arrow,J=v&&Y?E(Y):{width:0,height:0},X=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=X[F],Z=X[R],te=_(0,D[K],J[K]),ne=x?D[K]/2-q-te-Q-V:z-te-Q-V,re=x?-D[K]/2+q+te+Z+V:$+te+Z+V,ie=o.elements.arrow&&j(o.elements.arrow),oe=ie?"y"===C?ie.clientTop||0:ie.clientLeft||0:0,se=o.modifiersData.offset?o.modifiersData.offset[o.placement][C]:0,ae=S[C]+ne-se-oe,ce=S[C]+re-se;if(l){var ue=_(v?B(U,ae):U,W,v?M(H,ce):H);S[C]=ue,I[C]=ue-W}if(p){var le="x"===C?e:r,fe="x"===C?t:n,pe=S[L],de=pe+T[le],he=pe-T[fe],me=_(v?B(de,ae):de,pe,v?M(he,ce):he);S[L]=me,I[L]=me-pe}}o.modifiersData[c]=I}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(i){var s,a=i.state,c=i.name,u=i.options,l=a.elements.arrow,f=a.modifiersData.popperOffsets,p=b(a.placement),d=P(p),h=[r,n].indexOf(p)>=0?"height":"width";if(l&&f){var m=function(e,t){return D("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:N(e,o))}(u.padding,a),g=E(l),y="y"===d?e:r,v="y"===d?t:n,w=a.rects.reference[h]+a.rects.reference[d]-f[d]-a.rects.popper[h],O=f[d]-a.rects.reference[d],T=j(l),A=T?"y"===d?T.clientHeight||0:T.clientWidth||0:0,k=w/2-O/2,x=m[y],C=A-g[h]-m[v],L=A/2-g[h]/2+k,M=_(x,L,C),B=d;a.modifiersData[c]=((s={})[B]=M,s.centerOffset=M-L,s)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&T(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=ee(t,{elementContext:"reference"}),a=ee(t,{altBoundary:!0}),c=ne(s,r),u=ne(a,i,o),l=re(c),f=re(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),le="tippy-content",fe="tippy-arrow",pe="tippy-svg-arrow",de={passive:!0,capture:!0};function he(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function me(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function ge(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ye(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function ve(e){return[].concat(e)}function be(e,t){-1===e.indexOf(t)&&e.push(t)}function we(e){return[].slice.call(e)}function Oe(){return document.createElement("div")}function Ee(e){return["Element","Fragment"].some((function(t){return me(e,t)}))}function Te(e){return Ee(e)?[e]:function(e){return me(e,"NodeList")}(e)?we(e):Array.isArray(e)?e:we(document.querySelectorAll(e))}function Ae(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function ke(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function xe(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ce={isTouch:!1},Le=0;function je(){Ce.isTouch||(Ce.isTouch=!0,window.performance&&document.addEventListener("mousemove",Pe))}function Pe(){var e=performance.now();e-Le<20&&(Ce.isTouch=!1,document.removeEventListener("mousemove",Pe)),Le=e}function Me(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Be="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Se=/MSIE |Trident\//.test(Be),_e=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),De=Object.keys(_e);function Ne(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:i),t}),{});return Object.assign({},e,{},t)}function Ve(e,t){var n=Object.assign({},t,{content:ge(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ne(Object.assign({},_e,{plugins:t}))):De).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},_e.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Ie(e,t){e.innerHTML=t}function Fe(e){var t=Oe();return!0===e?t.className=fe:(t.className=pe,Ee(e)?t.appendChild(e):Ie(t,e)),t}function Re(e,t){Ee(t.content)?(Ie(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Ie(e,t.content):e.textContent=t.content)}function Ke(e){var t=e.firstElementChild,n=we(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(le)})),arrow:n.find((function(e){return e.classList.contains(fe)||e.classList.contains(pe)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function We(e){var t=Oe(),n=Oe();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Oe();function i(n,r){var i=Ke(t),o=i.box,s=i.content,a=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Re(s,e.props),r.arrow?a?n.arrow!==r.arrow&&(o.removeChild(a),o.appendChild(Fe(r.arrow))):o.appendChild(Fe(r.arrow)):a&&o.removeChild(a)}return r.className=le,r.setAttribute("data-state","hidden"),Re(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}We.$$tippy=!0;var Ue=1,He=[],qe=[];function ze(e,t){var n,r,i,o,s,a,c,u,l,f=Ve(e,Object.assign({},_e,{},Ne((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),p=!1,d=!1,h=!1,m=!1,g=[],y=ye(Y,f.interactiveDebounce),v=Ue++,b=(l=f.plugins).filter((function(e,t){return l.indexOf(e)===t})),w={id:v,reference:e,popper:Oe(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(t){if(w.state.isDestroyed)return;_("onBeforeUpdate",[w,t]),z();var n=w.props,r=Ve(e,Object.assign({},w.props,{},t,{ignoreAttributes:!0}));w.props=r,q(),n.interactiveDebounce!==r.interactiveDebounce&&(V(),y=ye(Y,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?ve(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");N(),S(),T&&T(n,r);w.popperInstance&&(G(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));_("onAfterUpdate",[w,t])},setContent:function(e){w.setProps({content:e})},show:function(){var e=w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,r=Ce.isTouch&&!w.props.touch,i=he(w.props.duration,0,_e.duration);if(e||t||n||r)return;if(j().hasAttribute("disabled"))return;if(_("onShow",[w],!1),!1===w.props.onShow(w))return;w.state.isVisible=!0,L()&&(E.style.visibility="visible");S(),K(),w.state.isMounted||(E.style.transition="none");if(L()){var o=M(),s=o.box,a=o.content;Ae([s,a],0)}c=function(){var e;if(w.state.isVisible&&!m){if(m=!0,E.offsetHeight,E.style.transition=w.props.moveTransition,L()&&w.props.animation){var t=M(),n=t.box,r=t.content;Ae([n,r],i),ke([n,r],"visible")}D(),N(),be(qe,w),null==(e=w.popperInstance)||e.forceUpdate(),w.state.isMounted=!0,_("onMount",[w]),w.props.animation&&L()&&function(e,t){U(e,t)}(i,(function(){w.state.isShown=!0,_("onShown",[w])}))}},function(){var e,t=w.props.appendTo,n=j();e=w.props.interactive&&t===_e.appendTo||"parent"===t?n.parentNode:ge(t,[n]);e.contains(E)||e.appendChild(E);G()}()},hide:function(){var e=!w.state.isVisible,t=w.state.isDestroyed,n=!w.state.isEnabled,r=he(w.props.duration,1,_e.duration);if(e||t||n)return;if(_("onHide",[w],!1),!1===w.props.onHide(w))return;w.state.isVisible=!1,w.state.isShown=!1,m=!1,p=!1,L()&&(E.style.visibility="hidden");if(V(),W(),S(),L()){var i=M(),o=i.box,s=i.content;w.props.animation&&(Ae([o,s],r),ke([o,s],"hidden"))}D(),N(),w.props.animation?L()&&function(e,t){U(e,(function(){!w.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&t()}))}(r,w.unmount):w.unmount()},hideWithInteractivity:function(e){P().addEventListener("mousemove",y),be(He,y),y(e)},enable:function(){w.state.isEnabled=!0},disable:function(){w.hide(),w.state.isEnabled=!1},unmount:function(){w.state.isVisible&&w.hide();if(!w.state.isMounted)return;Z(),ee().forEach((function(e){e._tippy.unmount()})),E.parentNode&&E.parentNode.removeChild(E);qe=qe.filter((function(e){return e!==w})),w.state.isMounted=!1,_("onHidden",[w])},destroy:function(){if(w.state.isDestroyed)return;w.clearDelayTimeouts(),w.unmount(),z(),delete e._tippy,w.state.isDestroyed=!0,_("onDestroy",[w])}};if(!f.render)return w;var O=f.render(w),E=O.popper,T=O.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+w.id,w.popper=E,e._tippy=w,E._tippy=w;var A=b.map((function(e){return e.fn(w)})),k=e.hasAttribute("aria-expanded");return q(),N(),S(),_("onCreate",[w]),f.showOnCreate&&te(),E.addEventListener("mouseenter",(function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()})),E.addEventListener("mouseleave",(function(e){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&(P().addEventListener("mousemove",y),y(e))})),w;function x(){var e=w.props.touch;return Array.isArray(e)?e:[e,0]}function C(){return"hold"===x()[0]}function L(){var e;return!!(null==(e=w.props.render)?void 0:e.$$tippy)}function j(){return u||e}function P(){var e,t,n=j().parentNode;return n?(null==(t=ve(n)[0])||null==(e=t.ownerDocument)?void 0:e.body)?t.ownerDocument:document:document}function M(){return Ke(E)}function B(e){return w.state.isMounted&&!w.state.isVisible||Ce.isTouch||s&&"focus"===s.type?0:he(w.props.delay,e?0:1,_e.delay)}function S(){E.style.pointerEvents=w.props.interactive&&w.state.isVisible?"":"none",E.style.zIndex=""+w.props.zIndex}function _(e,t,n){var r;(void 0===n&&(n=!0),A.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=w.props)[e].apply(r,t)}function D(){var t=w.props.aria;if(t.content){var n="aria-"+t.content,r=E.id;ve(w.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(w.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function N(){!k&&w.props.aria.expanded&&ve(w.props.triggerTarget||e).forEach((function(e){w.props.interactive?e.setAttribute("aria-expanded",w.state.isVisible&&e===j()?"true":"false"):e.removeAttribute("aria-expanded")}))}function V(){P().removeEventListener("mousemove",y),He=He.filter((function(e){return e!==y}))}function I(e){if(!(Ce.isTouch&&(h||"mousedown"===e.type)||w.props.interactive&&E.contains(e.target))){if(j().contains(e.target)){if(Ce.isTouch)return;if(w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else _("onClickOutside",[w,e]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),d=!0,setTimeout((function(){d=!1})),w.state.isMounted||W())}}function F(){h=!0}function R(){h=!1}function K(){var e=P();e.addEventListener("mousedown",I,!0),e.addEventListener("touchend",I,de),e.addEventListener("touchstart",R,de),e.addEventListener("touchmove",F,de)}function W(){var e=P();e.removeEventListener("mousedown",I,!0),e.removeEventListener("touchend",I,de),e.removeEventListener("touchstart",R,de),e.removeEventListener("touchmove",F,de)}function U(e,t){var n=M().box;function r(e){e.target===n&&(xe(n,"remove",r),t())}if(0===e)return t();xe(n,"remove",a),xe(n,"add",r),a=r}function H(t,n,r){void 0===r&&(r=!1),ve(w.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),g.push({node:e,eventType:t,handler:n,options:r})}))}function q(){var e;C()&&(H("touchstart",$,{passive:!0}),H("touchend",J,{passive:!0})),(e=w.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(H(e,$),e){case"mouseenter":H("mouseleave",J);break;case"focus":H(Se?"focusout":"blur",X);break;case"focusin":H("focusout",X)}}))}function z(){g.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),g=[]}function $(e){var t,n=!1;if(w.state.isEnabled&&!Q(e)&&!d){var r="focus"===(null==(t=s)?void 0:t.type);s=e,u=e.currentTarget,N(),!w.state.isVisible&&me(e,"MouseEvent")&&He.forEach((function(t){return t(e)})),"click"===e.type&&(w.props.trigger.indexOf("mouseenter")<0||p)&&!1!==w.props.hideOnClick&&w.state.isVisible?n=!0:te(e),"click"===e.type&&(p=!n),n&&!r&&ne(e)}}function Y(e){var t=e.target,n=j().contains(t)||E.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,s=i.placement.split("-")[0],a=i.modifiersData.offset;if(!a)return!0;var c="bottom"===s?a.top.y:0,u="top"===s?a.bottom.y:0,l="right"===s?a.left.x:0,f="left"===s?a.right.x:0,p=t.top-r+c>o,d=r-t.bottom-u>o,h=t.left-n+l>o,m=n-t.right-f>o;return p||d||h||m}))}(ee().concat(E).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:f}:null})).filter(Boolean),e)&&(V(),ne(e))}function J(e){Q(e)||w.props.trigger.indexOf("click")>=0&&p||(w.props.interactive?w.hideWithInteractivity(e):ne(e))}function X(e){w.props.trigger.indexOf("focusin")<0&&e.target!==j()||w.props.interactive&&e.relatedTarget&&E.contains(e.relatedTarget)||ne(e)}function Q(e){return!!Ce.isTouch&&C()!==e.type.indexOf("touch")>=0}function G(){Z();var t=w.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,s=t.moveTransition,a=L()?Ke(E).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||j()}:e,l=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(L()){var n=M().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];L()&&a&&l.push({name:"arrow",options:{element:a,padding:3}}),l.push.apply(l,(null==n?void 0:n.modifiers)||[]),w.popperInstance=ue(u,E,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:l}))}function Z(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function ee(){return we(E.querySelectorAll("[data-tippy-root]"))}function te(e){w.clearDelayTimeouts(),e&&_("onTrigger",[w,e]),K();var t=B(!0),n=x(),i=n[0],o=n[1];Ce.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout((function(){w.show()}),t):w.show()}function ne(e){if(w.clearDelayTimeouts(),_("onUntrigger",[w,e]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=B(!1);t?i=setTimeout((function(){w.state.isVisible&&w.hide()}),t):o=requestAnimationFrame((function(){w.hide()}))}}else W()}}function $e(e,t){void 0===t&&(t={});var n=_e.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",je,de),window.addEventListener("blur",Me);var r=Object.assign({},t,{plugins:n}),i=Te(e).reduce((function(e,t){var n=t&&ze(t,r);return n&&e.push(n),e}),[]);return Ee(e)?i[0]:i}$e.defaultProps=_e,$e.setDefaultProps=function(e){Object.keys(e).forEach((function(t){_e[t]=e[t]}))},$e.currentInput=Ce,Object.assign({},v,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),$e.setDefaultProps({render:We});var Ye=function(){function e(e,t,n){this.eventTarget=e,this.eventName=t,this.eventOptions=n,this.unorderedBindings=new Set}return e.prototype.connect=function(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)},e.prototype.disconnect=function(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)},e.prototype.bindingConnected=function(e){this.unorderedBindings.add(e)},e.prototype.bindingDisconnected=function(e){this.unorderedBindings.delete(e)},e.prototype.handleEvent=function(e){for(var t=function(e){if("immediatePropagationStopped"in e)return e;var t=e.stopImmediatePropagation;return Object.assign(e,{immediatePropagationStopped:!1,stopImmediatePropagation:function(){this.immediatePropagationStopped=!0,t.call(this)}})}(e),n=0,r=this.bindings;n<r.length;n++){var i=r[n];if(t.immediatePropagationStopped)break;i.handleEvent(t)}},Object.defineProperty(e.prototype,"bindings",{get:function(){return Array.from(this.unorderedBindings).sort((function(e,t){var n=e.index,r=t.index;return n<r?-1:n>r?1:0}))},enumerable:!1,configurable:!0}),e}();var Je=function(){function e(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}return e.prototype.start=function(){this.started||(this.started=!0,this.eventListeners.forEach((function(e){return e.connect()})))},e.prototype.stop=function(){this.started&&(this.started=!1,this.eventListeners.forEach((function(e){return e.disconnect()})))},Object.defineProperty(e.prototype,"eventListeners",{get:function(){return Array.from(this.eventListenerMaps.values()).reduce((function(e,t){return e.concat(Array.from(t.values()))}),[])},enumerable:!1,configurable:!0}),e.prototype.bindingConnected=function(e){this.fetchEventListenerForBinding(e).bindingConnected(e)},e.prototype.bindingDisconnected=function(e){this.fetchEventListenerForBinding(e).bindingDisconnected(e)},e.prototype.handleError=function(e,t,n){void 0===n&&(n={}),this.application.handleError(e,"Error "+t,n)},e.prototype.fetchEventListenerForBinding=function(e){var t=e.eventTarget,n=e.eventName,r=e.eventOptions;return this.fetchEventListener(t,n,r)},e.prototype.fetchEventListener=function(e,t,n){var r=this.fetchEventListenerMapForEventTarget(e),i=this.cacheKey(t,n),o=r.get(i);return o||(o=this.createEventListener(e,t,n),r.set(i,o)),o},e.prototype.createEventListener=function(e,t,n){var r=new Ye(e,t,n);return this.started&&r.connect(),r},e.prototype.fetchEventListenerMapForEventTarget=function(e){var t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t},e.prototype.cacheKey=function(e,t){var n=[e];return Object.keys(t).sort().forEach((function(e){n.push((t[e]?"":"!")+e)})),n.join(":")},e}(),Xe=/^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;function Qe(e){return"window"==e?window:"document"==e?document:void 0}var Ge=function(){function e(e,t,n){this.element=e,this.index=t,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function(e){var t=e.tagName.toLowerCase();if(t in Ze)return Ze[t](e)}(e)||et("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||et("missing identifier"),this.methodName=n.methodName||et("missing method name")}return e.forToken=function(e){return new this(e.element,e.index,(t=e.content,{eventTarget:Qe((r=t.trim().match(Xe)||[])[4]),eventName:r[2],eventOptions:r[9]?(n=r[9],n.split(":").reduce((function(e,t){var n;return Object.assign(e,((n={})[t.replace(/^!/,"")]=!/^!/.test(t),n))}),{})):{},identifier:r[5],methodName:r[7]}));var t,n,r},e.prototype.toString=function(){var e=this.eventTargetName?"@"+this.eventTargetName:"";return""+this.eventName+e+"->"+this.identifier+"#"+this.methodName},Object.defineProperty(e.prototype,"eventTargetName",{get:function(){return(e=this.eventTarget)==window?"window":e==document?"document":void 0;var e},enumerable:!1,configurable:!0}),e}(),Ze={a:function(e){return"click"},button:function(e){return"click"},form:function(e){return"submit"},input:function(e){return"submit"==e.getAttribute("type")?"click":"input"},select:function(e){return"change"},textarea:function(e){return"input"}};function et(e){throw new Error(e)}var tt=function(){function e(e,t){this.context=e,this.action=t}return Object.defineProperty(e.prototype,"index",{get:function(){return this.action.index},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventTarget",{get:function(){return this.action.eventTarget},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"eventOptions",{get:function(){return this.action.eventOptions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!1,configurable:!0}),e.prototype.handleEvent=function(e){this.willBeInvokedByEvent(e)&&this.invokeWithEvent(e)},Object.defineProperty(e.prototype,"eventName",{get:function(){return this.action.eventName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){var e=this.controller[this.methodName];if("function"==typeof e)return e;throw new Error('Action "'+this.action+'" references undefined method "'+this.methodName+'"')},enumerable:!1,configurable:!0}),e.prototype.invokeWithEvent=function(e){try{this.method.call(this.controller,e)}catch(r){var t=this,n={identifier:t.identifier,controller:t.controller,element:t.element,index:t.index,event:e};this.context.handleError(r,'invoking action "'+this.action+'"',n)}},e.prototype.willBeInvokedByEvent=function(e){var t=e.target;return this.element===t||(t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element))},Object.defineProperty(e.prototype,"controller",{get:function(){return this.context.controller},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"methodName",{get:function(){return this.action.methodName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this.context.scope},enumerable:!1,configurable:!0}),e}(),nt=function(){function e(e,t){var n=this;this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver((function(e){return n.processMutations(e)}))}return e.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,childList:!0,subtree:!0}),this.refresh())},e.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},e.prototype.refresh=function(){if(this.started){for(var e=new Set(this.matchElementsInTree()),t=0,n=Array.from(this.elements);t<n.length;t++){var r=n[t];e.has(r)||this.removeElement(r)}for(var i=0,o=Array.from(e);i<o.length;i++){r=o[i];this.addElement(r)}}},e.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var r=n[t];this.processMutation(r)}},e.prototype.processMutation=function(e){"attributes"==e.type?this.processAttributeChange(e.target,e.attributeName):"childList"==e.type&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))},e.prototype.processAttributeChange=function(e,t){var n=e;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,t):this.removeElement(n):this.matchElement(n)&&this.addElement(n)},e.prototype.processRemovedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t],i=this.elementFromNode(r);i&&this.processTree(i,this.removeElement)}},e.prototype.processAddedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t],i=this.elementFromNode(r);i&&this.elementIsActive(i)&&this.processTree(i,this.addElement)}},e.prototype.matchElement=function(e){return this.delegate.matchElement(e)},e.prototype.matchElementsInTree=function(e){return void 0===e&&(e=this.element),this.delegate.matchElementsInTree(e)},e.prototype.processTree=function(e,t){for(var n=0,r=this.matchElementsInTree(e);n<r.length;n++){var i=r[n];t.call(this,i)}},e.prototype.elementFromNode=function(e){if(e.nodeType==Node.ELEMENT_NODE)return e},e.prototype.elementIsActive=function(e){return e.isConnected==this.element.isConnected&&this.element.contains(e)},e.prototype.addElement=function(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))},e.prototype.removeElement=function(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))},e}(),rt=function(){function e(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new nt(e,this)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.elementObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selector",{get:function(){return"["+this.attributeName+"]"},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.elementObserver.start()},e.prototype.stop=function(){this.elementObserver.stop()},e.prototype.refresh=function(){this.elementObserver.refresh()},Object.defineProperty(e.prototype,"started",{get:function(){return this.elementObserver.started},enumerable:!1,configurable:!0}),e.prototype.matchElement=function(e){return e.hasAttribute(this.attributeName)},e.prototype.matchElementsInTree=function(e){var t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)},e.prototype.elementMatched=function(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)},e.prototype.elementUnmatched=function(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)},e.prototype.elementAttributeChanged=function(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)},e}(),it=function(){function e(e,t){var n=this;this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((function(e){return n.processMutations(e)}))}return e.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0}),this.refresh())},e.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},e.prototype.refresh=function(){if(this.started)for(var e=0,t=this.knownAttributeNames;e<t.length;e++){var n=t[e];this.refreshAttribute(n)}},e.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var r=n[t];this.processMutation(r)}},e.prototype.processMutation=function(e){var t=e.attributeName;t&&this.refreshAttribute(t)},e.prototype.refreshAttribute=function(e){var t=this.delegate.getStringMapKeyForAttribute(e);if(null!=t){this.stringMap.has(e)||this.stringMapKeyAdded(t,e);var n=this.element.getAttribute(e);this.stringMap.get(e)!=n&&this.stringMapValueChanged(n,t),null==n?(this.stringMap.delete(e),this.stringMapKeyRemoved(t,e)):this.stringMap.set(e,n)}},e.prototype.stringMapKeyAdded=function(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)},e.prototype.stringMapValueChanged=function(e,t){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t)},e.prototype.stringMapKeyRemoved=function(e,t){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t)},Object.defineProperty(e.prototype,"knownAttributeNames",{get:function(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentAttributeNames",{get:function(){return Array.from(this.element.attributes).map((function(e){return e.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"recordedAttributeNames",{get:function(){return Array.from(this.stringMap.keys())},enumerable:!1,configurable:!0}),e}();function ot(e,t,n){at(e,t).add(n)}function st(e,t,n){at(e,t).delete(n),function(e,t){var n=e.get(t);null!=n&&0==n.size&&e.delete(t)}(e,t)}function at(e,t){var n=e.get(t);return n||(n=new Set,e.set(t,n)),n}var ct,ut=function(){function e(){this.valuesByKey=new Map}return Object.defineProperty(e.prototype,"values",{get:function(){return Array.from(this.valuesByKey.values()).reduce((function(e,t){return e.concat(Array.from(t))}),[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return Array.from(this.valuesByKey.values()).reduce((function(e,t){return e+t.size}),0)},enumerable:!1,configurable:!0}),e.prototype.add=function(e,t){ot(this.valuesByKey,e,t)},e.prototype.delete=function(e,t){st(this.valuesByKey,e,t)},e.prototype.has=function(e,t){var n=this.valuesByKey.get(e);return null!=n&&n.has(t)},e.prototype.hasKey=function(e){return this.valuesByKey.has(e)},e.prototype.hasValue=function(e){return Array.from(this.valuesByKey.values()).some((function(t){return t.has(e)}))},e.prototype.getValuesForKey=function(e){var t=this.valuesByKey.get(e);return t?Array.from(t):[]},e.prototype.getKeysForValue=function(e){return Array.from(this.valuesByKey).filter((function(t){return t[0],t[1].has(e)})).map((function(e){var t=e[0];return e[1],t}))},e}(),lt=window&&window.__extends||(ct=function(e,t){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}ct(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});!function(e){function t(){var t=e.call(this)||this;return t.keysByValue=new Map,t}lt(t,e),Object.defineProperty(t.prototype,"values",{get:function(){return Array.from(this.keysByValue.keys())},enumerable:!1,configurable:!0}),t.prototype.add=function(t,n){e.prototype.add.call(this,t,n),ot(this.keysByValue,n,t)},t.prototype.delete=function(t,n){e.prototype.delete.call(this,t,n),st(this.keysByValue,n,t)},t.prototype.hasValue=function(e){return this.keysByValue.has(e)},t.prototype.getKeysForValue=function(e){var t=this.keysByValue.get(e);return t?Array.from(t):[]}}(ut);var ft=function(){function e(e,t,n){this.attributeObserver=new rt(e,t,this),this.delegate=n,this.tokensByElement=new ut}return Object.defineProperty(e.prototype,"started",{get:function(){return this.attributeObserver.started},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.attributeObserver.start()},e.prototype.stop=function(){this.attributeObserver.stop()},e.prototype.refresh=function(){this.attributeObserver.refresh()},Object.defineProperty(e.prototype,"element",{get:function(){return this.attributeObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this.attributeObserver.attributeName},enumerable:!1,configurable:!0}),e.prototype.elementMatchedAttribute=function(e){this.tokensMatched(this.readTokensForElement(e))},e.prototype.elementAttributeValueChanged=function(e){var t=this.refreshTokensForElement(e),n=t[0],r=t[1];this.tokensUnmatched(n),this.tokensMatched(r)},e.prototype.elementUnmatchedAttribute=function(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))},e.prototype.tokensMatched=function(e){var t=this;e.forEach((function(e){return t.tokenMatched(e)}))},e.prototype.tokensUnmatched=function(e){var t=this;e.forEach((function(e){return t.tokenUnmatched(e)}))},e.prototype.tokenMatched=function(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)},e.prototype.tokenUnmatched=function(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)},e.prototype.refreshTokensForElement=function(e){var t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),r=function(e,t){var n=Math.max(e.length,t.length);return Array.from({length:n},(function(n,r){return[e[r],t[r]]}))}(t,n).findIndex((function(e){return!function(e,t){return e&&t&&e.index==t.index&&e.content==t.content}(e[0],e[1])}));return-1==r?[[],[]]:[t.slice(r),n.slice(r)]},e.prototype.readTokensForElement=function(e){var t=this.attributeName;return function(e,t,n){return e.trim().split(/\s+/).filter((function(e){return e.length})).map((function(e,r){return{element:t,attributeName:n,content:e,index:r}}))}(e.getAttribute(t)||"",e,t)},e}();var pt=function(){function e(e,t,n){this.tokenListObserver=new ft(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}return Object.defineProperty(e.prototype,"started",{get:function(){return this.tokenListObserver.started},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.tokenListObserver.start()},e.prototype.stop=function(){this.tokenListObserver.stop()},e.prototype.refresh=function(){this.tokenListObserver.refresh()},Object.defineProperty(e.prototype,"element",{get:function(){return this.tokenListObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this.tokenListObserver.attributeName},enumerable:!1,configurable:!0}),e.prototype.tokenMatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))},e.prototype.tokenUnmatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))},e.prototype.fetchParseResultForToken=function(e){var t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t},e.prototype.fetchValuesByTokenForElement=function(e){var t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t},e.prototype.parseToken=function(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(e){return{error:e}}},e}(),dt=function(){function e(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}return e.prototype.start=function(){this.valueListObserver||(this.valueListObserver=new pt(this.element,this.actionAttribute,this),this.valueListObserver.start())},e.prototype.stop=function(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())},Object.defineProperty(e.prototype,"element",{get:function(){return this.context.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.context.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actionAttribute",{get:function(){return this.schema.actionAttribute},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.context.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return Array.from(this.bindingsByAction.values())},enumerable:!1,configurable:!0}),e.prototype.connectAction=function(e){var t=new tt(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)},e.prototype.disconnectAction=function(e){var t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))},e.prototype.disconnectAllActions=function(){var e=this;this.bindings.forEach((function(t){return e.delegate.bindingDisconnected(t)})),this.bindingsByAction.clear()},e.prototype.parseValueForToken=function(e){var t=Ge.forToken(e);if(t.identifier==this.identifier)return t},e.prototype.elementMatchedValue=function(e,t){this.connectAction(t)},e.prototype.elementUnmatchedValue=function(e,t){this.disconnectAction(t)},e}(),ht=function(){function e(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new it(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap,this.invokeChangedCallbacksForDefaultValues()}return e.prototype.start=function(){this.stringMapObserver.start()},e.prototype.stop=function(){this.stringMapObserver.stop()},Object.defineProperty(e.prototype,"element",{get:function(){return this.context.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controller",{get:function(){return this.context.controller},enumerable:!1,configurable:!0}),e.prototype.getStringMapKeyForAttribute=function(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name},e.prototype.stringMapValueChanged=function(e,t){this.invokeChangedCallbackForValue(t)},e.prototype.invokeChangedCallbacksForDefaultValues=function(){for(var e=0,t=this.valueDescriptors;e<t.length;e++){var n=t[e],r=n.key,i=n.name;null==n.defaultValue||this.controller.data.has(r)||this.invokeChangedCallbackForValue(i)}},e.prototype.invokeChangedCallbackForValue=function(e){var t=e+"Changed",n=this.receiver[t];if("function"==typeof n){var r=this.receiver[e];n.call(this.receiver,r)}},Object.defineProperty(e.prototype,"valueDescriptors",{get:function(){var e=this.valueDescriptorMap;return Object.keys(e).map((function(t){return e[t]}))},enumerable:!1,configurable:!0}),e}(),mt=function(){function e(e,t){this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new dt(this,this.dispatcher),this.valueObserver=new ht(this,this.controller);try{this.controller.initialize()}catch(e){this.handleError(e,"initializing controller")}}return e.prototype.connect=function(){this.bindingObserver.start(),this.valueObserver.start();try{this.controller.connect()}catch(e){this.handleError(e,"connecting controller")}},e.prototype.disconnect=function(){try{this.controller.disconnect()}catch(e){this.handleError(e,"disconnecting controller")}this.valueObserver.stop(),this.bindingObserver.stop()},Object.defineProperty(e.prototype,"application",{get:function(){return this.module.application},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.module.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.application.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dispatcher",{get:function(){return this.application.dispatcher},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.element.parentElement},enumerable:!1,configurable:!0}),e.prototype.handleError=function(e,t,n){void 0===n&&(n={});var r=this,i=r.identifier,o=r.controller,s=r.element;n=Object.assign({identifier:i,controller:o,element:s},n),this.application.handleError(e,"Error "+t,n)},e}();function gt(e,t){var n=vt(e);return Array.from(n.reduce((function(e,n){return function(e,t){var n=e[t];return Array.isArray(n)?n:[]}(n,t).forEach((function(t){return e.add(t)})),e}),new Set))}function yt(e,t){return vt(e).reduce((function(e,n){return e.push.apply(e,function(e,t){var n=e[t];return n?Object.keys(n).map((function(e){return[e,n[e]]})):[]}(n,t)),e}),[])}function vt(e){for(var t=[];e;)t.push(e),e=Object.getPrototypeOf(e);return t.reverse()}var bt=window&&window.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=window&&window.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};function Ot(e){return function(e,t){var n=Tt(e),r=function(e,t){return Et(t).reduce((function(n,r){var i,o=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e,n);if(!r||!("value"in r)){var i=Object.getOwnPropertyDescriptor(t,n).value;return r&&(i.get=r.get||i.get,i.set=r.set||i.set),i}}(e,t,r);return o&&Object.assign(n,((i={})[r]=o,i)),n}),{})}(e.prototype,t);return Object.defineProperties(n.prototype,r),n}(e,function(e){return gt(e,"blessings").reduce((function(t,n){var r=n(e);for(var i in r){var o=t[i]||{};t[i]=Object.assign(o,r[i])}return t}),{})}(e))}var Et="function"==typeof Object.getOwnPropertySymbols?function(e){return wt(Object.getOwnPropertyNames(e),Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Tt=function(){function e(e){function t(){var n=this&&this instanceof t?this.constructor:void 0;return Reflect.construct(e,arguments,n)}return t.prototype=Object.create(e.prototype,{constructor:{value:t}}),Reflect.setPrototypeOf(t,e),t}try{return(t=e((function(){this.a.call(this)}))).prototype.a=function(){},new t,e}catch(e){return function(e){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bt(t,e),t}(e)}}var t}();var At=function(){function e(e,t){this.application=e,this.definition=function(e){return{identifier:e.identifier,controllerConstructor:Ot(e.controllerConstructor)}}(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this.definition.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerConstructor",{get:function(){return this.definition.controllerConstructor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contexts",{get:function(){return Array.from(this.connectedContexts)},enumerable:!1,configurable:!0}),e.prototype.connectContextForScope=function(e){var t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()},e.prototype.disconnectContextForScope=function(e){var t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())},e.prototype.fetchContextForScope=function(e){var t=this.contextsByScope.get(e);return t||(t=new mt(this,e),this.contextsByScope.set(e,t)),t},e}(),kt=function(){function e(e){this.scope=e}return e.prototype.has=function(e){return this.data.has(this.getDataKey(e))},e.prototype.get=function(e){return this.data.get(this.getDataKey(e))},e.prototype.getAttributeName=function(e){return this.data.getAttributeNameForKey(this.getDataKey(e))},e.prototype.getDataKey=function(e){return e+"-class"},Object.defineProperty(e.prototype,"data",{get:function(){return this.scope.data},enumerable:!1,configurable:!0}),e}();function xt(e){return e.replace(/(?:[_-])([a-z0-9])/g,(function(e,t){return t.toUpperCase()}))}function Ct(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Lt(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()}))}var jt=function(){function e(e){this.scope=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!1,configurable:!0}),e.prototype.get=function(e){var t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)},e.prototype.set=function(e,t){var n=this.getAttributeNameForKey(e);return this.element.setAttribute(n,t),this.get(e)},e.prototype.has=function(e){var t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)},e.prototype.delete=function(e){if(this.has(e)){var t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}return!1},e.prototype.getAttributeNameForKey=function(e){return"data-"+this.identifier+"-"+Lt(e)},e}(),Pt=function(){function e(e){this.warnedKeysByObject=new WeakMap,this.logger=e}return e.prototype.warn=function(e,t,n){var r=this.warnedKeysByObject.get(e);r||(r=new Set,this.warnedKeysByObject.set(e,r)),r.has(t)||(r.add(t),this.logger.warn(n,e))},e}();function Mt(e,t){return"["+e+'~="'+t+'"]'}var Bt=window&&window.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},St=function(){function e(e){this.scope=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.scope.schema},enumerable:!1,configurable:!0}),e.prototype.has=function(e){return null!=this.find(e)},e.prototype.find=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce((function(t,n){return t||e.findTarget(n)||e.findLegacyTarget(n)}),void 0)},e.prototype.findAll=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reduce((function(t,n){return Bt(t,e.findAllTargets(n),e.findAllLegacyTargets(n))}),[])},e.prototype.findTarget=function(e){var t=this.getSelectorForTargetName(e);return this.scope.findElement(t)},e.prototype.findAllTargets=function(e){var t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)},e.prototype.getSelectorForTargetName=function(e){return Mt("data-"+this.identifier+"-target",e)},e.prototype.findLegacyTarget=function(e){var t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)},e.prototype.findAllLegacyTargets=function(e){var t=this,n=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(n).map((function(n){return t.deprecate(n,e)}))},e.prototype.getLegacySelectorForTargetName=function(e){var t=this.identifier+"."+e;return Mt(this.schema.targetAttribute,t)},e.prototype.deprecate=function(e,t){if(e){var n=this.identifier,r=this.schema.targetAttribute;this.guide.warn(e,"target:"+t,"Please replace "+r+'="'+n+"."+t+'" with data-'+n+'-target="'+t+'". The '+r+" attribute is deprecated and will be removed in a future version of Stimulus.")}return e},Object.defineProperty(e.prototype,"guide",{get:function(){return this.scope.guide},enumerable:!1,configurable:!0}),e}(),_t=window&&window.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},Dt=function(){function e(e,t,n,r){var i=this;this.targets=new St(this),this.classes=new kt(this),this.data=new jt(this),this.containsElement=function(e){return e.closest(i.controllerSelector)===i.element},this.schema=e,this.element=t,this.identifier=n,this.guide=new Pt(r)}return e.prototype.findElement=function(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)},e.prototype.findAllElements=function(e){return _t(this.element.matches(e)?[this.element]:[],this.queryElements(e).filter(this.containsElement))},e.prototype.queryElements=function(e){return Array.from(this.element.querySelectorAll(e))},Object.defineProperty(e.prototype,"controllerSelector",{get:function(){return Mt(this.schema.controllerAttribute,this.identifier)},enumerable:!1,configurable:!0}),e}(),Nt=function(){function e(e,t,n){this.element=e,this.schema=t,this.delegate=n,this.valueListObserver=new pt(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}return e.prototype.start=function(){this.valueListObserver.start()},e.prototype.stop=function(){this.valueListObserver.stop()},Object.defineProperty(e.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!1,configurable:!0}),e.prototype.parseValueForToken=function(e){var t=e.element,n=e.content,r=this.fetchScopesByIdentifierForElement(t),i=r.get(n);return i||(i=this.delegate.createScopeForElementAndIdentifier(t,n),r.set(n,i)),i},e.prototype.elementMatchedValue=function(e,t){var n=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,n),1==n&&this.delegate.scopeConnected(t)},e.prototype.elementUnmatchedValue=function(e,t){var n=this.scopeReferenceCounts.get(t);n&&(this.scopeReferenceCounts.set(t,n-1),1==n&&this.delegate.scopeDisconnected(t))},e.prototype.fetchScopesByIdentifierForElement=function(e){var t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t},e}(),Vt=function(){function e(e){this.application=e,this.scopeObserver=new Nt(this.element,this.schema,this),this.scopesByIdentifier=new ut,this.modulesByIdentifier=new Map}return Object.defineProperty(e.prototype,"element",{get:function(){return this.application.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.application.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logger",{get:function(){return this.application.logger},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerAttribute",{get:function(){return this.schema.controllerAttribute},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modules",{get:function(){return Array.from(this.modulesByIdentifier.values())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contexts",{get:function(){return this.modules.reduce((function(e,t){return e.concat(t.contexts)}),[])},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.scopeObserver.start()},e.prototype.stop=function(){this.scopeObserver.stop()},e.prototype.loadDefinition=function(e){this.unloadIdentifier(e.identifier);var t=new At(this.application,e);this.connectModule(t)},e.prototype.unloadIdentifier=function(e){var t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)},e.prototype.getContextForElementAndIdentifier=function(e,t){var n=this.modulesByIdentifier.get(t);if(n)return n.contexts.find((function(t){return t.element==e}))},e.prototype.handleError=function(e,t,n){this.application.handleError(e,t,n)},e.prototype.createScopeForElementAndIdentifier=function(e,t){return new Dt(this.schema,e,t,this.logger)},e.prototype.scopeConnected=function(e){this.scopesByIdentifier.add(e.identifier,e);var t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)},e.prototype.scopeDisconnected=function(e){this.scopesByIdentifier.delete(e.identifier,e);var t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)},e.prototype.connectModule=function(e){this.modulesByIdentifier.set(e.identifier,e),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((function(t){return e.connectContextForScope(t)}))},e.prototype.disconnectModule=function(e){this.modulesByIdentifier.delete(e.identifier),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach((function(t){return e.disconnectContextForScope(t)}))},e}(),It={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target"},Ft=window&&window.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},Rt=window&&window.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Kt=window&&window.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},Wt=function(){function e(e,t){void 0===e&&(e=document.documentElement),void 0===t&&(t=It),this.logger=console,this.element=e,this.schema=t,this.dispatcher=new Je(this),this.router=new Vt(this)}return e.start=function(t,n){var r=new e(t,n);return r.start(),r},e.prototype.start=function(){return Ft(this,void 0,void 0,(function(){return Rt(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",e):e()}))];case 1:return e.sent(),this.dispatcher.start(),this.router.start(),[2]}}))}))},e.prototype.stop=function(){this.dispatcher.stop(),this.router.stop()},e.prototype.register=function(e,t){this.load({identifier:e,controllerConstructor:t})},e.prototype.load=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=Array.isArray(e)?e:Kt([e],n);i.forEach((function(e){return t.router.loadDefinition(e)}))},e.prototype.unload=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=Array.isArray(e)?e:Kt([e],n);i.forEach((function(e){return t.router.unloadIdentifier(e)}))},Object.defineProperty(e.prototype,"controllers",{get:function(){return this.router.contexts.map((function(e){return e.controller}))},enumerable:!1,configurable:!0}),e.prototype.getControllerForElementAndIdentifier=function(e,t){var n=this.router.getContextForElementAndIdentifier(e,t);return n?n.controller:null},e.prototype.handleError=function(e,t,n){this.logger.error("%s\n\n%o\n\n%o",t,e,n)},e}();function Ut(e){return gt(e,"classes").reduce((function(e,t){return Object.assign(e,((r={})[i=(n=t)+"Class"]={get:function(){var e=this.classes;if(e.has(n))return e.get(n);var t=e.getAttributeName(n);throw new Error('Missing attribute "'+t+'"')}},r["has"+Ct(i)]={get:function(){return this.classes.has(n)}},r));var n,r,i}),{})}function Ht(e){return gt(e,"targets").reduce((function(e,t){return Object.assign(e,((r={})[(n=t)+"Target"]={get:function(){var e=this.targets.find(n);if(e)return e;throw new Error('Missing target element "'+this.identifier+"."+n+'"')}},r[n+"Targets"]={get:function(){return this.targets.findAll(n)}},r["has"+Ct(n)+"Target"]={get:function(){return this.targets.has(n)}},r));var n,r}),{})}function qt(e){var t=yt(e,"values"),n={valueDescriptorMap:{get:function(){var e=this;return t.reduce((function(t,n){var r,i=zt(n),o=e.data.getAttributeNameForKey(i.key);return Object.assign(t,((r={})[o]=i,r))}),{})}}};return t.reduce((function(e,t){return Object.assign(e,function(e){var t,n=zt(e),r=n.type,i=n.key,o=n.name,s=Yt[r],a=Jt[r]||Jt.default;return(t={})[o]={get:function(){var e=this.data.get(i);return null!==e?s(e):n.defaultValue},set:function(e){void 0===e?this.data.delete(i):this.data.set(i,a(e))}},t["has"+Ct(o)]={get:function(){return this.data.has(i)}},t}(t))}),n)}function zt(e){return function(e,t){var n=Lt(e)+"-value";return{type:t,key:n,name:xt(n),get defaultValue(){return $t[t]}}}(e[0],function(e){switch(e){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}throw new Error('Unknown value type constant "'+e+'"')}(e[1]))}var $t={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Yt={array:function(e){var t=JSON.parse(e);if(!Array.isArray(t))throw new TypeError("Expected array");return t},boolean:function(e){return!("0"==e||"false"==e)},number:function(e){return parseFloat(e)},object:function(e){var t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError("Expected object");return t},string:function(e){return e}},Jt={default:function(e){return""+e},array:Xt,object:Xt};function Xt(e){return JSON.stringify(e)}var Qt=function(){function e(e){this.context=e}return Object.defineProperty(e.prototype,"application",{get:function(){return this.context.application},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scope",{get:function(){return this.context.scope},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.scope.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return this.scope.identifier},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targets",{get:function(){return this.scope.targets},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classes",{get:function(){return this.scope.classes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.scope.data},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){},e.prototype.connect=function(){},e.prototype.disconnect=function(){},e.blessings=[Ut,Ht,qt],e.targets=[],e.values={},e}();function Gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zt(e,t,n){return t&&Gt(e.prototype,t),n&&Gt(e,n),e}function en(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(function(e){function t(){return e.apply(this,arguments)||this}en(t,e);var n=t.prototype;return n.initialize=function(){this.hide()},n.connect=function(){var e=this;setTimeout((function(){e.show()}),200),this.hasDismissAfterValue&&setTimeout((function(){e.close()}),this.dismissAfterValue)},n.close=function(){var e=this;this.hide(),setTimeout((function(){e.element.remove()}),1100)},n.show=function(){this.element.setAttribute("style","transition: 1s; transform:translate(0, 0);")},n.hide=function(){this.element.setAttribute("style","transition: 1s; transform:translate(400px, 0);")},t}(Qt)).values={dismissAfter:Number},(function(e){function t(){return e.apply(this,arguments)||this}en(t,e);var n=t.prototype;return n.connect=function(){this.timeout=null,this.duration=this.data.get("duration")||1e3},n.save=function(){var e=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){e.statusTarget.textContent="Saving...",Rails.fire(e.formTarget,"submit")}),this.duration)},n.success=function(){this.setStatus("Saved!")},n.error=function(){this.setStatus("Unable to save!")},n.setStatus=function(e){var t=this;this.statusTarget.textContent=e,this.timeout=setTimeout((function(){t.statusTarget.textContent=""}),2e3)},t}(Qt)).targets=["form","status"];var tn=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this)._onMenuButtonKeydown=function(e){switch(e.keyCode){case 13:case 32:e.preventDefault(),t.toggle()}},t}en(t,e);var n=t.prototype;return n.connect=function(){this.toggleClass=this.data.get("class")||"hidden",this.visibleClass=this.data.get("visibleClass")||null,this.invisibleClass=this.data.get("invisibleClass")||null,this.activeClass=this.data.get("activeClass")||null,this.enteringClass=this.data.get("enteringClass")||null,this.leavingClass=this.data.get("leavingClass")||null,this.hasButtonTarget&&this.buttonTarget.addEventListener("keydown",this._onMenuButtonKeydown),this.element.setAttribute("aria-haspopup","true")},n.disconnect=function(){this.hasButtonTarget&&this.buttonTarget.removeEventListener("keydown",this._onMenuButtonKeydown)},n.toggle=function(){this.openValue=!this.openValue},n.openValueChanged=function(){this.openValue?this._show():this._hide()},n._show=function(e){var t=this;setTimeout(function(){t.menuTarget.classList.remove(t.toggleClass),t.element.setAttribute("aria-expanded","true"),t._enteringClassList[0].forEach(function(e){t.menuTarget.classList.add(e)}.bind(t)),t._activeClassList[0].forEach((function(e){t.activeTarget.classList.add(e)})),t._invisibleClassList[0].forEach((function(e){return t.menuTarget.classList.remove(e)})),t._visibleClassList[0].forEach((function(e){t.menuTarget.classList.add(e)})),setTimeout(function(){t._enteringClassList[0].forEach((function(e){return t.menuTarget.classList.remove(e)}))}.bind(t),t.enterTimeout[0]),"function"==typeof e&&e()}.bind(this))},n._hide=function(e){var t=this;setTimeout(function(){t.element.setAttribute("aria-expanded","false"),t._invisibleClassList[0].forEach((function(e){return t.menuTarget.classList.add(e)})),t._visibleClassList[0].forEach((function(e){return t.menuTarget.classList.remove(e)})),t._activeClassList[0].forEach((function(e){return t.activeTarget.classList.remove(e)})),t._leavingClassList[0].forEach((function(e){return t.menuTarget.classList.add(e)})),setTimeout(function(){t._leavingClassList[0].forEach((function(e){return t.menuTarget.classList.remove(e)})),"function"==typeof e&&e(),t.menuTarget.classList.add(t.toggleClass)}.bind(t),t.leaveTimeout[0])}.bind(this))},n.show=function(){this.openValue=!0},n.hide=function(e){!1===this.element.contains(e.target)&&this.openValue&&(this.openValue=!1)},Zt(t,[{key:"activeTarget",get:function(){return this.data.has("activeTarget")?document.querySelector(this.data.get("activeTarget")):this.element}},{key:"_activeClassList",get:function(){return this.activeClass?this.activeClass.split(",").map((function(e){return e.split(" ")})):[[],[]]}},{key:"_visibleClassList",get:function(){return this.visibleClass?this.visibleClass.split(",").map((function(e){return e.split(" ")})):[[],[]]}},{key:"_invisibleClassList",get:function(){return this.invisibleClass?this.invisibleClass.split(",").map((function(e){return e.split(" ")})):[[],[]]}},{key:"_enteringClassList",get:function(){return this.enteringClass?this.enteringClass.split(",").map((function(e){return e.split(" ")})):[[],[]]}},{key:"_leavingClassList",get:function(){return this.leavingClass?this.leavingClass.split(",").map((function(e){return e.split(" ")})):[[],[]]}},{key:"enterTimeout",get:function(){return(this.data.get("enterTimeout")||"0,0").split(",").map((function(e){return parseInt(e)}))}},{key:"leaveTimeout",get:function(){return(this.data.get("leaveTimeout")||"0,0").split(",").map((function(e){return parseInt(e)}))}}]),t}(Qt);tn.targets=["menu","button"],tn.values={open:Boolean},(function(e){function t(){return e.apply(this,arguments)||this}en(t,e);var n=t.prototype;return n.connect=function(){this.toggleClass=this.data.get("class")||"hidden",this.backgroundId=this.data.get("backgroundId")||"modal-background",this.backgroundHtml=this.data.get("backgroundHtml")||this._backgroundHTML(),this.allowBackgroundClose="true"===(this.data.get("allowBackgroundClose")||"true"),this.preventDefaultActionOpening="true"===(this.data.get("preventDefaultActionOpening")||"true"),this.preventDefaultActionClosing="true"===(this.data.get("preventDefaultActionClosing")||"true")},n.disconnect=function(){this.close()},n.open=function(e){this.preventDefaultActionOpening&&e.preventDefault(),e.target.blur&&e.target.blur(),this.lockScroll(),this.containerTarget.classList.remove(this.toggleClass),this.data.get("disable-backdrop")||(document.body.insertAdjacentHTML("beforeend",this.backgroundHtml),this.background=document.querySelector("#"+this.backgroundId))},n.close=function(e){e&&this.preventDefaultActionClosing&&e.preventDefault(),this.unlockScroll(),this.containerTarget.classList.add(this.toggleClass),this.background&&this.background.remove()},n.closeBackground=function(e){this.allowBackgroundClose&&e.target===this.containerTarget&&this.close(e)},n.closeWithKeyboard=function(e){27!==e.keyCode||this.containerTarget.classList.contains(this.toggleClass)||this.close(e)},n._backgroundHTML=function(){return'<div id="'+this.backgroundId+'" class="fixed top-0 left-0 w-full h-full" style="background-color: rgba(0, 0, 0, 0.8); z-index: 9998;"></div>'},n.lockScroll=function(){var e=window.innerWidth-document.documentElement.clientWidth;document.body.style.paddingRight=e+"px",this.saveScrollPosition(),document.body.classList.add("fixed","inset-x-0","overflow-hidden"),document.body.style.top="-"+this.scrollPosition+"px"},n.unlockScroll=function(){document.body.style.paddingRight=null,document.body.classList.remove("fixed","inset-x-0","overflow-hidden"),this.restoreScrollPosition(),document.body.style.top=null},n.saveScrollPosition=function(){this.scrollPosition=window.pageYOffset||document.body.scrollTop},n.restoreScrollPosition=function(){document.documentElement.scrollTop=this.scrollPosition},t}(Qt)).targets=["container"],(function(e){function t(){return e.apply(this,arguments)||this}en(t,e);var n=t.prototype;return n.connect=function(){var e=this;this.activeTabClasses=(this.data.get("activeTab")||"active").split(" "),this.inactiveTabClasses=(this.data.get("inactiveTab")||"inactive").split(" "),this.anchor&&(this.index=this.tabTargets.findIndex((function(t){return t.id===e.anchor}))),this.showTab()},n.change=function(e){e.preventDefault(),this.index=e.currentTarget.dataset.index?e.currentTarget.dataset.index:e.currentTarget.dataset.id?this.tabTargets.findIndex((function(t){return t.id==e.currentTarget.dataset.id})):this.tabTargets.indexOf(e.currentTarget),window.dispatchEvent(new CustomEvent("tsc:tab-change"))},n.showTab=function(){var e=this;this.tabTargets.forEach((function(t,n){var r,i,o,s,a=e.panelTargets[n];n===e.index?(a.classList.remove("hidden"),(r=t.classList).remove.apply(r,e.inactiveTabClasses),(i=t.classList).add.apply(i,e.activeTabClasses),t.id&&(location.hash=t.id)):(a.classList.add("hidden"),(o=t.classList).remove.apply(o,e.activeTabClasses),(s=t.classList).add.apply(s,e.inactiveTabClasses))}))},Zt(t,[{key:"index",get:function(){return parseInt(this.data.get("index")||0)},set:function(e){this.data.set("index",e>=0?e:0),this.showTab()}},{key:"anchor",get:function(){return document.URL.split("#").length>1?document.URL.split("#")[1]:null}}]),t}(Qt)).targets=["tab","panel"];var nn=function(e){function t(){return e.apply(this,arguments)||this}en(t,e);var n=t.prototype;return n.connect=function(){this.toggleClass=this.data.get("class")||"hidden"},n.toggle=function(e){e.preventDefault(),this.openValue=!this.openValue},n.hide=function(e){e.preventDefault(),this.openValue=!1},n.show=function(e){e.preventDefault(),this.openValue=!0},n.openValueChanged=function(){var e=this;this.toggleClass&&this.toggleableTargets.forEach((function(t){t.classList.toggle(e.toggleClass)}))},t}(Qt);function rn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function on(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sn(e,t,n){return t&&on(e.prototype,t),n&&on(e,n),e}function an(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ln(e,t)}function un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ln(e,t){return(ln=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fn(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function pn(e,t,n){return(pn=fn()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&ln(i,n.prototype),i}).apply(null,arguments)}function dn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hn(e){var t=fn();return function(){var n,r=un(e);if(t){var i=un(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dn(this,n)}}function mn(e){return function(e){if(Array.isArray(e))return gn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}nn.targets=["toggleable"],nn.values={open:Boolean},(function(e){function t(){return e.apply(this,arguments)||this}en(t,e);var n=t.prototype;return n.initialize=function(){this.contentTarget.setAttribute("style","transform:translate("+this.data.get("translateX")+", "+this.data.get("translateY")+");")},n.mouseOver=function(){this.contentTarget.classList.remove("hidden")},n.mouseOut=function(){this.contentTarget.classList.add("hidden")},t}(Qt)).targets=["content"],(function(e){function t(){return e.apply(this,arguments)||this}en(t,e);var n=t.prototype;return n._show=function(){var t=this;this.overlayTarget.classList.remove(this.toggleClass),e.prototype._show.call(this,function(){t._activeClassList[1].forEach((function(e){return t.overlayTarget.classList.add(e)})),t._invisibleClassList[1].forEach((function(e){return t.overlayTarget.classList.remove(e)})),t._visibleClassList[1].forEach((function(e){return t.overlayTarget.classList.add(e)})),setTimeout(function(){t._enteringClassList[1].forEach((function(e){return t.overlayTarget.classList.remove(e)}))}.bind(t),t.enterTimeout[1])}.bind(this))},n._hide=function(){var t=this;this._leavingClassList[1].forEach((function(e){return t.overlayTarget.classList.add(e)})),e.prototype._hide.call(this,function(){setTimeout(function(){t._visibleClassList[1].forEach((function(e){return t.overlayTarget.classList.remove(e)})),t._invisibleClassList[1].forEach((function(e){return t.overlayTarget.classList.add(e)})),t._activeClassList[1].forEach((function(e){return t.overlayTarget.classList.remove(e)})),t._leavingClassList[1].forEach((function(e){return t.overlayTarget.classList.remove(e)})),t.overlayTarget.classList.add(t.toggleClass)}.bind(t),t.leaveTimeout[1])}.bind(this))},t}(tn)).targets=["menu","overlay"],(function(e){function t(){return e.apply(this,arguments)||this}en(t,e);var n=t.prototype;return n.connect=function(){this.styleProperty=this.data.get("style")||"backgroundColor"},n.update=function(){this.preview=this.color},n._getContrastYIQ=function(e){return e=e.replace("#",""),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"},Zt(t,[{key:"preview",set:function(e){this.previewTarget.style[this.styleProperty]=e;var t=this._getContrastYIQ(e);"color"===this.styleProperty?this.previewTarget.style.backgroundColor=t:this.previewTarget.style.color=t}},{key:"color",get:function(){return this.colorTarget.value}}]),t}(Qt)).targets=["preview","color"];var yn=function(e){cn(n,e);var t=hn(n);function n(){return rn(this,n),t.apply(this,arguments)}return sn(n,[{key:"connect",value:function(){this.setCount()}},{key:"checkAll",value:function(){this.setAllCheckboxes(!0),this.setCount()}},{key:"checkNone",value:function(){this.setAllCheckboxes(!1),this.setCount()}},{key:"onChecked",value:function(){this.setCount()}},{key:"setAllCheckboxes",value:function(e){this.checkboxes.forEach((function(t){var n=t;n.disabled||(n.checked=e)}))}},{key:"setCount",value:function(){if(this.hasCountTarget){var e=this.selectedCheckboxes.length;this.countTarget.innerHTML="".concat(e," selected")}}},{key:"selectedCheckboxes",get:function(){return this.checkboxes.filter((function(e){return e.checked}))}},{key:"checkboxes",get:function(){return pn(Array,mn(this.element.querySelectorAll("input[type=checkbox]")))}}]),n}(Qt);an(yn,"targets",["count"]);var vn=function(e){cn(n,e);var t=hn(n);function n(){return rn(this,n),t.apply(this,arguments)}return sn(n,[{key:"selectAll",value:function(e){var t=e.target.checked;this.allTarget.indeterminate=!1,this._setAllCheckboxes(t),this._dispatch("change",{count:this.selectedCount})}},{key:"onSelected",value:function(){this.allTarget.indeterminate=!!this._indeterminate,this._dispatch("change",{count:this.selectedCount})}},{key:"selectedCount",get:function(){return this.selected.length}},{key:"selected",get:function(){return this.selectables.filter((function(e){return e.checked}))}},{key:"selectables",get:function(){return pn(Array,mn(this.selectableTargets))}},{key:"_setAllCheckboxes",value:function(e){this.selectables.forEach((function(t){var n=t;n.disabled||(n.checked=e)}))}},{key:"_indeterminate",get:function(){return this.selected.length!==this.selectableTargets.length&&this.selected.length>0}},{key:"_dispatch",value:function(e,t){window.dispatchEvent(new CustomEvent("rmp:select:".concat(e),{bubbles:!0,detail:t}))}}]),n}(Qt);an(vn,"targets",["all","selectable"]);var bn=function(e){cn(n,e);var t=hn(n);function n(){return rn(this,n),t.apply(this,arguments)}return sn(n,[{key:"apply",value:function(){location.href="".concat(window.location.pathname,"?").concat(this.params)}},{key:"post",value:function(){var e=document.head.querySelector('meta[name="csrf-token"]').content,t="".concat(window.location.pathname,"/destroy_all?").concat(this.params);fetch(t,{method:"DELETE",redirect:"follow",headers:{"Content-Type":"application/json",credentials:"same-origin"},body:JSON.stringify({authenticity_token:e})}).then((function(e){e.redirected&&(window.location.href=e.url)}))}},{key:"params",get:function(){return this.activeFilterTargets().map((function(e){return"".concat(e.name,"=").concat(e.value)})).join("&")}},{key:"activeFilterTargets",value:function(){return this.filterTargets.filter((function(e){return"checkbox"===e.type||"radio"===e.type?e.checked:e.value.length>0}))}}]),n}(Qt);an(bn,"targets",["filter"]);var wn=function(e){cn(n,e);var t=hn(n);function n(){return rn(this,n),t.apply(this,arguments)}return sn(n,[{key:"clear",value:function(){this.eventTarget.value=null,window.dispatchEvent(new CustomEvent("search-controller:submit",{}))}},{key:"submit",value:function(e){e.preventDefault(),"Enter"!==e.key&&"click"!==e.type||window.dispatchEvent(new CustomEvent("search-controller:submit",{}))}}]),n}(Qt);an(wn,"targets",["field"]);var On=function(e){cn(n,e);var t=hn(n);function n(){return rn(this,n),t.apply(this,arguments)}return sn(n,[{key:"enable",value:function(){this.enableTarget.disabled=!1}},{key:"disable",value:function(){this.enableTarget.disabled=!0}},{key:"change",value:function(e){e.type.match(/rmp:select:.*/)&&(e.detail.count>0?this.enable():this.disable())}}]),n}(Qt);an(On,"targets",["enable"]);var En=Wt.start();En.register("dropdown",tn),En.register("checklist",yn),En.register("selectable",vn),En.register("filters",bn),En.register("search",wn),En.register("enable",On),document.addEventListener("DOMContentLoaded",(function(){var e;!function(){var e=document.getElementById("profiled-requests-table");if(e)for(var t=e.rows,n=function(t){var n=e.rows[t],r=n.dataset.link;r&&(n.onclick=function(){window.location.href=r})},r=1;r<t.length;r++)n(r)}(),document.querySelectorAll(".trace-bar").forEach((function(e){$e(e,{trigger:"click",content:e.children[0],theme:"rmp",maxWidth:"700px",placement:"bottom",interactive:!0,onShow:function(e){e.popper.querySelector(".popover-close").addEventListener("click",(function(){e.hide()}))},onHide:function(e){e.popper.querySelector(".popover-close").removeEventListener("click",(function(){e.hide()}))}})})),(e=document.getElementById("trace-search"))&&e.addEventListener("keyup",(function(e){"Enter"===e.key&&(e.preventDefault(),document.getElementById("trace-form").submit())}))}),!1)}));
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_mini_profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - hschne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-28 00:00:00.000000000 Z
11
+ date: 2021-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inline_svg
@@ -85,15 +85,26 @@ files:
85
85
  - app/helpers/rails_mini_profiler/profiled_requests_helper.rb
86
86
  - app/javascript/images/bookmark.svg
87
87
  - app/javascript/images/chart.svg
88
+ - app/javascript/images/check.svg
89
+ - app/javascript/images/chevron.svg
88
90
  - app/javascript/images/delete.svg
91
+ - app/javascript/images/filter.svg
89
92
  - app/javascript/images/graph.svg
90
93
  - app/javascript/images/logo.svg
91
94
  - app/javascript/images/logo_variant.svg
92
95
  - app/javascript/images/search.svg
93
96
  - app/javascript/images/setting.svg
94
97
  - app/javascript/images/show.svg
98
+ - app/javascript/js/checklist_controller.js
99
+ - app/javascript/js/enable_controller.js
100
+ - app/javascript/js/filter_controller.js
101
+ - app/javascript/js/search_controller.js
102
+ - app/javascript/js/select_controller.js
95
103
  - app/javascript/packs/rails-mini-profiler.js
104
+ - app/javascript/stylesheets/components/page_header/page_header.scss
96
105
  - app/javascript/stylesheets/components/pagination.scss
106
+ - app/javascript/stylesheets/components/profiled_request_table/placeholder.scss
107
+ - app/javascript/stylesheets/components/profiled_request_table/profiled_request_table.scss
97
108
  - app/javascript/stylesheets/flamegraph.scss
98
109
  - app/javascript/stylesheets/flashes.scss
99
110
  - app/javascript/stylesheets/navbar.scss
@@ -119,6 +130,8 @@ files:
119
130
  - app/presenters/rails_mini_profiler/rmp_trace_presenter.rb
120
131
  - app/presenters/rails_mini_profiler/sequel_trace_presenter.rb
121
132
  - app/presenters/rails_mini_profiler/trace_presenter.rb
133
+ - app/search/rails_mini_profiler/base_search.rb
134
+ - app/search/rails_mini_profiler/profiled_request_search.rb
122
135
  - app/views/layouts/rails_mini_profiler/application.html.erb
123
136
  - app/views/layouts/rails_mini_profiler/flamegraph.html.erb
124
137
  - app/views/models/_flamegraph.json.jb
@@ -130,6 +143,11 @@ files:
130
143
  - app/views/rails_mini_profiler/profiled_requests/index.html.erb
131
144
  - app/views/rails_mini_profiler/profiled_requests/index.json.jb
132
145
  - app/views/rails_mini_profiler/profiled_requests/shared/_trace.html.erb
146
+ - app/views/rails_mini_profiler/profiled_requests/shared/header/_header.erb
147
+ - app/views/rails_mini_profiler/profiled_requests/shared/table/_placeholder.erb
148
+ - app/views/rails_mini_profiler/profiled_requests/shared/table/_table.erb
149
+ - app/views/rails_mini_profiler/profiled_requests/shared/table/_table_head.erb
150
+ - app/views/rails_mini_profiler/profiled_requests/shared/table/_table_row.erb
133
151
  - app/views/rails_mini_profiler/profiled_requests/show.html.erb
134
152
  - app/views/rails_mini_profiler/profiled_requests/show.json.jb
135
153
  - app/views/rails_mini_profiler/shared/_flashes.html.erb
@@ -152,12 +170,20 @@ files:
152
170
  - lib/rails_mini_profiler/logger.rb
153
171
  - lib/rails_mini_profiler/middleware.rb
154
172
  - lib/rails_mini_profiler/models/base_model.rb
155
- - lib/rails_mini_profiler/models/trace.rb
156
173
  - lib/rails_mini_profiler/redirect.rb
157
174
  - lib/rails_mini_profiler/request_context.rb
158
175
  - lib/rails_mini_profiler/request_wrapper.rb
159
176
  - lib/rails_mini_profiler/response_wrapper.rb
160
- - lib/rails_mini_profiler/tracers.rb
177
+ - lib/rails_mini_profiler/tracing.rb
178
+ - lib/rails_mini_profiler/tracing/controller_tracer.rb
179
+ - lib/rails_mini_profiler/tracing/null_trace.rb
180
+ - lib/rails_mini_profiler/tracing/sequel_tracer.rb
181
+ - lib/rails_mini_profiler/tracing/sequel_tracker.rb
182
+ - lib/rails_mini_profiler/tracing/subscriptions.rb
183
+ - lib/rails_mini_profiler/tracing/trace.rb
184
+ - lib/rails_mini_profiler/tracing/trace_factory.rb
185
+ - lib/rails_mini_profiler/tracing/tracer.rb
186
+ - lib/rails_mini_profiler/tracing/view_tracer.rb
161
187
  - lib/rails_mini_profiler/user.rb
162
188
  - lib/rails_mini_profiler/version.rb
163
189
  - lib/tasks/rails_mini_profiler_tasks.rake
@@ -179,7 +205,10 @@ files:
179
205
  - public/rails_mini_profiler/speedscope/speedscope.026f36b0.js.map
180
206
  - vendor/assets/images/bookmark.svg
181
207
  - vendor/assets/images/chart.svg
208
+ - vendor/assets/images/check.svg
209
+ - vendor/assets/images/chevron.svg
182
210
  - vendor/assets/images/delete.svg
211
+ - vendor/assets/images/filter.svg
183
212
  - vendor/assets/images/graph.svg
184
213
  - vendor/assets/images/logo.svg
185
214
  - vendor/assets/images/logo_variant.svg
@@ -1,85 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RailsMiniProfiler
4
- class Tracers
5
- DEFAULT_SUBSCRIPTIONS = %w[
6
- sql.active_record
7
- instantiation.active_record
8
- render_template.action_view
9
- render_partial.action_view
10
- process_action.action_controller
11
- rails_mini_profiler.total_time
12
- ].freeze
13
-
14
- class << self
15
- def setup!(&callback)
16
- DEFAULT_SUBSCRIPTIONS.each do |event|
17
- subscribe(event, &callback)
18
- end
19
- end
20
-
21
- def build_trace(event)
22
- start = (event.time.to_f * 100_000).to_i
23
- finish = (event.end.to_f * 100_000).to_i
24
- Models::Trace.new(
25
- name: event.name,
26
- start: start,
27
- finish: finish,
28
- duration: finish - start,
29
- allocations: event.allocations,
30
- backtrace: Rails.backtrace_cleaner.clean(caller),
31
- payload: format_payload(event)
32
- )
33
- end
34
-
35
- private
36
-
37
- def subscribe(*subscriptions, &callback)
38
- subscriptions.each do |subscription|
39
- ActiveSupport::Notifications.subscribe(subscription) do |event|
40
- callback.call(event)
41
- end
42
- end
43
- end
44
-
45
- def format_payload(event)
46
- case event.name
47
- when 'sql.active_record'
48
- transform_sql_event(event)
49
- when 'render_template.action_view', 'render_partial.action_view'
50
- event.payload.slice(:identifier, :count)
51
- when 'process_action.action_controller'
52
- transform_controller_event(event)
53
- else
54
- event.payload
55
- end
56
- end
57
-
58
- def transform_sql_event(event)
59
- payload = event.payload.slice(:name, :sql, :binds, :type_casted_binds)
60
- typecasted_binds = payload[:type_casted_binds]
61
- # Sometimes, typecasted binds are a proc. Not sure why. In those instances, we extract the typecasted
62
- # values from the proc by executing call.
63
- typecasted_binds = typecasted_binds.call if typecasted_binds.respond_to?(:call)
64
- payload[:binds] = transform_binds(payload[:binds], typecasted_binds)
65
- payload.delete(:type_casted_binds)
66
- payload.reject { |_k, v| v.blank? }
67
- end
68
-
69
- def transform_binds(binds, type_casted_binds)
70
- binds.each_with_object([]).with_index do |(binding, object), i|
71
- name = binding.name
72
- value = type_casted_binds[i]
73
- object << { name: name, value: value }
74
- end
75
- end
76
-
77
- def transform_controller_event(event)
78
- payload = event.payload
79
- .slice(:view_runtime, :db_runtime)
80
- .transform_values { |value| value&.round(2) }
81
- payload.reject { |_k, v| v.blank? }
82
- end
83
- end
84
- end
85
- end