avo 2.19.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -2
  3. data/Gemfile.lock +6 -6
  4. data/app/components/avo/card_component.html.erb +15 -15
  5. data/app/components/avo/card_component.rb +7 -5
  6. data/app/components/avo/empty_state_component.html.erb +1 -1
  7. data/app/components/avo/empty_state_component.rb +12 -10
  8. data/app/components/avo/fields/belongs_to_field/edit_component.rb +1 -1
  9. data/app/components/avo/fields/boolean_field/edit_component.html.erb +1 -1
  10. data/app/components/avo/fields/boolean_group_field/edit_component.html.erb +1 -1
  11. data/app/components/avo/fields/code_field/edit_component.html.erb +2 -2
  12. data/app/components/avo/fields/country_field/edit_component.html.erb +1 -1
  13. data/app/components/avo/fields/date_field/edit_component.html.erb +2 -2
  14. data/app/components/avo/fields/date_time_field/edit_component.html.erb +2 -2
  15. data/app/components/avo/fields/edit_component.rb +4 -0
  16. data/app/components/avo/fields/external_image_field/edit_component.html.erb +1 -1
  17. data/app/components/avo/fields/file_field/edit_component.html.erb +1 -1
  18. data/app/components/avo/fields/files_field/edit_component.html.erb +1 -1
  19. data/app/components/avo/fields/has_one_field/show_component.html.erb +3 -3
  20. data/app/components/avo/fields/markdown_field/edit_component.html.erb +1 -1
  21. data/app/components/avo/fields/markdown_field/show_component.html.erb +1 -1
  22. data/app/components/avo/fields/number_field/edit_component.html.erb +1 -1
  23. data/app/components/avo/fields/password_field/edit_component.html.erb +1 -1
  24. data/app/components/avo/fields/progress_bar_field/edit_component.html.erb +1 -1
  25. data/app/components/avo/fields/select_field/edit_component.html.erb +2 -2
  26. data/app/components/avo/fields/show_component.rb +4 -0
  27. data/app/components/avo/fields/status_field/edit_component.html.erb +1 -1
  28. data/app/components/avo/fields/tags_field/edit_component.html.erb +2 -2
  29. data/app/components/avo/fields/text_field/edit_component.html.erb +1 -1
  30. data/app/components/avo/fields/textarea_field/edit_component.html.erb +1 -1
  31. data/app/components/avo/fields/time_field/edit_component.html.erb +2 -2
  32. data/app/components/avo/fields/trix_field/edit_component.html.erb +3 -2
  33. data/app/components/avo/fields/trix_field/edit_component.rb +5 -1
  34. data/app/components/avo/index/resource_grid_component.html.erb +1 -1
  35. data/app/components/avo/index/resource_table_component.rb +3 -3
  36. data/app/components/avo/paginator_component.html.erb +1 -5
  37. data/app/components/avo/paginator_component.rb +8 -0
  38. data/app/components/avo/panel_component.html.erb +1 -1
  39. data/app/components/avo/resource_component.rb +17 -2
  40. data/app/components/avo/sidebar/group_component.html.erb +18 -12
  41. data/app/components/avo/sidebar/heading_component.html.erb +17 -10
  42. data/app/components/avo/views/resource_index_component.html.erb +1 -1
  43. data/app/controllers/avo/actions_controller.rb +27 -5
  44. data/app/controllers/avo/application_controller.rb +3 -2
  45. data/app/controllers/avo/associations_controller.rb +2 -1
  46. data/app/controllers/avo/attachments_controller.rb +4 -0
  47. data/app/controllers/avo/base_controller.rb +27 -16
  48. data/app/controllers/avo/dashboards/cards_controller.rb +1 -1
  49. data/app/controllers/avo/dashboards_controller.rb +1 -0
  50. data/app/controllers/avo/search_controller.rb +11 -5
  51. data/app/javascript/js/controllers/fields/trix_field_controller.js +6 -3
  52. data/app/javascript/js/controllers/item_select_all_controller.js +7 -4
  53. data/app/views/avo/actions/keep_modal_open.turbo_stream.erb +5 -0
  54. data/app/views/avo/actions/show.html.erb +3 -2
  55. data/app/views/avo/base/_multiple_select_filter.html.erb +1 -1
  56. data/app/views/avo/partials/_resource_search.html.erb +1 -1
  57. data/app/views/layouts/avo/application.html.erb +1 -1
  58. data/avo.gemspec +0 -1
  59. data/config/i18n-tasks.yml +1 -1
  60. data/config/initializers/pagy.rb +16 -0
  61. data/lib/avo/app.rb +4 -1
  62. data/lib/avo/base_action.rb +25 -4
  63. data/lib/avo/base_card.rb +8 -3
  64. data/lib/avo/base_resource.rb +21 -6
  65. data/lib/avo/concerns/breadcrumbs.rb +96 -0
  66. data/lib/avo/concerns/handles_field_args.rb +8 -1
  67. data/lib/avo/concerns/has_html_attributes.rb +14 -16
  68. data/lib/avo/dashboards/base_dashboard.rb +7 -1
  69. data/lib/avo/fields/base_field.rb +2 -1
  70. data/lib/avo/fields/concerns/is_disabled.rb +19 -0
  71. data/lib/avo/fields/select_field.rb +39 -34
  72. data/lib/avo/filters/base_filter.rb +9 -3
  73. data/lib/avo/hosts/resource_record_host.rb +7 -0
  74. data/lib/avo/hosts/visibility_host.rb +2 -1
  75. data/lib/avo/services/authorization_service.rb +2 -2
  76. data/lib/avo/version.rb +1 -1
  77. data/lib/generators/avo/templates/field/components/edit_component.html.erb.tt +1 -1
  78. data/lib/generators/avo/templates/locales/avo.en.yml +3 -2
  79. data/lib/generators/avo/templates/locales/avo.fr.yml +3 -2
  80. data/lib/generators/avo/templates/locales/avo.nb.yml +3 -2
  81. data/lib/generators/avo/templates/locales/avo.nn.yml +3 -2
  82. data/lib/generators/avo/templates/locales/avo.pt-BR.yml +3 -2
  83. data/lib/generators/avo/templates/locales/avo.pt.yml +120 -0
  84. data/lib/generators/avo/templates/locales/avo.ro.yml +56 -55
  85. data/lib/generators/avo/templates/locales/avo.tr.yml +3 -2
  86. data/lib/generators/avo/templates/locales/pagy/nn.yml +15 -0
  87. data/lib/generators/avo/templates/locales/pagy/ro.yml +17 -0
  88. data/public/avo-assets/avo.base.css +4 -4
  89. data/public/avo-assets/avo.base.js +2 -2
  90. data/public/avo-assets/avo.base.js.map +2 -2
  91. metadata +9 -16
@@ -0,0 +1,120 @@
1
+ ---
2
+ pt:
3
+ avo:
4
+ action_ran_successfully: Ação executada com sucesso!
5
+ actions: Ações
6
+ and_x_other_resources: e %{count} outros recursos
7
+ are_you_sure: Tem a certeza?
8
+ are_you_sure_detach_item: Tem a certeza que deseja separar este %{item}.
9
+ are_you_sure_you_want_to_run_this_option: Tem a certeza que deseja executar esta ação?
10
+ attach: Anexar
11
+ attach_and_attach_another: Anexar & anexar outro
12
+ attach_item: Anexar %{item}
13
+ attachment_class_attached: "%{attachment_class} anexado."
14
+ attachment_class_detached: "%{attachment_class} separado."
15
+ attachment_destroyed: Anexo destruído
16
+ cancel: Cancelar
17
+ choose_a_country: Escolha um país
18
+ choose_an_option: Escolha uma opção
19
+ choose_item: Escolher %{item}
20
+ clear_value: Apagar valor
21
+ click_to_reveal_filters: Clique para mostrar os filtros
22
+ confirm: Confirmar
23
+ create_new_item: Criar novo %{item}
24
+ dashboard: Painel
25
+ dashboards: Painéis
26
+ delete: apagar
27
+ delete_file: Apagar arquivo
28
+ delete_item: Apagar %{item}
29
+ detach_item: separar %{item}
30
+ details: detalhe
31
+ download: Download
32
+ download_file: Download do ficheiro
33
+ download_item: Download %{item}
34
+ edit: editar
35
+ edit_item: editar %{item}
36
+ empty_dashboard_message: Adicionar cartões a este painel
37
+ failed: Falhou
38
+ failed_to_find_attachment: Falha ao encontrar anexo
39
+ failed_to_load: Falhou ao carregar
40
+ field_translations:
41
+ file:
42
+ one: ficheiro
43
+ other: ficheiros
44
+ zero: ficheiros
45
+ people:
46
+ one: pessoa
47
+ other: pessoas
48
+ zero: ninguém
49
+ filter_by: Filtrar por
50
+ filters: Filtros
51
+ go_back: Voltar
52
+ grid_view: Visualização em grelha
53
+ hide_content: Esconder conteúdo
54
+ home: Início
55
+ key_value_field:
56
+ add_row: Adicionar linha
57
+ delete_row: Apagar linha
58
+ key: Chave
59
+ value: Valor
60
+ list_is_empty: Lista vazia
61
+ loading: A carregar
62
+ more: Mais
63
+ new: novo
64
+ next_page: Próxima página
65
+ no_cards_present: Nenhum cartão presente
66
+ no_item_found: Nenhum registro encontrado
67
+ no_options_available: Nenhuma opção disponível
68
+ no_related_item_found: Nenhum registro relacionado encontrado
69
+ not_authorized: Não está autorizado a executar essa ação.
70
+ number_of_items:
71
+ one: um %{item}
72
+ other: "%{count} %{item}"
73
+ zero: sem %{item}
74
+ oops_nothing_found: Oops! Nada encontrado...
75
+ order:
76
+ higher: Mover recurso para cima
77
+ lower: Mover recuros para baixo
78
+ reorder_record: Reordenar recurso
79
+ to_bottom: Mover recurso para o fundo
80
+ to_top: Mover recurso para o topo
81
+ per_page: Por página
82
+ prev_page: Página anterior
83
+ remove_selection: Remover seleção
84
+ reset_filters: Limpar filtros
85
+ resource_created: Recurso criado
86
+ resource_destroyed: Recurso destruído
87
+ resource_translations:
88
+ user:
89
+ one: utilizador
90
+ other: utilizadores
91
+ zero: utilizadores
92
+ resource_updated: Recurso atualizado
93
+ resources: Recursos
94
+ run: Executar
95
+ save: Guardar
96
+ search:
97
+ cancel_button: Cancelar
98
+ placeholder: Procurar
99
+ select_all: Selecionar tudo
100
+ select_all_matching: Selecionar todas as correspondências
101
+ select_item: Selecionar item
102
+ show_content: Mostrar conteúdo
103
+ sign_out: Terminar sessão
104
+ switch_to_view: Alterar para visão %{view_type}
105
+ table_view: Visualização em tabela
106
+ tools: Ferramentas
107
+ type_to_search: Escreva para pesquisar.
108
+ unauthorized: Não autorizado
109
+ undo: desfazer
110
+ view: Ver
111
+ view_item: ver %{item}
112
+ was_successfully_created: foi criado com sucesso
113
+ was_successfully_updated: foi atualizado com sucesso
114
+ x_items_more:
115
+ one: mais um item
116
+ other: "%{count} mais items"
117
+ zero: mais nenhum item
118
+ x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> itens selecionados nesta página de um total de <span class="font-bold text-gray-700">%{count}</span>
119
+ x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> itens selecionados de todas as páginas
120
+ you_missed_something_check_form: Pode ter-se esquecido algo. Por favor, verifique o formulário.
@@ -1,111 +1,112 @@
1
1
  ---
2
2
  ro:
3
3
  avo:
4
- action_ran_successfully: Actiunea a rulat cu succes!
5
- actions: Actiuni
6
- and_x_other_resources: plus alte %{count} resources
7
- are_you_sure: Esti sigur?
4
+ action_ran_successfully: Acțiunea a rulat cu succes!
5
+ actions: Acțiuni
6
+ and_x_other_resources: plus alte %{count} recorduri
7
+ are_you_sure: Ești sigur?
8
8
  are_you_sure_detach_item: Sigur vrei să detașezi asta %{item}.
9
- are_you_sure_you_want_to_run_this_option: Esti sigur ca vrei sa rulezi aceasta actiune?
10
- attach: Ataseaza
11
- attach_and_attach_another: Ataseaza si ataseaza inca unul
12
- attach_item: Anexeaza %{item}
9
+ are_you_sure_you_want_to_run_this_option: Ești sigur vrei rulezi aceasta acțiune?
10
+ attach: Atașează
11
+ attach_and_attach_another: Atașează și atașează inca unul
12
+ attach_item: Atașează %{item}
13
13
  attachment_class_attached: "%{attachment_class} anexat."
14
14
  attachment_class_detached: "%{attachment_class} separat."
15
15
  attachment_destroyed: Atașamentul a fost distrus
16
- cancel: Anuleaza
17
- choose_a_country: Alege o tara
18
- choose_an_option: Alege o optiune
16
+ cancel: Anulează
17
+ choose_a_country: Alege o țară
18
+ choose_an_option: Alege o opțiune
19
19
  choose_item: Alege %{item}
20
- clear_value: Sterge valoarea
20
+ clear_value: Șterge valoarea
21
21
  click_to_reveal_filters: Faceți clic pentru a afișa filtrele
22
22
  confirm: Confirm
23
- create_new_item: Creeaza %{item}
23
+ create_new_item: Creează %{item}
24
24
  dashboard: Panou de control
25
25
  dashboards: Panouri de control
26
- delete: sterge
27
- delete_file: Sterge fisierul
28
- delete_item: Sterge %{item}
29
- detach_item: detaseaza %{item}
26
+ delete: șterge
27
+ delete_file: Șterge fișierul
28
+ delete_item: Șterge %{item}
29
+ detach_item: detașează %{item}
30
30
  details: detalii
31
- download: Descarca
32
- download_file: Descărcă fișier
33
- download_item: Descarca %{item}
34
- edit: modifica
35
- edit_item: modifica %{item}
36
- empty_dashboard_message: Adauga carduri in acest dashboard
31
+ download: Descarcă
32
+ download_file: Descarcă fișier
33
+ download_item: Descarcă %{item}
34
+ edit: modifică
35
+ edit_item: modifică %{item}
36
+ empty_dashboard_message: Adaugă carduri în acest dashboard
37
37
  failed: A eșuat
38
38
  failed_to_find_attachment: Atașamentul nu a fost găsit
39
- failed_to_load: Incarcarea a esuat
39
+ failed_to_load: Încărcarea a eșuat
40
40
  field_translations:
41
41
  file:
42
- one: fisier
43
- other: fisiere
44
- zero: fisiere
42
+ one: fișier
43
+ other: fișiere
44
+ zero: fișiere
45
45
  people:
46
46
  one: peep
47
47
  other: peeps
48
48
  zero: peeps
49
+ filter_by: Filtează după
49
50
  filters: Filtre
50
- go_back: Inapoi
51
- grid_view: Vezi sub forma de grid
52
- hide_content: Ascunde continutul
53
- home: Acasa
51
+ go_back: Înapoi
52
+ grid_view: Vezi sub formă de grid
53
+ hide_content: Ascunde conținutul
54
+ home: Acasă
54
55
  key_value_field:
55
- add_row: Adauga rand
56
- delete_row: Sterge rand
56
+ add_row: Adaugă rând
57
+ delete_row: Șterge rând
57
58
  key: Cheie
58
59
  value: Valoare
59
- list_is_empty: Lista este goala
60
- loading: Se incarca
60
+ list_is_empty: Lista este goală
61
+ loading: Se incarcă
61
62
  more: Mai multe
62
63
  new: nou
63
- next_page: Pagina urmatoare
64
+ next_page: Pagina următoare
64
65
  no_cards_present: Niciun card disponibil
65
- no_item_found: Nu s-au gasit %{item}
66
- no_options_available: Nicio optiune disponibila
67
- no_related_item_found: Nu s-au gasit %{item} asociate
66
+ no_item_found: Nici un articol găsit
67
+ no_options_available: Nicio opțiune disponibilă
68
+ no_related_item_found: Nici un articol asociat găsit
68
69
  not_authorized: Nu sunteți autorizat să efectuați această acțiune.
69
70
  number_of_items:
70
71
  one: un %{item}
71
72
  other: "%{count} %{item}"
72
73
  zero: 0 %{item}
73
- oops_nothing_found: Oups! Nu am gasit rezultate...
74
+ oops_nothing_found: Oups! Nu am găsit rezultate...
74
75
  order:
75
76
  higher: Mutați înregistrarea mai sus
76
77
  lower: Mutați înregistrarea mai jos
77
78
  reorder_record: Reordonați înregistrarea
78
79
  to_bottom: Mutați înregistrarea jos de tot
79
80
  to_top: Mutați înregistrarea sus de tot
80
- per_page: Pe pagina
81
+ per_page: Pe pagină
81
82
  prev_page: Pagina anterioara
82
- remove_selection: Sterge selectia
83
+ remove_selection: Șterge selecția
83
84
  reset_filters: Resetați filtrele
84
- resource_created: Resursa creata
85
- resource_destroyed: Resursa stearsa
85
+ resource_created: Resursă creata
86
+ resource_destroyed: Resursă ștearsă
86
87
  resource_translations:
87
88
  user:
88
89
  one: utilizator
89
90
  other: utilizatori
90
91
  zero: utilizatori
91
- resource_updated: Resursa actualizata
92
+ resource_updated: Resursă actualizata
92
93
  resources: Resurse
93
- run: Ruleaza
94
- save: Salveaza
94
+ run: Rulează
95
+ save: Salvează
95
96
  search:
96
97
  cancel_button: Anulare
97
- placeholder: Cauta
98
- select_all: Selecteaza totul
99
- select_all_matching: Selecteaza toate care se potrivesc
100
- select_item: Selecteaza record
101
- show_content: Arata continutul
98
+ placeholder: Caută
99
+ select_all: Selectează totul
100
+ select_all_matching: Selectează toate care se potrivesc
101
+ select_item: Selectează record
102
+ show_content: Arată conținutul
102
103
  sign_out: Delogare
103
104
  switch_to_view: Comutați la vizualizarea %{view_type}
104
- table_view: Vezi sub forma de tabel
105
+ table_view: Vezi sub formă de tabel
105
106
  tools: Instrumente
106
- type_to_search: Cauta aici...
107
+ type_to_search: Caută aici...
107
108
  unauthorized: Neautorizat
108
- undo: Anuleaza
109
+ undo: Anulează
109
110
  view: vezi
110
111
  view_item: vezi %{item}
111
112
  was_successfully_created: a fost creat
@@ -46,6 +46,7 @@ tr:
46
46
  one: kişi
47
47
  other: kişi
48
48
  zero: kişi
49
+ filter_by: Tarafından filtre
49
50
  filters: Filtreler
50
51
  go_back: Geri dön
51
52
  grid_view: Grid görünümü
@@ -62,9 +63,9 @@ tr:
62
63
  new: yeni
63
64
  next_page: Sonraki sayfa
64
65
  no_cards_present: Kart yok
65
- no_item_found: Hiç %{item} bulunamadı
66
+ no_item_found: Hiç bulunamadı
66
67
  no_options_available: Seçenek yok
67
- no_related_item_found: İlişkili %{item} bulunamadı
68
+ no_related_item_found: İlişkili bulunamadı
68
69
  not_authorized: Bu eylemi gerçekleştirme yetkiniz yok.
69
70
  number_of_items:
70
71
  one: bir %{item}
@@ -0,0 +1,15 @@
1
+ nn:
2
+ pagy:
3
+ item_name:
4
+ one: "resultat"
5
+ other: "resultat"
6
+ nav:
7
+ prev: "&lsaquo;&nbsp;Førre"
8
+ next: "Neste&nbsp;&rsaquo;"
9
+ gap: "&hellip;"
10
+ info:
11
+ no_items: "Ingen %{item_name} funne"
12
+ single_page: "Viser <b>%{count}</b> %{item_name}"
13
+ multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> av totalt <b>%{count}</b>"
14
+ combo_nav_js: "<label>Side %{page_input} av %{pages}</label>"
15
+ items_selector_js: "<label>Vis %{items_input} %{item_name} per side</label>"
@@ -0,0 +1,17 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/locales/utils/p11n.rb)
2
+
3
+ ro:
4
+ pagy:
5
+ item_name:
6
+ one: "un record"
7
+ other: "recorduri"
8
+ nav:
9
+ prev: "&lsaquo;&nbsp;Înapoi"
10
+ next: "Înainte&nbsp;&rsaquo;"
11
+ gap: "&hellip;"
12
+ info:
13
+ no_items: "Nici %{item_name} găsit"
14
+ single_page: "<b>%{count}</b> %{item_name}"
15
+ multiple_pages: "<b>%{from}-%{to}</b> din totalul de <b>%{count}</b>"
16
+ combo_nav_js: "<label>Pagina %{page_input} din %{pages}</label>"
17
+ items_selector_js: "<label>Show %{items_input} %{item_name} per page</label>"
@@ -6345,14 +6345,14 @@ trix-toolbar .trix-button-group:not(:first-child){
6345
6345
  z-index:20
6346
6346
  }
6347
6347
 
6348
- .z-40{
6349
- z-index:40
6350
- }
6351
-
6352
6348
  .z-\[100\]{
6353
6349
  z-index:100
6354
6350
  }
6355
6351
 
6352
+ .z-40{
6353
+ z-index:40
6354
+ }
6355
+
6356
6356
  .z-\[60\]{
6357
6357
  z-index:60
6358
6358
  }
@@ -69,7 +69,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
69
69
  <span class='flatpickr-weekday'>
70
70
  ${de.join("</span><span class='flatpickr-weekday'>")}
71
71
  </span>
72
- `}function oe(){r.calendarContainer.classList.add("hasWeeks");let le=jr("div","flatpickr-weekwrapper");le.appendChild(jr("span","flatpickr-weekday",r.l10n.weekAbbreviation));let de=jr("div","flatpickr-weeks");return le.appendChild(de),{weekWrapper:le,weekNumbers:de}}function G(le,de=!0){let Te=de?le:le-r.currentMonth;Te<0&&r._hidePrevMonthArrow===!0||Te>0&&r._hideNextMonthArrow===!0||(r.currentMonth+=Te,(r.currentMonth<0||r.currentMonth>11)&&(r.currentYear+=r.currentMonth>11?1:-1,r.currentMonth=(r.currentMonth+12)%12,er("onYearChange"),S()),V(),er("onMonthChange"),Zt())}function K(le=!0,de=!0){if(r.input.value="",r.altInput!==void 0&&(r.altInput.value=""),r.mobileInput!==void 0&&(r.mobileInput.value=""),r.selectedDates=[],r.latestSelectedDateObj=void 0,de===!0&&(r.currentYear=r._initialDate.getFullYear(),r.currentMonth=r._initialDate.getMonth()),r.config.enableTime===!0){let{hours:Te,minutes:He,seconds:lt}=fE(r.config);g(Te,He,lt)}r.redraw(),le&&er("onChange")}function ve(){r.isOpen=!1,r.isMobile||(r.calendarContainer!==void 0&&r.calendarContainer.classList.remove("open"),r._input!==void 0&&r._input.classList.remove("active")),er("onClose")}function Se(){r.config!==void 0&&er("onDestroy");for(let le=r._handlers.length;le--;)r._handlers[le].remove();if(r._handlers=[],r.mobileInput)r.mobileInput.parentNode&&r.mobileInput.parentNode.removeChild(r.mobileInput),r.mobileInput=void 0;else if(r.calendarContainer&&r.calendarContainer.parentNode)if(r.config.static&&r.calendarContainer.parentNode){let le=r.calendarContainer.parentNode;if(le.lastChild&&le.removeChild(le.lastChild),le.parentNode){for(;le.firstChild;)le.parentNode.insertBefore(le.firstChild,le);le.parentNode.removeChild(le)}}else r.calendarContainer.parentNode.removeChild(r.calendarContainer);r.altInput&&(r.input.type="text",r.altInput.parentNode&&r.altInput.parentNode.removeChild(r.altInput),delete r.altInput),r.input&&(r.input.type=r.input._type,r.input.classList.remove("flatpickr-input"),r.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(le=>{try{delete r[le]}catch{}})}function _e(le){return r.config.appendTo&&r.config.appendTo.contains(le)?!0:r.calendarContainer.contains(le)}function Ne(le){if(r.isOpen&&!r.config.inline){let de=sa(le),Te=_e(de),He=de===r.input||de===r.altInput||r.element.contains(de)||le.path&&le.path.indexOf&&(~le.path.indexOf(r.input)||~le.path.indexOf(r.altInput)),lt=le.type==="blur"?He&&le.relatedTarget&&!_e(le.relatedTarget):!He&&!Te&&!_e(le.relatedTarget),Qe=!r.config.ignoredFocusElements.some(Dt=>Dt.contains(de));lt&&Qe&&(r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0&&r.input.value!==""&&r.input.value!==void 0&&s(),r.close(),r.config&&r.config.mode==="range"&&r.selectedDates.length===1&&(r.clear(!1),r.redraw()))}}function Le(le){if(!le||r.config.minDate&&le<r.config.minDate.getFullYear()||r.config.maxDate&&le>r.config.maxDate.getFullYear())return;let de=le,Te=r.currentYear!==de;r.currentYear=de||r.currentYear,r.config.maxDate&&r.currentYear===r.config.maxDate.getFullYear()?r.currentMonth=Math.min(r.config.maxDate.getMonth(),r.currentMonth):r.config.minDate&&r.currentYear===r.config.minDate.getFullYear()&&(r.currentMonth=Math.max(r.config.minDate.getMonth(),r.currentMonth)),Te&&(r.redraw(),er("onYearChange"),S())}function it(le,de=!0){var Te;let He=r.parseDate(le,void 0,de);if(r.config.minDate&&He&&la(He,r.config.minDate,de!==void 0?de:!r.minDateHasTime)<0||r.config.maxDate&&He&&la(He,r.config.maxDate,de!==void 0?de:!r.maxDateHasTime)>0)return!1;if(!r.config.enable&&r.config.disable.length===0)return!0;if(He===void 0)return!1;let lt=!!r.config.enable,Qe=(Te=r.config.enable)!==null&&Te!==void 0?Te:r.config.disable;for(let Dt=0,_t;Dt<Qe.length;Dt++){if(_t=Qe[Dt],typeof _t=="function"&&_t(He))return lt;if(_t instanceof Date&&He!==void 0&&_t.getTime()===He.getTime())return lt;if(typeof _t=="string"){let Xt=r.parseDate(_t,void 0,!0);return Xt&&Xt.getTime()===He.getTime()?lt:!lt}else if(typeof _t=="object"&&He!==void 0&&_t.from&&_t.to&&He.getTime()>=_t.from.getTime()&&He.getTime()<=_t.to.getTime())return lt}return!lt}function ze(le){return r.daysContainer!==void 0?le.className.indexOf("hidden")===-1&&le.className.indexOf("flatpickr-disabled")===-1&&r.daysContainer.contains(le):!1}function tt(le){le.target===r._input&&(r.selectedDates.length>0||r._input.value.length>0)&&!(le.relatedTarget&&_e(le.relatedTarget))&&r.setDate(r._input.value,!0,le.target===r.altInput?r.config.altFormat:r.config.dateFormat)}function wt(le){let de=sa(le),Te=r.config.wrap?t.contains(de):de===r._input,He=r.config.allowInput,lt=r.isOpen&&(!He||!Te),Qe=r.config.inline&&Te&&!He;if(le.keyCode===13&&Te){if(He)return r.setDate(r._input.value,!0,de===r.altInput?r.config.altFormat:r.config.dateFormat),de.blur();r.open()}else if(_e(de)||lt||Qe){let Dt=!!r.timeContainer&&r.timeContainer.contains(de);switch(le.keyCode){case 13:Dt?(le.preventDefault(),s(),Fe()):It(le);break;case 27:le.preventDefault(),Fe();break;case 8:case 46:Te&&!r.config.allowInput&&(le.preventDefault(),r.clear());break;case 37:case 39:if(!Dt&&!Te){if(le.preventDefault(),r.daysContainer!==void 0&&(He===!1||document.activeElement&&ze(document.activeElement))){let Xt=le.keyCode===39?1:-1;le.ctrlKey?(le.stopPropagation(),G(Xt),F(C(1),0)):F(void 0,Xt)}}else r.hourElement&&r.hourElement.focus();break;case 38:case 40:le.preventDefault();let _t=le.keyCode===40?1:-1;r.daysContainer&&de.$i!==void 0||de===r.input||de===r.altInput?le.ctrlKey?(le.stopPropagation(),Le(r.currentYear-_t),F(C(1),0)):Dt||F(void 0,_t*7):de===r.currentYearElement?Le(r.currentYear-_t):r.config.enableTime&&(!Dt&&r.hourElement&&r.hourElement.focus(),s(le),r._debouncedChange());break;case 9:if(Dt){let Xt=[r.hourElement,r.minuteElement,r.secondElement,r.amPM].concat(r.pluginElements).filter(dr=>dr),Yt=Xt.indexOf(de);if(Yt!==-1){let dr=Xt[Yt+(le.shiftKey?-1:1)];le.preventDefault(),(dr||r._input).focus()}}else!r.config.noCalendar&&r.daysContainer&&r.daysContainer.contains(de)&&le.shiftKey&&(le.preventDefault(),r._input.focus());break;default:break}}if(r.amPM!==void 0&&de===r.amPM)switch(le.key){case r.l10n.amPM[0].charAt(0):case r.l10n.amPM[0].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[0],f(),tr();break;case r.l10n.amPM[1].charAt(0):case r.l10n.amPM[1].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[1],f(),tr();break}(Te||_e(de))&&er("onKeyDown",le)}function Tt(le){if(r.selectedDates.length!==1||le&&(!le.classList.contains("flatpickr-day")||le.classList.contains("flatpickr-disabled")))return;let de=le?le.dateObj.getTime():r.days.firstElementChild.dateObj.getTime(),Te=r.parseDate(r.selectedDates[0],void 0,!0).getTime(),He=Math.min(de,r.selectedDates[0].getTime()),lt=Math.max(de,r.selectedDates[0].getTime()),Qe=!1,Dt=0,_t=0;for(let Xt=He;Xt<lt;Xt+=goe.DAY)it(new Date(Xt),!0)||(Qe=Qe||Xt>He&&Xt<lt,Xt<Te&&(!Dt||Xt>Dt)?Dt=Xt:Xt>Te&&(!_t||Xt<_t)&&(_t=Xt));for(let Xt=0;Xt<r.config.showMonths;Xt++){let Yt=r.daysContainer.children[Xt];for(let dr=0,sn=Yt.children.length;dr<sn;dr++){let zr=Yt.children[dr],Hr=zr.dateObj.getTime(),Jn=Dt>0&&Hr<Dt||_t>0&&Hr>_t;if(Jn){zr.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(Vi=>{zr.classList.remove(Vi)});continue}else if(Qe&&!Jn)continue;["startRange","inRange","endRange","notAllowed"].forEach(Vi=>{zr.classList.remove(Vi)}),le!==void 0&&(le.classList.add(de<=r.selectedDates[0].getTime()?"startRange":"endRange"),Te<de&&Hr===Te?zr.classList.add("startRange"):Te>de&&Hr===Te&&zr.classList.add("endRange"),Hr>=Dt&&(_t===0||Hr<=_t)&&poe(Hr,Te,de)&&zr.classList.add("inRange"))}}}function Ve(){r.isOpen&&!r.config.static&&!r.config.inline&&fe()}function Oe(le,de=r._positionElement){if(r.isMobile===!0){if(le){le.preventDefault();let He=sa(le);He&&He.blur()}r.mobileInput!==void 0&&(r.mobileInput.focus(),r.mobileInput.click()),er("onOpen");return}else if(r._input.disabled||r.config.inline)return;let Te=r.isOpen;r.isOpen=!0,Te||(r.calendarContainer.classList.add("open"),r._input.classList.add("active"),er("onOpen"),fe(de)),r.config.enableTime===!0&&r.config.noCalendar===!0&&r.config.allowInput===!1&&(le===void 0||!r.timeContainer.contains(le.relatedTarget))&&setTimeout(()=>r.hourElement.select(),50)}function Me(le){return de=>{let Te=r.config[`_${le}Date`]=r.parseDate(de,r.config.dateFormat),He=r.config[`_${le==="min"?"max":"min"}Date`];Te!==void 0&&(r[le==="min"?"minDateHasTime":"maxDateHasTime"]=Te.getHours()>0||Te.getMinutes()>0||Te.getSeconds()>0),r.selectedDates&&(r.selectedDates=r.selectedDates.filter(lt=>it(lt)),!r.selectedDates.length&&le==="min"&&p(Te),tr()),r.daysContainer&&($e(),Te!==void 0?r.currentYearElement[le]=Te.getFullYear().toString():r.currentYearElement.removeAttribute(le),r.currentYearElement.disabled=!!He&&Te!==void 0&&He.getFullYear()===Te.getFullYear())}}function he(){let le=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],de=Object.assign(Object.assign({},JSON.parse(JSON.stringify(t.dataset||{}))),e),Te={};r.config.parseDate=de.parseDate,r.config.formatDate=de.formatDate,Object.defineProperty(r.config,"enable",{get:()=>r.config._enable,set:Qe=>{r.config._enable=xe(Qe)}}),Object.defineProperty(r.config,"disable",{get:()=>r.config._disable,set:Qe=>{r.config._disable=xe(Qe)}});let He=de.mode==="time";if(!de.dateFormat&&(de.enableTime||He)){let Qe=ui.defaultConfig.dateFormat||Mf.dateFormat;Te.dateFormat=de.noCalendar||He?"H:i"+(de.enableSeconds?":S":""):Qe+" H:i"+(de.enableSeconds?":S":"")}if(de.altInput&&(de.enableTime||He)&&!de.altFormat){let Qe=ui.defaultConfig.altFormat||Mf.altFormat;Te.altFormat=de.noCalendar||He?"h:i"+(de.enableSeconds?":S K":" K"):Qe+` h:i${de.enableSeconds?":S":""} K`}Object.defineProperty(r.config,"minDate",{get:()=>r.config._minDate,set:Me("min")}),Object.defineProperty(r.config,"maxDate",{get:()=>r.config._maxDate,set:Me("max")});let lt=Qe=>Dt=>{r.config[Qe==="min"?"_minTime":"_maxTime"]=r.parseDate(Dt,"H:i:S")};Object.defineProperty(r.config,"minTime",{get:()=>r.config._minTime,set:lt("min")}),Object.defineProperty(r.config,"maxTime",{get:()=>r.config._maxTime,set:lt("max")}),de.mode==="time"&&(r.config.noCalendar=!0,r.config.enableTime=!0),Object.assign(r.config,Te,de);for(let Qe=0;Qe<le.length;Qe++)r.config[le[Qe]]=r.config[le[Qe]]===!0||r.config[le[Qe]]==="true";aE.filter(Qe=>r.config[Qe]!==void 0).forEach(Qe=>{r.config[Qe]=uE(r.config[Qe]||[]).map(o)}),r.isMobile=!r.config.disableMobile&&!r.config.inline&&r.config.mode==="single"&&!r.config.disable.length&&!r.config.enable&&!r.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let Qe=0;Qe<r.config.plugins.length;Qe++){let Dt=r.config.plugins[Qe](r)||{};for(let _t in Dt)aE.indexOf(_t)>-1?r.config[_t]=uE(Dt[_t]).map(o).concat(r.config[_t]):typeof de[_t]>"u"&&(r.config[_t]=Dt[_t])}de.altInputClass||(r.config.altInputClass=J().className+" "+r.config.altInputClass),er("onParseConfig")}function J(){return r.config.wrap?t.querySelector("[data-input]"):t}function re(){typeof r.config.locale!="object"&&typeof ui.l10ns[r.config.locale]>"u"&&r.config.errorHandler(new Error(`flatpickr: invalid locale ${r.config.locale}`)),r.l10n=Object.assign(Object.assign({},ui.l10ns.default),typeof r.config.locale=="object"?r.config.locale:r.config.locale!=="default"?ui.l10ns[r.config.locale]:void 0),D0.K=`(${r.l10n.amPM[0]}|${r.l10n.amPM[1]}|${r.l10n.amPM[0].toLowerCase()}|${r.l10n.amPM[1].toLowerCase()})`,Object.assign(Object.assign({},e),JSON.parse(JSON.stringify(t.dataset||{}))).time_24hr===void 0&&ui.defaultConfig.time_24hr===void 0&&(r.config.time_24hr=r.l10n.time_24hr),r.formatDate=aF(r),r.parseDate=cE({config:r.config,l10n:r.l10n})}function fe(le){if(typeof r.config.position=="function")return void r.config.position(r,le);if(r.calendarContainer===void 0)return;er("onPreCalendarPosition");let de=le||r._positionElement,Te=Array.prototype.reduce.call(r.calendarContainer.children,(Ci,ln)=>Ci+ln.offsetHeight,0),He=r.calendarContainer.offsetWidth,lt=r.config.position.split(" "),Qe=lt[0],Dt=lt.length>1?lt[1]:null,_t=de.getBoundingClientRect(),Xt=window.innerHeight-_t.bottom,Yt=Qe==="above"||Qe!=="below"&&Xt<Te&&_t.top>Te,dr=window.pageYOffset+_t.top+(Yt?-Te-2:de.offsetHeight+2);if(go(r.calendarContainer,"arrowTop",!Yt),go(r.calendarContainer,"arrowBottom",Yt),r.config.inline)return;let sn=window.pageXOffset+_t.left,zr=!1,vo=!1;Dt==="center"?(sn-=(He-_t.width)/2,zr=!0):Dt==="right"&&(sn-=He-_t.width,vo=!0),go(r.calendarContainer,"arrowLeft",!zr&&!vo),go(r.calendarContainer,"arrowCenter",zr),go(r.calendarContainer,"arrowRight",vo);let Hr=window.document.body.offsetWidth-(window.pageXOffset+_t.right),Jn=sn+He>window.document.body.offsetWidth,Vi=Hr+He>window.document.body.offsetWidth;if(go(r.calendarContainer,"rightMost",Jn),!r.config.static)if(r.calendarContainer.style.top=`${dr}px`,!Jn)r.calendarContainer.style.left=`${sn}px`,r.calendarContainer.style.right="auto";else if(!Vi)r.calendarContainer.style.left="auto",r.calendarContainer.style.right=`${Hr}px`;else{let Ci=ht();if(Ci===void 0)return;let ln=window.document.body.offsetWidth,Ro=Math.max(0,ln/2-He/2),Ti=".flatpickr-calendar.centerMost:before",$s=".flatpickr-calendar.centerMost:after",yo=Ci.cssRules.length,qo=`{left:${_t.left}px;right:auto;}`;go(r.calendarContainer,"rightMost",!1),go(r.calendarContainer,"centerMost",!0),Ci.insertRule(`${Ti},${$s}${qo}`,yo),r.calendarContainer.style.left=`${Ro}px`,r.calendarContainer.style.right="auto"}}function ht(){let le=null;for(let de=0;de<document.styleSheets.length;de++){let Te=document.styleSheets[de];try{Te.cssRules}catch{continue}le=Te;break}return le??ke()}function ke(){let le=document.createElement("style");return document.head.appendChild(le),le.sheet}function $e(){r.config.noCalendar||r.isMobile||(S(),Zt(),V())}function Fe(){r._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(r.close,0):r.close()}function It(le){le.preventDefault(),le.stopPropagation();let de=Dt=>Dt.classList&&Dt.classList.contains("flatpickr-day")&&!Dt.classList.contains("flatpickr-disabled")&&!Dt.classList.contains("notAllowed"),Te=nF(sa(le),de);if(Te===void 0)return;let He=Te,lt=r.latestSelectedDateObj=new Date(He.dateObj.getTime()),Qe=(lt.getMonth()<r.currentMonth||lt.getMonth()>r.currentMonth+r.config.showMonths-1)&&r.config.mode!=="range";if(r.selectedDateElem=He,r.config.mode==="single")r.selectedDates=[lt];else if(r.config.mode==="multiple"){let Dt=Ze(lt);Dt?r.selectedDates.splice(parseInt(Dt),1):r.selectedDates.push(lt)}else r.config.mode==="range"&&(r.selectedDates.length===2&&r.clear(!1,!1),r.latestSelectedDateObj=lt,r.selectedDates.push(lt),la(lt,r.selectedDates[0],!0)!==0&&r.selectedDates.sort((Dt,_t)=>Dt.getTime()-_t.getTime()));if(f(),Qe){let Dt=r.currentYear!==lt.getFullYear();r.currentYear=lt.getFullYear(),r.currentMonth=lt.getMonth(),Dt&&(er("onYearChange"),S()),er("onMonthChange")}if(Zt(),V(),tr(),!Qe&&r.config.mode!=="range"&&r.config.showMonths===1?_(He):r.selectedDateElem!==void 0&&r.hourElement===void 0&&r.selectedDateElem&&r.selectedDateElem.focus(),r.hourElement!==void 0&&r.hourElement!==void 0&&r.hourElement.focus(),r.config.closeOnSelect){let Dt=r.config.mode==="single"&&!r.config.enableTime,_t=r.config.mode==="range"&&r.selectedDates.length===2&&!r.config.enableTime;(Dt||_t)&&Fe()}w()}let ut={locale:[re,X],showMonths:[q,a,z],minDate:[k],maxDate:[k],clickOpens:[()=>{r.config.clickOpens===!0?(x(r._input,"focus",r.open),x(r._input,"click",r.open)):(r._input.removeEventListener("focus",r.open),r._input.removeEventListener("click",r.open))}]};function gt(le,de){if(le!==null&&typeof le=="object"){Object.assign(r.config,le);for(let Te in le)ut[Te]!==void 0&&ut[Te].forEach(He=>He())}else r.config[le]=de,ut[le]!==void 0?ut[le].forEach(Te=>Te()):aE.indexOf(le)>-1&&(r.config[le]=uE(de));r.redraw(),tr(!0)}function st(le,de){let Te=[];if(le instanceof Array)Te=le.map(He=>r.parseDate(He,de));else if(le instanceof Date||typeof le=="number")Te=[r.parseDate(le,de)];else if(typeof le=="string")switch(r.config.mode){case"single":case"time":Te=[r.parseDate(le,de)];break;case"multiple":Te=le.split(r.config.conjunction).map(He=>r.parseDate(He,de));break;case"range":Te=le.split(r.l10n.rangeSeparator).map(He=>r.parseDate(He,de));break;default:break}else r.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(le)}`));r.selectedDates=r.config.allowInvalidPreload?Te:Te.filter(He=>He instanceof Date&&it(He,!1)),r.config.mode==="range"&&r.selectedDates.sort((He,lt)=>He.getTime()-lt.getTime())}function ye(le,de=!1,Te=r.config.dateFormat){if(le!==0&&!le||le instanceof Array&&le.length===0)return r.clear(de);st(le,Te),r.latestSelectedDateObj=r.selectedDates[r.selectedDates.length-1],r.redraw(),k(void 0,de),p(),r.selectedDates.length===0&&r.clear(!1),tr(de),de&&er("onChange")}function xe(le){return le.slice().map(de=>typeof de=="string"||typeof de=="number"||de instanceof Date?r.parseDate(de,void 0,!0):de&&typeof de=="object"&&de.from&&de.to?{from:r.parseDate(de.from,void 0),to:r.parseDate(de.to,void 0)}:de).filter(de=>de)}function We(){r.selectedDates=[],r.now=r.parseDate(r.config.now)||new Date;let le=r.config.defaultDate||((r.input.nodeName==="INPUT"||r.input.nodeName==="TEXTAREA")&&r.input.placeholder&&r.input.value===r.input.placeholder?null:r.input.value);le&&st(le,r.config.dateFormat),r._initialDate=r.selectedDates.length>0?r.selectedDates[0]:r.config.minDate&&r.config.minDate.getTime()>r.now.getTime()?r.config.minDate:r.config.maxDate&&r.config.maxDate.getTime()<r.now.getTime()?r.config.maxDate:r.now,r.currentYear=r._initialDate.getFullYear(),r.currentMonth=r._initialDate.getMonth(),r.selectedDates.length>0&&(r.latestSelectedDateObj=r.selectedDates[0]),r.config.minTime!==void 0&&(r.config.minTime=r.parseDate(r.config.minTime,"H:i")),r.config.maxTime!==void 0&&(r.config.maxTime=r.parseDate(r.config.maxTime,"H:i")),r.minDateHasTime=!!r.config.minDate&&(r.config.minDate.getHours()>0||r.config.minDate.getMinutes()>0||r.config.minDate.getSeconds()>0),r.maxDateHasTime=!!r.config.maxDate&&(r.config.maxDate.getHours()>0||r.config.maxDate.getMinutes()>0||r.config.maxDate.getSeconds()>0)}function bt(){if(r.input=J(),!r.input){r.config.errorHandler(new Error("Invalid input element specified"));return}r.input._type=r.input.type,r.input.type="text",r.input.classList.add("flatpickr-input"),r._input=r.input,r.config.altInput&&(r.altInput=jr(r.input.nodeName,r.config.altInputClass),r._input=r.altInput,r.altInput.placeholder=r.input.placeholder,r.altInput.disabled=r.input.disabled,r.altInput.required=r.input.required,r.altInput.tabIndex=r.input.tabIndex,r.altInput.type="text",r.input.setAttribute("type","hidden"),!r.config.static&&r.input.parentNode&&r.input.parentNode.insertBefore(r.altInput,r.input.nextSibling)),r.config.allowInput||r._input.setAttribute("readonly","readonly"),r._positionElement=r.config.positionElement||r._input}function Gr(){let le=r.config.enableTime?r.config.noCalendar?"time":"datetime-local":"date";r.mobileInput=jr("input",r.input.className+" flatpickr-mobile"),r.mobileInput.tabIndex=1,r.mobileInput.type=le,r.mobileInput.disabled=r.input.disabled,r.mobileInput.required=r.input.required,r.mobileInput.placeholder=r.input.placeholder,r.mobileFormatStr=le==="datetime-local"?"Y-m-d\\TH:i:S":le==="date"?"Y-m-d":"H:i:S",r.selectedDates.length>0&&(r.mobileInput.defaultValue=r.mobileInput.value=r.formatDate(r.selectedDates[0],r.mobileFormatStr)),r.config.minDate&&(r.mobileInput.min=r.formatDate(r.config.minDate,"Y-m-d")),r.config.maxDate&&(r.mobileInput.max=r.formatDate(r.config.maxDate,"Y-m-d")),r.input.getAttribute("step")&&(r.mobileInput.step=String(r.input.getAttribute("step"))),r.input.type="hidden",r.altInput!==void 0&&(r.altInput.type="hidden");try{r.input.parentNode&&r.input.parentNode.insertBefore(r.mobileInput,r.input.nextSibling)}catch{}x(r.mobileInput,"change",de=>{r.setDate(sa(de).value,!1,r.mobileFormatStr),er("onChange"),er("onClose")})}function vt(le){if(r.isOpen===!0)return r.close();r.open(le)}function er(le,de){if(r.config===void 0)return;let Te=r.config[le];if(Te!==void 0&&Te.length>0)for(let He=0;Te[He]&&He<Te.length;He++)Te[He](r.selectedDates,r.input.value,r,de);le==="onChange"&&(r.input.dispatchEvent(Ie("change")),r.input.dispatchEvent(Ie("input")))}function Ie(le){let de=document.createEvent("Event");return de.initEvent(le,!0,!0),de}function Ze(le){for(let de=0;de<r.selectedDates.length;de++)if(la(r.selectedDates[de],le)===0)return""+de;return!1}function dt(le){return r.config.mode!=="range"||r.selectedDates.length<2?!1:la(le,r.selectedDates[0])>=0&&la(le,r.selectedDates[1])<=0}function Zt(){r.config.noCalendar||r.isMobile||!r.monthNav||(r.yearElements.forEach((le,de)=>{let Te=new Date(r.currentYear,r.currentMonth,1);Te.setMonth(r.currentMonth+de),r.config.showMonths>1||r.config.monthSelectorType==="static"?r.monthElements[de].textContent=A0(Te.getMonth(),r.config.shorthandCurrentMonth,r.l10n)+" ":r.monthsDropdownContainer.value=Te.getMonth().toString(),le.value=Te.getFullYear().toString()}),r._hidePrevMonthArrow=r.config.minDate!==void 0&&(r.currentYear===r.config.minDate.getFullYear()?r.currentMonth<=r.config.minDate.getMonth():r.currentYear<r.config.minDate.getFullYear()),r._hideNextMonthArrow=r.config.maxDate!==void 0&&(r.currentYear===r.config.maxDate.getFullYear()?r.currentMonth+1>r.config.maxDate.getMonth():r.currentYear>r.config.maxDate.getFullYear()))}function jt(le){return r.selectedDates.map(de=>r.formatDate(de,le)).filter((de,Te,He)=>r.config.mode!=="range"||r.config.enableTime||He.indexOf(de)===Te).join(r.config.mode!=="range"?r.config.conjunction:r.l10n.rangeSeparator)}function tr(le=!0){r.mobileInput!==void 0&&r.mobileFormatStr&&(r.mobileInput.value=r.latestSelectedDateObj!==void 0?r.formatDate(r.latestSelectedDateObj,r.mobileFormatStr):""),r.input.value=jt(r.config.dateFormat),r.altInput!==void 0&&(r.altInput.value=jt(r.config.altFormat)),le!==!1&&er("onValueUpdate")}function sr(le){let de=sa(le),Te=r.prevMonthNav.contains(de),He=r.nextMonthNav.contains(de);Te||He?G(Te?-1:1):r.yearElements.indexOf(de)>=0?de.select():de.classList.contains("arrowUp")?r.changeYear(r.currentYear+1):de.classList.contains("arrowDown")&&r.changeYear(r.currentYear-1)}function Hn(le){le.preventDefault();let de=le.type==="keydown",Te=sa(le),He=Te;r.amPM!==void 0&&Te===r.amPM&&(r.amPM.textContent=r.l10n.amPM[aa(r.amPM.textContent===r.l10n.amPM[0])]);let lt=parseFloat(He.getAttribute("min")),Qe=parseFloat(He.getAttribute("max")),Dt=parseFloat(He.getAttribute("step")),_t=parseInt(He.value,10),Xt=le.delta||(de?le.which===38?1:-1:0),Yt=_t+Dt*Xt;if(typeof He.value<"u"&&He.value.length===2){let dr=He===r.hourElement,sn=He===r.minuteElement;Yt<lt?(Yt=Qe+Yt+aa(!dr)+(aa(dr)&&aa(!r.amPM)),sn&&D(void 0,-1,r.hourElement)):Yt>Qe&&(Yt=He===r.hourElement?Yt-Qe-aa(!r.amPM):lt,sn&&D(void 0,1,r.hourElement)),r.amPM&&dr&&(Dt===1?Yt+_t===23:Math.abs(Yt-_t)>Dt)&&(r.amPM.textContent=r.l10n.amPM[aa(r.amPM.textContent===r.l10n.amPM[0])]),He.value=po(Yt)}}return i(),r}function mm(t,e){let r=Array.prototype.slice.call(t).filter(i=>i instanceof HTMLElement),n=[];for(let i=0;i<r.length;i++){let o=r[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=TQe(o,e||{}),n.push(o._flatpickr)}catch(a){console.error(a)}}return n.length===1?n[0]:n}var CQe,ui,yoe,boe=se(()=>{Jq();eF();rF();doe();moe();oF();voe();CQe=300;typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return mm(this,t)},HTMLElement.prototype.flatpickr=function(t){return mm([this],t)});ui=function(t,e){return typeof t=="string"?mm(window.document.querySelectorAll(t),e):t instanceof Node?mm([t],e):mm(t,e)};ui.defaultConfig={};ui.l10ns={en:Object.assign({},lE),default:Object.assign({},lE)};ui.localize=t=>{ui.l10ns.default=Object.assign(Object.assign({},ui.l10ns.default),t)};ui.setDefaults=t=>{ui.defaultConfig=Object.assign(Object.assign({},ui.defaultConfig),t)};ui.parseDate=cE({});ui.formatDate=aF({});ui.compareDates=la;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(t){return mm(this,t)});Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof t=="string"?parseInt(t,10):t))};typeof window<"u"&&(window.flatpickr=ui);yoe=ui});function xoe(t){return new Date(new Date(t).getTime()+new Date(t).getTimezoneOffset()*60*1e3)}var xh,woe,_oe,O0,Soe=se(()=>{Pr();xh=Vr(foe());boe();woe="y/LL/dd",_oe="TT",O0=class extends Ct{constructor(){super(...arguments);pt(this,"flatpickrInstance");pt(this,"cachedInitialValue")}get browserZone(){return xh.DateTime.local().zoneName}get initialValue(){return this.isOnShow||this.isOnIndex?this.context.element.innerText:this.isOnEdit?this.inputTarget.value:null}get isOnIndex(){return this.viewValue==="index"}get isOnEdit(){return this.viewValue==="edit"}get isOnShow(){return this.viewValue==="show"}get fieldIsDate(){return this.fieldTypeValue==="date"}get fieldIsDateTime(){return this.fieldTypeValue==="dateTime"}get fieldIsTime(){return this.fieldTypeValue==="time"}get fieldHasTime(){return this.fieldIsTime||this.fieldIsDateTime}get parsedValue(){return xh.DateTime.fromISO(this.initialValue,{zone:"UTC"})}get displayTimezone(){return this.timezoneValue||this.browserZone}connect(){this.cacheInitialValue(),this.isOnShow||this.isOnIndex?this.initShow():this.isOnEdit&&this.initEdit()}disconnect(){this.isOnShow||this.isOnIndex?this.context.element.innerText=this.cachedInitialValue:this.isOnEdit&&this.flatpickrInstance&&this.flatpickrInstance.destroy()}cacheInitialValue(){this.cachedInitialValue=this.initialValue}initShow(){let t=this.parsedValue;this.fieldHasTime&&this.relativeValue&&(t=t.setZone(this.displayTimezone)),this.context.element.innerText=t.toFormat(this.formatValue)}initEdit(){let t=za({enableTime:!1,enableSeconds:!1,time_24hr:this.time24HrValue,locale:{firstDayOfWeek:0},altInput:!0,onChange:this.onChange.bind(this),noCalendar:!1},this.pickerOptionsValue);if(t.altFormat=this.pickerFormatValue,t.disableMobile=this.disableMobileValue,t.locale.firstDayOfWeek=this.firstDayOfWeekValue,t.enableTime=this.enableTimeValue,t.enableSeconds=this.enableTimeValue,t.noCalendar=this.noCalendarValue,this.fieldHasTime&&(t.dateFormat="Y-m-d H:i:S"),this.initialValue)switch(this.fieldTypeValue){case"date":t.defaultDate=xoe(this.initialValue);break;default:case"time":t.defaultDate=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO();break;case"dateTime":t.defaultDate=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO();break}if(this.flatpickrInstance=yoe(this.fakeInputTarget,t),!this.initialValue)return;let e;switch(this.fieldTypeValue){case"time":e=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!0}).toFormat(_oe);break;case"date":e=xh.DateTime.fromJSDate(xoe(this.initialValue)).toFormat(woe);break;default:case"dateTime":e=this.parsedValue.setZone(this.displayTimezone).toISO();break}this.updateRealInput(e)}onChange(t){if(t.length===0){this.updateRealInput("");return}let e;switch(this.fieldTypeValue){case"time":e=xh.DateTime.fromISO(t[0].toISOString()).setZone("UTC",{keepLocalTime:!this.relativeValue}).toFormat(_oe);break;case"date":e=xh.DateTime.fromISO(t[0].toISOString()).setZone("UTC",{keepLocalTime:!0}).toFormat(woe);break;default:case"dateTime":e=xh.DateTime.fromISO(t[0].toISOString()).setZone("UTC",{keepLocalTime:!this.relativeValue}).toISO();break}this.updateRealInput(e)}updateRealInput(t){this.inputTarget.value=t}};pt(O0,"targets",["input","fakeInput"]),pt(O0,"values",{view:String,timezone:String,format:String,enableTime:Boolean,pickerFormat:String,firstDayOfWeek:Number,time24Hr:Boolean,disableMobile:Boolean,noCalendar:Boolean,relative:Boolean,fieldType:{type:String,default:"dateTime"},pickerOptions:{type:Object,default:{}}})});var dE,koe=se(()=>{Pr();dE=class extends Ct{showContent(t){this.contentTarget.classList.toggle("hidden"),t.target.classList.add("hidden")}};pt(dE,"targets",["content"])});var M0,Eoe=se(()=>{Pr();M0=class extends Ct{connect(){this.resourceName=this.element.dataset.resourceName}toggle(t){let e=!!t.target.checked;document.querySelectorAll(`[data-controller="item-selector"][data-resource-name="${this.resourceName}"] input[type=checkbox]`).forEach(r=>r.checked!==e&&r.click()),this.pageCountValue>1&&(this.selectAllOverlay(e),e||this.resetUnselected())}selectRow(){let t=!0;this.itemCheckboxTargets.forEach(e=>t=t&&e.checked),this.checkboxTarget.checked=t,this.pageCountValue>1&&(this.selectAllOverlay(t),this.resetUnselected())}selectAll(t){t.preventDefault(),this.selectedAllValue=!this.selectedAllValue,this.unselectedMessageTarget.classList.toggle("hidden"),this.selectedMessageTarget.classList.toggle("hidden")}resetUnselected(){this.selectedAllValue=!1,this.unselectedMessageTarget.classList.remove("hidden"),this.selectedMessageTarget.classList.add("hidden")}selectAllOverlay(t){t?this.selectAllOverlayTarget.classList.remove("hidden"):this.selectAllOverlayTarget.classList.add("hidden")}};pt(M0,"targets",["itemCheckbox","checkbox","selectAllOverlay","unselectedMessage","selectedMessage"]),pt(M0,"values",{pageCount:Number,selectedAll:Boolean,selectedAllQuery:String})});var hE,Coe=se(()=>{Pr();hE=class extends Ct{constructor(){super(...arguments);pt(this,"checkbox",{});pt(this,"enabledClasses",["text-black"]);pt(this,"disabledClasses",["text-gray-500"])}get actionsPanelPresent(){return this.actionsButtonElement!==null}get currentIds(){try{return JSON.parse(this.stateHolderElement.dataset.selectedResources)}catch(t){return[]}}get actionLinks(){return document.querySelectorAll('.js-actions-dropdown a[data-actions-picker-target="resourceAction"]')}set currentIds(t){this.stateHolderElement.dataset.selectedResources=JSON.stringify(t),this.actionsPanelPresent&&(t.length>0?this.enableResourceActions():this.disableResourceActions())}connect(){this.resourceName=this.element.dataset.resourceName,this.resourceId=this.element.dataset.resourceId,this.actionsButtonElement=document.querySelector(`[data-actions-dropdown-button="${this.resourceName}"]`),this.stateHolderElement=document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`)}addToSelected(){let t=this.currentIds;t.push(this.resourceId),this.currentIds=t}removeFromSelected(){this.currentIds=this.currentIds.filter(t=>t.toString()!==this.resourceId)}toggle(t){this.checkbox=t.target,this.checkbox.checked?this.addToSelected():this.removeFromSelected()}enableResourceActions(){this.actionLinks.forEach(t=>{t.classList.add(...this.enabledClasses),t.classList.remove(...this.disabledClasses),t.setAttribute("data-href",t.getAttribute("href")),t.dataset.disabled=!1})}disableResourceActions(){this.actionLinks.forEach(t=>{t.classList.remove(...this.enabledClasses),t.classList.add(...this.disabledClasses),t.setAttribute("href",t.getAttribute("data-href")),t.dataset.disabled=!0})}};pt(hE,"targets",["panel"])});var pE,Toe=se(()=>{Pr();em();pE=class extends Ct{constructor(){super(...arguments);pt(this,"fieldValue",[]);pt(this,"options",{})}get keyInputDisabled(){return!this.options.editable||this.options.disable_editing_keys}get valueInputDisabled(){return!this.options.editable}connect(){this.setOptions();try{let t=JSON.parse(this.inputTarget.value);Object.keys(t).forEach(e=>this.fieldValue.push([e,t[e]]))}catch(t){this.fieldValue=[]}this.updateKeyValueComponent()}addRow(){this.options.disable_adding_rows||!this.options.editable||(this.fieldValue.push(["",""]),this.updateKeyValueComponent(),this.focusLastRow())}deleteRow(t){if(this.options.disable_deleting_rows||!this.options.editable)return;let{index:e}=t.params;this.fieldValue.splice(e,1),this.updateTextareaInput(),this.updateKeyValueComponent()}focusLastRow(){return this.rowsTarget.querySelector(".flex.key-value-row:last-child .key-value-input-key").focus()}valueFieldUpdated(t){let{value:e}=t.target,{index:r}=t.target.dataset;this.fieldValue[r][1]=e,this.updateTextareaInput()}keyFieldUpdated(t){let{value:e}=t.target,{index:r}=t.target.dataset;this.fieldValue[r][0]=e,this.updateTextareaInput()}updateTextareaInput(){if(!this.hasInputTarget)return;let t={};this.fieldValue&&this.fieldValue.length>0&&(t=Object.assign(...this.fieldValue.map(([e,r])=>({[e]:r})))),this.inputTarget.innerText=JSON.stringify(t),this.inputTarget.dispatchEvent(new Event("input"))}updateKeyValueComponent(){let t="",e=0;this.fieldValue.forEach(r=>{let[n,i]=r;t+=this.interpolatedRow(n,i,e),e++}),this.rowsTarget.innerHTML=t,window.initTippy()}interpolatedRow(t,e,r){let n=`<div class="flex key-value-row">
72
+ `}function oe(){r.calendarContainer.classList.add("hasWeeks");let le=jr("div","flatpickr-weekwrapper");le.appendChild(jr("span","flatpickr-weekday",r.l10n.weekAbbreviation));let de=jr("div","flatpickr-weeks");return le.appendChild(de),{weekWrapper:le,weekNumbers:de}}function G(le,de=!0){let Te=de?le:le-r.currentMonth;Te<0&&r._hidePrevMonthArrow===!0||Te>0&&r._hideNextMonthArrow===!0||(r.currentMonth+=Te,(r.currentMonth<0||r.currentMonth>11)&&(r.currentYear+=r.currentMonth>11?1:-1,r.currentMonth=(r.currentMonth+12)%12,er("onYearChange"),S()),V(),er("onMonthChange"),Zt())}function K(le=!0,de=!0){if(r.input.value="",r.altInput!==void 0&&(r.altInput.value=""),r.mobileInput!==void 0&&(r.mobileInput.value=""),r.selectedDates=[],r.latestSelectedDateObj=void 0,de===!0&&(r.currentYear=r._initialDate.getFullYear(),r.currentMonth=r._initialDate.getMonth()),r.config.enableTime===!0){let{hours:Te,minutes:He,seconds:lt}=fE(r.config);g(Te,He,lt)}r.redraw(),le&&er("onChange")}function ve(){r.isOpen=!1,r.isMobile||(r.calendarContainer!==void 0&&r.calendarContainer.classList.remove("open"),r._input!==void 0&&r._input.classList.remove("active")),er("onClose")}function Se(){r.config!==void 0&&er("onDestroy");for(let le=r._handlers.length;le--;)r._handlers[le].remove();if(r._handlers=[],r.mobileInput)r.mobileInput.parentNode&&r.mobileInput.parentNode.removeChild(r.mobileInput),r.mobileInput=void 0;else if(r.calendarContainer&&r.calendarContainer.parentNode)if(r.config.static&&r.calendarContainer.parentNode){let le=r.calendarContainer.parentNode;if(le.lastChild&&le.removeChild(le.lastChild),le.parentNode){for(;le.firstChild;)le.parentNode.insertBefore(le.firstChild,le);le.parentNode.removeChild(le)}}else r.calendarContainer.parentNode.removeChild(r.calendarContainer);r.altInput&&(r.input.type="text",r.altInput.parentNode&&r.altInput.parentNode.removeChild(r.altInput),delete r.altInput),r.input&&(r.input.type=r.input._type,r.input.classList.remove("flatpickr-input"),r.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(le=>{try{delete r[le]}catch{}})}function _e(le){return r.config.appendTo&&r.config.appendTo.contains(le)?!0:r.calendarContainer.contains(le)}function Ne(le){if(r.isOpen&&!r.config.inline){let de=sa(le),Te=_e(de),He=de===r.input||de===r.altInput||r.element.contains(de)||le.path&&le.path.indexOf&&(~le.path.indexOf(r.input)||~le.path.indexOf(r.altInput)),lt=le.type==="blur"?He&&le.relatedTarget&&!_e(le.relatedTarget):!He&&!Te&&!_e(le.relatedTarget),Qe=!r.config.ignoredFocusElements.some(Dt=>Dt.contains(de));lt&&Qe&&(r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0&&r.input.value!==""&&r.input.value!==void 0&&s(),r.close(),r.config&&r.config.mode==="range"&&r.selectedDates.length===1&&(r.clear(!1),r.redraw()))}}function Le(le){if(!le||r.config.minDate&&le<r.config.minDate.getFullYear()||r.config.maxDate&&le>r.config.maxDate.getFullYear())return;let de=le,Te=r.currentYear!==de;r.currentYear=de||r.currentYear,r.config.maxDate&&r.currentYear===r.config.maxDate.getFullYear()?r.currentMonth=Math.min(r.config.maxDate.getMonth(),r.currentMonth):r.config.minDate&&r.currentYear===r.config.minDate.getFullYear()&&(r.currentMonth=Math.max(r.config.minDate.getMonth(),r.currentMonth)),Te&&(r.redraw(),er("onYearChange"),S())}function it(le,de=!0){var Te;let He=r.parseDate(le,void 0,de);if(r.config.minDate&&He&&la(He,r.config.minDate,de!==void 0?de:!r.minDateHasTime)<0||r.config.maxDate&&He&&la(He,r.config.maxDate,de!==void 0?de:!r.maxDateHasTime)>0)return!1;if(!r.config.enable&&r.config.disable.length===0)return!0;if(He===void 0)return!1;let lt=!!r.config.enable,Qe=(Te=r.config.enable)!==null&&Te!==void 0?Te:r.config.disable;for(let Dt=0,_t;Dt<Qe.length;Dt++){if(_t=Qe[Dt],typeof _t=="function"&&_t(He))return lt;if(_t instanceof Date&&He!==void 0&&_t.getTime()===He.getTime())return lt;if(typeof _t=="string"){let Xt=r.parseDate(_t,void 0,!0);return Xt&&Xt.getTime()===He.getTime()?lt:!lt}else if(typeof _t=="object"&&He!==void 0&&_t.from&&_t.to&&He.getTime()>=_t.from.getTime()&&He.getTime()<=_t.to.getTime())return lt}return!lt}function ze(le){return r.daysContainer!==void 0?le.className.indexOf("hidden")===-1&&le.className.indexOf("flatpickr-disabled")===-1&&r.daysContainer.contains(le):!1}function tt(le){le.target===r._input&&(r.selectedDates.length>0||r._input.value.length>0)&&!(le.relatedTarget&&_e(le.relatedTarget))&&r.setDate(r._input.value,!0,le.target===r.altInput?r.config.altFormat:r.config.dateFormat)}function wt(le){let de=sa(le),Te=r.config.wrap?t.contains(de):de===r._input,He=r.config.allowInput,lt=r.isOpen&&(!He||!Te),Qe=r.config.inline&&Te&&!He;if(le.keyCode===13&&Te){if(He)return r.setDate(r._input.value,!0,de===r.altInput?r.config.altFormat:r.config.dateFormat),de.blur();r.open()}else if(_e(de)||lt||Qe){let Dt=!!r.timeContainer&&r.timeContainer.contains(de);switch(le.keyCode){case 13:Dt?(le.preventDefault(),s(),Fe()):It(le);break;case 27:le.preventDefault(),Fe();break;case 8:case 46:Te&&!r.config.allowInput&&(le.preventDefault(),r.clear());break;case 37:case 39:if(!Dt&&!Te){if(le.preventDefault(),r.daysContainer!==void 0&&(He===!1||document.activeElement&&ze(document.activeElement))){let Xt=le.keyCode===39?1:-1;le.ctrlKey?(le.stopPropagation(),G(Xt),F(C(1),0)):F(void 0,Xt)}}else r.hourElement&&r.hourElement.focus();break;case 38:case 40:le.preventDefault();let _t=le.keyCode===40?1:-1;r.daysContainer&&de.$i!==void 0||de===r.input||de===r.altInput?le.ctrlKey?(le.stopPropagation(),Le(r.currentYear-_t),F(C(1),0)):Dt||F(void 0,_t*7):de===r.currentYearElement?Le(r.currentYear-_t):r.config.enableTime&&(!Dt&&r.hourElement&&r.hourElement.focus(),s(le),r._debouncedChange());break;case 9:if(Dt){let Xt=[r.hourElement,r.minuteElement,r.secondElement,r.amPM].concat(r.pluginElements).filter(dr=>dr),Yt=Xt.indexOf(de);if(Yt!==-1){let dr=Xt[Yt+(le.shiftKey?-1:1)];le.preventDefault(),(dr||r._input).focus()}}else!r.config.noCalendar&&r.daysContainer&&r.daysContainer.contains(de)&&le.shiftKey&&(le.preventDefault(),r._input.focus());break;default:break}}if(r.amPM!==void 0&&de===r.amPM)switch(le.key){case r.l10n.amPM[0].charAt(0):case r.l10n.amPM[0].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[0],f(),tr();break;case r.l10n.amPM[1].charAt(0):case r.l10n.amPM[1].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[1],f(),tr();break}(Te||_e(de))&&er("onKeyDown",le)}function Tt(le){if(r.selectedDates.length!==1||le&&(!le.classList.contains("flatpickr-day")||le.classList.contains("flatpickr-disabled")))return;let de=le?le.dateObj.getTime():r.days.firstElementChild.dateObj.getTime(),Te=r.parseDate(r.selectedDates[0],void 0,!0).getTime(),He=Math.min(de,r.selectedDates[0].getTime()),lt=Math.max(de,r.selectedDates[0].getTime()),Qe=!1,Dt=0,_t=0;for(let Xt=He;Xt<lt;Xt+=goe.DAY)it(new Date(Xt),!0)||(Qe=Qe||Xt>He&&Xt<lt,Xt<Te&&(!Dt||Xt>Dt)?Dt=Xt:Xt>Te&&(!_t||Xt<_t)&&(_t=Xt));for(let Xt=0;Xt<r.config.showMonths;Xt++){let Yt=r.daysContainer.children[Xt];for(let dr=0,sn=Yt.children.length;dr<sn;dr++){let zr=Yt.children[dr],Hr=zr.dateObj.getTime(),Jn=Dt>0&&Hr<Dt||_t>0&&Hr>_t;if(Jn){zr.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(Vi=>{zr.classList.remove(Vi)});continue}else if(Qe&&!Jn)continue;["startRange","inRange","endRange","notAllowed"].forEach(Vi=>{zr.classList.remove(Vi)}),le!==void 0&&(le.classList.add(de<=r.selectedDates[0].getTime()?"startRange":"endRange"),Te<de&&Hr===Te?zr.classList.add("startRange"):Te>de&&Hr===Te&&zr.classList.add("endRange"),Hr>=Dt&&(_t===0||Hr<=_t)&&poe(Hr,Te,de)&&zr.classList.add("inRange"))}}}function Ve(){r.isOpen&&!r.config.static&&!r.config.inline&&fe()}function Oe(le,de=r._positionElement){if(r.isMobile===!0){if(le){le.preventDefault();let He=sa(le);He&&He.blur()}r.mobileInput!==void 0&&(r.mobileInput.focus(),r.mobileInput.click()),er("onOpen");return}else if(r._input.disabled||r.config.inline)return;let Te=r.isOpen;r.isOpen=!0,Te||(r.calendarContainer.classList.add("open"),r._input.classList.add("active"),er("onOpen"),fe(de)),r.config.enableTime===!0&&r.config.noCalendar===!0&&r.config.allowInput===!1&&(le===void 0||!r.timeContainer.contains(le.relatedTarget))&&setTimeout(()=>r.hourElement.select(),50)}function Me(le){return de=>{let Te=r.config[`_${le}Date`]=r.parseDate(de,r.config.dateFormat),He=r.config[`_${le==="min"?"max":"min"}Date`];Te!==void 0&&(r[le==="min"?"minDateHasTime":"maxDateHasTime"]=Te.getHours()>0||Te.getMinutes()>0||Te.getSeconds()>0),r.selectedDates&&(r.selectedDates=r.selectedDates.filter(lt=>it(lt)),!r.selectedDates.length&&le==="min"&&p(Te),tr()),r.daysContainer&&($e(),Te!==void 0?r.currentYearElement[le]=Te.getFullYear().toString():r.currentYearElement.removeAttribute(le),r.currentYearElement.disabled=!!He&&Te!==void 0&&He.getFullYear()===Te.getFullYear())}}function he(){let le=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],de=Object.assign(Object.assign({},JSON.parse(JSON.stringify(t.dataset||{}))),e),Te={};r.config.parseDate=de.parseDate,r.config.formatDate=de.formatDate,Object.defineProperty(r.config,"enable",{get:()=>r.config._enable,set:Qe=>{r.config._enable=xe(Qe)}}),Object.defineProperty(r.config,"disable",{get:()=>r.config._disable,set:Qe=>{r.config._disable=xe(Qe)}});let He=de.mode==="time";if(!de.dateFormat&&(de.enableTime||He)){let Qe=ui.defaultConfig.dateFormat||Mf.dateFormat;Te.dateFormat=de.noCalendar||He?"H:i"+(de.enableSeconds?":S":""):Qe+" H:i"+(de.enableSeconds?":S":"")}if(de.altInput&&(de.enableTime||He)&&!de.altFormat){let Qe=ui.defaultConfig.altFormat||Mf.altFormat;Te.altFormat=de.noCalendar||He?"h:i"+(de.enableSeconds?":S K":" K"):Qe+` h:i${de.enableSeconds?":S":""} K`}Object.defineProperty(r.config,"minDate",{get:()=>r.config._minDate,set:Me("min")}),Object.defineProperty(r.config,"maxDate",{get:()=>r.config._maxDate,set:Me("max")});let lt=Qe=>Dt=>{r.config[Qe==="min"?"_minTime":"_maxTime"]=r.parseDate(Dt,"H:i:S")};Object.defineProperty(r.config,"minTime",{get:()=>r.config._minTime,set:lt("min")}),Object.defineProperty(r.config,"maxTime",{get:()=>r.config._maxTime,set:lt("max")}),de.mode==="time"&&(r.config.noCalendar=!0,r.config.enableTime=!0),Object.assign(r.config,Te,de);for(let Qe=0;Qe<le.length;Qe++)r.config[le[Qe]]=r.config[le[Qe]]===!0||r.config[le[Qe]]==="true";aE.filter(Qe=>r.config[Qe]!==void 0).forEach(Qe=>{r.config[Qe]=uE(r.config[Qe]||[]).map(o)}),r.isMobile=!r.config.disableMobile&&!r.config.inline&&r.config.mode==="single"&&!r.config.disable.length&&!r.config.enable&&!r.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let Qe=0;Qe<r.config.plugins.length;Qe++){let Dt=r.config.plugins[Qe](r)||{};for(let _t in Dt)aE.indexOf(_t)>-1?r.config[_t]=uE(Dt[_t]).map(o).concat(r.config[_t]):typeof de[_t]>"u"&&(r.config[_t]=Dt[_t])}de.altInputClass||(r.config.altInputClass=J().className+" "+r.config.altInputClass),er("onParseConfig")}function J(){return r.config.wrap?t.querySelector("[data-input]"):t}function re(){typeof r.config.locale!="object"&&typeof ui.l10ns[r.config.locale]>"u"&&r.config.errorHandler(new Error(`flatpickr: invalid locale ${r.config.locale}`)),r.l10n=Object.assign(Object.assign({},ui.l10ns.default),typeof r.config.locale=="object"?r.config.locale:r.config.locale!=="default"?ui.l10ns[r.config.locale]:void 0),D0.K=`(${r.l10n.amPM[0]}|${r.l10n.amPM[1]}|${r.l10n.amPM[0].toLowerCase()}|${r.l10n.amPM[1].toLowerCase()})`,Object.assign(Object.assign({},e),JSON.parse(JSON.stringify(t.dataset||{}))).time_24hr===void 0&&ui.defaultConfig.time_24hr===void 0&&(r.config.time_24hr=r.l10n.time_24hr),r.formatDate=aF(r),r.parseDate=cE({config:r.config,l10n:r.l10n})}function fe(le){if(typeof r.config.position=="function")return void r.config.position(r,le);if(r.calendarContainer===void 0)return;er("onPreCalendarPosition");let de=le||r._positionElement,Te=Array.prototype.reduce.call(r.calendarContainer.children,(Ci,ln)=>Ci+ln.offsetHeight,0),He=r.calendarContainer.offsetWidth,lt=r.config.position.split(" "),Qe=lt[0],Dt=lt.length>1?lt[1]:null,_t=de.getBoundingClientRect(),Xt=window.innerHeight-_t.bottom,Yt=Qe==="above"||Qe!=="below"&&Xt<Te&&_t.top>Te,dr=window.pageYOffset+_t.top+(Yt?-Te-2:de.offsetHeight+2);if(go(r.calendarContainer,"arrowTop",!Yt),go(r.calendarContainer,"arrowBottom",Yt),r.config.inline)return;let sn=window.pageXOffset+_t.left,zr=!1,vo=!1;Dt==="center"?(sn-=(He-_t.width)/2,zr=!0):Dt==="right"&&(sn-=He-_t.width,vo=!0),go(r.calendarContainer,"arrowLeft",!zr&&!vo),go(r.calendarContainer,"arrowCenter",zr),go(r.calendarContainer,"arrowRight",vo);let Hr=window.document.body.offsetWidth-(window.pageXOffset+_t.right),Jn=sn+He>window.document.body.offsetWidth,Vi=Hr+He>window.document.body.offsetWidth;if(go(r.calendarContainer,"rightMost",Jn),!r.config.static)if(r.calendarContainer.style.top=`${dr}px`,!Jn)r.calendarContainer.style.left=`${sn}px`,r.calendarContainer.style.right="auto";else if(!Vi)r.calendarContainer.style.left="auto",r.calendarContainer.style.right=`${Hr}px`;else{let Ci=ht();if(Ci===void 0)return;let ln=window.document.body.offsetWidth,Ro=Math.max(0,ln/2-He/2),Ti=".flatpickr-calendar.centerMost:before",$s=".flatpickr-calendar.centerMost:after",yo=Ci.cssRules.length,qo=`{left:${_t.left}px;right:auto;}`;go(r.calendarContainer,"rightMost",!1),go(r.calendarContainer,"centerMost",!0),Ci.insertRule(`${Ti},${$s}${qo}`,yo),r.calendarContainer.style.left=`${Ro}px`,r.calendarContainer.style.right="auto"}}function ht(){let le=null;for(let de=0;de<document.styleSheets.length;de++){let Te=document.styleSheets[de];try{Te.cssRules}catch{continue}le=Te;break}return le??ke()}function ke(){let le=document.createElement("style");return document.head.appendChild(le),le.sheet}function $e(){r.config.noCalendar||r.isMobile||(S(),Zt(),V())}function Fe(){r._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(r.close,0):r.close()}function It(le){le.preventDefault(),le.stopPropagation();let de=Dt=>Dt.classList&&Dt.classList.contains("flatpickr-day")&&!Dt.classList.contains("flatpickr-disabled")&&!Dt.classList.contains("notAllowed"),Te=nF(sa(le),de);if(Te===void 0)return;let He=Te,lt=r.latestSelectedDateObj=new Date(He.dateObj.getTime()),Qe=(lt.getMonth()<r.currentMonth||lt.getMonth()>r.currentMonth+r.config.showMonths-1)&&r.config.mode!=="range";if(r.selectedDateElem=He,r.config.mode==="single")r.selectedDates=[lt];else if(r.config.mode==="multiple"){let Dt=Ze(lt);Dt?r.selectedDates.splice(parseInt(Dt),1):r.selectedDates.push(lt)}else r.config.mode==="range"&&(r.selectedDates.length===2&&r.clear(!1,!1),r.latestSelectedDateObj=lt,r.selectedDates.push(lt),la(lt,r.selectedDates[0],!0)!==0&&r.selectedDates.sort((Dt,_t)=>Dt.getTime()-_t.getTime()));if(f(),Qe){let Dt=r.currentYear!==lt.getFullYear();r.currentYear=lt.getFullYear(),r.currentMonth=lt.getMonth(),Dt&&(er("onYearChange"),S()),er("onMonthChange")}if(Zt(),V(),tr(),!Qe&&r.config.mode!=="range"&&r.config.showMonths===1?_(He):r.selectedDateElem!==void 0&&r.hourElement===void 0&&r.selectedDateElem&&r.selectedDateElem.focus(),r.hourElement!==void 0&&r.hourElement!==void 0&&r.hourElement.focus(),r.config.closeOnSelect){let Dt=r.config.mode==="single"&&!r.config.enableTime,_t=r.config.mode==="range"&&r.selectedDates.length===2&&!r.config.enableTime;(Dt||_t)&&Fe()}w()}let ut={locale:[re,X],showMonths:[q,a,z],minDate:[k],maxDate:[k],clickOpens:[()=>{r.config.clickOpens===!0?(x(r._input,"focus",r.open),x(r._input,"click",r.open)):(r._input.removeEventListener("focus",r.open),r._input.removeEventListener("click",r.open))}]};function gt(le,de){if(le!==null&&typeof le=="object"){Object.assign(r.config,le);for(let Te in le)ut[Te]!==void 0&&ut[Te].forEach(He=>He())}else r.config[le]=de,ut[le]!==void 0?ut[le].forEach(Te=>Te()):aE.indexOf(le)>-1&&(r.config[le]=uE(de));r.redraw(),tr(!0)}function st(le,de){let Te=[];if(le instanceof Array)Te=le.map(He=>r.parseDate(He,de));else if(le instanceof Date||typeof le=="number")Te=[r.parseDate(le,de)];else if(typeof le=="string")switch(r.config.mode){case"single":case"time":Te=[r.parseDate(le,de)];break;case"multiple":Te=le.split(r.config.conjunction).map(He=>r.parseDate(He,de));break;case"range":Te=le.split(r.l10n.rangeSeparator).map(He=>r.parseDate(He,de));break;default:break}else r.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(le)}`));r.selectedDates=r.config.allowInvalidPreload?Te:Te.filter(He=>He instanceof Date&&it(He,!1)),r.config.mode==="range"&&r.selectedDates.sort((He,lt)=>He.getTime()-lt.getTime())}function ye(le,de=!1,Te=r.config.dateFormat){if(le!==0&&!le||le instanceof Array&&le.length===0)return r.clear(de);st(le,Te),r.latestSelectedDateObj=r.selectedDates[r.selectedDates.length-1],r.redraw(),k(void 0,de),p(),r.selectedDates.length===0&&r.clear(!1),tr(de),de&&er("onChange")}function xe(le){return le.slice().map(de=>typeof de=="string"||typeof de=="number"||de instanceof Date?r.parseDate(de,void 0,!0):de&&typeof de=="object"&&de.from&&de.to?{from:r.parseDate(de.from,void 0),to:r.parseDate(de.to,void 0)}:de).filter(de=>de)}function We(){r.selectedDates=[],r.now=r.parseDate(r.config.now)||new Date;let le=r.config.defaultDate||((r.input.nodeName==="INPUT"||r.input.nodeName==="TEXTAREA")&&r.input.placeholder&&r.input.value===r.input.placeholder?null:r.input.value);le&&st(le,r.config.dateFormat),r._initialDate=r.selectedDates.length>0?r.selectedDates[0]:r.config.minDate&&r.config.minDate.getTime()>r.now.getTime()?r.config.minDate:r.config.maxDate&&r.config.maxDate.getTime()<r.now.getTime()?r.config.maxDate:r.now,r.currentYear=r._initialDate.getFullYear(),r.currentMonth=r._initialDate.getMonth(),r.selectedDates.length>0&&(r.latestSelectedDateObj=r.selectedDates[0]),r.config.minTime!==void 0&&(r.config.minTime=r.parseDate(r.config.minTime,"H:i")),r.config.maxTime!==void 0&&(r.config.maxTime=r.parseDate(r.config.maxTime,"H:i")),r.minDateHasTime=!!r.config.minDate&&(r.config.minDate.getHours()>0||r.config.minDate.getMinutes()>0||r.config.minDate.getSeconds()>0),r.maxDateHasTime=!!r.config.maxDate&&(r.config.maxDate.getHours()>0||r.config.maxDate.getMinutes()>0||r.config.maxDate.getSeconds()>0)}function bt(){if(r.input=J(),!r.input){r.config.errorHandler(new Error("Invalid input element specified"));return}r.input._type=r.input.type,r.input.type="text",r.input.classList.add("flatpickr-input"),r._input=r.input,r.config.altInput&&(r.altInput=jr(r.input.nodeName,r.config.altInputClass),r._input=r.altInput,r.altInput.placeholder=r.input.placeholder,r.altInput.disabled=r.input.disabled,r.altInput.required=r.input.required,r.altInput.tabIndex=r.input.tabIndex,r.altInput.type="text",r.input.setAttribute("type","hidden"),!r.config.static&&r.input.parentNode&&r.input.parentNode.insertBefore(r.altInput,r.input.nextSibling)),r.config.allowInput||r._input.setAttribute("readonly","readonly"),r._positionElement=r.config.positionElement||r._input}function Gr(){let le=r.config.enableTime?r.config.noCalendar?"time":"datetime-local":"date";r.mobileInput=jr("input",r.input.className+" flatpickr-mobile"),r.mobileInput.tabIndex=1,r.mobileInput.type=le,r.mobileInput.disabled=r.input.disabled,r.mobileInput.required=r.input.required,r.mobileInput.placeholder=r.input.placeholder,r.mobileFormatStr=le==="datetime-local"?"Y-m-d\\TH:i:S":le==="date"?"Y-m-d":"H:i:S",r.selectedDates.length>0&&(r.mobileInput.defaultValue=r.mobileInput.value=r.formatDate(r.selectedDates[0],r.mobileFormatStr)),r.config.minDate&&(r.mobileInput.min=r.formatDate(r.config.minDate,"Y-m-d")),r.config.maxDate&&(r.mobileInput.max=r.formatDate(r.config.maxDate,"Y-m-d")),r.input.getAttribute("step")&&(r.mobileInput.step=String(r.input.getAttribute("step"))),r.input.type="hidden",r.altInput!==void 0&&(r.altInput.type="hidden");try{r.input.parentNode&&r.input.parentNode.insertBefore(r.mobileInput,r.input.nextSibling)}catch{}x(r.mobileInput,"change",de=>{r.setDate(sa(de).value,!1,r.mobileFormatStr),er("onChange"),er("onClose")})}function vt(le){if(r.isOpen===!0)return r.close();r.open(le)}function er(le,de){if(r.config===void 0)return;let Te=r.config[le];if(Te!==void 0&&Te.length>0)for(let He=0;Te[He]&&He<Te.length;He++)Te[He](r.selectedDates,r.input.value,r,de);le==="onChange"&&(r.input.dispatchEvent(Ie("change")),r.input.dispatchEvent(Ie("input")))}function Ie(le){let de=document.createEvent("Event");return de.initEvent(le,!0,!0),de}function Ze(le){for(let de=0;de<r.selectedDates.length;de++)if(la(r.selectedDates[de],le)===0)return""+de;return!1}function dt(le){return r.config.mode!=="range"||r.selectedDates.length<2?!1:la(le,r.selectedDates[0])>=0&&la(le,r.selectedDates[1])<=0}function Zt(){r.config.noCalendar||r.isMobile||!r.monthNav||(r.yearElements.forEach((le,de)=>{let Te=new Date(r.currentYear,r.currentMonth,1);Te.setMonth(r.currentMonth+de),r.config.showMonths>1||r.config.monthSelectorType==="static"?r.monthElements[de].textContent=A0(Te.getMonth(),r.config.shorthandCurrentMonth,r.l10n)+" ":r.monthsDropdownContainer.value=Te.getMonth().toString(),le.value=Te.getFullYear().toString()}),r._hidePrevMonthArrow=r.config.minDate!==void 0&&(r.currentYear===r.config.minDate.getFullYear()?r.currentMonth<=r.config.minDate.getMonth():r.currentYear<r.config.minDate.getFullYear()),r._hideNextMonthArrow=r.config.maxDate!==void 0&&(r.currentYear===r.config.maxDate.getFullYear()?r.currentMonth+1>r.config.maxDate.getMonth():r.currentYear>r.config.maxDate.getFullYear()))}function jt(le){return r.selectedDates.map(de=>r.formatDate(de,le)).filter((de,Te,He)=>r.config.mode!=="range"||r.config.enableTime||He.indexOf(de)===Te).join(r.config.mode!=="range"?r.config.conjunction:r.l10n.rangeSeparator)}function tr(le=!0){r.mobileInput!==void 0&&r.mobileFormatStr&&(r.mobileInput.value=r.latestSelectedDateObj!==void 0?r.formatDate(r.latestSelectedDateObj,r.mobileFormatStr):""),r.input.value=jt(r.config.dateFormat),r.altInput!==void 0&&(r.altInput.value=jt(r.config.altFormat)),le!==!1&&er("onValueUpdate")}function sr(le){let de=sa(le),Te=r.prevMonthNav.contains(de),He=r.nextMonthNav.contains(de);Te||He?G(Te?-1:1):r.yearElements.indexOf(de)>=0?de.select():de.classList.contains("arrowUp")?r.changeYear(r.currentYear+1):de.classList.contains("arrowDown")&&r.changeYear(r.currentYear-1)}function Hn(le){le.preventDefault();let de=le.type==="keydown",Te=sa(le),He=Te;r.amPM!==void 0&&Te===r.amPM&&(r.amPM.textContent=r.l10n.amPM[aa(r.amPM.textContent===r.l10n.amPM[0])]);let lt=parseFloat(He.getAttribute("min")),Qe=parseFloat(He.getAttribute("max")),Dt=parseFloat(He.getAttribute("step")),_t=parseInt(He.value,10),Xt=le.delta||(de?le.which===38?1:-1:0),Yt=_t+Dt*Xt;if(typeof He.value<"u"&&He.value.length===2){let dr=He===r.hourElement,sn=He===r.minuteElement;Yt<lt?(Yt=Qe+Yt+aa(!dr)+(aa(dr)&&aa(!r.amPM)),sn&&D(void 0,-1,r.hourElement)):Yt>Qe&&(Yt=He===r.hourElement?Yt-Qe-aa(!r.amPM):lt,sn&&D(void 0,1,r.hourElement)),r.amPM&&dr&&(Dt===1?Yt+_t===23:Math.abs(Yt-_t)>Dt)&&(r.amPM.textContent=r.l10n.amPM[aa(r.amPM.textContent===r.l10n.amPM[0])]),He.value=po(Yt)}}return i(),r}function mm(t,e){let r=Array.prototype.slice.call(t).filter(i=>i instanceof HTMLElement),n=[];for(let i=0;i<r.length;i++){let o=r[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=TQe(o,e||{}),n.push(o._flatpickr)}catch(a){console.error(a)}}return n.length===1?n[0]:n}var CQe,ui,yoe,boe=se(()=>{Jq();eF();rF();doe();moe();oF();voe();CQe=300;typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return mm(this,t)},HTMLElement.prototype.flatpickr=function(t){return mm([this],t)});ui=function(t,e){return typeof t=="string"?mm(window.document.querySelectorAll(t),e):t instanceof Node?mm([t],e):mm(t,e)};ui.defaultConfig={};ui.l10ns={en:Object.assign({},lE),default:Object.assign({},lE)};ui.localize=t=>{ui.l10ns.default=Object.assign(Object.assign({},ui.l10ns.default),t)};ui.setDefaults=t=>{ui.defaultConfig=Object.assign(Object.assign({},ui.defaultConfig),t)};ui.parseDate=cE({});ui.formatDate=aF({});ui.compareDates=la;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(t){return mm(this,t)});Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof t=="string"?parseInt(t,10):t))};typeof window<"u"&&(window.flatpickr=ui);yoe=ui});function xoe(t){return new Date(new Date(t).getTime()+new Date(t).getTimezoneOffset()*60*1e3)}var xh,woe,_oe,O0,Soe=se(()=>{Pr();xh=Vr(foe());boe();woe="y/LL/dd",_oe="TT",O0=class extends Ct{constructor(){super(...arguments);pt(this,"flatpickrInstance");pt(this,"cachedInitialValue")}get browserZone(){return xh.DateTime.local().zoneName}get initialValue(){return this.isOnShow||this.isOnIndex?this.context.element.innerText:this.isOnEdit?this.inputTarget.value:null}get isOnIndex(){return this.viewValue==="index"}get isOnEdit(){return this.viewValue==="edit"}get isOnShow(){return this.viewValue==="show"}get fieldIsDate(){return this.fieldTypeValue==="date"}get fieldIsDateTime(){return this.fieldTypeValue==="dateTime"}get fieldIsTime(){return this.fieldTypeValue==="time"}get fieldHasTime(){return this.fieldIsTime||this.fieldIsDateTime}get parsedValue(){return xh.DateTime.fromISO(this.initialValue,{zone:"UTC"})}get displayTimezone(){return this.timezoneValue||this.browserZone}connect(){this.cacheInitialValue(),this.isOnShow||this.isOnIndex?this.initShow():this.isOnEdit&&this.initEdit()}disconnect(){this.isOnShow||this.isOnIndex?this.context.element.innerText=this.cachedInitialValue:this.isOnEdit&&this.flatpickrInstance&&this.flatpickrInstance.destroy()}cacheInitialValue(){this.cachedInitialValue=this.initialValue}initShow(){let t=this.parsedValue;this.fieldHasTime&&this.relativeValue&&(t=t.setZone(this.displayTimezone)),this.context.element.innerText=t.toFormat(this.formatValue)}initEdit(){let t=za({enableTime:!1,enableSeconds:!1,time_24hr:this.time24HrValue,locale:{firstDayOfWeek:0},altInput:!0,onChange:this.onChange.bind(this),noCalendar:!1},this.pickerOptionsValue);if(t.altFormat=this.pickerFormatValue,t.disableMobile=this.disableMobileValue,t.locale.firstDayOfWeek=this.firstDayOfWeekValue,t.enableTime=this.enableTimeValue,t.enableSeconds=this.enableTimeValue,t.noCalendar=this.noCalendarValue,this.fieldHasTime&&(t.dateFormat="Y-m-d H:i:S"),this.initialValue)switch(this.fieldTypeValue){case"date":t.defaultDate=xoe(this.initialValue);break;default:case"time":t.defaultDate=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO();break;case"dateTime":t.defaultDate=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO();break}if(this.flatpickrInstance=yoe(this.fakeInputTarget,t),!this.initialValue)return;let e;switch(this.fieldTypeValue){case"time":e=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!0}).toFormat(_oe);break;case"date":e=xh.DateTime.fromJSDate(xoe(this.initialValue)).toFormat(woe);break;default:case"dateTime":e=this.parsedValue.setZone(this.displayTimezone).toISO();break}this.updateRealInput(e)}onChange(t){if(t.length===0){this.updateRealInput("");return}let e;switch(this.fieldTypeValue){case"time":e=xh.DateTime.fromISO(t[0].toISOString()).setZone("UTC",{keepLocalTime:!this.relativeValue}).toFormat(_oe);break;case"date":e=xh.DateTime.fromISO(t[0].toISOString()).setZone("UTC",{keepLocalTime:!0}).toFormat(woe);break;default:case"dateTime":e=xh.DateTime.fromISO(t[0].toISOString()).setZone("UTC",{keepLocalTime:!this.relativeValue}).toISO();break}this.updateRealInput(e)}updateRealInput(t){this.inputTarget.value=t}};pt(O0,"targets",["input","fakeInput"]),pt(O0,"values",{view:String,timezone:String,format:String,enableTime:Boolean,pickerFormat:String,firstDayOfWeek:Number,time24Hr:Boolean,disableMobile:Boolean,noCalendar:Boolean,relative:Boolean,fieldType:{type:String,default:"dateTime"},pickerOptions:{type:Object,default:{}}})});var dE,koe=se(()=>{Pr();dE=class extends Ct{showContent(t){this.contentTarget.classList.toggle("hidden"),t.target.classList.add("hidden")}};pt(dE,"targets",["content"])});var M0,Eoe=se(()=>{Pr();M0=class extends Ct{connect(){this.resourceName=this.element.dataset.resourceName}toggle(t){let e=!!t.target.checked;document.querySelectorAll(`[data-controller="item-selector"][data-resource-name="${this.resourceName}"] input[type=checkbox]`).forEach(r=>r.checked!==e&&r.click()),this.selectAllEnabled()&&(this.selectAllOverlay(e),e||this.resetUnselected())}selectRow(){let t=!0;this.itemCheckboxTargets.forEach(e=>t=t&&e.checked),this.checkboxTarget.checked=t,this.selectAllEnabled()&&(this.selectAllOverlay(t),this.resetUnselected())}selectAll(t){t.preventDefault(),this.selectedAllValue=!this.selectedAllValue,this.unselectedMessageTarget.classList.toggle("hidden"),this.selectedMessageTarget.classList.toggle("hidden")}resetUnselected(){this.selectedAllValue=!1,this.unselectedMessageTarget.classList.remove("hidden"),this.selectedMessageTarget.classList.add("hidden")}selectAllOverlay(t){t?this.selectAllOverlayTarget.classList.remove("hidden"):this.selectAllOverlayTarget.classList.add("hidden")}selectAllEnabled(){return this.pageCountValue>1&&this.selectedAllQueryValue!=="select_all_disabled"}};pt(M0,"targets",["itemCheckbox","checkbox","selectAllOverlay","unselectedMessage","selectedMessage"]),pt(M0,"values",{pageCount:Number,selectedAll:Boolean,selectedAllQuery:String})});var hE,Coe=se(()=>{Pr();hE=class extends Ct{constructor(){super(...arguments);pt(this,"checkbox",{});pt(this,"enabledClasses",["text-black"]);pt(this,"disabledClasses",["text-gray-500"])}get actionsPanelPresent(){return this.actionsButtonElement!==null}get currentIds(){try{return JSON.parse(this.stateHolderElement.dataset.selectedResources)}catch(t){return[]}}get actionLinks(){return document.querySelectorAll('.js-actions-dropdown a[data-actions-picker-target="resourceAction"]')}set currentIds(t){this.stateHolderElement.dataset.selectedResources=JSON.stringify(t),this.actionsPanelPresent&&(t.length>0?this.enableResourceActions():this.disableResourceActions())}connect(){this.resourceName=this.element.dataset.resourceName,this.resourceId=this.element.dataset.resourceId,this.actionsButtonElement=document.querySelector(`[data-actions-dropdown-button="${this.resourceName}"]`),this.stateHolderElement=document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`)}addToSelected(){let t=this.currentIds;t.push(this.resourceId),this.currentIds=t}removeFromSelected(){this.currentIds=this.currentIds.filter(t=>t.toString()!==this.resourceId)}toggle(t){this.checkbox=t.target,this.checkbox.checked?this.addToSelected():this.removeFromSelected()}enableResourceActions(){this.actionLinks.forEach(t=>{t.classList.add(...this.enabledClasses),t.classList.remove(...this.disabledClasses),t.setAttribute("data-href",t.getAttribute("href")),t.dataset.disabled=!1})}disableResourceActions(){this.actionLinks.forEach(t=>{t.classList.remove(...this.enabledClasses),t.classList.add(...this.disabledClasses),t.setAttribute("href",t.getAttribute("data-href")),t.dataset.disabled=!0})}};pt(hE,"targets",["panel"])});var pE,Toe=se(()=>{Pr();em();pE=class extends Ct{constructor(){super(...arguments);pt(this,"fieldValue",[]);pt(this,"options",{})}get keyInputDisabled(){return!this.options.editable||this.options.disable_editing_keys}get valueInputDisabled(){return!this.options.editable}connect(){this.setOptions();try{let t=JSON.parse(this.inputTarget.value);Object.keys(t).forEach(e=>this.fieldValue.push([e,t[e]]))}catch(t){this.fieldValue=[]}this.updateKeyValueComponent()}addRow(){this.options.disable_adding_rows||!this.options.editable||(this.fieldValue.push(["",""]),this.updateKeyValueComponent(),this.focusLastRow())}deleteRow(t){if(this.options.disable_deleting_rows||!this.options.editable)return;let{index:e}=t.params;this.fieldValue.splice(e,1),this.updateTextareaInput(),this.updateKeyValueComponent()}focusLastRow(){return this.rowsTarget.querySelector(".flex.key-value-row:last-child .key-value-input-key").focus()}valueFieldUpdated(t){let{value:e}=t.target,{index:r}=t.target.dataset;this.fieldValue[r][1]=e,this.updateTextareaInput()}keyFieldUpdated(t){let{value:e}=t.target,{index:r}=t.target.dataset;this.fieldValue[r][0]=e,this.updateTextareaInput()}updateTextareaInput(){if(!this.hasInputTarget)return;let t={};this.fieldValue&&this.fieldValue.length>0&&(t=Object.assign(...this.fieldValue.map(([e,r])=>({[e]:r})))),this.inputTarget.innerText=JSON.stringify(t),this.inputTarget.dispatchEvent(new Event("input"))}updateKeyValueComponent(){let t="",e=0;this.fieldValue.forEach(r=>{let[n,i]=r;t+=this.interpolatedRow(n,i,e),e++}),this.rowsTarget.innerHTML=t,window.initTippy()}interpolatedRow(t,e,r){let n=`<div class="flex key-value-row">
73
73
  ${this.inputField("key",r,t,e)}
74
74
  ${this.inputField("value",r,t,e)}`;return this.options.editable&&(n+=`<a
75
75
  href="javascript:void(0);"
@@ -413,7 +413,7 @@ function print() { __p += __j.call(arguments, '') }
413
413
  %t [data-trix-cursor-target=right] {
414
414
  vertical-align: bottom !important;
415
415
  margin-right: -1px !important;
416
- }`,trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++A),this.trixId)}},labels:{get:function(){var D,M,P;return M=[],this.id&&this.ownerDocument&&M.push.apply(M,this.ownerDocument.querySelectorAll("label[for='"+this.id+"']")),(D=i(this,{matchingSelector:"label"}))&&((P=D.control)===this||P===null)&&M.push(D),M}},toolbarElement:{get:function(){var D,M,P;return this.hasAttribute("toolbar")?(M=this.ownerDocument)!=null?M.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(P="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",P),D=s("trix-toolbar",{id:P}),this.parentNode.insertBefore(D,this),D):void 0}},inputElement:{get:function(){var D,M,P;return this.hasAttribute("input")?(P=this.ownerDocument)!=null?P.getElementById(this.getAttribute("input")):void 0:this.parentNode?(M="trix-input-"+this.trixId,this.setAttribute("input",M),D=s("input",{type:"hidden",id:M}),this.parentNode.insertBefore(D,this.nextElementSibling),D):void 0}},editor:{get:function(){var D;return(D=this.editorController)!=null?D.editor:void 0}},name:{get:function(){var D;return(D=this.inputElement)!=null?D.name:void 0}},value:{get:function(){var D;return(D=this.inputElement)!=null?D.value:void 0},set:function(D){var M;return this.defaultValue=D,(M=this.editor)!=null?M.loadHTML(this.defaultValue):void 0}},notify:function(D,M){return this.editorController?u("trix-"+D,{onElement:this,attributes:M}):void 0},setInputElementValue:function(D){var M;return(M=this.inputElement)!=null?M.value=D:void 0},initialize:function(){return this.hasAttribute("data-trix-internal")?void 0:(k(this),f(this),w(this))},connect:function(){return this.hasAttribute("data-trix-internal")?void 0:(this.editorController||(u("trix-before-initialize",{onElement:this}),this.editorController=new e.EditorController({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(function(D){return function(){return u("trix-initialize",{onElement:D})}}(this))),this.editorController.registerSelectionManager(),this.registerResetListener(),this.registerClickListener(),p(this))},disconnect:function(){var D;return(D=this.editorController)!=null&&D.unregisterSelectionManager(),this.unregisterResetListener(),this.unregisterClickListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},registerClickListener:function(){return this.clickListener=this.clickBubbled.bind(this),window.addEventListener("click",this.clickListener,!1)},unregisterClickListener:function(){return window.removeEventListener("click",this.clickListener,!1)},resetBubbled:function(D){var M;if(!D.defaultPrevented&&D.target===((M=this.inputElement)!=null?M.form:void 0))return this.reset()},clickBubbled:function(D){var M;if(!(D.defaultPrevented||this.contains(D.target)||!(M=i(D.target,{matchingSelector:"label"}))||c.call(this.labels,M)<0))return this.focus()},reset:function(){return this.value=this.defaultValue}}}())}.call(this),function(){}.call(this)}).call(this),typeof Dh=="object"&&Dh.exports?Dh.exports=e:typeof define=="function"&&define.amd&&define(e)}.call(Ah)});var rIt,AC,ode=se(()=>{rIt=Vr(ide());Pr();em();AC=class extends Ct{get resourceId(){return this.controllerTarget.dataset.resourceId}get resourceName(){return this.controllerTarget.dataset.resourceName}get attachmentKey(){return this.controllerTarget.dataset.attachmentKey}get attachmentsDisabled(){return Io(this.controllerTarget.dataset.attachmentsDisabled)}get hideAttachmentFilename(){return Io(this.controllerTarget.dataset.hideAttachmentFilename)}get hideAttachmentFilesize(){return Io(this.controllerTarget.dataset.hideAttachmentFilesize)}get hideAttachmentUrl(){return Io(this.controllerTarget.dataset.hideAttachmentUrl)}get uploadUrl(){return`${window.location.origin}${window.Avo.configuration.root_path}/avo_api/resources/${this.resourceName}/${this.resourceId}/attachments`}connect(){this.attachmentsDisabled&&this.controllerTarget.querySelector(".trix-button-group--file-tools").remove(),window.addEventListener("trix-file-accept",t=>{if(t.target===this.editorTarget){if(this.attachmentsDisabled){t.preventDefault(),alert("This field has attachments disabled.");return}if(this.resourceId===""){t.preventDefault(),alert("You can't upload files into the Trix editor until you save the resource.");return}this.attachmentKey===""&&(t.preventDefault(),alert("You haven't set an `attachment_key` to this Trix field."))}}),window.addEventListener("trix-attachment-add",t=>{t.target===this.editorTarget&&t.attachment.file&&this.uploadFileAttachment(t.attachment)})}uploadFileAttachment(t){this.uploadFile(t.file,e=>t.setUploadProgress(e),e=>t.setAttributes(e))}uploadFile(t,e,r){let n=this.createFormData(t),i=new XMLHttpRequest;i.open("POST",this.uploadUrl,!0),i.setRequestHeader("X-CSRF-Token",document.querySelector('meta[name="csrf-token"]').content),i.upload.addEventListener("progress",o=>{let a=o.loaded/o.total*100;e(a)}),i.addEventListener("load",()=>{if(i.status===200){let o;try{o=JSON.parse(i.response)}catch(s){o={}}let a={url:o.url,href:o.href};this.hideAttachmentFilename&&(a.filename=null),this.hideAttachmentFilesize&&(a.filesize=null),this.hideAttachmentUrl&&(a.href=null),r(a)}}),i.send(n)}createFormData(t){let e=new FormData;return e.append("Content-Type",t.type),e.append("file",t),e.append("filename",t.name),e.append("attachment_key",this.attachmentKey),e}};pt(AC,"targets",["editor","controller"])});var ade=se(()=>{Rre();qre();Fre();Nre();Bre();$re();tie();rie();nie();Soe();nm();koe();Eoe();Coe();Toe();Aoe();Doe();Ooe();Moe();Ioe();gse();mse();vse();Ice();Pce();Rce();jce();Ofe();Mfe();Bfe();jfe();zfe();nde();ode();mr.register("action",I1);mr.register("actions-picker",p0);mr.register("attachments",L1);mr.register("boolean-filter",B1);mr.register("copy-to-clipboard",uq);mr.register("dashboard-card",U1);mr.register("filter",Ca);mr.register("hidden-input",dE);mr.register("item-select-all",M0);mr.register("item-selector",hE);mr.register("loading-button",gE);mr.register("menu",mE);mr.register("modal",vE);mr.register("multiple-select-filter",yE);mr.register("per-page",bE);mr.register("resource-edit",P0);mr.register("resource-index",fF);mr.register("resource-show",dF);mr.register("search",VE);mr.register("select",$E);mr.register("select-filter",YE);mr.register("sidebar",H0);mr.register("tabs",Y0);mr.register("tags-field",_C);mr.register("text-filter",SC);mr.register("tippy",kC);mr.register("toggle-panel",TC);mr.register("belongs-to-field",P1);mr.register("code-field",W1);mr.register("date-field",O0);mr.register("key-value",pE);mr.register("simple-mde",wC);mr.register("trix-field",AC)});var Grt=Z(cde=>{var zIt=Vr(uX()),HIt=Vr(cX()),sde=Vr(dX()),lde=Vr(mL());FL();var ude=Vr(hQ());pP();tre();rre();ade();ude.default.start();window.Turbolinks=Yd;var DC=null;lde.bind("r r r",()=>{DC=document.scrollingElement.scrollTop,Yd.visit(window.location.href,{action:"replace"})});function Krt(){window.navigator.userAgent.indexOf("Mac OS X")>=0?(document.body.classList.add("os-mac"),document.body.classList.remove("os-pc")):(document.body.classList.add("os-pc"),document.body.classList.remove("os-mac"))}function hN(){lk('[data-tippy="tooltip"]',{theme:"light",content(t){let e=t.getAttribute("title");return t.removeAttribute("title"),t.removeAttribute("data-tippy"),e}})}window.initTippy=hN;sde.start();document.addEventListener("turbo:load",()=>{hN(),Krt(),DC&&setTimeout(()=>{document.scrollingElement.scrollTo(0,DC),DC=0},50),setTimeout(()=>{document.body.classList.remove("turbo-loading")},1)});document.addEventListener("turbo:frame-load",()=>{hN()});document.addEventListener("turbo:before-fetch-response",t=>bv(cde,null,function*(){var e,r,n;if(t.detail.fetchResponse.response.status===500){let{id:i,src:o}=t.target;(n=(r=(e=t.detail.fetchResponse)==null?void 0:e.response)==null?void 0:r.url)!=null&&n.includes("/failed_to_load")||(t.target.src=`${window.Avo.configuration.root_path}/failed_to_load?turbo_frame=${i}&src=${o}`)}}));document.addEventListener("turbo:visit",()=>document.body.classList.add("turbo-loading"));document.addEventListener("turbo:submit-start",()=>document.body.classList.add("turbo-loading"));document.addEventListener("turbo:submit-end",()=>document.body.classList.remove("turbo-loading"));document.addEventListener("turbo:before-cache",()=>{document.querySelectorAll("[data-turbo-remove-before-cache]").forEach(t=>t.remove())});window.Avo=window.Avo||{configuration:{}};window.Avo.menus={resetCollapsedState(){Array.from(document.querySelectorAll("[data-menu-key-param]")).map(t=>t.getAttribute("data-menu-key-param")).filter(Boolean).forEach(t=>{window.localStorage.removeItem(t)})}}});Grt();})();
416
+ }`,trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++A),this.trixId)}},labels:{get:function(){var D,M,P;return M=[],this.id&&this.ownerDocument&&M.push.apply(M,this.ownerDocument.querySelectorAll("label[for='"+this.id+"']")),(D=i(this,{matchingSelector:"label"}))&&((P=D.control)===this||P===null)&&M.push(D),M}},toolbarElement:{get:function(){var D,M,P;return this.hasAttribute("toolbar")?(M=this.ownerDocument)!=null?M.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(P="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",P),D=s("trix-toolbar",{id:P}),this.parentNode.insertBefore(D,this),D):void 0}},inputElement:{get:function(){var D,M,P;return this.hasAttribute("input")?(P=this.ownerDocument)!=null?P.getElementById(this.getAttribute("input")):void 0:this.parentNode?(M="trix-input-"+this.trixId,this.setAttribute("input",M),D=s("input",{type:"hidden",id:M}),this.parentNode.insertBefore(D,this.nextElementSibling),D):void 0}},editor:{get:function(){var D;return(D=this.editorController)!=null?D.editor:void 0}},name:{get:function(){var D;return(D=this.inputElement)!=null?D.name:void 0}},value:{get:function(){var D;return(D=this.inputElement)!=null?D.value:void 0},set:function(D){var M;return this.defaultValue=D,(M=this.editor)!=null?M.loadHTML(this.defaultValue):void 0}},notify:function(D,M){return this.editorController?u("trix-"+D,{onElement:this,attributes:M}):void 0},setInputElementValue:function(D){var M;return(M=this.inputElement)!=null?M.value=D:void 0},initialize:function(){return this.hasAttribute("data-trix-internal")?void 0:(k(this),f(this),w(this))},connect:function(){return this.hasAttribute("data-trix-internal")?void 0:(this.editorController||(u("trix-before-initialize",{onElement:this}),this.editorController=new e.EditorController({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(function(D){return function(){return u("trix-initialize",{onElement:D})}}(this))),this.editorController.registerSelectionManager(),this.registerResetListener(),this.registerClickListener(),p(this))},disconnect:function(){var D;return(D=this.editorController)!=null&&D.unregisterSelectionManager(),this.unregisterResetListener(),this.unregisterClickListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},registerClickListener:function(){return this.clickListener=this.clickBubbled.bind(this),window.addEventListener("click",this.clickListener,!1)},unregisterClickListener:function(){return window.removeEventListener("click",this.clickListener,!1)},resetBubbled:function(D){var M;if(!D.defaultPrevented&&D.target===((M=this.inputElement)!=null?M.form:void 0))return this.reset()},clickBubbled:function(D){var M;if(!(D.defaultPrevented||this.contains(D.target)||!(M=i(D.target,{matchingSelector:"label"}))||c.call(this.labels,M)<0))return this.focus()},reset:function(){return this.value=this.defaultValue}}}())}.call(this),function(){}.call(this)}).call(this),typeof Dh=="object"&&Dh.exports?Dh.exports=e:typeof define=="function"&&define.amd&&define(e)}.call(Ah)});var rIt,AC,ode=se(()=>{rIt=Vr(ide());Pr();em();AC=class extends Ct{get resourceId(){return this.controllerTarget.dataset.resourceId}get resourceName(){return this.controllerTarget.dataset.resourceName}get attachmentKey(){return this.controllerTarget.dataset.attachmentKey}get attachmentsDisabled(){return Io(this.controllerTarget.dataset.attachmentsDisabled)}get hideAttachmentFilename(){return Io(this.controllerTarget.dataset.hideAttachmentFilename)}get hideAttachmentFilesize(){return Io(this.controllerTarget.dataset.hideAttachmentFilesize)}get hideAttachmentUrl(){return Io(this.controllerTarget.dataset.hideAttachmentUrl)}get uploadUrl(){return`${window.location.origin}${window.Avo.configuration.root_path}/avo_api/resources/${this.resourceName}/${this.resourceId}/attachments`}connect(){this.attachmentsDisabled&&this.controllerTarget.querySelector(".trix-button-group--file-tools").remove(),window.addEventListener("trix-file-accept",t=>{if(t.target===this.editorTarget){if(this.attachmentsDisabled){t.preventDefault(),alert("This field has attachments disabled.");return}if(!this.resourceId){t.preventDefault(),alert("You can't upload files into the Trix editor until you save the resource.");return}this.attachmentKey||(t.preventDefault(),alert("You haven't set an `attachment_key` to this Trix field."))}}),window.addEventListener("trix-attachment-add",t=>{t.target===this.editorTarget&&t.attachment.file&&this.uploadFileAttachment(t.attachment)})}uploadFileAttachment(t){this.uploadFile(t.file,e=>t.setUploadProgress(e),e=>t.setAttributes(e))}uploadFile(t,e,r){var a;let n=this.createFormData(t),i=new XMLHttpRequest;i.open("POST",this.uploadUrl,!0);let o=(a=document.querySelector('meta[name="csrf-token"]'))==null?void 0:a.content;o&&i.setRequestHeader("X-CSRF-Token",o),i.upload.addEventListener("progress",s=>{let u=s.loaded/s.total*100;e(u)}),i.addEventListener("load",()=>{if(i.status===200){let s;try{s=JSON.parse(i.response)}catch(c){s={}}let u={url:s.url,href:s.href};this.hideAttachmentFilename&&(u.filename=null),this.hideAttachmentFilesize&&(u.filesize=null),this.hideAttachmentUrl&&(u.href=null),r(u)}}),i.send(n)}createFormData(t){let e=new FormData;return e.append("Content-Type",t.type),e.append("file",t),e.append("filename",t.name),e.append("attachment_key",this.attachmentKey),e}};pt(AC,"targets",["editor","controller"])});var ade=se(()=>{Rre();qre();Fre();Nre();Bre();$re();tie();rie();nie();Soe();nm();koe();Eoe();Coe();Toe();Aoe();Doe();Ooe();Moe();Ioe();gse();mse();vse();Ice();Pce();Rce();jce();Ofe();Mfe();Bfe();jfe();zfe();nde();ode();mr.register("action",I1);mr.register("actions-picker",p0);mr.register("attachments",L1);mr.register("boolean-filter",B1);mr.register("copy-to-clipboard",uq);mr.register("dashboard-card",U1);mr.register("filter",Ca);mr.register("hidden-input",dE);mr.register("item-select-all",M0);mr.register("item-selector",hE);mr.register("loading-button",gE);mr.register("menu",mE);mr.register("modal",vE);mr.register("multiple-select-filter",yE);mr.register("per-page",bE);mr.register("resource-edit",P0);mr.register("resource-index",fF);mr.register("resource-show",dF);mr.register("search",VE);mr.register("select",$E);mr.register("select-filter",YE);mr.register("sidebar",H0);mr.register("tabs",Y0);mr.register("tags-field",_C);mr.register("text-filter",SC);mr.register("tippy",kC);mr.register("toggle-panel",TC);mr.register("belongs-to-field",P1);mr.register("code-field",W1);mr.register("date-field",O0);mr.register("key-value",pE);mr.register("simple-mde",wC);mr.register("trix-field",AC)});var Grt=Z(cde=>{var zIt=Vr(uX()),HIt=Vr(cX()),sde=Vr(dX()),lde=Vr(mL());FL();var ude=Vr(hQ());pP();tre();rre();ade();ude.default.start();window.Turbolinks=Yd;var DC=null;lde.bind("r r r",()=>{DC=document.scrollingElement.scrollTop,Yd.visit(window.location.href,{action:"replace"})});function Krt(){window.navigator.userAgent.indexOf("Mac OS X")>=0?(document.body.classList.add("os-mac"),document.body.classList.remove("os-pc")):(document.body.classList.add("os-pc"),document.body.classList.remove("os-mac"))}function hN(){lk('[data-tippy="tooltip"]',{theme:"light",content(t){let e=t.getAttribute("title");return t.removeAttribute("title"),t.removeAttribute("data-tippy"),e}})}window.initTippy=hN;sde.start();document.addEventListener("turbo:load",()=>{hN(),Krt(),DC&&setTimeout(()=>{document.scrollingElement.scrollTo(0,DC),DC=0},50),setTimeout(()=>{document.body.classList.remove("turbo-loading")},1)});document.addEventListener("turbo:frame-load",()=>{hN()});document.addEventListener("turbo:before-fetch-response",t=>bv(cde,null,function*(){var e,r,n;if(t.detail.fetchResponse.response.status===500){let{id:i,src:o}=t.target;(n=(r=(e=t.detail.fetchResponse)==null?void 0:e.response)==null?void 0:r.url)!=null&&n.includes("/failed_to_load")||(t.target.src=`${window.Avo.configuration.root_path}/failed_to_load?turbo_frame=${i}&src=${o}`)}}));document.addEventListener("turbo:visit",()=>document.body.classList.add("turbo-loading"));document.addEventListener("turbo:submit-start",()=>document.body.classList.add("turbo-loading"));document.addEventListener("turbo:submit-end",()=>document.body.classList.remove("turbo-loading"));document.addEventListener("turbo:before-cache",()=>{document.querySelectorAll("[data-turbo-remove-before-cache]").forEach(t=>t.remove())});window.Avo=window.Avo||{configuration:{}};window.Avo.menus={resetCollapsedState(){Array.from(document.querySelectorAll("[data-menu-key-param]")).map(t=>t.getAttribute("data-menu-key-param")).filter(Boolean).forEach(t=>{window.localStorage.removeItem(t)})}}});Grt();})();
417
417
  /*!
418
418
  * @kurkle/color v0.1.9
419
419
  * https://github.com/kurkle/color#readme