avo 3.14.1 → 3.14.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '082bc71609a798a5f6f6afd5d3a9ecedc5d20c292c51661947add5a9db6d0b90'
4
- data.tar.gz: 3b2330fd614901596747fd708360da3719acca547522170058985f8ab0134544
3
+ metadata.gz: dbfd7286276c37ce33893ed0429a2d876834c90fea03ce8f090f447a88451cd6
4
+ data.tar.gz: 13d8e8c67a6adaba69eea9ce52b98af41e09eec77af509a6cd4f24c8b6cb5398
5
5
  SHA512:
6
- metadata.gz: e2764badea08bd8f1275641be392eee14246082cc49ca5e68ad8768acbe7dade7734c5543f34b25b4782f88fdccecb02fa04345f5bd736ac2f63919e181987ef
7
- data.tar.gz: 9bad7034ff00bf4e028d2dcf125411f97e3bab73c3e1d56a6c65ea95969c6d2505a4eaa789491262d84fadeed1817bcf73f83983c0e4fb3961389f92dc628af4
6
+ metadata.gz: 927705c318281ba42b8ff891a2b493f0e728fdb30195f8b5754050959df5717530c017d8d2cc5370899e5823f0aba6119bc6627a44f06ad096b8d8b70dd9e58c
7
+ data.tar.gz: 79e5fe1f7d60de83bba28dbf2eb1cb88fcd6cbaffcde4919226035cf278518708e189d216a37471d4911f5781141ded74b9514d47b317042a0496c9ed844ea25
data/Gemfile.lock CHANGED
@@ -107,7 +107,7 @@ GIT
107
107
  PATH
108
108
  remote: .
109
109
  specs:
110
- avo (3.14.1)
110
+ avo (3.14.3)
111
111
  actionview (>= 6.1)
112
112
  active_link_to
113
113
  activerecord (>= 6.1)
@@ -1,7 +1,12 @@
1
- <div
2
- class="avo-sidebar fixed z-[60] t-0 application-sidebar w-64 flex-1 border-r lg:border-none bg-none h-[calc(100dvh-4rem)] bg-application lg:bg-transparent <%= 'print:hidden' if Avo.configuration.hide_layout_when_printing %> <%= 'hidden' unless @sidebar_open %>"
3
- data-sidebar-target="<%= stimulus_target %>"
4
- >
1
+ <%= content_tag :div,
2
+ class: class_names(
3
+ "avo-sidebar fixed z-[60] t-0 application-sidebar w-64 flex-1 border-r lg:border-none bg-none xh-dvh h-[calc(100dvh-4rem)] bg-application lg:bg-transparent",
4
+ "print:hidden": Avo.configuration.hide_layout_when_printing,
5
+ "hidden": !@sidebar_open,
6
+ ),
7
+ data: {
8
+ sidebar_target: stimulus_target
9
+ } do %>
5
10
  <div class="flex flex-col w-full h-full">
6
11
  <div class="flex-1 flex flex-col justify-between overflow-auto h-full pt-3 mac-styled-scrollbar">
7
12
  <div class="space-y-6 mb-4">
@@ -61,4 +66,4 @@
61
66
  <% end %>
62
67
  <%= render Avo::SidebarProfileComponent.new user: helpers._current_user %>
63
68
  </div>
64
- </div>
69
+ <% end %>
@@ -21,14 +21,14 @@
21
21
  <%= helpers.svg "avo/three-dots", class: 'h-4' %>
22
22
  </a>
23
23
  <div
24
- class="hidden absolute flex flex-col inset-auto right-0 -mt-12 bg-white rounded min-w-[200px] shadow-context -translate-y-full z-40"
24
+ class="hidden absolute flex flex-col inset-auto right-0 -mt-28 bg-white rounded min-w-[200px] shadow-context z-40"
25
25
  data-toggle-target="panel"
26
- data-transition-enter="transition ease-out duration-100"
27
- data-transition-enter-start="transform opacity-0 translate-y-1"
26
+ data-transition-enter="transition ease-in-out duration-100"
27
+ data-transition-enter-start="transform opacity-0 translate-y-3"
28
28
  data-transition-enter-end="transform opacity-100 translate-y-0"
29
29
  data-transition-leave="transition ease-in duration-75"
30
30
  data-transition-leave-start="transform opacity-100 translate-y-0"
31
- data-transition-leave-end="transform opacity-0 translate-y-1"
31
+ data-transition-leave-end="transform opacity-0 translate-y-3"
32
32
  >
33
33
  <% if Avo.plugin_manager.installed?(:avo_menu) && Avo.has_profile_menu? %>
34
34
  <div class="text-black space-y-4">
@@ -40,9 +40,9 @@
40
40
  </div>
41
41
  <% end %>
42
42
  <%= render "avo/partials/profile_menu_extra" %>
43
- <% if can_destroy_user? %>
44
- <%= form_with url: helpers.main_app.send(destroy_user_session_path),
45
- method: :delete,
43
+ <% if can_sign_out_user? %>
44
+ <%= form_with url: helpers.main_app.send(sign_out_path),
45
+ method: sign_out_method,
46
46
  data: {
47
47
  controller: :"sign-out",
48
48
  sign_out_confirm_value: t('avo.are_you_sure'),
@@ -53,7 +53,7 @@
53
53
  <%= helpers.svg "avo/logout", class: 'h-4 mr-1' %> <%= t('avo.sign_out') %>
54
54
  <% end %>
55
55
  <% end %>
56
- <% end %>
56
+ <% end %>
57
57
  </div>
58
58
  </div>
59
59
  </div>
@@ -3,6 +3,8 @@
3
3
  class Avo::SidebarProfileComponent < Avo::BaseComponent
4
4
  prop :user
5
5
 
6
+ delegate :main_app, to: :helpers
7
+
6
8
  def avatar
7
9
  if @user.respond_to?(:avatar) && @user.avatar.present?
8
10
  @user.avatar
@@ -31,13 +33,24 @@ class Avo::SidebarProfileComponent < Avo::BaseComponent
31
33
  end
32
34
  end
33
35
 
34
- def destroy_user_session_path
35
- # If `sign_out_path_name` is configured, use it. Otherwise construct the
36
- # path name based on `current_user_resource_name`.
37
- (Avo.configuration.sign_out_path_name || "destroy_#{Avo.configuration.current_user_resource_name}_session_path").to_sym
36
+ def sign_out_method
37
+ :delete
38
+ end
39
+
40
+ def sign_out_path
41
+ return Avo.configuration.sign_out_path_name if Avo.configuration.sign_out_path_name.present?
42
+ return :session_path if helpers.possibly_rails_authentication?
43
+
44
+ default_sign_out_path
45
+ end
46
+
47
+ def default_sign_out_path
48
+ default_path = :"destroy_#{Avo.configuration.current_user_resource_name}_session_path"
49
+
50
+ default_path if main_app.respond_to?(default_path)
38
51
  end
39
52
 
40
- def can_destroy_user?
41
- helpers.main_app.respond_to?(destroy_user_session_path)
53
+ def can_sign_out_user?
54
+ sign_out_path.present? && main_app.respond_to?(sign_out_path&.to_sym)
42
55
  end
43
56
  end
@@ -155,11 +155,13 @@ module Avo
155
155
  end
156
156
 
157
157
  def authorize_if_defined(method, record = @record)
158
+ return unless Avo.configuration.authorization_enabled?
159
+
158
160
  @authorization.set_record(record)
159
161
 
160
162
  if @authorization.has_method?(method.to_sym)
161
163
  @authorization.authorize_action method.to_sym
162
- elsif !@authorization.is_a?(Avo::Services::AuthorizationService) && Avo.configuration.explicit_authorization
164
+ elsif Avo.configuration.explicit_authorization
163
165
  raise Avo::NotAuthorizedError.new
164
166
  end
165
167
  end
@@ -141,6 +141,10 @@ module Avo
141
141
  Avo.configuration.branding.chart_colors[index % Avo.configuration.branding.chart_colors.length]
142
142
  end
143
143
 
144
+ def possibly_rails_authentication?
145
+ defined?(Authentication) && Authentication.private_instance_methods.include?(:require_authentication) && Authentication.private_instance_methods.include?(:authenticated?)
146
+ end
147
+
144
148
  private
145
149
 
146
150
  # Taken from the original library
@@ -22,7 +22,7 @@ export default class extends Controller {
22
22
  if (this.hasPanelTarget) {
23
23
  const isInExemptionContainer = this.hasExemptionContainersValue && this.exemptionContainerTargets.some((container) => container.contains(e.target))
24
24
 
25
- if (!isInExemptionContainer) {
25
+ if (!isInExemptionContainer && !this.panelTarget.classList.contains('hidden')) {
26
26
  leave(this.panelTarget)
27
27
  }
28
28
  }
@@ -1,6 +1,6 @@
1
1
  import { Turbo } from '@hotwired/turbo-rails'
2
2
 
3
- Turbo.setConfirmMethod((message) => {
3
+ Turbo.config.forms.confirm = (message) => {
4
4
  const dialog = document.getElementById('turbo-confirm')
5
5
  dialog.querySelector('p').textContent = message
6
6
  dialog.showModal()
@@ -16,4 +16,4 @@ Turbo.setConfirmMethod((message) => {
16
16
  resolve(dialog.returnValue === 'confirm')
17
17
  }, { once: true })
18
18
  })
19
- })
19
+ }
@@ -5,6 +5,8 @@ module Avo
5
5
 
6
6
  # Ex: A Post has many Comments
7
7
  def authorize_association_for(policy_method)
8
+ return true unless Avo.configuration.authorization_enabled?
9
+
8
10
  # Use the related_name as the base of the association
9
11
  association_name = @reflection&.name
10
12
  return true if association_name.blank?
@@ -34,10 +36,8 @@ module Avo
34
36
 
35
37
  if service.has_method?(method_name, raise_exception: false)
36
38
  service.authorize_action(method_name, record:, raise_exception: false)
37
- elsif !service.is_a?(Avo::Services::AuthorizationService)
38
- !Avo.configuration.explicit_authorization
39
39
  else
40
- true
40
+ !Avo.configuration.explicit_authorization
41
41
  end
42
42
  end
43
43
  end
@@ -123,6 +123,12 @@ module Avo
123
123
  @associations_lookup_list_limit = 1000
124
124
  end
125
125
 
126
+ # Authorization is enabled when:
127
+ # (avo-pro gem is installed) AND (authorization_client is NOT nil)
128
+ def authorization_enabled?
129
+ @authorization_enabled ||= Avo.plugin_manager.installed?(:avo_pro) && !authorization_client.nil?
130
+ end
131
+
126
132
  def current_user_method(&block)
127
133
  @current_user = block if block.present?
128
134
  end
@@ -94,15 +94,15 @@ module Avo
94
94
  end
95
95
 
96
96
  def authorized?
97
+ return true unless Avo.configuration.authorization_enabled?
98
+
97
99
  method = :"view_#{id}?"
98
100
  service = field_resource.authorization
99
101
 
100
102
  if service.has_method? method
101
103
  service.authorize_action(method, raise_exception: false)
102
- elsif !service.is_a?(Avo::Services::AuthorizationService)
103
- !Avo.configuration.explicit_authorization
104
104
  else
105
- true
105
+ !Avo.configuration.explicit_authorization
106
106
  end
107
107
  end
108
108
 
@@ -179,7 +179,7 @@ module Avo
179
179
  end
180
180
 
181
181
  def name
182
- @name ||= name_from_translation_key(count: 1, default: class_name.underscore.humanize)
182
+ name_from_translation_key(count: 1, default: class_name.underscore.humanize)
183
183
  end
184
184
  alias_method :singular_name, :name
185
185
 
@@ -203,8 +203,6 @@ module Avo
203
203
  end
204
204
 
205
205
  def underscore_name
206
- return @name if @name.present?
207
-
208
206
  name.demodulize.underscore
209
207
  end
210
208
 
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.14.1" unless const_defined?(:VERSION)
2
+ VERSION = "3.14.3" unless const_defined?(:VERSION)
3
3
  end
@@ -118,7 +118,14 @@ module Generators
118
118
  component = component_to_eject.underscore
119
119
 
120
120
  # Get the component path for both, the rb and erb files
121
- rb, erb = ["app/components/#{component}.rb", "app/components/#{component}.html.erb"]
121
+ rb, erb = if (component_constant = component_to_eject.safe_constantize)
122
+ # If component is a constant, find the source location
123
+ source_location = component_constant.source_location
124
+
125
+ [source_location, source_location.gsub(".rb", ".html.erb")]
126
+ else
127
+ ["app/components/#{component}.rb", "app/components/#{component}.html.erb"]
128
+ end
122
129
 
123
130
  # Return if one of the components doesn't exist
124
131
  if !path_exists?(rb) || !path_exists?(erb)
@@ -7660,6 +7660,10 @@ tag.tagify__tag{
7660
7660
  margin-top:-0.5rem
7661
7661
  }
7662
7662
 
7663
+ .-mt-28{
7664
+ margin-top:-7rem
7665
+ }
7666
+
7663
7667
  .-mt-4{
7664
7668
  margin-top:-1rem
7665
7669
  }
@@ -8352,6 +8356,11 @@ tag.tagify__tag{
8352
8356
  transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
8353
8357
  }
8354
8358
 
8359
+ .translate-y-3{
8360
+ --tw-translate-y:0.75rem;
8361
+ transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
8362
+ }
8363
+
8355
8364
  .rotate-90{
8356
8365
  --tw-rotate:90deg;
8357
8366
  transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
@@ -905,7 +905,7 @@ img.ProseMirror-separator {
905
905
  1. Must only contain digits, lowercase ASCII letters or "-"
906
906
  2. Cannot start or end with "-"
907
907
  3. "-" cannot repeat`);su.customSchemes.push([r,e])}function eHt(){su.scanner=$6t(su.customSchemes);for(let r=0;r<su.tokenQueue.length;r++)su.tokenQueue[r][1]({scanner:su.scanner});su.parser=Z6t(su.scanner.tokens);for(let r=0;r<su.pluginQueue.length;r++)su.pluginQueue[r][1]({scanner:su.scanner,parser:su.parser});su.initialized=!0}function UZ(r){return su.initialized||eHt(),X6t(su.parser.start,r,G6t(su.scanner.start,r))}function HZ(r,e,t){if(e===void 0&&(e=null),t===void 0&&(t=null),e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}let n=new zZ(t),i=UZ(r),o=[];for(let a=0;a<i.length;a++){let l=i[a];l.isLink&&(!e||l.t===e)&&n.check(l)&&o.push(l.toFormattedObject(n))}return o}var q6t,B6t,ZT,CZ,AZ,DZ,IB,CB,OZ,yze,z6t,j6t,cze,Lo,Nm,fze,yn,ab,IZ,o2,MZ,PZ,MB,YT,LZ,bze,RZ,r2,n2,PB,LB,RB,FB,NB,qB,BB,zB,jB,UB,HB,WB,VB,$B,GB,KB,YB,hx,ZB,XB,JB,dx,FZ,QB,Pv,ez,NZ,Lv,tz,rz,nz,iz,oz,qZ,BZ,Rv,i2,az,xze,sz,_ze,KT,SZ,kZ,TZ,hze,dze,W6t,V6t,AB,DB,a2,gze,vze,Y6t,OB,qm,J6t,Q6t,su,kze=Ie(()=>{q6t="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",B6t="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",ZT=(r,e)=>{for(let t in e)r[t]=e[t];return r},CZ="numeric",AZ="ascii",DZ="alpha",IB="asciinumeric",CB="alphanumeric",OZ="domain",yze="emoji",z6t="scheme",j6t="slashscheme",cze="whitespace";tp.groups={};tp.prototype={accepts(){return!!this.t},go(r){let e=this,t=e.j[r];if(t)return t;for(let n=0;n<e.jr.length;n++){let i=e.jr[n][0],o=e.jr[n][1];if(o&&i.test(r))return o}return e.jd},has(r,e){return e===void 0&&(e=!1),e?r in this.j:!!this.go(r)},ta(r,e,t,n){for(let i=0;i<r.length;i++)this.tt(r[i],e,t,n)},tr(r,e,t,n){n=n||tp.groups;let i;return e&&e.j?i=e:(i=new tp(e),t&&n&&R1(e,t,n)),this.jr.push([r,i]),i},ts(r,e,t,n){let i=this,o=r.length;if(!o)return i;for(let a=0;a<o-1;a++)i=i.tt(r[a]);return i.tt(r[o-1],e,t,n)},tt(r,e,t,n){n=n||tp.groups;let i=this;if(e&&e.j)return i.j[r]=e,e;let o=e,a,l=i.go(r);if(l?(a=new tp,ZT(a.j,l.j),a.jr.push.apply(a.jr,l.jr),a.jd=l.jd,a.t=l.t):a=new tp,o){if(n)if(a.t&&typeof a.t=="string"){let f=ZT(H6t(a.t,n),t);R1(o,f,n)}else t&&R1(o,t,n);a.t=o}return i.j[r]=a,a}};Lo=(r,e,t,n,i)=>r.ta(e,t,n,i),Nm=(r,e,t,n,i)=>r.tr(e,t,n,i),fze=(r,e,t,n,i)=>r.ts(e,t,n,i),yn=(r,e,t,n,i)=>r.tt(e,t,n,i),ab="WORD",IZ="UWORD",o2="LOCALHOST",MZ="TLD",PZ="UTLD",MB="SCHEME",YT="SLASH_SCHEME",LZ="NUM",bze="WS",RZ="NL",r2="OPENBRACE",n2="CLOSEBRACE",PB="OPENBRACKET",LB="CLOSEBRACKET",RB="OPENPAREN",FB="CLOSEPAREN",NB="OPENANGLEBRACKET",qB="CLOSEANGLEBRACKET",BB="FULLWIDTHLEFTPAREN",zB="FULLWIDTHRIGHTPAREN",jB="LEFTCORNERBRACKET",UB="RIGHTCORNERBRACKET",HB="LEFTWHITECORNERBRACKET",WB="RIGHTWHITECORNERBRACKET",VB="FULLWIDTHLESSTHAN",$B="FULLWIDTHGREATERTHAN",GB="AMPERSAND",KB="APOSTROPHE",YB="ASTERISK",hx="AT",ZB="BACKSLASH",XB="BACKTICK",JB="CARET",dx="COLON",FZ="COMMA",QB="DOLLAR",Pv="DOT",ez="EQUALS",NZ="EXCLAMATION",Lv="HYPHEN",tz="PERCENT",rz="PIPE",nz="PLUS",iz="POUND",oz="QUERY",qZ="QUOTE",BZ="SEMI",Rv="SLASH",i2="TILDE",az="UNDERSCORE",xze="EMOJI",sz="SYM",_ze=Object.freeze({__proto__:null,WORD:ab,UWORD:IZ,LOCALHOST:o2,TLD:MZ,UTLD:PZ,SCHEME:MB,SLASH_SCHEME:YT,NUM:LZ,WS:bze,NL:RZ,OPENBRACE:r2,CLOSEBRACE:n2,OPENBRACKET:PB,CLOSEBRACKET:LB,OPENPAREN:RB,CLOSEPAREN:FB,OPENANGLEBRACKET:NB,CLOSEANGLEBRACKET:qB,FULLWIDTHLEFTPAREN:BB,FULLWIDTHRIGHTPAREN:zB,LEFTCORNERBRACKET:jB,RIGHTCORNERBRACKET:UB,LEFTWHITECORNERBRACKET:HB,RIGHTWHITECORNERBRACKET:WB,FULLWIDTHLESSTHAN:VB,FULLWIDTHGREATERTHAN:$B,AMPERSAND:GB,APOSTROPHE:KB,ASTERISK:YB,AT:hx,BACKSLASH:ZB,BACKTICK:XB,CARET:JB,COLON:dx,COMMA:FZ,DOLLAR:QB,DOT:Pv,EQUALS:ez,EXCLAMATION:NZ,HYPHEN:Lv,PERCENT:tz,PIPE:rz,PLUS:nz,POUND:iz,QUERY:oz,QUOTE:qZ,SEMI:BZ,SLASH:Rv,TILDE:i2,UNDERSCORE:az,EMOJI:xze,SYM:sz}),KT=/[a-z]/,SZ=/\p{L}/u,kZ=/\p{Emoji}/u,TZ=/\d/,hze=/\s/,dze=`
908
- `,W6t="\uFE0F",V6t="\u200D",AB=null,DB=null;a2={defaultProtocol:"http",events:null,format:mze,formatHref:mze,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};zZ.prototype={o:a2,ignoreTags:[],defaultRender(r){return r},check(r){return this.get("validate",r.toString(),r)},get(r,e,t){let n=e!=null,i=this.o[r];return i&&(typeof i=="object"?(i=t.t in i?i[t.t]:a2[r],typeof i=="function"&&n&&(i=i(e,t))):typeof i=="function"&&n&&(i=i(e,t.t,t)),i)},getObj(r,e,t){let n=this.o[r];return typeof n=="function"&&e!=null&&(n=n(e,t.t,t)),n},render(r){let e=r.render(this);return(this.get("render",null,r)||this.defaultRender)(e,r.t,r)}};wze.prototype={isLink:!1,toString(){return this.v},toHref(r){return this.toString()},toFormattedString(r){let e=this.toString(),t=r.get("truncate",e,this),n=r.get("format",e,this);return t&&n.length>t?n.substring(0,t)+"\u2026":n},toFormattedHref(r){return r.get("formatHref",this.toHref(r.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(r){return r===void 0&&(r=a2.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(r),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(r){return{type:this.t,value:this.toFormattedString(r),isLink:this.isLink,href:this.toFormattedHref(r),start:this.startIndex(),end:this.endIndex()}},validate(r){return r.get("validate",this.toString(),this)},render(r){let e=this,t=this.toHref(r.get("defaultProtocol")),n=r.get("formatHref",t,this),i=r.get("tagName",t,e),o=this.toFormattedString(r),a={},l=r.get("className",t,e),f=r.get("target",t,e),p=r.get("rel",t,e),v=r.getObj("attributes",t,e),w=r.getObj("events",t,e);return a.href=n,l&&(a.class=l),f&&(a.target=f),p&&(a.rel=p),v&&ZT(a,v),{tagName:i,attributes:a,content:o,eventListeners:w}}};gze=lz("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),vze=lz("text"),Y6t=lz("nl"),OB=lz("url",{isLink:!0,toHref(r){return r===void 0&&(r=a2.defaultProtocol),this.hasProtocol()?this.v:`${r}://${this.v}`},hasProtocol(){let r=this.tk;return r.length>=2&&r[0].t!==o2&&r[1].t===dx}}),qm=r=>new tp(r);J6t=typeof console<"u"&&console&&console.warn||(()=>{}),Q6t="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",su={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1}});function tHt(r){return r.length===1?r[0].isLink:r.length===3&&r[1].isLink?["()","[]"].includes(r[0].value+r[2].value):!1}function rHt(r){return new Dc({key:new wh("autolink"),appendTransaction:(e,t,n)=>{let i=e.some(p=>p.docChanged)&&!t.doc.eq(n.doc),o=e.some(p=>p.getMeta("preventAutolink"));if(!i||o)return;let{tr:a}=n,l=YBe(t.doc,[...e]);if(XBe(l).forEach(({newRange:p})=>{let v=ZBe(n.doc,p,L=>L.isTextblock),w,D;if(v.length>1?(w=v[0],D=n.doc.textBetween(w.pos,w.pos+w.node.nodeSize,void 0," ")):v.length&&n.doc.textBetween(p.from,p.to," "," ").endsWith(" ")&&(w=v[0],D=n.doc.textBetween(w.pos,p.to,void 0," ")),w&&D){let L=D.split(" ").filter(Y=>Y!=="");if(L.length<=0)return!1;let R=L[L.length-1],q=w.pos+D.lastIndexOf(R);if(!R)return!1;let H=UZ(R).map(Y=>Y.toObject(r.defaultProtocol));if(!tHt(H))return!1;H.filter(Y=>Y.isLink).map(Y=>({...Y,from:q+Y.start+1,to:q+Y.end+1})).filter(Y=>n.schema.marks.code?!n.doc.rangeHasMark(Y.from,Y.to,n.schema.marks.code):!0).filter(Y=>r.validate(Y.value)).forEach(Y=>{EB(Y.from,Y.to,n.doc).some(J=>J.mark.type===r.type)||a.addMark(Y.from,Y.to,r.type.create({href:Y.href}))})}}),!!a.steps.length)return a}})}function nHt(r){return new Dc({key:new wh("handleClickLink"),props:{handleClick:(e,t,n)=>{var i,o;if(n.button!==0||!e.editable)return!1;let a=n.target,l=[];for(;a.nodeName!=="DIV";)l.push(a),a=a.parentNode;if(!l.find(D=>D.nodeName==="A"))return!1;let f=wZ(e.state,r.type.name),p=n.target,v=(i=p?.href)!==null&&i!==void 0?i:f.href,w=(o=p?.target)!==null&&o!==void 0?o:f.target;return p&&v?(window.open(v,w),!0):!1}}})}function iHt(r){return new Dc({key:new wh("handlePasteLink"),props:{handlePaste:(e,t,n)=>{let{state:i}=e,{selection:o}=i,{empty:a}=o;if(a)return!1;let l="";n.content.forEach(p=>{l+=p.textContent});let f=HZ(l,{defaultProtocol:r.defaultProtocol}).find(p=>p.isLink&&p.value===l);return!l||!f?!1:(r.editor.commands.setMark(r.type,{href:f.href}),!0)}}})}function Tze(r,e){let t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(n=>{let i=typeof n=="string"?n:n.scheme;i&&t.push(i)}),!r||r.replace(oHt,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}var oHt,Eze,Cze=Ie(()=>{cd();kze();Y3();oHt=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;Eze=Th.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(r=>{if(typeof r=="string"){jZ(r);return}jZ(r.scheme,r.optionalSlashes)})},onDestroy(){Sze()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:r=>!!r}},addAttributes(){return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:r=>{let e=r.getAttribute("href");return!e||!Tze(e,this.options.protocols)?!1:null}}]},renderHTML({HTMLAttributes:r}){return Tze(r.href,this.options.protocols)?["a",au(this.options.HTMLAttributes,r),0]:["a",au(this.options.HTMLAttributes,{...r,href:""}),0]},addCommands(){return{setLink:r=>({chain:e})=>e().setMark(this.name,r).setMeta("preventAutolink",!0).run(),toggleLink:r=>({chain:e})=>e().toggleMark(this.name,r,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:r})=>r().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Mv({find:r=>{let e=[];if(r){let{validate:t}=this.options,n=HZ(r).filter(i=>i.isLink&&t(i.value));n.length&&n.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:r=>{var e;return{href:(e=r.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){let r=[];return this.options.autolink&&r.push(rHt({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&r.push(nHt({type:this.type})),this.options.linkOnPaste&&r.push(iHt({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),r}})});var Aze,Dze=Ie(()=>{cd();Aze=of.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:r}){return["li",au(this.options.HTMLAttributes,r),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}})});var aHt,Oze,Ize,Mze,Pze=Ie(()=>{cd();aHt="listItem",Oze="textStyle",Ize=/^(\d+)\.\s$/,Mze=of.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:r=>r.hasAttribute("start")?parseInt(r.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:r=>r.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:r}){let{start:e,...t}=r;return e===1?["ol",au(this.options.HTMLAttributes,t),0]:["ol",au(this.options.HTMLAttributes,r),0]},addCommands(){return{toggleOrderedList:()=>({commands:r,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(aHt,this.editor.getAttributes(Oze)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let r=GT({find:Ize,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(r=GT({find:Ize,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Oze)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[r]}})});var Lze,Rze=Ie(()=>{cd();Lze=of.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:r}){return["p",au(this.options.HTMLAttributes,r),0]},addCommands(){return{setParagraph:()=>({commands:r})=>r.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})});var sHt,lHt,Fze,Nze=Ie(()=>{cd();sHt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,lHt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Fze=Th.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:r=>r.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:r}){return["s",au(this.options.HTMLAttributes,r),0]},addCommands(){return{setStrike:()=>({commands:r})=>r.setMark(this.name),toggleStrike:()=>({commands:r})=>r.toggleMark(this.name),unsetStrike:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[cx({find:sHt,type:this.type})]},addPasteRules(){return[Mv({find:lHt,type:this.type})]}})});var qze,Bze=Ie(()=>{cd();qze=of.create({name:"text",group:"inline"})});var zze,jze=Ie(()=>{cd();zze=Th.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:r=>r.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:r}){return["u",au(this.options.HTMLAttributes,r),0]},addCommands(){return{setUnderline:()=>({commands:r})=>r.setMark(this.name),toggleUnderline:()=>({commands:r})=>r.toggleMark(this.name),unsetUnderline:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})});var Uze,Hze=Ie(()=>{cd();Y3();qY();Uze=ud.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Dc({key:new wh("placeholder"),props:{decorations:({doc:r,selection:e})=>{let t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,i=[];if(!t)return null;let o=this.editor.isEmpty;return r.descendants((a,l)=>{let f=n>=l&&n<=l+a.nodeSize,p=!a.isLeaf&&t2(a);if((f||!this.options.showOnlyCurrent)&&p){let v=[this.options.emptyNodeClass];o&&v.push(this.options.emptyEditorClass);let w=id.node(l,l+a.nodeSize,{class:v.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:f}):this.options.placeholder});i.push(w)}return this.options.includeChildren}),Pu.create(r,i)}}})]}})});var s2,Wze=Ie(()=>{qi();cd();QBe();nze();oze();sze();uze();Cze();Dze();Pze();Rze();Nze();Bze();jze();Hze();s2=class extends Br{constructor(){super(...arguments);_r(this,"initEditor",()=>{this.editor=new _B({element:this.editorTarget,extensions:[JBe,rze,ize,aze,lze,Eze.configure({openOnClick:!1}),Aze,Mze,Lze,Uze.configure({placeholder:this.inputTarget.placeholder}),Fze,qze,zze],type:"HTML",content:this.inputTarget.value,onUpdate:this.onUpdate,onSelectionUpdate:this.onSelectionUpdate})});_r(this,"initToolbar",()=>{this.buttons={bold:this.element.querySelector(".tiptap__button--bold"),italic:this.element.querySelector(".tiptap__button--italic"),underline:this.element.querySelector(".tiptap__button--underline"),strike:this.element.querySelector(".tiptap__button--strike"),bulletList:this.element.querySelector(".tiptap__button--ul"),orderedList:this.element.querySelector(".tiptap__button--ol"),link:this.element.querySelector(".tiptap__button--link")},this.linkArea=this.element.querySelector(".tiptap__link-area"),this.linkInput=this.element.querySelector(".tiptap__link-field"),this.unsetButton=this.element.querySelector(".tiptap__link-button--unset")});_r(this,"onUpdate",()=>{this.inputTarget.value=this.editor.getHTML()});_r(this,"onSelectionUpdate",()=>{Object.keys(this.buttons).forEach(e=>{let t=this.editor.isActive(e);this.buttons[e].classList.toggle("tiptap__button--selected",t),e==="link"&&(this.buttons[e].disabled=this.editor.view.state.selection.empty&&!t)}),this.updateLinkArea(),this.updateLinkButtonState()})}connect(){this.initEditor(),this.initToolbar()}handleButtonClick(e){let t=e.target.dataset.action;t&&this[t]&&this[t](e)}updateButtonState(e){this.buttons[e].classList.toggle("tiptap__button--selected",this.editor.isActive(e))}updateLinkButtonState(){let e=this.editor.isActive("link"),t=this.editor.view.state.selection.empty;this.buttons.link.disabled=t&&!e}updateLinkArea(){let e=this.editor.isActive("link");if(this.linkArea.classList.toggle("hidden",!e),this.unsetButton.classList.toggle("hidden",!e),e){let t=this.editor.getAttributes("link").href;this.linkInput.value=t||""}else this.linkInput.value=""}bold(){this.editor.chain().focus().toggleBold().run(),this.updateButtonState("bold")}italic(){this.editor.chain().focus().toggleItalic().run(),this.updateButtonState("italic")}underline(){this.editor.chain().focus().toggleUnderline().run(),this.updateButtonState("underline")}strike(){this.editor.chain().focus().toggleStrike().run(),this.updateButtonState("strike")}unorderedList(){this.editor.chain().focus().toggleBulletList().run(),this.updateButtonState("bulletList")}orderedList(){this.editor.chain().focus().toggleOrderedList().run(),this.updateButtonState("orderedList")}toggleLinkArea(e){let t=e.target.closest(".tiptap__button"),n=this.element.querySelector(".tiptap__link-area"),i=this.editor.getAttributes("link").href,o=this.element.querySelector(".tiptap__link-field");i&&(o.value=i),t.classList.contains("tiptap__button--selected")?(n.classList.toggle("hidden",!0),t.classList.toggle("tiptap__button--selected",!1)):this.editor.view.state.selection.empty||(n.classList.toggle("hidden",!1),t.classList.toggle("tiptap__button--selected",!0))}setLink(){let e=this.element.querySelector(".tiptap__link-field").value,t=this.element.querySelector(".tiptap__link-button--unset");e?(this.editor.chain().focus().extendMarkRange("link").setLink({href:e}).run(),t.classList.toggle("hidden",!1)):(this.editor.chain().focus().extendMarkRange("link").unsetLink().run(),t.classList.toggle("hidden",!0))}unsetLink(){let e=this.element.querySelector(".tiptap__link-button--unset");this.editor.chain().focus().extendMarkRange("link").unsetLink().run(),e.classList.toggle("hidden",!0)}preventEnter(e){(e.key==="Enter"||e.keyCode===13)&&e.preventDefault()}disconnect(){this.editor.destroy()}};_r(s2,"targets",["editor","controller","input"])});function VZ(r,e,t){r.addEventListener?r.addEventListener(e,t,!1):r.attachEvent&&r.attachEvent("on".concat(e),function(){t(window.event)})}function Yze(r,e){for(var t=e.slice(0,e.length-1),n=0;n<t.length;n++)t[n]=r[t[n].toLowerCase()];return t}function Zze(r){typeof r!="string"&&(r=""),r=r.replace(/\s/g,"");for(var e=r.split(","),t=e.lastIndexOf("");t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}function uHt(r,e){for(var t=r.length>=e.length?r:e,n=r.length>=e.length?e:r,i=!0,o=0;o<t.length;o++)n.indexOf(t[o])===-1&&(i=!1);return i}function e5e(r){Jze=r||"all"}function u2(){return Jze||"all"}function cHt(){return Ml.slice(0)}function fHt(r){var e=r.target||r.srcElement,t=e.tagName,n=!0;return(e.isContentEditable||(t==="INPUT"||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(n=!1),n}function hHt(r){return typeof r=="string"&&(r=cz(r)),Ml.indexOf(r)!==-1}function dHt(r,e){var t,n;r||(r=u2());for(var i in Of)if(Object.prototype.hasOwnProperty.call(Of,i))for(t=Of[i],n=0;n<t.length;)t[n].scope===r?t.splice(n,1):n++;u2()===r&&e5e(e||"all")}function pHt(r){var e=r.keyCode||r.which||r.charCode,t=Ml.indexOf(e);if(t>=0&&Ml.splice(t,1),r.key&&r.key.toLowerCase()==="meta"&&Ml.splice(0,Ml.length),(e===93||e===224)&&(e=91),e in Zf){Zf[e]=!1;for(var n in F1)F1[n]===e&&(px[n]=!1)}}function mHt(r){if(!r)Object.keys(Of).forEach(function(a){return delete Of[a]});else if(Array.isArray(r))r.forEach(function(a){a.key&&$Z(a)});else if(typeof r=="object")r.key&&$Z(r);else if(typeof r=="string"){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];var i=t[0],o=t[1];typeof i=="function"&&(o=i,i=""),$Z({key:r,scope:i,method:o,splitKey:"+"})}}function $ze(r,e,t){var n;if(e.scope===t||e.scope==="all"){n=e.mods.length>0;for(var i in Zf)Object.prototype.hasOwnProperty.call(Zf,i)&&(!Zf[i]&&e.mods.indexOf(+i)>-1||Zf[i]&&e.mods.indexOf(+i)===-1)&&(n=!1);(e.mods.length===0&&!Zf[16]&&!Zf[18]&&!Zf[17]&&!Zf[91]||n||e.shortcut==="*")&&e.method(r,e)===!1&&(r.preventDefault?r.preventDefault():r.returnValue=!1,r.stopPropagation&&r.stopPropagation(),r.cancelBubble&&(r.cancelBubble=!0))}}function Gze(r){var e=Of["*"],t=r.keyCode||r.which||r.charCode;if(!!px.filter.call(this,r)){if((t===93||t===224)&&(t=91),Ml.indexOf(t)===-1&&t!==229&&Ml.push(t),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(L){var R=Vze[L];r[L]&&Ml.indexOf(R)===-1?Ml.push(R):!r[L]&&Ml.indexOf(R)>-1?Ml.splice(Ml.indexOf(R),1):L==="metaKey"&&r[L]&&Ml.length===3&&(r.ctrlKey||r.shiftKey||r.altKey||(Ml=Ml.slice(Ml.indexOf(R))))}),t in Zf){Zf[t]=!0;for(var n in F1)F1[n]===t&&(px[n]=!0);if(!e)return}for(var i in Zf)Object.prototype.hasOwnProperty.call(Zf,i)&&(Zf[i]=r[Vze[i]]);r.getModifierState&&!(r.altKey&&!r.ctrlKey)&&r.getModifierState("AltGraph")&&(Ml.indexOf(17)===-1&&Ml.push(17),Ml.indexOf(18)===-1&&Ml.push(18),Zf[17]=!0,Zf[18]=!0);var o=u2();if(e)for(var a=0;a<e.length;a++)e[a].scope===o&&(r.type==="keydown"&&e[a].keydown||r.type==="keyup"&&e[a].keyup)&&$ze(r,e[a],o);if(t in Of){for(var l=0;l<Of[t].length;l++)if((r.type==="keydown"&&Of[t][l].keydown||r.type==="keyup"&&Of[t][l].keyup)&&Of[t][l].key){for(var f=Of[t][l],p=f.splitKey,v=f.key.split(p),w=[],D=0;D<v.length;D++)w.push(cz(v[D]));w.sort().join("")===Ml.sort().join("")&&$ze(r,f,o)}}}}function gHt(r){return Qze.indexOf(r)>-1}function px(r,e,t){Ml=[];var n=Zze(r),i=[],o="all",a=document,l=0,f=!1,p=!0,v="+";for(t===void 0&&typeof e=="function"&&(t=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(a=e.element),e.keyup&&(f=e.keyup),e.keydown!==void 0&&(p=e.keydown),typeof e.splitKey=="string"&&(v=e.splitKey)),typeof e=="string"&&(o=e);l<n.length;l++)r=n[l].split(v),i=[],r.length>1&&(i=Yze(F1,r)),r=r[r.length-1],r=r==="*"?"*":cz(r),r in Of||(Of[r]=[]),Of[r].push({keyup:f,keydown:p,scope:o,mods:i,shortcut:n[l],method:t,key:n[l],splitKey:v});typeof a<"u"&&!gHt(a)&&window&&(Qze.push(a),VZ(a,"keydown",function(w){Gze(w)}),VZ(window,"focus",function(){Ml=[]}),VZ(a,"keyup",function(w){Gze(w),pHt(w)}))}var WZ,Xze,F1,Vze,Zf,Of,l2,Ml,Jze,Qze,cz,$Z,GZ,uz,Kze,t5e=Ie(()=>{WZ=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;Xze={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":WZ?173:189,"=":WZ?61:187,";":WZ?59:186,"'":222,"[":219,"]":221,"\\":220},F1={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},Vze={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Zf={16:!1,18:!1,17:!1,91:!1},Of={};for(l2=1;l2<20;l2++)Xze["f".concat(l2)]=111+l2;Ml=[],Jze="all",Qze=[],cz=function(e){return Xze[e.toLowerCase()]||F1[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};$Z=function(e){var t=e.key,n=e.scope,i=e.method,o=e.splitKey,a=o===void 0?"+":o,l=Zze(t);l.forEach(function(f){var p=f.split(a),v=p.length,w=p[v-1],D=w==="*"?"*":cz(w);if(!!Of[D]){n||(n=u2());var L=v>1?Yze(F1,p):[];Of[D]=Of[D].map(function(R){var q=i?R.method===i:!0;return q&&R.scope===n&&uHt(R.mods,L)?{}:R})}})};GZ={setScope:e5e,getScope:u2,deleteScope:dHt,getPressedKeyCodes:cHt,isPressed:hHt,filter:fHt,unbind:mHt};for(uz in GZ)Object.prototype.hasOwnProperty.call(GZ,uz)&&(px[uz]=GZ[uz]);typeof window<"u"&&(Kze=window.hotkeys,px.noConflict=function(r){return r&&window.hotkeys===px&&(window.hotkeys=Kze),px},window.hotkeys=px)});function bHt(r){let e=r.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=e.top<=t&&e.top+e.height>=0,o=e.left<=n&&e.left+e.width>=0;return i&&o}var vHt,yHt,xHt,r5e,KZ,YZ,n5e=Ie(()=>{qi();t5e();vHt=(r,e,t)=>{let n=r;return t===!0?n=`${e.identifier}:${r}`:typeof t=="string"&&(n=`${t}:${r}`),n},yHt=(r,e,t)=>{let{bubbles:n,cancelable:i,composed:o}=e||{bubbles:!0,cancelable:!0,composed:!0};return e&&Object.assign(t,{originalEvent:e}),new CustomEvent(r,{bubbles:n,cancelable:i,composed:o,detail:t})};xHt={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},r5e=(r,e={})=>{let{onlyVisible:t,dispatchEvent:n,events:i,eventPrefix:o}=Object.assign({},xHt,e),a=v=>{let w=e?.element||r.element;if(!(w.contains(v.target)||!bHt(w)&&t)&&(r.clickOutside&&r.clickOutside(v),n)){let D=vHt("click:outside",r,o),L=yHt(D,v,{controller:r});w.dispatchEvent(L)}},l=()=>{i?.forEach(v=>{window.addEventListener(v,a,!1)})},f=()=>{i?.forEach(v=>{window.removeEventListener(v,a,!1)})},p=r.disconnect.bind(r);return Object.assign(r,{disconnect(){f(),p()}}),l(),[l,f]};KZ=class extends Br{};KZ.debounces=[];YZ=class extends Br{};YZ.throttles=[]});var XT,i5e=Ie(()=>{qi();WG();n5e();XT=class extends Br{get exemptionContainerTargets(){return this.exemptionContainersValue.map(r=>document.querySelector(r)).filter(Boolean)}connect(){r5e(this)}clickOutside(r){this.hasPanelTarget&&(this.hasExemptionContainersValue&&this.exemptionContainerTargets.some(t=>t.contains(r.target))||BO(this.panelTarget))}togglePanel(){this.hasPanelTarget&&LIe(this.panelTarget)}outlet({params:r}){let{outlet:e}=r;e&&document.querySelector(e)&&document.querySelector(e).classList.toggle("hidden")}};_r(XT,"targets",["panel"]),_r(XT,"values",{exemptionContainers:Array})});var c2,o5e=Ie(()=>{qi();c2=class extends Br{connect(){this.checkContentHeight()}checkContentHeight(){this.contentTarget.scrollHeight>50&&this.moreContentButtonTarget.classList.remove("hidden")}toggleContent(){this.contentTarget.classList.toggle("hidden"),this.toggleButtons()}toggleButtons(){this.moreContentButtonTarget.classList.toggle("hidden"),this.lessContentButtonTarget.classList.toggle("hidden")}};_r(c2,"targets",["content","moreContentButton","lessContentButton"])});function hz(r){var e,t;function n(o,a){try{var l=r[o](a),f=l.value,p=f instanceof KHt;Promise.resolve(p?f.v:f).then(function(v){if(p){var w=o==="return"?"return":"next";if(!f.k||v.done)return n(w,v);v=r[w](v).value}i(l.done?"return":"normal",v)},function(v){n("throw",v)})}catch(v){i("throw",v)}}function i(o,a){switch(o){case"return":e.resolve({value:a,done:!0});break;case"throw":e.reject(a);break;default:e.resolve({value:a,done:!1})}(e=e.next)?n(e.key,e.arg):t=null}this._invoke=function(o,a){return new Promise(function(l,f){var p={key:o,arg:a,resolve:l,reject:f,next:null};t?t=t.next=p:(e=t=p,n(o,a))})},typeof r.return!="function"&&(this.return=void 0)}function KHt(r,e){this.v=r,this.k=e}function np(r,e,t){return(e=YHt(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function YHt(r){var e=function(t,n){if(typeof t!="object"||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var o=i.call(t,n||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}(r,"string");return typeof e=="symbol"?e:String(e)}function al(r,e){return ZHt(r,W5e(r,e,"get"))}function jX(r,e,t){return XHt(r,W5e(r,e,"set"),t),t}function W5e(r,e,t){if(!e.has(r))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(r)}function ZHt(r,e){return e.get?e.get.call(r):e.value}function XHt(r,e,t){if(e.set)e.set.call(r,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function dz(r,e,t){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return t}function V5e(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function b2(r,e,t){V5e(r,e),e.set(r,t)}function pz(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",{required:e,value:t}=this.element,n=e&&!t,i=!!r,o=$o("input",{required:e}),a=r||o.validationMessage;al(this,sb).setValidity({valueMissing:n,customError:i},a)}var _Ht,B1,PX,hd,a5e,s5e,ZZ,T2,bo,wHt,P5e,qz,gx,L5e,LX,SHt,uu,m2,R5e,vx,RX,q1,XZ,yx,vz,fd,$o,f2,g2,JZ,l5e,QT,kHt,eE,z1,F5e,v2,FX,mz,H1,N5e,vX,E2,Ru,THt,u5e,EHt,QZ,eX,tX,W1,CHt,AHt,DHt,yX,bX,OHt,cb,V1,NX,IHt,MHt,rX,nX,iX,fz,xX,ic,PHt,_X,LHt,q5e,RHt,FHt,c5e,f5e,B5e,z5e,qX,j5e,aE,ws,ub,yz,h5e,wX,bz,$1,U5e,y2,H5e,NHt,d5e,p2,BX,zX,p5e,oX,dd,qHt,BHt,gz,h2,zHt,x2,SX,kX,m5e,tE,fb,TX,jHt,UHt,HHt,rE,WHt,mx,_2,g5e,VHt,xz,_z,wz,$Ht,v5e,Sz,nE,y5e,GHt,b5e,hb,kz,bx,xx,w2,iE,JHt,QHt,eWt,jp,Bm,tWt,rWt,nWt,iWt,$5e,oWt,x5e,_5e,w5e,rp,S5e,aX,k5e,G1,T5e,aWt,E5e,sWt,lWt,uWt,G5e,cWt,EX,fWt,hWt,dWt,pWt,lu,Tz,Ez,Nv,S2,mWt,sX,Cz,K5e,gWt,Az,Dz,lX,vWt,yWt,Y5e,Oz,lb,Z5e,bWt,uX,N1,xWt,cX,Iz,Mz,Pz,X5e,_Wt,wWt,Lz,CX,Rz,AX,SWt,kWt,C5e,oE,fX,TWt,J5e,EWt,Ng,CWt,AWt,DWt,OWt,Fv,j1,IWt,hX,MWt,Q5e,PWt,LWt,dX,DX,OX,RWt,Bz,FWt,NWt,A5e,D5e,O5e,JT,Fz,U1,qWt,BWt,zWt,Nz,jWt,UWt,HWt,WWt,VWt,I5e,sb,d2,IX,pX,mX,gX,MX,Eh,k2,M5e,e4e=Ie(()=>{_Ht="2.1.8",B1="[data-trix-attachment]",PX={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},hd={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(r){return a5e(r.parentNode)===hd[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(r){return a5e(r.parentNode)===hd[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},a5e=r=>{var e;return r==null||(e=r.tagName)===null||e===void 0?void 0:e.toLowerCase()},s5e=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),ZZ=s5e&&parseInt(s5e[1]),T2={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:ZZ&&ZZ>12,samsungAndroid:ZZ&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(r=>r in InputEvent.prototype)},bo={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"},wHt=[bo.bytes,bo.KB,bo.MB,bo.GB,bo.TB,bo.PB],P5e={prefix:"IEC",precision:2,formatter(r){switch(r){case 0:return"0 ".concat(bo.bytes);case 1:return"1 ".concat(bo.byte);default:let e;this.prefix==="SI"?e=1e3:this.prefix==="IEC"&&(e=1024);let t=Math.floor(Math.log(r)/Math.log(e)),n=(r/Math.pow(e,t)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(n," ").concat(wHt[t])}}},qz="\uFEFF",gx="\xA0",L5e=function(r){for(let e in r){let t=r[e];this[e]=t}return this},LX=document.documentElement,SHt=LX.matches,uu=function(r){let{onElement:e,matchingSelector:t,withCallback:n,inPhase:i,preventDefault:o,times:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=e||LX,f=t,p=i==="capturing",v=function(w){a!=null&&--a==0&&v.destroy();let D=vx(w.target,{matchingSelector:f});D!=null&&(n?.call(D,w,D),o&&w.preventDefault())};return v.destroy=()=>l.removeEventListener(r,v,p),l.addEventListener(r,v,p),v},m2=function(r){let{onElement:e,bubbles:t,cancelable:n,attributes:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=e??LX;t=t!==!1,n=n!==!1;let a=document.createEvent("Events");return a.initEvent(r,t,n),i!=null&&L5e.call(a,i),o.dispatchEvent(a)},R5e=function(r,e){if(r?.nodeType===1)return SHt.call(r,e)},vx=function(r){let{matchingSelector:e,untilNode:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.parentNode;if(r!=null){if(e==null)return r;if(r.closest&&t==null)return r.closest(e);for(;r&&r!==t;){if(R5e(r,e))return r;r=r.parentNode}}},RX=r=>document.activeElement!==r&&q1(r,document.activeElement),q1=function(r,e){if(r&&e)for(;e;){if(e===r)return!0;e=e.parentNode}},XZ=function(r){var e;if((e=r)===null||e===void 0||!e.parentNode)return;let t=0;for(r=r.previousSibling;r;)t++,r=r.previousSibling;return t},yx=r=>{var e;return r==null||(e=r.parentNode)===null||e===void 0?void 0:e.removeChild(r)},vz=function(r){let{onlyNodesOfType:e,usingFilter:t,expandEntityReferences:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=(()=>{switch(e){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(r,i,t??null,n===!0)},fd=r=>{var e;return r==null||(e=r.tagName)===null||e===void 0?void 0:e.toLowerCase()},$o=function(r){let e,t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof r=="object"?(n=r,r=n.tagName):n={attributes:n};let i=document.createElement(r);if(n.editable!=null&&(n.attributes==null&&(n.attributes={}),n.attributes.contenteditable=n.editable),n.attributes)for(e in n.attributes)t=n.attributes[e],i.setAttribute(e,t);if(n.style)for(e in n.style)t=n.style[e],i.style[e]=t;if(n.data)for(e in n.data)t=n.data[e],i.dataset[e]=t;return n.className&&n.className.split(" ").forEach(o=>{i.classList.add(o)}),n.textContent&&(i.textContent=n.textContent),n.childNodes&&[].concat(n.childNodes).forEach(o=>{i.appendChild(o)}),i},g2=function(){if(f2!=null)return f2;f2=[];for(let r in hd){let e=hd[r];e.tagName&&f2.push(e.tagName)}return f2},JZ=r=>QT(r?.firstChild),l5e=function(r){let{strict:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return e?QT(r):QT(r)||!QT(r.firstChild)&&function(t){return g2().includes(fd(t))&&!g2().includes(fd(t.firstChild))}(r)},QT=r=>kHt(r)&&r?.data==="block",kHt=r=>r?.nodeType===Node.COMMENT_NODE,eE=function(r){let{name:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r)return v2(r)?r.data===qz?!e||r.parentNode.dataset.trixCursorTarget===e:void 0:eE(r.firstChild)},z1=r=>R5e(r,B1),F5e=r=>v2(r)&&r?.data==="",v2=r=>r?.nodeType===Node.TEXT_NODE,FX={level2Enabled:!0,getLevel(){return this.level2Enabled&&T2.supportsInputEvents?2:0},pickFiles(r){let e=$o("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});e.addEventListener("change",()=>{r(e.files),yx(e)}),yx(document.getElementById(this.fileInputId)),document.body.appendChild(e),e.click()}},mz={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:`
908
+ `,W6t="\uFE0F",V6t="\u200D",AB=null,DB=null;a2={defaultProtocol:"http",events:null,format:mze,formatHref:mze,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};zZ.prototype={o:a2,ignoreTags:[],defaultRender(r){return r},check(r){return this.get("validate",r.toString(),r)},get(r,e,t){let n=e!=null,i=this.o[r];return i&&(typeof i=="object"?(i=t.t in i?i[t.t]:a2[r],typeof i=="function"&&n&&(i=i(e,t))):typeof i=="function"&&n&&(i=i(e,t.t,t)),i)},getObj(r,e,t){let n=this.o[r];return typeof n=="function"&&e!=null&&(n=n(e,t.t,t)),n},render(r){let e=r.render(this);return(this.get("render",null,r)||this.defaultRender)(e,r.t,r)}};wze.prototype={isLink:!1,toString(){return this.v},toHref(r){return this.toString()},toFormattedString(r){let e=this.toString(),t=r.get("truncate",e,this),n=r.get("format",e,this);return t&&n.length>t?n.substring(0,t)+"\u2026":n},toFormattedHref(r){return r.get("formatHref",this.toHref(r.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(r){return r===void 0&&(r=a2.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(r),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(r){return{type:this.t,value:this.toFormattedString(r),isLink:this.isLink,href:this.toFormattedHref(r),start:this.startIndex(),end:this.endIndex()}},validate(r){return r.get("validate",this.toString(),this)},render(r){let e=this,t=this.toHref(r.get("defaultProtocol")),n=r.get("formatHref",t,this),i=r.get("tagName",t,e),o=this.toFormattedString(r),a={},l=r.get("className",t,e),f=r.get("target",t,e),p=r.get("rel",t,e),v=r.getObj("attributes",t,e),w=r.getObj("events",t,e);return a.href=n,l&&(a.class=l),f&&(a.target=f),p&&(a.rel=p),v&&ZT(a,v),{tagName:i,attributes:a,content:o,eventListeners:w}}};gze=lz("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),vze=lz("text"),Y6t=lz("nl"),OB=lz("url",{isLink:!0,toHref(r){return r===void 0&&(r=a2.defaultProtocol),this.hasProtocol()?this.v:`${r}://${this.v}`},hasProtocol(){let r=this.tk;return r.length>=2&&r[0].t!==o2&&r[1].t===dx}}),qm=r=>new tp(r);J6t=typeof console<"u"&&console&&console.warn||(()=>{}),Q6t="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",su={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1}});function tHt(r){return r.length===1?r[0].isLink:r.length===3&&r[1].isLink?["()","[]"].includes(r[0].value+r[2].value):!1}function rHt(r){return new Dc({key:new wh("autolink"),appendTransaction:(e,t,n)=>{let i=e.some(p=>p.docChanged)&&!t.doc.eq(n.doc),o=e.some(p=>p.getMeta("preventAutolink"));if(!i||o)return;let{tr:a}=n,l=YBe(t.doc,[...e]);if(XBe(l).forEach(({newRange:p})=>{let v=ZBe(n.doc,p,L=>L.isTextblock),w,D;if(v.length>1?(w=v[0],D=n.doc.textBetween(w.pos,w.pos+w.node.nodeSize,void 0," ")):v.length&&n.doc.textBetween(p.from,p.to," "," ").endsWith(" ")&&(w=v[0],D=n.doc.textBetween(w.pos,p.to,void 0," ")),w&&D){let L=D.split(" ").filter(Y=>Y!=="");if(L.length<=0)return!1;let R=L[L.length-1],q=w.pos+D.lastIndexOf(R);if(!R)return!1;let H=UZ(R).map(Y=>Y.toObject(r.defaultProtocol));if(!tHt(H))return!1;H.filter(Y=>Y.isLink).map(Y=>({...Y,from:q+Y.start+1,to:q+Y.end+1})).filter(Y=>n.schema.marks.code?!n.doc.rangeHasMark(Y.from,Y.to,n.schema.marks.code):!0).filter(Y=>r.validate(Y.value)).forEach(Y=>{EB(Y.from,Y.to,n.doc).some(J=>J.mark.type===r.type)||a.addMark(Y.from,Y.to,r.type.create({href:Y.href}))})}}),!!a.steps.length)return a}})}function nHt(r){return new Dc({key:new wh("handleClickLink"),props:{handleClick:(e,t,n)=>{var i,o;if(n.button!==0||!e.editable)return!1;let a=n.target,l=[];for(;a.nodeName!=="DIV";)l.push(a),a=a.parentNode;if(!l.find(D=>D.nodeName==="A"))return!1;let f=wZ(e.state,r.type.name),p=n.target,v=(i=p?.href)!==null&&i!==void 0?i:f.href,w=(o=p?.target)!==null&&o!==void 0?o:f.target;return p&&v?(window.open(v,w),!0):!1}}})}function iHt(r){return new Dc({key:new wh("handlePasteLink"),props:{handlePaste:(e,t,n)=>{let{state:i}=e,{selection:o}=i,{empty:a}=o;if(a)return!1;let l="";n.content.forEach(p=>{l+=p.textContent});let f=HZ(l,{defaultProtocol:r.defaultProtocol}).find(p=>p.isLink&&p.value===l);return!l||!f?!1:(r.editor.commands.setMark(r.type,{href:f.href}),!0)}}})}function Tze(r,e){let t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(n=>{let i=typeof n=="string"?n:n.scheme;i&&t.push(i)}),!r||r.replace(oHt,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}var oHt,Eze,Cze=Ie(()=>{cd();kze();Y3();oHt=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;Eze=Th.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(r=>{if(typeof r=="string"){jZ(r);return}jZ(r.scheme,r.optionalSlashes)})},onDestroy(){Sze()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:r=>!!r}},addAttributes(){return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:r=>{let e=r.getAttribute("href");return!e||!Tze(e,this.options.protocols)?!1:null}}]},renderHTML({HTMLAttributes:r}){return Tze(r.href,this.options.protocols)?["a",au(this.options.HTMLAttributes,r),0]:["a",au(this.options.HTMLAttributes,{...r,href:""}),0]},addCommands(){return{setLink:r=>({chain:e})=>e().setMark(this.name,r).setMeta("preventAutolink",!0).run(),toggleLink:r=>({chain:e})=>e().toggleMark(this.name,r,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:r})=>r().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Mv({find:r=>{let e=[];if(r){let{validate:t}=this.options,n=HZ(r).filter(i=>i.isLink&&t(i.value));n.length&&n.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:r=>{var e;return{href:(e=r.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){let r=[];return this.options.autolink&&r.push(rHt({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&r.push(nHt({type:this.type})),this.options.linkOnPaste&&r.push(iHt({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),r}})});var Aze,Dze=Ie(()=>{cd();Aze=of.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:r}){return["li",au(this.options.HTMLAttributes,r),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}})});var aHt,Oze,Ize,Mze,Pze=Ie(()=>{cd();aHt="listItem",Oze="textStyle",Ize=/^(\d+)\.\s$/,Mze=of.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:r=>r.hasAttribute("start")?parseInt(r.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:r=>r.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:r}){let{start:e,...t}=r;return e===1?["ol",au(this.options.HTMLAttributes,t),0]:["ol",au(this.options.HTMLAttributes,r),0]},addCommands(){return{toggleOrderedList:()=>({commands:r,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(aHt,this.editor.getAttributes(Oze)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let r=GT({find:Ize,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(r=GT({find:Ize,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Oze)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[r]}})});var Lze,Rze=Ie(()=>{cd();Lze=of.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:r}){return["p",au(this.options.HTMLAttributes,r),0]},addCommands(){return{setParagraph:()=>({commands:r})=>r.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})});var sHt,lHt,Fze,Nze=Ie(()=>{cd();sHt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,lHt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Fze=Th.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:r=>r.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:r}){return["s",au(this.options.HTMLAttributes,r),0]},addCommands(){return{setStrike:()=>({commands:r})=>r.setMark(this.name),toggleStrike:()=>({commands:r})=>r.toggleMark(this.name),unsetStrike:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[cx({find:sHt,type:this.type})]},addPasteRules(){return[Mv({find:lHt,type:this.type})]}})});var qze,Bze=Ie(()=>{cd();qze=of.create({name:"text",group:"inline"})});var zze,jze=Ie(()=>{cd();zze=Th.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:r=>r.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:r}){return["u",au(this.options.HTMLAttributes,r),0]},addCommands(){return{setUnderline:()=>({commands:r})=>r.setMark(this.name),toggleUnderline:()=>({commands:r})=>r.toggleMark(this.name),unsetUnderline:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})});var Uze,Hze=Ie(()=>{cd();Y3();qY();Uze=ud.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Dc({key:new wh("placeholder"),props:{decorations:({doc:r,selection:e})=>{let t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,i=[];if(!t)return null;let o=this.editor.isEmpty;return r.descendants((a,l)=>{let f=n>=l&&n<=l+a.nodeSize,p=!a.isLeaf&&t2(a);if((f||!this.options.showOnlyCurrent)&&p){let v=[this.options.emptyNodeClass];o&&v.push(this.options.emptyEditorClass);let w=id.node(l,l+a.nodeSize,{class:v.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:f}):this.options.placeholder});i.push(w)}return this.options.includeChildren}),Pu.create(r,i)}}})]}})});var s2,Wze=Ie(()=>{qi();cd();QBe();nze();oze();sze();uze();Cze();Dze();Pze();Rze();Nze();Bze();jze();Hze();s2=class extends Br{constructor(){super(...arguments);_r(this,"initEditor",()=>{this.editor=new _B({element:this.editorTarget,extensions:[JBe,rze,ize,aze,lze,Eze.configure({openOnClick:!1}),Aze,Mze,Lze,Uze.configure({placeholder:this.inputTarget.placeholder}),Fze,qze,zze],type:"HTML",content:this.inputTarget.value,onUpdate:this.onUpdate,onSelectionUpdate:this.onSelectionUpdate})});_r(this,"initToolbar",()=>{this.buttons={bold:this.element.querySelector(".tiptap__button--bold"),italic:this.element.querySelector(".tiptap__button--italic"),underline:this.element.querySelector(".tiptap__button--underline"),strike:this.element.querySelector(".tiptap__button--strike"),bulletList:this.element.querySelector(".tiptap__button--ul"),orderedList:this.element.querySelector(".tiptap__button--ol"),link:this.element.querySelector(".tiptap__button--link")},this.linkArea=this.element.querySelector(".tiptap__link-area"),this.linkInput=this.element.querySelector(".tiptap__link-field"),this.unsetButton=this.element.querySelector(".tiptap__link-button--unset")});_r(this,"onUpdate",()=>{this.inputTarget.value=this.editor.getHTML()});_r(this,"onSelectionUpdate",()=>{Object.keys(this.buttons).forEach(e=>{let t=this.editor.isActive(e);this.buttons[e].classList.toggle("tiptap__button--selected",t),e==="link"&&(this.buttons[e].disabled=this.editor.view.state.selection.empty&&!t)}),this.updateLinkArea(),this.updateLinkButtonState()})}connect(){this.initEditor(),this.initToolbar()}handleButtonClick(e){let t=e.target.dataset.action;t&&this[t]&&this[t](e)}updateButtonState(e){this.buttons[e].classList.toggle("tiptap__button--selected",this.editor.isActive(e))}updateLinkButtonState(){let e=this.editor.isActive("link"),t=this.editor.view.state.selection.empty;this.buttons.link.disabled=t&&!e}updateLinkArea(){let e=this.editor.isActive("link");if(this.linkArea.classList.toggle("hidden",!e),this.unsetButton.classList.toggle("hidden",!e),e){let t=this.editor.getAttributes("link").href;this.linkInput.value=t||""}else this.linkInput.value=""}bold(){this.editor.chain().focus().toggleBold().run(),this.updateButtonState("bold")}italic(){this.editor.chain().focus().toggleItalic().run(),this.updateButtonState("italic")}underline(){this.editor.chain().focus().toggleUnderline().run(),this.updateButtonState("underline")}strike(){this.editor.chain().focus().toggleStrike().run(),this.updateButtonState("strike")}unorderedList(){this.editor.chain().focus().toggleBulletList().run(),this.updateButtonState("bulletList")}orderedList(){this.editor.chain().focus().toggleOrderedList().run(),this.updateButtonState("orderedList")}toggleLinkArea(e){let t=e.target.closest(".tiptap__button"),n=this.element.querySelector(".tiptap__link-area"),i=this.editor.getAttributes("link").href,o=this.element.querySelector(".tiptap__link-field");i&&(o.value=i),t.classList.contains("tiptap__button--selected")?(n.classList.toggle("hidden",!0),t.classList.toggle("tiptap__button--selected",!1)):this.editor.view.state.selection.empty||(n.classList.toggle("hidden",!1),t.classList.toggle("tiptap__button--selected",!0))}setLink(){let e=this.element.querySelector(".tiptap__link-field").value,t=this.element.querySelector(".tiptap__link-button--unset");e?(this.editor.chain().focus().extendMarkRange("link").setLink({href:e}).run(),t.classList.toggle("hidden",!1)):(this.editor.chain().focus().extendMarkRange("link").unsetLink().run(),t.classList.toggle("hidden",!0))}unsetLink(){let e=this.element.querySelector(".tiptap__link-button--unset");this.editor.chain().focus().extendMarkRange("link").unsetLink().run(),e.classList.toggle("hidden",!0)}preventEnter(e){(e.key==="Enter"||e.keyCode===13)&&e.preventDefault()}disconnect(){this.editor.destroy()}};_r(s2,"targets",["editor","controller","input"])});function VZ(r,e,t){r.addEventListener?r.addEventListener(e,t,!1):r.attachEvent&&r.attachEvent("on".concat(e),function(){t(window.event)})}function Yze(r,e){for(var t=e.slice(0,e.length-1),n=0;n<t.length;n++)t[n]=r[t[n].toLowerCase()];return t}function Zze(r){typeof r!="string"&&(r=""),r=r.replace(/\s/g,"");for(var e=r.split(","),t=e.lastIndexOf("");t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}function uHt(r,e){for(var t=r.length>=e.length?r:e,n=r.length>=e.length?e:r,i=!0,o=0;o<t.length;o++)n.indexOf(t[o])===-1&&(i=!1);return i}function e5e(r){Jze=r||"all"}function u2(){return Jze||"all"}function cHt(){return Ml.slice(0)}function fHt(r){var e=r.target||r.srcElement,t=e.tagName,n=!0;return(e.isContentEditable||(t==="INPUT"||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(n=!1),n}function hHt(r){return typeof r=="string"&&(r=cz(r)),Ml.indexOf(r)!==-1}function dHt(r,e){var t,n;r||(r=u2());for(var i in Of)if(Object.prototype.hasOwnProperty.call(Of,i))for(t=Of[i],n=0;n<t.length;)t[n].scope===r?t.splice(n,1):n++;u2()===r&&e5e(e||"all")}function pHt(r){var e=r.keyCode||r.which||r.charCode,t=Ml.indexOf(e);if(t>=0&&Ml.splice(t,1),r.key&&r.key.toLowerCase()==="meta"&&Ml.splice(0,Ml.length),(e===93||e===224)&&(e=91),e in Zf){Zf[e]=!1;for(var n in F1)F1[n]===e&&(px[n]=!1)}}function mHt(r){if(!r)Object.keys(Of).forEach(function(a){return delete Of[a]});else if(Array.isArray(r))r.forEach(function(a){a.key&&$Z(a)});else if(typeof r=="object")r.key&&$Z(r);else if(typeof r=="string"){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];var i=t[0],o=t[1];typeof i=="function"&&(o=i,i=""),$Z({key:r,scope:i,method:o,splitKey:"+"})}}function $ze(r,e,t){var n;if(e.scope===t||e.scope==="all"){n=e.mods.length>0;for(var i in Zf)Object.prototype.hasOwnProperty.call(Zf,i)&&(!Zf[i]&&e.mods.indexOf(+i)>-1||Zf[i]&&e.mods.indexOf(+i)===-1)&&(n=!1);(e.mods.length===0&&!Zf[16]&&!Zf[18]&&!Zf[17]&&!Zf[91]||n||e.shortcut==="*")&&e.method(r,e)===!1&&(r.preventDefault?r.preventDefault():r.returnValue=!1,r.stopPropagation&&r.stopPropagation(),r.cancelBubble&&(r.cancelBubble=!0))}}function Gze(r){var e=Of["*"],t=r.keyCode||r.which||r.charCode;if(!!px.filter.call(this,r)){if((t===93||t===224)&&(t=91),Ml.indexOf(t)===-1&&t!==229&&Ml.push(t),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(L){var R=Vze[L];r[L]&&Ml.indexOf(R)===-1?Ml.push(R):!r[L]&&Ml.indexOf(R)>-1?Ml.splice(Ml.indexOf(R),1):L==="metaKey"&&r[L]&&Ml.length===3&&(r.ctrlKey||r.shiftKey||r.altKey||(Ml=Ml.slice(Ml.indexOf(R))))}),t in Zf){Zf[t]=!0;for(var n in F1)F1[n]===t&&(px[n]=!0);if(!e)return}for(var i in Zf)Object.prototype.hasOwnProperty.call(Zf,i)&&(Zf[i]=r[Vze[i]]);r.getModifierState&&!(r.altKey&&!r.ctrlKey)&&r.getModifierState("AltGraph")&&(Ml.indexOf(17)===-1&&Ml.push(17),Ml.indexOf(18)===-1&&Ml.push(18),Zf[17]=!0,Zf[18]=!0);var o=u2();if(e)for(var a=0;a<e.length;a++)e[a].scope===o&&(r.type==="keydown"&&e[a].keydown||r.type==="keyup"&&e[a].keyup)&&$ze(r,e[a],o);if(t in Of){for(var l=0;l<Of[t].length;l++)if((r.type==="keydown"&&Of[t][l].keydown||r.type==="keyup"&&Of[t][l].keyup)&&Of[t][l].key){for(var f=Of[t][l],p=f.splitKey,v=f.key.split(p),w=[],D=0;D<v.length;D++)w.push(cz(v[D]));w.sort().join("")===Ml.sort().join("")&&$ze(r,f,o)}}}}function gHt(r){return Qze.indexOf(r)>-1}function px(r,e,t){Ml=[];var n=Zze(r),i=[],o="all",a=document,l=0,f=!1,p=!0,v="+";for(t===void 0&&typeof e=="function"&&(t=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(a=e.element),e.keyup&&(f=e.keyup),e.keydown!==void 0&&(p=e.keydown),typeof e.splitKey=="string"&&(v=e.splitKey)),typeof e=="string"&&(o=e);l<n.length;l++)r=n[l].split(v),i=[],r.length>1&&(i=Yze(F1,r)),r=r[r.length-1],r=r==="*"?"*":cz(r),r in Of||(Of[r]=[]),Of[r].push({keyup:f,keydown:p,scope:o,mods:i,shortcut:n[l],method:t,key:n[l],splitKey:v});typeof a<"u"&&!gHt(a)&&window&&(Qze.push(a),VZ(a,"keydown",function(w){Gze(w)}),VZ(window,"focus",function(){Ml=[]}),VZ(a,"keyup",function(w){Gze(w),pHt(w)}))}var WZ,Xze,F1,Vze,Zf,Of,l2,Ml,Jze,Qze,cz,$Z,GZ,uz,Kze,t5e=Ie(()=>{WZ=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;Xze={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":WZ?173:189,"=":WZ?61:187,";":WZ?59:186,"'":222,"[":219,"]":221,"\\":220},F1={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},Vze={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Zf={16:!1,18:!1,17:!1,91:!1},Of={};for(l2=1;l2<20;l2++)Xze["f".concat(l2)]=111+l2;Ml=[],Jze="all",Qze=[],cz=function(e){return Xze[e.toLowerCase()]||F1[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};$Z=function(e){var t=e.key,n=e.scope,i=e.method,o=e.splitKey,a=o===void 0?"+":o,l=Zze(t);l.forEach(function(f){var p=f.split(a),v=p.length,w=p[v-1],D=w==="*"?"*":cz(w);if(!!Of[D]){n||(n=u2());var L=v>1?Yze(F1,p):[];Of[D]=Of[D].map(function(R){var q=i?R.method===i:!0;return q&&R.scope===n&&uHt(R.mods,L)?{}:R})}})};GZ={setScope:e5e,getScope:u2,deleteScope:dHt,getPressedKeyCodes:cHt,isPressed:hHt,filter:fHt,unbind:mHt};for(uz in GZ)Object.prototype.hasOwnProperty.call(GZ,uz)&&(px[uz]=GZ[uz]);typeof window<"u"&&(Kze=window.hotkeys,px.noConflict=function(r){return r&&window.hotkeys===px&&(window.hotkeys=Kze),px},window.hotkeys=px)});function bHt(r){let e=r.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=e.top<=t&&e.top+e.height>=0,o=e.left<=n&&e.left+e.width>=0;return i&&o}var vHt,yHt,xHt,r5e,KZ,YZ,n5e=Ie(()=>{qi();t5e();vHt=(r,e,t)=>{let n=r;return t===!0?n=`${e.identifier}:${r}`:typeof t=="string"&&(n=`${t}:${r}`),n},yHt=(r,e,t)=>{let{bubbles:n,cancelable:i,composed:o}=e||{bubbles:!0,cancelable:!0,composed:!0};return e&&Object.assign(t,{originalEvent:e}),new CustomEvent(r,{bubbles:n,cancelable:i,composed:o,detail:t})};xHt={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},r5e=(r,e={})=>{let{onlyVisible:t,dispatchEvent:n,events:i,eventPrefix:o}=Object.assign({},xHt,e),a=v=>{let w=e?.element||r.element;if(!(w.contains(v.target)||!bHt(w)&&t)&&(r.clickOutside&&r.clickOutside(v),n)){let D=vHt("click:outside",r,o),L=yHt(D,v,{controller:r});w.dispatchEvent(L)}},l=()=>{i?.forEach(v=>{window.addEventListener(v,a,!1)})},f=()=>{i?.forEach(v=>{window.removeEventListener(v,a,!1)})},p=r.disconnect.bind(r);return Object.assign(r,{disconnect(){f(),p()}}),l(),[l,f]};KZ=class extends Br{};KZ.debounces=[];YZ=class extends Br{};YZ.throttles=[]});var XT,i5e=Ie(()=>{qi();WG();n5e();XT=class extends Br{get exemptionContainerTargets(){return this.exemptionContainersValue.map(r=>document.querySelector(r)).filter(Boolean)}connect(){r5e(this)}clickOutside(r){this.hasPanelTarget&&!(this.hasExemptionContainersValue&&this.exemptionContainerTargets.some(t=>t.contains(r.target)))&&!this.panelTarget.classList.contains("hidden")&&BO(this.panelTarget)}togglePanel(){this.hasPanelTarget&&LIe(this.panelTarget)}outlet({params:r}){let{outlet:e}=r;e&&document.querySelector(e)&&document.querySelector(e).classList.toggle("hidden")}};_r(XT,"targets",["panel"]),_r(XT,"values",{exemptionContainers:Array})});var c2,o5e=Ie(()=>{qi();c2=class extends Br{connect(){this.checkContentHeight()}checkContentHeight(){this.contentTarget.scrollHeight>50&&this.moreContentButtonTarget.classList.remove("hidden")}toggleContent(){this.contentTarget.classList.toggle("hidden"),this.toggleButtons()}toggleButtons(){this.moreContentButtonTarget.classList.toggle("hidden"),this.lessContentButtonTarget.classList.toggle("hidden")}};_r(c2,"targets",["content","moreContentButton","lessContentButton"])});function hz(r){var e,t;function n(o,a){try{var l=r[o](a),f=l.value,p=f instanceof KHt;Promise.resolve(p?f.v:f).then(function(v){if(p){var w=o==="return"?"return":"next";if(!f.k||v.done)return n(w,v);v=r[w](v).value}i(l.done?"return":"normal",v)},function(v){n("throw",v)})}catch(v){i("throw",v)}}function i(o,a){switch(o){case"return":e.resolve({value:a,done:!0});break;case"throw":e.reject(a);break;default:e.resolve({value:a,done:!1})}(e=e.next)?n(e.key,e.arg):t=null}this._invoke=function(o,a){return new Promise(function(l,f){var p={key:o,arg:a,resolve:l,reject:f,next:null};t?t=t.next=p:(e=t=p,n(o,a))})},typeof r.return!="function"&&(this.return=void 0)}function KHt(r,e){this.v=r,this.k=e}function np(r,e,t){return(e=YHt(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function YHt(r){var e=function(t,n){if(typeof t!="object"||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var o=i.call(t,n||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(t)}(r,"string");return typeof e=="symbol"?e:String(e)}function al(r,e){return ZHt(r,W5e(r,e,"get"))}function jX(r,e,t){return XHt(r,W5e(r,e,"set"),t),t}function W5e(r,e,t){if(!e.has(r))throw new TypeError("attempted to "+t+" private field on non-instance");return e.get(r)}function ZHt(r,e){return e.get?e.get.call(r):e.value}function XHt(r,e,t){if(e.set)e.set.call(r,t);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=t}}function dz(r,e,t){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return t}function V5e(r,e){if(e.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function b2(r,e,t){V5e(r,e),e.set(r,t)}function pz(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",{required:e,value:t}=this.element,n=e&&!t,i=!!r,o=$o("input",{required:e}),a=r||o.validationMessage;al(this,sb).setValidity({valueMissing:n,customError:i},a)}var _Ht,B1,PX,hd,a5e,s5e,ZZ,T2,bo,wHt,P5e,qz,gx,L5e,LX,SHt,uu,m2,R5e,vx,RX,q1,XZ,yx,vz,fd,$o,f2,g2,JZ,l5e,QT,kHt,eE,z1,F5e,v2,FX,mz,H1,N5e,vX,E2,Ru,THt,u5e,EHt,QZ,eX,tX,W1,CHt,AHt,DHt,yX,bX,OHt,cb,V1,NX,IHt,MHt,rX,nX,iX,fz,xX,ic,PHt,_X,LHt,q5e,RHt,FHt,c5e,f5e,B5e,z5e,qX,j5e,aE,ws,ub,yz,h5e,wX,bz,$1,U5e,y2,H5e,NHt,d5e,p2,BX,zX,p5e,oX,dd,qHt,BHt,gz,h2,zHt,x2,SX,kX,m5e,tE,fb,TX,jHt,UHt,HHt,rE,WHt,mx,_2,g5e,VHt,xz,_z,wz,$Ht,v5e,Sz,nE,y5e,GHt,b5e,hb,kz,bx,xx,w2,iE,JHt,QHt,eWt,jp,Bm,tWt,rWt,nWt,iWt,$5e,oWt,x5e,_5e,w5e,rp,S5e,aX,k5e,G1,T5e,aWt,E5e,sWt,lWt,uWt,G5e,cWt,EX,fWt,hWt,dWt,pWt,lu,Tz,Ez,Nv,S2,mWt,sX,Cz,K5e,gWt,Az,Dz,lX,vWt,yWt,Y5e,Oz,lb,Z5e,bWt,uX,N1,xWt,cX,Iz,Mz,Pz,X5e,_Wt,wWt,Lz,CX,Rz,AX,SWt,kWt,C5e,oE,fX,TWt,J5e,EWt,Ng,CWt,AWt,DWt,OWt,Fv,j1,IWt,hX,MWt,Q5e,PWt,LWt,dX,DX,OX,RWt,Bz,FWt,NWt,A5e,D5e,O5e,JT,Fz,U1,qWt,BWt,zWt,Nz,jWt,UWt,HWt,WWt,VWt,I5e,sb,d2,IX,pX,mX,gX,MX,Eh,k2,M5e,e4e=Ie(()=>{_Ht="2.1.8",B1="[data-trix-attachment]",PX={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},hd={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(r){return a5e(r.parentNode)===hd[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(r){return a5e(r.parentNode)===hd[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},a5e=r=>{var e;return r==null||(e=r.tagName)===null||e===void 0?void 0:e.toLowerCase()},s5e=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),ZZ=s5e&&parseInt(s5e[1]),T2={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:ZZ&&ZZ>12,samsungAndroid:ZZ&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(r=>r in InputEvent.prototype)},bo={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"},wHt=[bo.bytes,bo.KB,bo.MB,bo.GB,bo.TB,bo.PB],P5e={prefix:"IEC",precision:2,formatter(r){switch(r){case 0:return"0 ".concat(bo.bytes);case 1:return"1 ".concat(bo.byte);default:let e;this.prefix==="SI"?e=1e3:this.prefix==="IEC"&&(e=1024);let t=Math.floor(Math.log(r)/Math.log(e)),n=(r/Math.pow(e,t)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(n," ").concat(wHt[t])}}},qz="\uFEFF",gx="\xA0",L5e=function(r){for(let e in r){let t=r[e];this[e]=t}return this},LX=document.documentElement,SHt=LX.matches,uu=function(r){let{onElement:e,matchingSelector:t,withCallback:n,inPhase:i,preventDefault:o,times:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=e||LX,f=t,p=i==="capturing",v=function(w){a!=null&&--a==0&&v.destroy();let D=vx(w.target,{matchingSelector:f});D!=null&&(n?.call(D,w,D),o&&w.preventDefault())};return v.destroy=()=>l.removeEventListener(r,v,p),l.addEventListener(r,v,p),v},m2=function(r){let{onElement:e,bubbles:t,cancelable:n,attributes:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=e??LX;t=t!==!1,n=n!==!1;let a=document.createEvent("Events");return a.initEvent(r,t,n),i!=null&&L5e.call(a,i),o.dispatchEvent(a)},R5e=function(r,e){if(r?.nodeType===1)return SHt.call(r,e)},vx=function(r){let{matchingSelector:e,untilNode:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.parentNode;if(r!=null){if(e==null)return r;if(r.closest&&t==null)return r.closest(e);for(;r&&r!==t;){if(R5e(r,e))return r;r=r.parentNode}}},RX=r=>document.activeElement!==r&&q1(r,document.activeElement),q1=function(r,e){if(r&&e)for(;e;){if(e===r)return!0;e=e.parentNode}},XZ=function(r){var e;if((e=r)===null||e===void 0||!e.parentNode)return;let t=0;for(r=r.previousSibling;r;)t++,r=r.previousSibling;return t},yx=r=>{var e;return r==null||(e=r.parentNode)===null||e===void 0?void 0:e.removeChild(r)},vz=function(r){let{onlyNodesOfType:e,usingFilter:t,expandEntityReferences:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=(()=>{switch(e){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(r,i,t??null,n===!0)},fd=r=>{var e;return r==null||(e=r.tagName)===null||e===void 0?void 0:e.toLowerCase()},$o=function(r){let e,t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof r=="object"?(n=r,r=n.tagName):n={attributes:n};let i=document.createElement(r);if(n.editable!=null&&(n.attributes==null&&(n.attributes={}),n.attributes.contenteditable=n.editable),n.attributes)for(e in n.attributes)t=n.attributes[e],i.setAttribute(e,t);if(n.style)for(e in n.style)t=n.style[e],i.style[e]=t;if(n.data)for(e in n.data)t=n.data[e],i.dataset[e]=t;return n.className&&n.className.split(" ").forEach(o=>{i.classList.add(o)}),n.textContent&&(i.textContent=n.textContent),n.childNodes&&[].concat(n.childNodes).forEach(o=>{i.appendChild(o)}),i},g2=function(){if(f2!=null)return f2;f2=[];for(let r in hd){let e=hd[r];e.tagName&&f2.push(e.tagName)}return f2},JZ=r=>QT(r?.firstChild),l5e=function(r){let{strict:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return e?QT(r):QT(r)||!QT(r.firstChild)&&function(t){return g2().includes(fd(t))&&!g2().includes(fd(t.firstChild))}(r)},QT=r=>kHt(r)&&r?.data==="block",kHt=r=>r?.nodeType===Node.COMMENT_NODE,eE=function(r){let{name:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r)return v2(r)?r.data===qz?!e||r.parentNode.dataset.trixCursorTarget===e:void 0:eE(r.firstChild)},z1=r=>R5e(r,B1),F5e=r=>v2(r)&&r?.data==="",v2=r=>r?.nodeType===Node.TEXT_NODE,FX={level2Enabled:!0,getLevel(){return this.level2Enabled&&T2.supportsInputEvents?2:0},pickFiles(r){let e=$o("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});e.addEventListener("change",()=>{r(e.files),yx(e)}),yx(document.getElementById(this.fileInputId)),document.body.appendChild(e),e.click()}},mz={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:`
909
909
  `},H1={bold:{tagName:"strong",inheritable:!0,parser(r){let e=window.getComputedStyle(r);return e.fontWeight==="bold"||e.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:r=>window.getComputedStyle(r).fontStyle==="italic"},href:{groupTagName:"a",parser(r){let e="a:not(".concat(B1,")"),t=r.closest(e);if(t)return t.getAttribute("href")}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}},N5e={getDefaultHTML:()=>`<div class="trix-button-row">
910
910
  <span class="trix-button-group trix-button-group--text-tools" data-trix-button-group="text-tools">
911
911
  <button type="button" class="trix-button trix-button--icon trix-button--icon-bold" data-trix-attribute="bold" data-trix-key="b" title="`.concat(bo.bold,'" tabindex="-1">').concat(bo.bold,`</button>
@@ -1048,7 +1048,7 @@ img.ProseMirror-separator {
1048
1048
  %t [data-trix-cursor-target=right] {
1049
1049
  vertical-align: bottom !important;
1050
1050
  margin-right: -1px !important;
1051
- }`));sb=new WeakMap,d2=new WeakSet,IX=class{constructor(e){var t,n;V5e(t=this,n=d2),n.add(t),b2(this,sb,{writable:!0,value:void 0}),this.element=e,jX(this,sb,e.attachInternals())}connectedCallback(){dz(this,d2,pz).call(this)}disconnectedCallback(){}get labels(){return al(this,sb).labels}get disabled(){var e;return(e=this.element.inputElement)===null||e===void 0?void 0:e.disabled}set disabled(e){this.element.toggleAttribute("disabled",e)}get required(){return this.element.hasAttribute("required")}set required(e){this.element.toggleAttribute("required",e),dz(this,d2,pz).call(this)}get validity(){return al(this,sb).validity}get validationMessage(){return al(this,sb).validationMessage}get willValidate(){return al(this,sb).willValidate}setFormValue(e){dz(this,d2,pz).call(this)}checkValidity(){return al(this,sb).checkValidity()}reportValidity(){return al(this,sb).reportValidity()}setCustomValidity(e){dz(this,d2,pz).call(this,e)}};pX=new WeakMap,mX=new WeakMap,gX=new WeakMap,MX=class{constructor(e){b2(this,pX,{writable:!0,value:void 0}),b2(this,mX,{writable:!0,value:t=>{t.defaultPrevented||t.target===this.element.form&&this.element.reset()}}),b2(this,gX,{writable:!0,value:t=>{if(t.defaultPrevented||this.element.contains(t.target))return;let n=vx(t.target,{matchingSelector:"label"});n&&Array.from(this.labels).includes(n)&&this.element.focus()}}),this.element=e}connectedCallback(){jX(this,pX,function(e){if(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))return;let t=function(){let n=Array.from(e.labels).map(o=>{if(!o.contains(e))return o.textContent}).filter(o=>o),i=n.join(" ");return i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label")};return t(),uu("focus",{onElement:e,withCallback:t})}(this.element)),window.addEventListener("reset",al(this,mX),!1),window.addEventListener("click",al(this,gX),!1)}disconnectedCallback(){var e;(e=al(this,pX))===null||e===void 0||e.destroy(),window.removeEventListener("reset",al(this,mX),!1),window.removeEventListener("click",al(this,gX),!1)}get labels(){let e=[];this.element.id&&this.element.ownerDocument&&e.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id,"']"))||[]));let t=vx(this.element,{matchingSelector:"label"});return t&&[this.element,null].includes(t.control)&&e.push(t),e}get disabled(){return console.warn("This browser does not support the [disabled] attribute for trix-editor elements."),!1}set disabled(e){console.warn("This browser does not support the [disabled] attribute for trix-editor elements.")}get required(){return console.warn("This browser does not support the [required] attribute for trix-editor elements."),!1}set required(e){console.warn("This browser does not support the [required] attribute for trix-editor elements.")}get validity(){return console.warn("This browser does not support the validity property for trix-editor elements."),null}get validationMessage(){return console.warn("This browser does not support the validationMessage property for trix-editor elements."),""}get willValidate(){return console.warn("This browser does not support the willValidate property for trix-editor elements."),!1}setFormValue(e){}checkValidity(){return console.warn("This browser does not support checkValidity() for trix-editor elements."),!0}reportValidity(){return console.warn("This browser does not support reportValidity() for trix-editor elements."),!0}setCustomValidity(e){console.warn("This browser does not support setCustomValidity(validationMessage) for trix-editor elements.")}},Eh=new WeakMap,k2=class extends HTMLElement{constructor(){super(),b2(this,Eh,{writable:!0,value:void 0}),jX(this,Eh,this.constructor.formAssociated?new IX(this):new MX(this))}get trixId(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++jWt),this.trixId)}get labels(){return al(this,Eh).labels}get disabled(){return al(this,Eh).disabled}set disabled(e){al(this,Eh).disabled=e}get required(){return al(this,Eh).required}set required(e){al(this,Eh).required=e}get validity(){return al(this,Eh).validity}get validationMessage(){return al(this,Eh).validationMessage}get willValidate(){return al(this,Eh).willValidate}get type(){return this.localName}get toolbarElement(){var e;if(this.hasAttribute("toolbar"))return(e=this.ownerDocument)===null||e===void 0?void 0:e.getElementById(this.getAttribute("toolbar"));if(this.parentNode){let t="trix-toolbar-".concat(this.trixId);this.setAttribute("toolbar",t);let n=$o("trix-toolbar",{id:t});return this.parentNode.insertBefore(n,this),n}}get form(){var e;return(e=this.inputElement)===null||e===void 0?void 0:e.form}get inputElement(){var e;if(this.hasAttribute("input"))return(e=this.ownerDocument)===null||e===void 0?void 0:e.getElementById(this.getAttribute("input"));if(this.parentNode){let t="trix-input-".concat(this.trixId);this.setAttribute("input",t);let n=$o("input",{type:"hidden",id:t});return this.parentNode.insertBefore(n,this.nextElementSibling),n}}get editor(){var e;return(e=this.editorController)===null||e===void 0?void 0:e.editor}get name(){var e;return(e=this.inputElement)===null||e===void 0?void 0:e.name}get value(){var e;return(e=this.inputElement)===null||e===void 0?void 0:e.value}set value(e){var t;this.defaultValue=e,(t=this.editor)===null||t===void 0||t.loadHTML(this.defaultValue)}notify(e,t){if(this.editorController)return m2("trix-".concat(e),{onElement:this,attributes:t})}setFormValue(e){this.inputElement&&(this.inputElement.value=e,al(this,Eh).setFormValue(e))}connectedCallback(){this.hasAttribute("data-trix-internal")||(UWt(this),function(e){e.hasAttribute("role")||e.setAttribute("role","textbox")}(this),this.editorController||(m2("trix-before-initialize",{onElement:this}),this.editorController=new U1({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(()=>m2("trix-initialize",{onElement:this}))),this.editorController.registerSelectionManager(),al(this,Eh).connectedCallback(),function(e){!document.querySelector(":focus")&&e.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===e&&e.focus()}(this))}disconnectedCallback(){var e;(e=this.editorController)===null||e===void 0||e.unregisterSelectionManager(),al(this,Eh).disconnectedCallback()}checkValidity(){return al(this,Eh).checkValidity()}reportValidity(){return al(this,Eh).reportValidity()}setCustomValidity(e){al(this,Eh).setCustomValidity(e)}formDisabledCallback(e){this.inputElement&&(this.inputElement.disabled=e),this.toggleAttribute("contenteditable",!e)}formResetCallback(){this.reset()}reset(){this.value=this.defaultValue}};np(k2,"formAssociated","ElementInternals"in window);M5e={VERSION:_Ht,config:E2,core:pWt,models:Z5e,views:bWt,controllers:qWt,observers:BWt,operations:zWt,elements:Object.freeze({__proto__:null,TrixEditorElement:k2,TrixToolbarElement:Nz}),filters:Object.freeze({__proto__:null,Filter:Cz,attachmentGalleryFilter:K5e})};Object.assign(M5e,Z5e),window.Trix=M5e,setTimeout(function(){customElements.get("trix-toolbar")||customElements.define("trix-toolbar",Nz),customElements.get("trix-editor")||customElements.define("trix-editor",k2)},0)});var UX,sE,t4e=Ie(()=>{e4e();UX=Ca(z_());qi();ON();sE=class extends Br{get uploadUrl(){let r=new UX.default(window.location.origin),e=new UX.default(window.Avo.configuration.root_path);return r.path(`${e.path()}/avo_api/resources/${this.resourceNameValue}/${this.resourceIdValue}/attachments`),r.query(e.query()),r.toString()}connect(){this.attachmentsDisabledValue&&this.controllerTarget.querySelector(".trix-button-group--file-tools").remove(),window.addEventListener("trix-file-accept",r=>{if(r.target===this.editorTarget){if(this.attachmentsDisabledValue){r.preventDefault(),alert(this.attachmentDisableWarningValue);return}if(!this.resourceIdValue){r.preventDefault(),alert(this.uploadWarningValue);return}!this.isActionTextValue&&!this.attachmentKeyValue&&(r.preventDefault(),alert(this.attachmentKeyWarningValue))}}),window.addEventListener("trix-attachment-add",r=>{r.target===this.editorTarget&&r.attachment.file&&this.uploadFileAttachment(r.attachment)})}uploadFileAttachment(r){this.uploadFile(r.file,e=>r.setUploadProgress(e),e=>r.setAttributes(e))}uploadFile(r,e,t){var a;let n=this.createFormData(r),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",l=>{let f=l.loaded/l.total*100;e(f)}),i.addEventListener("load",()=>{if(i.status===200){let l;try{l=JSON.parse(i.response)}catch(p){l={}}let f={url:l.url,href:l.href};this.hideAttachmentFilenameValue&&(f.filename=null),this.hideAttachmentFilesizeValue&&(f.filesize=null),this.hideAttachmentUrlValue&&(f.href=null),t(f)}}),i.send(n)}createStorageKey(r){let e=new Date,t=e.toISOString().slice(0,10),n=`${e.getTime()}-${r.name}`;return["tmp",t,n].join("/")}createFormData(r){let e=new FormData;return e.append("Content-Type",r.type),e.append("file",r),e.append("filename",r.name),this.attachmentKeyValue?e.append("attachment_key",this.attachmentKeyValue):e.append("key",this.createStorageKey(r)),e}};_r(sE,"targets",["editor","controller"]),_r(sE,"values",{resourceName:String,resourceId:String,attachmentsDisabled:Boolean,attachmentKey:String,hideAttachmentFilename:Boolean,hideAttachmentFilesize:Boolean,hideAttachmentUrl:Boolean,isActionText:Boolean,uploadWarning:String,attachmentDisableWarning:String,attachmentKeyWarning:String})});var r4e=Ie(()=>{HEe();WEe();VEe();$Ee();GEe();ZEe();nCe();oCe();aCe();vAe();yAe();bAe();WDe();VDe();eIe();j_();tIe();rIe();nIe();iIe();MIe();PIe();FIe();NIe();qIe();BIe();zIe();jIe();UIe();HIe();EMe();CMe();AMe();eNe();rNe();nNe();iNe();aNe();sNe();cNe();fNe();MNe();PNe();LNe();Wze();i5e();o5e();t4e();hi.register("action",bk);hi.register("actions-overflow",xk);hi.register("actions-picker",_k);hi.register("attachments",CD);hi.register("boolean-filter",DD);hi.register("card-filters",OD);hi.register("clear-input",ID);hi.register("copy-to-clipboard",IN);hi.register("dashboard-card",RD);hi.register("date-time-filter",$k);hi.register("filter",ph);hi.register("panel-refresh",Xq);hi.register("hidden-input",kO);hi.register("input-autofocus",TO);hi.register("item-select-all",Xk);hi.register("item-selector",EO);hi.register("loading-button",qO);hi.register("menu",zO);hi.register("modal",iT);hi.register("multiple-select-filter",jO);hi.register("per-page",UO);hi.register("preview",HO);hi.register("resource-edit",aT);hi.register("resource-index",Qq);hi.register("resource-show",e3);hi.register("search",ST);hi.register("select",xI);hi.register("select-filter",_I);hi.register("self-destroy",A3);hi.register("sidebar",kT);hi.register("sign-out",TT);hi.register("tabs",ET);hi.register("table-row",O3);hi.register("text-filter",CI);hi.register("tippy",AI);hi.register("toggle",XT);hi.register("trix-body",c2);hi.register("belongs-to-field",AD);hi.register("code-field",LD);hi.register("date-field",Vk);hi.register("easy-mde",SO);hi.register("key-value",NO);hi.register("progress-bar-field",WO);hi.register("reload-belongs-to-field",VO);hi.register("tags-field",DT);hi.register("trix-field",sE);hi.register("tiptap-field",s2)});var n4e=Ie(()=>{YF();mv.setConfirmMethod(r=>{let e=document.getElementById("turbo-confirm");return e.querySelector("p").textContent=r,e.showModal(),e.addEventListener("click",t=>{t.target.nodeName==="DIALOG"&&e.close()}),new Promise(t=>{e.addEventListener("close",()=>{t(e.returnValue==="confirm")},{once:!0})})})});var i4e=ue((HX,WX)=>{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof HX<"u"?e():(e(),r.FileSaver={})})(HX,function(){"use strict";function r(l,f){return typeof f>"u"?f={autoBom:!1}:typeof f!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function e(l,f,p){var v=new XMLHttpRequest;v.open("GET",l),v.responseType="blob",v.onload=function(){a(v.response,f,p)},v.onerror=function(){console.error("could not download file")},v.send()}function t(l){var f=new XMLHttpRequest;f.open("HEAD",l,!1);try{f.send()}catch{}return 200<=f.status&&299>=f.status}function n(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(f)}}var i=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,o=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=i.saveAs||(typeof window!="object"||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(l,f,p){var v=i.URL||i.webkitURL,w=document.createElement("a");f=f||l.name||"download",w.download=f,w.rel="noopener",typeof l=="string"?(w.href=l,w.origin===location.origin?n(w):t(w.href)?e(l,f,p):n(w,w.target="_blank")):(w.href=v.createObjectURL(l),setTimeout(function(){v.revokeObjectURL(w.href)},4e4),setTimeout(function(){n(w)},0))}:"msSaveOrOpenBlob"in navigator?function(l,f,p){if(f=f||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(r(l,p),f);else if(t(l))e(l,f,p);else{var v=document.createElement("a");v.href=l,v.target="_blank",setTimeout(function(){n(v)})}}:function(l,f,p,v){if(v=v||open("","_blank"),v&&(v.document.title=v.document.body.innerText="downloading..."),typeof l=="string")return e(l,f,p);var w=l.type==="application/octet-stream",D=/constructor/i.test(i.HTMLElement)||i.safari,L=/CriOS\/[\d]+/.test(navigator.userAgent);if((L||w&&D||o)&&typeof FileReader<"u"){var R=new FileReader;R.onloadend=function(){var Y=R.result;Y=L?Y:Y.replace(/^data:[^;]*;/,"data:attachment/file;"),v?v.location.href=Y:location=Y,v=null},R.readAsDataURL(l)}else{var q=i.URL||i.webkitURL,H=q.createObjectURL(l);v?v.location=H:location.href=H,v=null,setTimeout(function(){q.revokeObjectURL(H)},4e4)}});i.saveAs=a.saveAs=a,typeof WX<"u"&&(WX.exports=a)})});var o4e,a4e=Ie(()=>{jF();o4e=Ca(i4e());w0.close_filters_dropdown=function(){document.querySelector(".filters-dropdown-selector").classList.add("hidden")};w0.open_filter=function(){let r=this.getAttribute("unique-id");setTimeout(()=>{document.querySelector(`[data-filter-id="${r}"] .pill`).click()},150)};w0.download=function(){let r=atob(this.getAttribute("content")),e=new Array(r.length);for(let n=0;n<r.length;n++)e[n]=r.charCodeAt(n);let t=new Uint8Array(e);(0,o4e.saveAs)(new Blob([t]),this.getAttribute("filename"))};window.StreamActions=w0});var GWt=ue(u4e=>{var fAr=Ca(Pxe());aSe();sSe();var pAr=Ca(lSe()),s4e=Ca(cSe()),l4e=Ca(K8());YF();cN();fTe();hTe();r4e();n4e();a4e();window.Avo.localStorage=new fN;window.Turbolinks=mv;var zz=null;l4e.bind("r r r",()=>{zz=document.scrollingElement.scrollTop,mv.visit(window.location.href,{action:"replace"})});function $Wt(){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 VX(){vk('[data-tippy="tooltip"]',{theme:"light",content(r){let e=r.getAttribute("title");return r.removeAttribute("title"),r.removeAttribute("data-tippy"),r.setAttribute("has-data-tippy",e),e},onShow(r){return r.props.content===null||r.props.content.length===0?!1:r}})}window.initTippy=VX;s4e.start();document.addEventListener("turbo:load",()=>{VX(),$Wt(),zz&&setTimeout(()=>{document.scrollingElement.scrollTo(0,zz),zz=0},50),setTimeout(()=>{document.body.classList.remove("turbo-loading")},1)});document.addEventListener("turbo:frame-load",()=>{VX(),document.querySelectorAll('turbo-frame[loading="lazy"][complete]').forEach(r=>r.removeAttribute("loading"))});document.addEventListener("turbo:before-fetch-response",r=>dw(u4e,null,function*(){var e,t,n;if(r.detail.fetchResponse.response.status===500){let{id:i,src:o}=r.target;(n=(t=(e=r.detail.fetchResponse)==null?void 0:e.response)==null?void 0:t.url)!=null&&n.includes("/failed_to_load")||(r.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(r=>r.remove()),document.querySelectorAll("[has-data-tippy]").forEach(r=>{r.setAttribute("data-tippy","tooltip"),r.setAttribute("title",r.getAttribute("has-data-tippy")),r.removeAttribute("has-data-tippy")})});window.Avo=window.Avo||{configuration:{}};window.Avo.menus={resetCollapsedState(){Array.from(document.querySelectorAll("[data-menu-key-param]")).map(r=>r.getAttribute("data-menu-key-param")).filter(Boolean).forEach(r=>{window.localStorage.removeItem(r)})}}});GWt();})();
1051
+ }`));sb=new WeakMap,d2=new WeakSet,IX=class{constructor(e){var t,n;V5e(t=this,n=d2),n.add(t),b2(this,sb,{writable:!0,value:void 0}),this.element=e,jX(this,sb,e.attachInternals())}connectedCallback(){dz(this,d2,pz).call(this)}disconnectedCallback(){}get labels(){return al(this,sb).labels}get disabled(){var e;return(e=this.element.inputElement)===null||e===void 0?void 0:e.disabled}set disabled(e){this.element.toggleAttribute("disabled",e)}get required(){return this.element.hasAttribute("required")}set required(e){this.element.toggleAttribute("required",e),dz(this,d2,pz).call(this)}get validity(){return al(this,sb).validity}get validationMessage(){return al(this,sb).validationMessage}get willValidate(){return al(this,sb).willValidate}setFormValue(e){dz(this,d2,pz).call(this)}checkValidity(){return al(this,sb).checkValidity()}reportValidity(){return al(this,sb).reportValidity()}setCustomValidity(e){dz(this,d2,pz).call(this,e)}};pX=new WeakMap,mX=new WeakMap,gX=new WeakMap,MX=class{constructor(e){b2(this,pX,{writable:!0,value:void 0}),b2(this,mX,{writable:!0,value:t=>{t.defaultPrevented||t.target===this.element.form&&this.element.reset()}}),b2(this,gX,{writable:!0,value:t=>{if(t.defaultPrevented||this.element.contains(t.target))return;let n=vx(t.target,{matchingSelector:"label"});n&&Array.from(this.labels).includes(n)&&this.element.focus()}}),this.element=e}connectedCallback(){jX(this,pX,function(e){if(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))return;let t=function(){let n=Array.from(e.labels).map(o=>{if(!o.contains(e))return o.textContent}).filter(o=>o),i=n.join(" ");return i?e.setAttribute("aria-label",i):e.removeAttribute("aria-label")};return t(),uu("focus",{onElement:e,withCallback:t})}(this.element)),window.addEventListener("reset",al(this,mX),!1),window.addEventListener("click",al(this,gX),!1)}disconnectedCallback(){var e;(e=al(this,pX))===null||e===void 0||e.destroy(),window.removeEventListener("reset",al(this,mX),!1),window.removeEventListener("click",al(this,gX),!1)}get labels(){let e=[];this.element.id&&this.element.ownerDocument&&e.push(...Array.from(this.element.ownerDocument.querySelectorAll("label[for='".concat(this.element.id,"']"))||[]));let t=vx(this.element,{matchingSelector:"label"});return t&&[this.element,null].includes(t.control)&&e.push(t),e}get disabled(){return console.warn("This browser does not support the [disabled] attribute for trix-editor elements."),!1}set disabled(e){console.warn("This browser does not support the [disabled] attribute for trix-editor elements.")}get required(){return console.warn("This browser does not support the [required] attribute for trix-editor elements."),!1}set required(e){console.warn("This browser does not support the [required] attribute for trix-editor elements.")}get validity(){return console.warn("This browser does not support the validity property for trix-editor elements."),null}get validationMessage(){return console.warn("This browser does not support the validationMessage property for trix-editor elements."),""}get willValidate(){return console.warn("This browser does not support the willValidate property for trix-editor elements."),!1}setFormValue(e){}checkValidity(){return console.warn("This browser does not support checkValidity() for trix-editor elements."),!0}reportValidity(){return console.warn("This browser does not support reportValidity() for trix-editor elements."),!0}setCustomValidity(e){console.warn("This browser does not support setCustomValidity(validationMessage) for trix-editor elements.")}},Eh=new WeakMap,k2=class extends HTMLElement{constructor(){super(),b2(this,Eh,{writable:!0,value:void 0}),jX(this,Eh,this.constructor.formAssociated?new IX(this):new MX(this))}get trixId(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++jWt),this.trixId)}get labels(){return al(this,Eh).labels}get disabled(){return al(this,Eh).disabled}set disabled(e){al(this,Eh).disabled=e}get required(){return al(this,Eh).required}set required(e){al(this,Eh).required=e}get validity(){return al(this,Eh).validity}get validationMessage(){return al(this,Eh).validationMessage}get willValidate(){return al(this,Eh).willValidate}get type(){return this.localName}get toolbarElement(){var e;if(this.hasAttribute("toolbar"))return(e=this.ownerDocument)===null||e===void 0?void 0:e.getElementById(this.getAttribute("toolbar"));if(this.parentNode){let t="trix-toolbar-".concat(this.trixId);this.setAttribute("toolbar",t);let n=$o("trix-toolbar",{id:t});return this.parentNode.insertBefore(n,this),n}}get form(){var e;return(e=this.inputElement)===null||e===void 0?void 0:e.form}get inputElement(){var e;if(this.hasAttribute("input"))return(e=this.ownerDocument)===null||e===void 0?void 0:e.getElementById(this.getAttribute("input"));if(this.parentNode){let t="trix-input-".concat(this.trixId);this.setAttribute("input",t);let n=$o("input",{type:"hidden",id:t});return this.parentNode.insertBefore(n,this.nextElementSibling),n}}get editor(){var e;return(e=this.editorController)===null||e===void 0?void 0:e.editor}get name(){var e;return(e=this.inputElement)===null||e===void 0?void 0:e.name}get value(){var e;return(e=this.inputElement)===null||e===void 0?void 0:e.value}set value(e){var t;this.defaultValue=e,(t=this.editor)===null||t===void 0||t.loadHTML(this.defaultValue)}notify(e,t){if(this.editorController)return m2("trix-".concat(e),{onElement:this,attributes:t})}setFormValue(e){this.inputElement&&(this.inputElement.value=e,al(this,Eh).setFormValue(e))}connectedCallback(){this.hasAttribute("data-trix-internal")||(UWt(this),function(e){e.hasAttribute("role")||e.setAttribute("role","textbox")}(this),this.editorController||(m2("trix-before-initialize",{onElement:this}),this.editorController=new U1({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(()=>m2("trix-initialize",{onElement:this}))),this.editorController.registerSelectionManager(),al(this,Eh).connectedCallback(),function(e){!document.querySelector(":focus")&&e.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===e&&e.focus()}(this))}disconnectedCallback(){var e;(e=this.editorController)===null||e===void 0||e.unregisterSelectionManager(),al(this,Eh).disconnectedCallback()}checkValidity(){return al(this,Eh).checkValidity()}reportValidity(){return al(this,Eh).reportValidity()}setCustomValidity(e){al(this,Eh).setCustomValidity(e)}formDisabledCallback(e){this.inputElement&&(this.inputElement.disabled=e),this.toggleAttribute("contenteditable",!e)}formResetCallback(){this.reset()}reset(){this.value=this.defaultValue}};np(k2,"formAssociated","ElementInternals"in window);M5e={VERSION:_Ht,config:E2,core:pWt,models:Z5e,views:bWt,controllers:qWt,observers:BWt,operations:zWt,elements:Object.freeze({__proto__:null,TrixEditorElement:k2,TrixToolbarElement:Nz}),filters:Object.freeze({__proto__:null,Filter:Cz,attachmentGalleryFilter:K5e})};Object.assign(M5e,Z5e),window.Trix=M5e,setTimeout(function(){customElements.get("trix-toolbar")||customElements.define("trix-toolbar",Nz),customElements.get("trix-editor")||customElements.define("trix-editor",k2)},0)});var UX,sE,t4e=Ie(()=>{e4e();UX=Ca(z_());qi();ON();sE=class extends Br{get uploadUrl(){let r=new UX.default(window.location.origin),e=new UX.default(window.Avo.configuration.root_path);return r.path(`${e.path()}/avo_api/resources/${this.resourceNameValue}/${this.resourceIdValue}/attachments`),r.query(e.query()),r.toString()}connect(){this.attachmentsDisabledValue&&this.controllerTarget.querySelector(".trix-button-group--file-tools").remove(),window.addEventListener("trix-file-accept",r=>{if(r.target===this.editorTarget){if(this.attachmentsDisabledValue){r.preventDefault(),alert(this.attachmentDisableWarningValue);return}if(!this.resourceIdValue){r.preventDefault(),alert(this.uploadWarningValue);return}!this.isActionTextValue&&!this.attachmentKeyValue&&(r.preventDefault(),alert(this.attachmentKeyWarningValue))}}),window.addEventListener("trix-attachment-add",r=>{r.target===this.editorTarget&&r.attachment.file&&this.uploadFileAttachment(r.attachment)})}uploadFileAttachment(r){this.uploadFile(r.file,e=>r.setUploadProgress(e),e=>r.setAttributes(e))}uploadFile(r,e,t){var a;let n=this.createFormData(r),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",l=>{let f=l.loaded/l.total*100;e(f)}),i.addEventListener("load",()=>{if(i.status===200){let l;try{l=JSON.parse(i.response)}catch(p){l={}}let f={url:l.url,href:l.href};this.hideAttachmentFilenameValue&&(f.filename=null),this.hideAttachmentFilesizeValue&&(f.filesize=null),this.hideAttachmentUrlValue&&(f.href=null),t(f)}}),i.send(n)}createStorageKey(r){let e=new Date,t=e.toISOString().slice(0,10),n=`${e.getTime()}-${r.name}`;return["tmp",t,n].join("/")}createFormData(r){let e=new FormData;return e.append("Content-Type",r.type),e.append("file",r),e.append("filename",r.name),this.attachmentKeyValue?e.append("attachment_key",this.attachmentKeyValue):e.append("key",this.createStorageKey(r)),e}};_r(sE,"targets",["editor","controller"]),_r(sE,"values",{resourceName:String,resourceId:String,attachmentsDisabled:Boolean,attachmentKey:String,hideAttachmentFilename:Boolean,hideAttachmentFilesize:Boolean,hideAttachmentUrl:Boolean,isActionText:Boolean,uploadWarning:String,attachmentDisableWarning:String,attachmentKeyWarning:String})});var r4e=Ie(()=>{HEe();WEe();VEe();$Ee();GEe();ZEe();nCe();oCe();aCe();vAe();yAe();bAe();WDe();VDe();eIe();j_();tIe();rIe();nIe();iIe();MIe();PIe();FIe();NIe();qIe();BIe();zIe();jIe();UIe();HIe();EMe();CMe();AMe();eNe();rNe();nNe();iNe();aNe();sNe();cNe();fNe();MNe();PNe();LNe();Wze();i5e();o5e();t4e();hi.register("action",bk);hi.register("actions-overflow",xk);hi.register("actions-picker",_k);hi.register("attachments",CD);hi.register("boolean-filter",DD);hi.register("card-filters",OD);hi.register("clear-input",ID);hi.register("copy-to-clipboard",IN);hi.register("dashboard-card",RD);hi.register("date-time-filter",$k);hi.register("filter",ph);hi.register("panel-refresh",Xq);hi.register("hidden-input",kO);hi.register("input-autofocus",TO);hi.register("item-select-all",Xk);hi.register("item-selector",EO);hi.register("loading-button",qO);hi.register("menu",zO);hi.register("modal",iT);hi.register("multiple-select-filter",jO);hi.register("per-page",UO);hi.register("preview",HO);hi.register("resource-edit",aT);hi.register("resource-index",Qq);hi.register("resource-show",e3);hi.register("search",ST);hi.register("select",xI);hi.register("select-filter",_I);hi.register("self-destroy",A3);hi.register("sidebar",kT);hi.register("sign-out",TT);hi.register("tabs",ET);hi.register("table-row",O3);hi.register("text-filter",CI);hi.register("tippy",AI);hi.register("toggle",XT);hi.register("trix-body",c2);hi.register("belongs-to-field",AD);hi.register("code-field",LD);hi.register("date-field",Vk);hi.register("easy-mde",SO);hi.register("key-value",NO);hi.register("progress-bar-field",WO);hi.register("reload-belongs-to-field",VO);hi.register("tags-field",DT);hi.register("trix-field",sE);hi.register("tiptap-field",s2)});var n4e=Ie(()=>{YF();mv.config.forms.confirm=r=>{let e=document.getElementById("turbo-confirm");return e.querySelector("p").textContent=r,e.showModal(),e.addEventListener("click",t=>{t.target.nodeName==="DIALOG"&&e.close()}),new Promise(t=>{e.addEventListener("close",()=>{t(e.returnValue==="confirm")},{once:!0})})}});var i4e=ue((HX,WX)=>{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof HX<"u"?e():(e(),r.FileSaver={})})(HX,function(){"use strict";function r(l,f){return typeof f>"u"?f={autoBom:!1}:typeof f!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function e(l,f,p){var v=new XMLHttpRequest;v.open("GET",l),v.responseType="blob",v.onload=function(){a(v.response,f,p)},v.onerror=function(){console.error("could not download file")},v.send()}function t(l){var f=new XMLHttpRequest;f.open("HEAD",l,!1);try{f.send()}catch{}return 200<=f.status&&299>=f.status}function n(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(f)}}var i=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,o=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=i.saveAs||(typeof window!="object"||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(l,f,p){var v=i.URL||i.webkitURL,w=document.createElement("a");f=f||l.name||"download",w.download=f,w.rel="noopener",typeof l=="string"?(w.href=l,w.origin===location.origin?n(w):t(w.href)?e(l,f,p):n(w,w.target="_blank")):(w.href=v.createObjectURL(l),setTimeout(function(){v.revokeObjectURL(w.href)},4e4),setTimeout(function(){n(w)},0))}:"msSaveOrOpenBlob"in navigator?function(l,f,p){if(f=f||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(r(l,p),f);else if(t(l))e(l,f,p);else{var v=document.createElement("a");v.href=l,v.target="_blank",setTimeout(function(){n(v)})}}:function(l,f,p,v){if(v=v||open("","_blank"),v&&(v.document.title=v.document.body.innerText="downloading..."),typeof l=="string")return e(l,f,p);var w=l.type==="application/octet-stream",D=/constructor/i.test(i.HTMLElement)||i.safari,L=/CriOS\/[\d]+/.test(navigator.userAgent);if((L||w&&D||o)&&typeof FileReader<"u"){var R=new FileReader;R.onloadend=function(){var Y=R.result;Y=L?Y:Y.replace(/^data:[^;]*;/,"data:attachment/file;"),v?v.location.href=Y:location=Y,v=null},R.readAsDataURL(l)}else{var q=i.URL||i.webkitURL,H=q.createObjectURL(l);v?v.location=H:location.href=H,v=null,setTimeout(function(){q.revokeObjectURL(H)},4e4)}});i.saveAs=a.saveAs=a,typeof WX<"u"&&(WX.exports=a)})});var o4e,a4e=Ie(()=>{jF();o4e=Ca(i4e());w0.close_filters_dropdown=function(){document.querySelector(".filters-dropdown-selector").classList.add("hidden")};w0.open_filter=function(){let r=this.getAttribute("unique-id");setTimeout(()=>{document.querySelector(`[data-filter-id="${r}"] .pill`).click()},150)};w0.download=function(){let r=atob(this.getAttribute("content")),e=new Array(r.length);for(let n=0;n<r.length;n++)e[n]=r.charCodeAt(n);let t=new Uint8Array(e);(0,o4e.saveAs)(new Blob([t]),this.getAttribute("filename"))};window.StreamActions=w0});var GWt=ue(u4e=>{var fAr=Ca(Pxe());aSe();sSe();var pAr=Ca(lSe()),s4e=Ca(cSe()),l4e=Ca(K8());YF();cN();fTe();hTe();r4e();n4e();a4e();window.Avo.localStorage=new fN;window.Turbolinks=mv;var zz=null;l4e.bind("r r r",()=>{zz=document.scrollingElement.scrollTop,mv.visit(window.location.href,{action:"replace"})});function $Wt(){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 VX(){vk('[data-tippy="tooltip"]',{theme:"light",content(r){let e=r.getAttribute("title");return r.removeAttribute("title"),r.removeAttribute("data-tippy"),r.setAttribute("has-data-tippy",e),e},onShow(r){return r.props.content===null||r.props.content.length===0?!1:r}})}window.initTippy=VX;s4e.start();document.addEventListener("turbo:load",()=>{VX(),$Wt(),zz&&setTimeout(()=>{document.scrollingElement.scrollTo(0,zz),zz=0},50),setTimeout(()=>{document.body.classList.remove("turbo-loading")},1)});document.addEventListener("turbo:frame-load",()=>{VX(),document.querySelectorAll('turbo-frame[loading="lazy"][complete]').forEach(r=>r.removeAttribute("loading"))});document.addEventListener("turbo:before-fetch-response",r=>dw(u4e,null,function*(){var e,t,n;if(r.detail.fetchResponse.response.status===500){let{id:i,src:o}=r.target;(n=(t=(e=r.detail.fetchResponse)==null?void 0:e.response)==null?void 0:t.url)!=null&&n.includes("/failed_to_load")||(r.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(r=>r.remove()),document.querySelectorAll("[has-data-tippy]").forEach(r=>{r.setAttribute("data-tippy","tooltip"),r.setAttribute("title",r.getAttribute("has-data-tippy")),r.removeAttribute("has-data-tippy")})});window.Avo=window.Avo||{configuration:{}};window.Avo.menus={resetCollapsedState(){Array.from(document.querySelectorAll("[data-menu-key-param]")).map(r=>r.getAttribute("data-menu-key-param")).filter(Boolean).forEach(r=>{window.localStorage.removeItem(r)})}}});GWt();})();
1052
1052
  /*!
1053
1053
  * @kurkle/color v0.1.9
1054
1054
  * https://github.com/kurkle/color#readme