turbo_boost-commands 0.0.1 → 0.0.2

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

Potentially problematic release.


This version of turbo_boost-commands might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a8b3d24673a0244201ee03bedf31a31fefa5bb862b4e642c52ecf83353bb92b
4
- data.tar.gz: 95d18d2b3c0dc04f9ca2ded0329c557ce9d11e1c19fc2c8d76788b1574bb6aeb
3
+ metadata.gz: 430c3c15ff72d5b5731a80e932330f302e79b3f0b120ff503b73c1ae7e38dc80
4
+ data.tar.gz: 8c43f25e058a7e21577f2593fca3321e2e8701b8d082472ccd4bb549deb97bb0
5
5
  SHA512:
6
- metadata.gz: e2c3c404a309e009b40e27a076dffd8c700cb6a427250e05cf89d5443eafb6c6bfb837b05566d57b6e581e72e31f9ffaed03a57a34636275062a16f1b80670db
7
- data.tar.gz: d1a80d66f7cfb7418f5674ac9a36b472574a780827ef477693ad91c433036eef18f967fd3c25ca9274d8cbb1acfdb8b186bd76ee7f35126a3da7c9f2ad0368d0
6
+ metadata.gz: 40aeec10534fc4a5a2c5db8ef0f2e4a18321c09ab1991c3f750b88961e8f3a73762c75a2651299326a96198626598a1f5b6f4d77fc4a5d7c0d197d2a7d418f41
7
+ data.tar.gz: 0f0059720d23849e57e9f3743d5d9c5a178a6510f1fef47d99f3bd7483f8507392349a410158090ae315cc4148d6d28b77d6890e4da5b0b39ffed2dcbb923136
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- turbo_boost-commands (0.0.1)
4
+ turbo_boost-commands (0.0.2)
5
5
  rails (>= 6.1)
6
6
  turbo-rails (>= 1.1)
7
- turbo_boost-streams (>= 0.0.1)
7
+ turbo_boost-streams (>= 0.0.2)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -244,7 +244,7 @@ GEM
244
244
  actionpack (>= 6.0.0)
245
245
  activejob (>= 6.0.0)
246
246
  railties (>= 6.0.0)
247
- turbo_boost-streams (0.0.1)
247
+ turbo_boost-streams (0.0.2)
248
248
  rails (>= 6.1)
249
249
  turbo-rails (>= 1.1)
250
250
  turbo_ready (0.1.4)
data/README.md CHANGED
@@ -37,6 +37,12 @@
37
37
  <a href="https://github.com/hopsoft/turbo_boost-commands/actions/workflows/tests.yml">
38
38
  <img alt="Tests" src="https://github.com/hopsoft/turbo_boost-commands/actions/workflows/tests.yml/badge.svg" />
39
39
  </a>
40
+ <a href="https://github.com/hopsoft/turbo_boost-commands/discussions" target="_blank">
41
+ <img alt="GitHub Discussions" src="https://img.shields.io/github/discussions/hopsoft/turbo_boost-commands?color=168AFE&logo=github">
42
+ </a>
43
+ <a href="https://github.com/sponsors/hopsoft">
44
+ <img alt="Sponsors" src="https://img.shields.io/github/sponsors/hopsoft?color=eb4aaa&logo=GitHub%20Sponsors" />
45
+ </a>
40
46
  <a href="https://twitter.com/hopsoft">
41
47
  <img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/hopsoft?logo=twitter&style=social">
42
48
  </a>
@@ -66,22 +72,24 @@
66
72
  - [Putting it All Together](#putting-it-all-together)
67
73
  - [Running Locally](#running-locally)
68
74
  - [Running in Docker](#running-in-docker)
69
- - [License](#license)
70
- - [Todos](#todos)
75
+ - [Community](#community)
76
+ - [Discussions](#discussions)
77
+ - [Twitter](#twitter)
71
78
  - [Releasing](#releasing)
79
+ - [About TurboBoost](#about-turboboost)
80
+ - [License](#license)
72
81
 
73
82
  <!-- Tocer[finish]: Auto-generated, don't remove. -->
74
83
 
75
84
  ## Why TurboBoost Commands?
76
85
 
77
86
  Commands to help you build robust reactive applications with Rails & Hotwire.
78
- They allow you to declaratively specify server methods that will execute when triggered by users *(think reactive applications)*.
87
+ They allow you to declaratively specify server methods that will execute whenever client side events are triggered by users.
79
88
 
80
89
  TurboBoost Commands work with Hotwire's Turbo Frames.
81
- They also work independent of frames.
82
- You choose.
90
+ __They also work independent of frames.__
83
91
 
84
- They let you *sprinkle* ✨ in reactive functionality and skip the ceremony of the typical
92
+ Commands let you *sprinkle* ✨ in reactive functionality and skip the ceremony of the typical
85
93
  [REST semantics](https://en.wikipedia.org/wiki/Representational_state_transfer)
86
94
  imposed by Rails conventions and Turbo Frames i.e. boilerplate *(routes, controllers, actions, etc...)*.
87
95
 
@@ -104,7 +112,7 @@ Commands are executed via Rails a `before_action` which means that reactivity ru
104
112
  _**Web sockets are NOT used for the reactive critical path!** 🎉_
105
113
  This also means that standard Rails mechanics drive their behavior.
106
114
 
107
- Also, commands can be tested in isolation or via Rails controller, integration, and system tests.
115
+ Commands can be tested in isolation as well as with standard Rails controller, integration, and system tests.
108
116
 
109
117
  ## Sponsors
110
118
 
@@ -173,7 +181,7 @@ This example illustrates how to use TurboBoost Commands to manage upvotes on a P
173
181
  ```erb
174
182
  <!-- app/views/posts/show.html.erb -->
175
183
  <%= turbo_frame_tag dom_id(@post) do %>
176
- <a href="#" data-command="PostCommand#upvote">Upvote</a>
184
+ <a href="#" data-turbo-command="PostCommand#upvote">Upvote</a>
177
185
  Upvote Count: <%= @post.votes %>
178
186
  <% end %>
179
187
  ```
@@ -205,14 +213,14 @@ It's possible to override these defaults like so.
205
213
 
206
214
  ```js
207
215
  // restrict `click` monitoring to <a> and <button> elements
208
- TurboBoost.Commands.registerEventDelegate('click', ['a[data-command]', 'button[data-command]'])
216
+ TurboBoost.Commands.registerEventDelegate('click', ['a[data-turbo-command]', 'button[data-command]'])
209
217
  ```
210
218
 
211
219
  You can also register custom events and elements.
212
220
  Here's an example that sets up monitoring for the `sl-change` event on the `sl-switch` element from the [Shoelace web component library](https://shoelace.style/).
213
221
 
214
222
  ```js
215
- TurboBoost.Commands.registerEventDelegate('sl-change', ['sl-switch[data-command]'])
223
+ TurboBoost.Commands.registerEventDelegate('sl-change', ['sl-switch[data-turbo-command]'])
216
224
  ```
217
225
 
218
226
  ### Lifecycle Events
@@ -232,7 +240,7 @@ but you can also explicitly target other frames just like you normally would wit
232
240
 
233
241
  ```erb
234
242
  <input type="checkbox"
235
- data-command="ExampleCommand#work"
243
+ data-turbo-command="ExampleCommand#work"
236
244
  data-turbo-frame="some-frame-id">
237
245
  ```
238
246
 
@@ -240,44 +248,44 @@ but you can also explicitly target other frames just like you normally would wit
240
248
 
241
249
  ```erb
242
250
  <turbo-frame id="example-frame">
243
- <input type="checkbox" data-command="ExampleCommand#work">
251
+ <input type="checkbox" data-turbo-command="ExampleCommand#work">
244
252
  </turbo-frame>
245
253
  ```
246
254
 
247
255
  ### Working with Forms
248
256
 
249
257
  TurboBoost Commands work great with Rails forms.
250
- Just specify the `data-command` attribute on the form.
258
+ Just specify the `data-turbo-command` attribute on the form.
251
259
 
252
260
  ```erb
253
261
  # app/views/posts/post.html.erb
254
262
  <%= turbo_frame_tag dom_id(@post) do %>
255
- <%= form_with model: @post, data: { command: "ExampleCommand#work" } do |form| %>
263
+ <%= form_with model: @post, data: { turbo_command: "ExampleCommand#work" } do |form| %>
256
264
  ...
257
265
  <% end %>
258
266
  <% end %>
259
267
 
260
268
  <%= turbo_frame_tag dom_id(@post) do %>
261
- <%= form_for @post, remote: true, data: { command: "ExampleCommand#work" } do |form| %>
269
+ <%= form_for @post, remote: true, data: { turbo_command: "ExampleCommand#work" } do |form| %>
262
270
  ...
263
271
  <% end %>
264
272
  <% end %>
265
273
 
266
274
  <%= form_with model: @post,
267
- data: { turbo_frame: dom_id(@post), command: "ExampleCommand#work" } do |form| %>
275
+ data: { turbo_frame: dom_id(@post), turbo_command: "ExampleCommand#work" } do |form| %>
268
276
  ...
269
277
  <% end %>
270
278
  ```
271
279
 
272
280
  ### Server Side Commands
273
281
 
274
- The client side DOM attribute `data-command` indicates what Ruby class and method to invoke.
282
+ The client side DOM attribute `data-turbo-command` indicates what Ruby class and method to invoke.
275
283
  *The attribute value is specified with RDoc notation. i.e. `ClassName#method_name`*
276
284
 
277
285
  Here's an example.
278
286
 
279
287
  ```erb
280
- <a data-command="DemoCommand#example">
288
+ <a data-turbo-command="DemoCommand#example">
281
289
  ```
282
290
 
283
291
  Server side commands can live anywhere in your app; however, we recommend you keep them in the `app/commands` directory.
@@ -356,7 +364,7 @@ Here's an example that shows how to do this.
356
364
  ```erb
357
365
  <!-- app/views/posts/index.html.erb -->
358
366
  <%= turbo_frame_tag dom_id(@posts) do %>
359
- <%= check_box_tag :all, :all, @all, data: { command: "PostsCommand#toggle_all" } %>
367
+ <%= check_box_tag :all, :all, @all, data: { turbo_command: "PostsCommand#toggle_all" } %>
360
368
  View All
361
369
 
362
370
  <% @posts.each do |post| %>
@@ -400,7 +408,7 @@ Here's how to do it.
400
408
  ```erb
401
409
  <!-- app/views/users/show.html.erb -->
402
410
  <%= turbo_frame_tag "user-alt" do %>
403
- <%= form_with model: @user, data: { command: "UserCommand#example" } do |form| %>
411
+ <%= form_with model: @user, data: { turbo_command: "UserCommand#example" } do |form| %>
404
412
  ...
405
413
  <% end %>
406
414
  <% end %>
@@ -473,9 +481,19 @@ docker compose up -d
473
481
  You can review the implementation in [`test/dummy/app`](https://github.com/hopsoft/turbo_boost-commands/tree/main/test/dummy).
474
482
  *Feel free to add some demos and submit a pull request while you're in there.*
475
483
 
476
- ## License
484
+ ## Community
477
485
 
478
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
486
+ ### Discussions
487
+
488
+ Feel free to add to the conversation here on [GitHub Discussions](https://github.com/hopsoft/turbo_boost-commands/discussions).
489
+
490
+ ### Twitter
491
+
492
+ Connect with the core team on Twitter.
493
+
494
+ <a href="https://twitter.com/hopsoft" target="_blank">
495
+ <img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/hopsoft?logo=twitter&style=social">
496
+ </a>
479
497
 
480
498
  ## Releasing
481
499
 
@@ -485,7 +503,20 @@ The gem is available as open source under the terms of the [MIT License](https:/
485
503
  1. Run `rake build` and `yarn build`
486
504
  1. Commit and push changes to GitHub
487
505
  1. Run `rake release`
488
- 1. Run `yarn publish --no-git-tag-version`
506
+ 1. Run `yarn publish --no-git-tag-version --access public`
489
507
  1. Yarn will prompt you for the new version. Pre-release versions use `-preN`
490
508
  1. Commit and push any changes to GitHub
491
509
  1. Create a new release on GitHub ([here](https://github.com/hopsoft/turbo_boost-commands/releases)) and generate the changelog for the stable release for it
510
+
511
+ ## About TurboBoost
512
+
513
+ TurboBoost is a suite of projects that enhance Rails and Hotwire to make building server rendered reactive applications simpler and more powerful.
514
+ Be sure to check out all of the various the libraries.
515
+
516
+ - [Streams](https://github.com/hopsoft/turbo_boost-streams)
517
+ - [Commands](https://github.com/hopsoft/turbo_boost-commands)
518
+ - Coming soon...
519
+
520
+ ## License
521
+
522
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,7 +1,7 @@
1
- var Gn=Object.defineProperty,Yn=Object.defineProperties;var Xn=Object.getOwnPropertyDescriptors;var or=Object.getOwnPropertySymbols;var Jn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable;var st=(e,t,r)=>t in e?Gn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))Jn.call(t,r)&&st(e,r,t[r]);if(or)for(var r of or(t))Zn.call(t,r)&&st(e,r,t[r]);return e},R=(e,t)=>Yn(e,Xn(t));var ut=(e,t,r)=>(st(e,typeof t!="symbol"?t+"":t,r),r);function Qn(e,t,r={}){let n=new CustomEvent(t,r);e.forEach(i=>i.dispatchEvent(n))}var ar=Qn;var pt=!1,mt=!1,te=[];function ei(e){ti(e)}function ti(e){te.includes(e)||te.push(e),ri()}function mr(e){let t=te.indexOf(e);t!==-1&&te.splice(t,1)}function ri(){!mt&&!pt&&(pt=!0,queueMicrotask(ni))}function ni(){pt=!1,mt=!0;for(let e=0;e<te.length;e++)te[e]();te.length=0,mt=!1}var de,Se,Fe,hr,ht=!0;function ii(e){ht=!1,e(),ht=!0}function oi(e){de=e.reactive,Fe=e.release,Se=t=>e.effect(t,{scheduler:r=>{ht?ei(r):r()}}),hr=e.raw}function sr(e){Se=e}function ai(e){let t=()=>{};return[n=>{let i=Se(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),Fe(i))},i},()=>{t()}]}var _r=[],gr=[],vr=[];function si(e){vr.push(e)}function br(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,gr.push(t))}function ui(e){_r.push(e)}function li(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function xr(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{(t===void 0||t.includes(r))&&(n.forEach(i=>i()),delete e._x_attributeCleanups[r])})}var Mt=new MutationObserver(Rt),kt=!1;function yr(){Mt.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),kt=!0}function ci(){fi(),Mt.disconnect(),kt=!1}var ye=[],lt=!1;function fi(){ye=ye.concat(Mt.takeRecords()),ye.length&&!lt&&(lt=!0,queueMicrotask(()=>{di(),lt=!1}))}function di(){Rt(ye),ye.length=0}function T(e){if(!kt)return e();ci();let t=e();return yr(),t}var Nt=!1,Ie=[];function pi(){Nt=!0}function mi(){Nt=!1,Rt(Ie),Ie=[]}function Rt(e){if(Nt){Ie=Ie.concat(e);return}let t=[],r=[],n=new Map,i=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&(e[o].type==="childList"&&(e[o].addedNodes.forEach(a=>a.nodeType===1&&t.push(a)),e[o].removedNodes.forEach(a=>a.nodeType===1&&r.push(a))),e[o].type==="attributes")){let a=e[o].target,s=e[o].attributeName,u=e[o].oldValue,l=()=>{n.has(a)||n.set(a,[]),n.get(a).push({name:s,value:a.getAttribute(s)})},f=()=>{i.has(a)||i.set(a,[]),i.get(a).push(s)};a.hasAttribute(s)&&u===null?l():a.hasAttribute(s)?(f(),l()):f()}i.forEach((o,a)=>{xr(a,o)}),n.forEach((o,a)=>{_r.forEach(s=>s(a,o))});for(let o of r)if(!t.includes(o)&&(gr.forEach(a=>a(o)),o._x_cleanups))for(;o._x_cleanups.length;)o._x_cleanups.pop()();t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)r.includes(o)||o.isConnected&&(delete o._x_ignoreSelf,delete o._x_ignore,vr.forEach(a=>a(o)),o._x_ignore=!0,o._x_ignoreSelf=!0);t.forEach(o=>{delete o._x_ignoreSelf,delete o._x_ignore}),t=null,r=null,n=null,i=null}function wr(e){return Ce(le(e))}function Te(e,t,r){return e._x_dataStack=[t,...le(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function ur(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function le(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?le(e.host):e.parentNode?le(e.parentNode):[]}function Ce(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(r=>Object.keys(r)))),has:(r,n)=>e.some(i=>i.hasOwnProperty(n)),get:(r,n)=>(e.find(i=>{if(i.hasOwnProperty(n)){let o=Object.getOwnPropertyDescriptor(i,n);if(o.get&&o.get._x_alreadyBound||o.set&&o.set._x_alreadyBound)return!0;if((o.get||o.set)&&o.enumerable){let a=o.get,s=o.set,u=o;a=a&&a.bind(t),s=s&&s.bind(t),a&&(a._x_alreadyBound=!0),s&&(s._x_alreadyBound=!0),Object.defineProperty(i,n,R(g({},u),{get:a,set:s}))}return!0}return!1})||{})[n],set:(r,n,i)=>{let o=e.find(a=>a.hasOwnProperty(n));return o?o[n]=i:e[e.length-1][n]=i,!0}});return t}function Er(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([o,{value:a,enumerable:s}])=>{if(s===!1||a===void 0)return;let u=i===""?o:`${i}.${o}`;typeof a=="object"&&a!==null&&a._x_interceptor?n[o]=a.initialize(e,u,o):t(a)&&a!==n&&!(a instanceof Element)&&r(a,u)})};return r(e)}function Ar(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>hi(n,i),a=>_t(n,i,a),i,o)}};return t(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,a,s)=>{let u=n.initialize(o,a,s);return r.initialValue=u,i(o,a,s)}}else r.initialValue=n;return r}}function hi(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function _t(e,t,r){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=r;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),_t(e[t[0]],t.slice(1),r)}}var Sr={};function j(e,t){Sr[e]=t}function gt(e,t){return Object.entries(Sr).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){let[i,o]=Nr(t);return i=g({interceptor:Ar},i),br(t,o),n(t,i)},enumerable:!1})}),e}function _i(e,t,r,...n){try{return r(...n)}catch(i){Ae(i,e,t)}}function Ae(e,t,r=void 0){Object.assign(e,{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
1
+ var Gn=Object.defineProperty,Yn=Object.defineProperties;var Xn=Object.getOwnPropertyDescriptors;var or=Object.getOwnPropertySymbols;var Jn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable;var st=(e,t,r)=>t in e?Gn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))Jn.call(t,r)&&st(e,r,t[r]);if(or)for(var r of or(t))Zn.call(t,r)&&st(e,r,t[r]);return e},R=(e,t)=>Yn(e,Xn(t));var ut=(e,t,r)=>(st(e,typeof t!="symbol"?t+"":t,r),r);function Qn(e,t,r={}){let n=new CustomEvent(t,r);e.forEach(i=>i.dispatchEvent(n))}var ar=Qn;var pt=!1,mt=!1,te=[];function ei(e){ti(e)}function ti(e){te.includes(e)||te.push(e),ri()}function mr(e){let t=te.indexOf(e);t!==-1&&te.splice(t,1)}function ri(){!mt&&!pt&&(pt=!0,queueMicrotask(ni))}function ni(){pt=!1,mt=!0;for(let e=0;e<te.length;e++)te[e]();te.length=0,mt=!1}var de,Se,Fe,hr,ht=!0;function ii(e){ht=!1,e(),ht=!0}function oi(e){de=e.reactive,Fe=e.release,Se=t=>e.effect(t,{scheduler:r=>{ht?ei(r):r()}}),hr=e.raw}function sr(e){Se=e}function ai(e){let t=()=>{};return[n=>{let i=Se(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),Fe(i))},i},()=>{t()}]}var _r=[],gr=[],vr=[];function si(e){vr.push(e)}function br(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,gr.push(t))}function ui(e){_r.push(e)}function li(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function xr(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{(t===void 0||t.includes(r))&&(n.forEach(i=>i()),delete e._x_attributeCleanups[r])})}var Mt=new MutationObserver(Rt),kt=!1;function yr(){Mt.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),kt=!0}function ci(){fi(),Mt.disconnect(),kt=!1}var ye=[],lt=!1;function fi(){ye=ye.concat(Mt.takeRecords()),ye.length&&!lt&&(lt=!0,queueMicrotask(()=>{di(),lt=!1}))}function di(){Rt(ye),ye.length=0}function T(e){if(!kt)return e();ci();let t=e();return yr(),t}var Nt=!1,Ie=[];function pi(){Nt=!0}function mi(){Nt=!1,Rt(Ie),Ie=[]}function Rt(e){if(Nt){Ie=Ie.concat(e);return}let t=[],r=[],n=new Map,i=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&(e[o].type==="childList"&&(e[o].addedNodes.forEach(a=>a.nodeType===1&&t.push(a)),e[o].removedNodes.forEach(a=>a.nodeType===1&&r.push(a))),e[o].type==="attributes")){let a=e[o].target,s=e[o].attributeName,u=e[o].oldValue,l=()=>{n.has(a)||n.set(a,[]),n.get(a).push({name:s,value:a.getAttribute(s)})},f=()=>{i.has(a)||i.set(a,[]),i.get(a).push(s)};a.hasAttribute(s)&&u===null?l():a.hasAttribute(s)?(f(),l()):f()}i.forEach((o,a)=>{xr(a,o)}),n.forEach((o,a)=>{_r.forEach(s=>s(a,o))});for(let o of r)if(!t.includes(o)&&(gr.forEach(a=>a(o)),o._x_cleanups))for(;o._x_cleanups.length;)o._x_cleanups.pop()();t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)r.includes(o)||o.isConnected&&(delete o._x_ignoreSelf,delete o._x_ignore,vr.forEach(a=>a(o)),o._x_ignore=!0,o._x_ignoreSelf=!0);t.forEach(o=>{delete o._x_ignoreSelf,delete o._x_ignore}),t=null,r=null,n=null,i=null}function wr(e){return Ce(le(e))}function Te(e,t,r){return e._x_dataStack=[t,...le(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function ur(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function le(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?le(e.host):e.parentNode?le(e.parentNode):[]}function Ce(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(r=>Object.keys(r)))),has:(r,n)=>e.some(i=>i.hasOwnProperty(n)),get:(r,n)=>(e.find(i=>{if(i.hasOwnProperty(n)){let o=Object.getOwnPropertyDescriptor(i,n);if(o.get&&o.get._x_alreadyBound||o.set&&o.set._x_alreadyBound)return!0;if((o.get||o.set)&&o.enumerable){let a=o.get,s=o.set,u=o;a=a&&a.bind(t),s=s&&s.bind(t),a&&(a._x_alreadyBound=!0),s&&(s._x_alreadyBound=!0),Object.defineProperty(i,n,R(g({},u),{get:a,set:s}))}return!0}return!1})||{})[n],set:(r,n,i)=>{let o=e.find(a=>a.hasOwnProperty(n));return o?o[n]=i:e[e.length-1][n]=i,!0}});return t}function Er(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([o,{value:a,enumerable:s}])=>{if(s===!1||a===void 0)return;let u=i===""?o:`${i}.${o}`;typeof a=="object"&&a!==null&&a._x_interceptor?n[o]=a.initialize(e,u,o):t(a)&&a!==n&&!(a instanceof Element)&&r(a,u)})};return r(e)}function Ar(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>hi(n,i),a=>_t(n,i,a),i,o)}};return t(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,a,s)=>{let u=n.initialize(o,a,s);return r.initialValue=u,i(o,a,s)}}else r.initialValue=n;return r}}function hi(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function _t(e,t,r){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=r;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),_t(e[t[0]],t.slice(1),r)}}var Sr={};function K(e,t){Sr[e]=t}function gt(e,t){return Object.entries(Sr).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){let[i,o]=Nr(t);return i=g({interceptor:Ar},i),br(t,o),n(t,i)},enumerable:!1})}),e}function _i(e,t,r,...n){try{return r(...n)}catch(i){Ae(i,e,t)}}function Ae(e,t,r=void 0){Object.assign(e,{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
2
2
 
3
3
  ${r?'Expression: "'+r+`"
4
4
 
5
- `:""}`,t),setTimeout(()=>{throw e},0)}var Pe=!0;function gi(e){let t=Pe;Pe=!1,e(),Pe=t}function ue(e,t,r={}){let n;return k(e,t)(i=>n=i,r),n}function k(...e){return Tr(...e)}var Tr=Cr;function vi(e){Tr=e}function Cr(e,t){let r={};gt(r,e);let n=[r,...le(e)];if(typeof t=="function")return bi(n,t);let i=yi(n,t,e);return _i.bind(null,e,t,i)}function bi(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Ce([n,...e]),i);Be(r,o)}}var ct={};function xi(e,t){if(ct[e])return ct[e];let r=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)\s/.test(e)?`(() => { ${e} })()`:e,o=(()=>{try{return new r(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`)}catch(a){return Ae(a,t,e),Promise.resolve()}})();return ct[e]=o,o}function yi(e,t,r){let n=xi(t,r);return(i=()=>{},{scope:o={},params:a=[]}={})=>{n.result=void 0,n.finished=!1;let s=Ce([o,...e]);if(typeof n=="function"){let u=n(n,s).catch(l=>Ae(l,r,t));n.finished?(Be(i,n.result,s,a,r),n.result=void 0):u.then(l=>{Be(i,l,s,a,r)}).catch(l=>Ae(l,r,t)).finally(()=>n.result=void 0)}}}function Be(e,t,r,n,i){if(Pe&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(a=>Be(e,a,r,n)).catch(a=>Ae(a,i,t)):e(o)}else e(t)}var Lt="x-";function pe(e=""){return Lt+e}function wi(e){Lt=e}var Or={};function A(e,t){Or[e]=t}function $t(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([s,u])=>({name:s,value:u})),a=Mr(o);o=o.map(s=>a.find(u=>u.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),t=t.concat(o)}let n={};return t.map($r((o,a)=>n[o]=a)).filter(Ir).map(Si(n,r)).sort(Ti).map(o=>Ai(e,o))}function Mr(e){return Array.from(e).map($r()).filter(t=>!Ir(t))}var vt=!1,xe=new Map,kr=Symbol();function Ei(e){vt=!0;let t=Symbol();kr=t,xe.set(t,[]);let r=()=>{for(;xe.get(t).length;)xe.get(t).shift()();xe.delete(t)},n=()=>{vt=!1,r()};e(r),n()}function Nr(e){let t=[],r=s=>t.push(s),[n,i]=ai(e);return t.push(i),[{Alpine:Oe,effect:n,cleanup:r,evaluateLater:k.bind(k,e),evaluate:ue.bind(ue,e)},()=>t.forEach(s=>s())]}function Ai(e,t){let r=()=>{},n=Or[t.type]||r,[i,o]=Nr(e);li(e,t.original,o);let a=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),vt?xe.get(kr).push(n):n())};return a.runCleanups=o,a}var Rr=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Lr=e=>e;function $r(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Pr.reduce((o,a)=>a(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Pr=[];function Pt(e){Pr.push(e)}function Ir({name:e}){return Br().test(e)}var Br=()=>new RegExp(`^${Lt}([^:^.]+)\\b`);function Si(e,t){return({name:r,value:n})=>{let i=r.match(Br()),o=r.match(/:([a-zA-Z0-9\-:]+)/),a=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],s=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:a.map(u=>u.replace(".","")),expression:n,original:s}}}var bt="DEFAULT",Le=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",bt,"teleport"];function Ti(e,t){let r=Le.indexOf(e.type)===-1?bt:e.type,n=Le.indexOf(t.type)===-1?bt:t.type;return Le.indexOf(r)-Le.indexOf(n)}function we(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var xt=[],It=!1;function Dr(e=()=>{}){return queueMicrotask(()=>{It||setTimeout(()=>{yt()})}),new Promise(t=>{xt.push(()=>{e(),t()})})}function yt(){for(It=!1;xt.length;)xt.shift()()}function Ci(){It=!0}function ie(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>ie(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)ie(n,t,!1),n=n.nextElementSibling}function ce(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function Oi(){document.body||ce("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),we(document,"alpine:init"),we(document,"alpine:initializing"),yr(),si(t=>X(t,ie)),br(t=>ki(t)),ui((t,r)=>{$t(t,r).forEach(n=>n())});let e=t=>!je(t.parentElement,!0);Array.from(document.querySelectorAll(Kr())).filter(e).forEach(t=>{X(t)}),we(document,"alpine:initialized")}var Bt=[],Fr=[];function jr(){return Bt.map(e=>e())}function Kr(){return Bt.concat(Fr).map(e=>e())}function Hr(e){Bt.push(e)}function qr(e){Fr.push(e)}function je(e,t=!1){return Ke(e,r=>{if((t?Kr():jr()).some(i=>r.matches(i)))return!0})}function Ke(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return Ke(e.parentElement,t)}}function Mi(e){return jr().some(t=>e.matches(t))}function X(e,t=ie){Ei(()=>{t(e,(r,n)=>{$t(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function ki(e){ie(e,t=>xr(t))}function Dt(e,t){return Array.isArray(t)?lr(e,t.join(" ")):typeof t=="object"&&t!==null?Ni(e,t):typeof t=="function"?Dt(e,t()):lr(e,t)}function lr(e,t){let r=o=>o.split(" ").filter(Boolean),n=o=>o.split(" ").filter(a=>!e.classList.contains(a)).filter(Boolean),i=o=>(e.classList.add(...o),()=>{e.classList.remove(...o)});return t=t===!0?t="":t||"",i(n(t))}function Ni(e,t){let r=s=>s.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([s,u])=>u?r(s):!1).filter(Boolean),i=Object.entries(t).flatMap(([s,u])=>u?!1:r(s)).filter(Boolean),o=[],a=[];return i.forEach(s=>{e.classList.contains(s)&&(e.classList.remove(s),a.push(s))}),n.forEach(s=>{e.classList.contains(s)||(e.classList.add(s),o.push(s))}),()=>{a.forEach(s=>e.classList.add(s)),o.forEach(s=>e.classList.remove(s))}}function He(e,t){return typeof t=="object"&&t!==null?Ri(e,t):Li(e,t)}function Ri(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],n.startsWith("--")||(n=$i(n)),e.style.setProperty(n,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{He(e,r)}}function Li(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function $i(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function wt(e,t=()=>{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}A("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{typeof n=="function"&&(n=i(n)),n?Pi(e,n,t):Ii(e,r,t)});function Pi(e,t,r){zr(e,Dt,""),{enter:i=>{e._x_transition.enter.during=i},"enter-start":i=>{e._x_transition.enter.start=i},"enter-end":i=>{e._x_transition.enter.end=i},leave:i=>{e._x_transition.leave.during=i},"leave-start":i=>{e._x_transition.leave.start=i},"leave-end":i=>{e._x_transition.leave.end=i}}[r](t)}function Ii(e,t,r){zr(e,He);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);t.includes("in")&&!n&&(t=t.filter((v,y)=>y<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((v,y)=>y>t.indexOf("out")));let a=!t.includes("opacity")&&!t.includes("scale"),s=a||t.includes("opacity"),u=a||t.includes("scale"),l=s?0:1,f=u?ve(t,"scale",95)/100:1,m=ve(t,"delay",0),b=ve(t,"origin","center"),I="opacity, transform",E=ve(t,"duration",150)/1e3,se=ve(t,"duration",75)/1e3,d="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:b,transitionDelay:m,transitionProperty:I,transitionDuration:`${E}s`,transitionTimingFunction:d},e._x_transition.enter.start={opacity:l,transform:`scale(${f})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:b,transitionDelay:m,transitionProperty:I,transitionDuration:`${se}s`,transitionTimingFunction:d},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:l,transform:`scale(${f})`})}function zr(e,t,r={}){e._x_transition||(e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Et(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Et(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(t){e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):o():e._x_transition?e._x_transition.in(r):o();return}e._x_hidePromise=e._x_transition?new Promise((a,s)=>{e._x_transition.out(()=>{},()=>a(n)),e._x_transitioning.beforeCancel(()=>s({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let a=Vr(e);a?(a._x_hideChildren||(a._x_hideChildren=[]),a._x_hideChildren.push(e)):i(()=>{let s=u=>{let l=Promise.all([u._x_hidePromise,...(u._x_hideChildren||[]).map(s)]).then(([f])=>f());return delete u._x_hidePromise,delete u._x_hideChildren,l};s(e).catch(u=>{if(!u.isFromCancelledTransition)throw u})})})};function Vr(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:Vr(t)}function Et(e,t,{during:r,start:n,end:i}={},o=()=>{},a=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),a();return}let s,u,l;Bi(e,{start(){s=t(e,n)},during(){u=t(e,r)},before:o,end(){s(),l=t(e,i)},after:a,cleanup(){u(),l()}})}function Bi(e,t){let r,n,i,o=wt(()=>{T(()=>{r=!0,n||t.before(),i||(t.end(),yt()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(a){this.beforeCancels.push(a)},cancel:wt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},T(()=>{t.start(),t.during()}),Ci(),requestAnimationFrame(()=>{if(r)return;let a=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,s=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;a===0&&(a=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),T(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{r||(T(()=>{t.end()}),yt(),setTimeout(e._x_transitioning.finish,a+s),i=!0)})})}function ve(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n||t==="scale"&&isNaN(n))return r;if(t==="duration"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}var At=!1;function qe(e,t=()=>{}){return(...r)=>At?t(...r):e(...r)}function Di(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),At=!0,ji(()=>{Fi(t)}),At=!1}function Fi(e){let t=!1;X(e,(n,i)=>{ie(n,(o,a)=>{if(t&&Mi(o))return a();t=!0,i(o,a)})})}function ji(e){let t=Se;sr((r,n)=>{let i=t(r);return Fe(i),()=>{}}),e(),sr(t)}function Wr(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=de({})),e._x_bindings[t]=r,t=n.includes("camel")?Ui(t):t,t){case"value":Ki(e,r);break;case"style":qi(e,r);break;case"class":Hi(e,r);break;default:zi(e,t,r);break}}function Ki(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=cr(e.value,t));else if(e.type==="checkbox")Number.isInteger(t)?e.value=t:!Number.isInteger(t)&&!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(r=>cr(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")Wi(e,t);else{if(e.value===t)return;e.value=t}}function Hi(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Dt(e,t)}function qi(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=He(e,t)}function zi(e,t,r){[null,void 0,!1].includes(r)&&Gi(t)?e.removeAttribute(t):(Ur(t)&&(r=t),Vi(e,t,r))}function Vi(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function Wi(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function Ui(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function cr(e,t){return e==t}function Ur(e){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}function Gi(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Yi(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];let n=e.getAttribute(t);return n===null?typeof r=="function"?r():r:n===""?!0:Ur(t)?!![t,"true"].includes(n):n}function Gr(e,t){var r;return function(){var n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function Yr(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function Xi(e){e(Oe)}var ee={},fr=!1;function Ji(e,t){if(fr||(ee=de(ee),fr=!0),t===void 0)return ee[e];ee[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&ee[e].init(),Er(ee[e])}function Zi(){return ee}var Xr={};function Qi(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?Jr(e,r()):Xr[e]=r}function eo(e){return Object.entries(Xr).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function Jr(e,t,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(t).map(([a,s])=>({name:a,value:s})),o=Mr(i);i=i.map(a=>o.find(s=>s.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),$t(e,i,r).map(a=>{n.push(a.runCleanups),a()})}var Zr={};function to(e,t){Zr[e]=t}function ro(e,t){return Object.entries(Zr).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var no={get reactive(){return de},get release(){return Fe},get effect(){return Se},get raw(){return hr},version:"3.10.5",flushAndStopDeferringMutations:mi,dontAutoEvaluateFunctions:gi,disableEffectScheduling:ii,setReactivityEngine:oi,closestDataStack:le,skipDuringClone:qe,addRootSelector:Hr,addInitSelector:qr,addScopeToNode:Te,deferMutations:pi,mapAttributes:Pt,evaluateLater:k,setEvaluator:vi,mergeProxies:Ce,findClosest:Ke,closestRoot:je,interceptor:Ar,transition:Et,setStyles:He,mutateDom:T,directive:A,throttle:Yr,debounce:Gr,evaluate:ue,initTree:X,nextTick:Dr,prefixed:pe,prefix:wi,plugin:Xi,magic:j,store:Ji,start:Oi,clone:Di,bound:Yi,$data:wr,data:to,bind:Qi},Oe=no;function Qr(e,t){let r=Object.create(null),n=e.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return t?i=>!!r[i.toLowerCase()]:i=>!!r[i]}var io="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",$a=Qr(io+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),oo=Object.freeze({}),Pa=Object.freeze([]),en=Object.assign,ao=Object.prototype.hasOwnProperty,ze=(e,t)=>ao.call(e,t),re=Array.isArray,Ee=e=>tn(e)==="[object Map]",so=e=>typeof e=="string",Ft=e=>typeof e=="symbol",Ve=e=>e!==null&&typeof e=="object",uo=Object.prototype.toString,tn=e=>uo.call(e),rn=e=>tn(e).slice(8,-1),jt=e=>so(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,We=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},lo=/-(\w)/g,Ia=We(e=>e.replace(lo,(t,r)=>r?r.toUpperCase():"")),co=/\B([A-Z])/g,Ba=We(e=>e.replace(co,"-$1").toLowerCase()),nn=We(e=>e.charAt(0).toUpperCase()+e.slice(1)),Da=We(e=>e?`on${nn(e)}`:""),on=(e,t)=>e!==t&&(e===e||t===t),St=new WeakMap,be=[],z,ne=Symbol("iterate"),Tt=Symbol("Map key iterate");function fo(e){return e&&e._isEffect===!0}function po(e,t=oo){fo(e)&&(e=e.raw);let r=_o(e,t);return t.lazy||r(),r}function mo(e){e.active&&(an(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var ho=0;function _o(e,t){let r=function(){if(!r.active)return e();if(!be.includes(r)){an(r);try{return vo(),be.push(r),z=r,e()}finally{be.pop(),sn(),z=be[be.length-1]}}};return r.id=ho++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function an(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var fe=!0,Kt=[];function go(){Kt.push(fe),fe=!1}function vo(){Kt.push(fe),fe=!0}function sn(){let e=Kt.pop();fe=e===void 0?!0:e}function F(e,t,r){if(!fe||z===void 0)return;let n=St.get(e);n||St.set(e,n=new Map);let i=n.get(r);i||n.set(r,i=new Set),i.has(z)||(i.add(z),z.deps.push(i),z.options.onTrack&&z.options.onTrack({effect:z,target:e,type:t,key:r}))}function J(e,t,r,n,i,o){let a=St.get(e);if(!a)return;let s=new Set,u=f=>{f&&f.forEach(m=>{(m!==z||m.allowRecurse)&&s.add(m)})};if(t==="clear")a.forEach(u);else if(r==="length"&&re(e))a.forEach((f,m)=>{(m==="length"||m>=n)&&u(f)});else switch(r!==void 0&&u(a.get(r)),t){case"add":re(e)?jt(r)&&u(a.get("length")):(u(a.get(ne)),Ee(e)&&u(a.get(Tt)));break;case"delete":re(e)||(u(a.get(ne)),Ee(e)&&u(a.get(Tt)));break;case"set":Ee(e)&&u(a.get(ne));break}let l=f=>{f.options.onTrigger&&f.options.onTrigger({effect:f,target:e,key:r,type:t,newValue:n,oldValue:i,oldTarget:o}),f.options.scheduler?f.options.scheduler(f):f()};s.forEach(l)}var bo=Qr("__proto__,__v_isRef,__isVue"),un=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Ft)),xo=Ue(),yo=Ue(!1,!0),wo=Ue(!0),Eo=Ue(!0,!0),De={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];De[e]=function(...r){let n=x(this);for(let o=0,a=this.length;o<a;o++)F(n,"get",o+"");let i=t.apply(n,r);return i===-1||i===!1?t.apply(n,r.map(x)):i}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];De[e]=function(...r){go();let n=t.apply(this,r);return sn(),n}});function Ue(e=!1,t=!1){return function(n,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_raw"&&o===(e?t?Lo:wn:t?Ro:yn).get(n))return n;let a=re(n);if(!e&&a&&ze(De,i))return Reflect.get(De,i,o);let s=Reflect.get(n,i,o);return(Ft(i)?un.has(i):bo(i))||(e||F(n,"get",i),t)?s:Ct(s)?!a||!jt(i)?s.value:s:Ve(s)?e?En(s):Vt(s):s}}var Ao=ln(),So=ln(!0);function ln(e=!1){return function(r,n,i,o){let a=r[n];if(!e&&(i=x(i),a=x(a),!re(r)&&Ct(a)&&!Ct(i)))return a.value=i,!0;let s=re(r)&&jt(n)?Number(n)<r.length:ze(r,n),u=Reflect.set(r,n,i,o);return r===x(o)&&(s?on(i,a)&&J(r,"set",n,i,a):J(r,"add",n,i)),u}}function To(e,t){let r=ze(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&J(e,"delete",t,void 0,n),i}function Co(e,t){let r=Reflect.has(e,t);return(!Ft(t)||!un.has(t))&&F(e,"has",t),r}function Oo(e){return F(e,"iterate",re(e)?"length":ne),Reflect.ownKeys(e)}var cn={get:xo,set:Ao,deleteProperty:To,has:Co,ownKeys:Oo},fn={get:wo,set(e,t){return console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},Fa=en({},cn,{get:yo,set:So}),ja=en({},fn,{get:Eo}),Ht=e=>Ve(e)?Vt(e):e,qt=e=>Ve(e)?En(e):e,zt=e=>e,Ge=e=>Reflect.getPrototypeOf(e);function Ye(e,t,r=!1,n=!1){e=e.__v_raw;let i=x(e),o=x(t);t!==o&&!r&&F(i,"get",t),!r&&F(i,"get",o);let{has:a}=Ge(i),s=n?zt:r?qt:Ht;if(a.call(i,t))return s(e.get(t));if(a.call(i,o))return s(e.get(o));e!==i&&e.get(t)}function Xe(e,t=!1){let r=this.__v_raw,n=x(r),i=x(e);return e!==i&&!t&&F(n,"has",e),!t&&F(n,"has",i),e===i?r.has(e):r.has(e)||r.has(i)}function Je(e,t=!1){return e=e.__v_raw,!t&&F(x(e),"iterate",ne),Reflect.get(e,"size",e)}function dn(e){e=x(e);let t=x(this);return Ge(t).has.call(t,e)||(t.add(e),J(t,"add",e,e)),this}function pn(e,t){t=x(t);let r=x(this),{has:n,get:i}=Ge(r),o=n.call(r,e);o?xn(r,n,e):(e=x(e),o=n.call(r,e));let a=i.call(r,e);return r.set(e,t),o?on(t,a)&&J(r,"set",e,t,a):J(r,"add",e,t),this}function mn(e){let t=x(this),{has:r,get:n}=Ge(t),i=r.call(t,e);i?xn(t,r,e):(e=x(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,a=t.delete(e);return i&&J(t,"delete",e,void 0,o),a}function hn(){let e=x(this),t=e.size!==0,r=Ee(e)?new Map(e):new Set(e),n=e.clear();return t&&J(e,"clear",void 0,void 0,r),n}function Ze(e,t){return function(n,i){let o=this,a=o.__v_raw,s=x(a),u=t?zt:e?qt:Ht;return!e&&F(s,"iterate",ne),a.forEach((l,f)=>n.call(i,u(l),u(f),o))}}function $e(e,t,r){return function(...n){let i=this.__v_raw,o=x(i),a=Ee(o),s=e==="entries"||e===Symbol.iterator&&a,u=e==="keys"&&a,l=i[e](...n),f=r?zt:t?qt:Ht;return!t&&F(o,"iterate",u?Tt:ne),{next(){let{value:m,done:b}=l.next();return b?{value:m,done:b}:{value:s?[f(m[0]),f(m[1])]:f(m),done:b}},[Symbol.iterator](){return this}}}}function Y(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${nn(e)} operation ${r}failed: target is readonly.`,x(this))}return e==="delete"?!1:this}}var _n={get(e){return Ye(this,e)},get size(){return Je(this)},has:Xe,add:dn,set:pn,delete:mn,clear:hn,forEach:Ze(!1,!1)},gn={get(e){return Ye(this,e,!1,!0)},get size(){return Je(this)},has:Xe,add:dn,set:pn,delete:mn,clear:hn,forEach:Ze(!1,!0)},vn={get(e){return Ye(this,e,!0)},get size(){return Je(this,!0)},has(e){return Xe.call(this,e,!0)},add:Y("add"),set:Y("set"),delete:Y("delete"),clear:Y("clear"),forEach:Ze(!0,!1)},bn={get(e){return Ye(this,e,!0,!0)},get size(){return Je(this,!0)},has(e){return Xe.call(this,e,!0)},add:Y("add"),set:Y("set"),delete:Y("delete"),clear:Y("clear"),forEach:Ze(!0,!0)},Mo=["keys","values","entries",Symbol.iterator];Mo.forEach(e=>{_n[e]=$e(e,!1,!1),vn[e]=$e(e,!0,!1),gn[e]=$e(e,!1,!0),bn[e]=$e(e,!0,!0)});function Qe(e,t){let r=t?e?bn:gn:e?vn:_n;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(ze(r,i)&&i in n?r:n,i,o)}var ko={get:Qe(!1,!1)},Ka={get:Qe(!1,!0)},No={get:Qe(!0,!1)},Ha={get:Qe(!0,!0)};function xn(e,t,r){let n=x(r);if(n!==r&&t.call(e,n)){let i=rn(e);console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var yn=new WeakMap,Ro=new WeakMap,wn=new WeakMap,Lo=new WeakMap;function $o(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Po(e){return e.__v_skip||!Object.isExtensible(e)?0:$o(rn(e))}function Vt(e){return e&&e.__v_isReadonly?e:An(e,!1,cn,ko,yn)}function En(e){return An(e,!0,fn,No,wn)}function An(e,t,r,n,i){if(!Ve(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;let o=i.get(e);if(o)return o;let a=Po(e);if(a===0)return e;let s=new Proxy(e,a===2?n:r);return i.set(e,s),s}function x(e){return e&&x(e.__v_raw)||e}function Ct(e){return Boolean(e&&e.__v_isRef===!0)}j("nextTick",()=>Dr);j("dispatch",e=>we.bind(we,e));j("watch",(e,{evaluateLater:t,effect:r})=>(n,i)=>{let o=t(n),a=!0,s,u=r(()=>o(l=>{JSON.stringify(l),a?s=l:queueMicrotask(()=>{i(l,s),s=l}),a=!1}));e._x_effects.delete(u)});j("store",Zi);j("data",e=>wr(e));j("root",e=>je(e));j("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Ce(Io(e))),e._x_refs_proxy));function Io(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var ft={};function Sn(e){return ft[e]||(ft[e]=0),++ft[e]}function Bo(e,t){return Ke(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function Do(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Sn(t))}j("id",e=>(t,r=null)=>{let n=Bo(e,t),i=n?n._x_ids[t]:Sn(t);return r?`${t}-${i}-${r}`:`${t}-${i}`});j("el",e=>e);Tn("Focus","focus","focus");Tn("Persist","persist","persist");function Tn(e,t,r){j(t,n=>ce(`You can't use [$${directiveName}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}A("modelable",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t),o=()=>{let l;return i(f=>l=f),l},a=n(`${t} = __placeholder`),s=l=>a(()=>{},{scope:{__placeholder:l}}),u=o();s(u),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let l=e._x_model.get,f=e._x_model.set;r(()=>s(l())),r(()=>f(o()))})});A("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&ce("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||ce(`Cannot find x-teleport element for selector: "${t}"`);let i=e.content.cloneNode(!0).firstElementChild;e._x_teleport=i,i._x_teleportBack=e,e._x_forwardEvents&&e._x_forwardEvents.forEach(o=>{i.addEventListener(o,a=>{a.stopPropagation(),e.dispatchEvent(new a.constructor(a.type,a))})}),Te(i,{},e),T(()=>{n.appendChild(i),X(i),i._x_ignore=!0}),r(()=>i.remove())});var Cn=()=>{};Cn.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};A("ignore",Cn);A("effect",(e,{expression:t},{effect:r})=>r(k(e,t)));function On(e,t,r,n){let i=e,o=u=>n(u),a={},s=(u,l)=>f=>l(u,f);if(r.includes("dot")&&(t=Fo(t)),r.includes("camel")&&(t=jo(t)),r.includes("passive")&&(a.passive=!0),r.includes("capture")&&(a.capture=!0),r.includes("window")&&(i=window),r.includes("document")&&(i=document),r.includes("prevent")&&(o=s(o,(u,l)=>{l.preventDefault(),u(l)})),r.includes("stop")&&(o=s(o,(u,l)=>{l.stopPropagation(),u(l)})),r.includes("self")&&(o=s(o,(u,l)=>{l.target===e&&u(l)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=s(o,(u,l)=>{e.contains(l.target)||l.target.isConnected!==!1&&(e.offsetWidth<1&&e.offsetHeight<1||e._x_isShown!==!1&&u(l))})),r.includes("once")&&(o=s(o,(u,l)=>{u(l),i.removeEventListener(t,o,a)})),o=s(o,(u,l)=>{Ho(t)&&qo(l,r)||u(l)}),r.includes("debounce")){let u=r[r.indexOf("debounce")+1]||"invalid-wait",l=Ot(u.split("ms")[0])?Number(u.split("ms")[0]):250;o=Gr(o,l)}if(r.includes("throttle")){let u=r[r.indexOf("throttle")+1]||"invalid-wait",l=Ot(u.split("ms")[0])?Number(u.split("ms")[0]):250;o=Yr(o,l)}return i.addEventListener(t,o,a),()=>{i.removeEventListener(t,o,a)}}function Fo(e){return e.replace(/-/g,".")}function jo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ot(e){return!Array.isArray(e)&&!isNaN(e)}function Ko(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Ho(e){return["keydown","keyup"].includes(e)}function qo(e,t){let r=t.filter(o=>!["window","document","prevent","stop","once"].includes(o));if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Ot((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&dr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter(o=>r.includes(o));return r=r.filter(o=>!i.includes(o)),!(i.length>0&&i.filter(a=>((a==="cmd"||a==="super")&&(a="meta"),e[`${a}Key`])).length===i.length&&dr(e.key).includes(r[0]))}function dr(e){if(!e)return[];e=Ko(e);let t={ctrl:"control",slash:"/",space:"-",spacebar:"-",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",equal:"="};return t[e]=e,Object.keys(t).map(r=>{if(t[r]===e)return r}).filter(r=>r)}A("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=k(e,r),a=`${r} = rightSideOfExpression($event, ${r})`,s=k(e,a);var u=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let l=zo(e,t,r),f=On(e,u,t,b=>{s(()=>{},{scope:{$event:b,rightSideOfExpression:l}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=f,i(()=>e._x_removeModelListeners.default());let m=k(e,`${r} = __placeholder`);e._x_model={get(){let b;return o(I=>b=I),b},set(b){m(()=>{},{scope:{__placeholder:b}})}},e._x_forceModelUpdate=()=>{o(b=>{b===void 0&&r.match(/\./)&&(b=""),window.fromModel=!0,T(()=>Wr(e,"value",b)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function zo(e,t,r){return e.type==="radio"&&T(()=>{e.hasAttribute("name")||e.setAttribute("name",r)}),(n,i)=>T(()=>{if(n instanceof CustomEvent&&n.detail!==void 0)return n.detail||n.target.value;if(e.type==="checkbox")if(Array.isArray(i)){let o=t.includes("number")?dt(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(a=>!Vo(a,o))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(o=>{let a=o.value||o.text;return dt(a)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?dt(o):t.includes("trim")?o.trim():o}}})}function dt(e){let t=e?parseFloat(e):null;return Wo(t)?t:e}function Vo(e,t){return e==t}function Wo(e){return!Array.isArray(e)&&!isNaN(e)}A("cloak",e=>queueMicrotask(()=>T(()=>e.removeAttribute(pe("cloak")))));qr(()=>`[${pe("init")}]`);A("init",qe((e,{expression:t},{evaluate:r})=>typeof t=="string"?!!t.trim()&&r(t,{},!1):r(t,{},!1)));A("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{T(()=>{e.textContent=o})})})});A("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{T(()=>{e.innerHTML=o,e._x_ignoreSelf=!0,X(e),delete e._x_ignoreSelf})})})});Pt(Rr(":",Lr(pe("bind:"))));A("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let s={};eo(s),k(e,n)(l=>{Jr(e,l,i)},{scope:s});return}if(t==="key")return Uo(e,n);let a=k(e,n);o(()=>a(s=>{s===void 0&&typeof n=="string"&&n.match(/\./)&&(s=""),T(()=>Wr(e,t,s,r))}))});function Uo(e,t){e._x_keyExpression=t}Hr(()=>`[${pe("data")}]`);A("data",qe((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};gt(n,e);let i={};ro(i,n);let o=ue(e,t,{scope:i});o===void 0&&(o={}),gt(o,e);let a=de(o);Er(a);let s=Te(e,a);a.init&&ue(e,a.init),r(()=>{a.destroy&&ue(e,a.destroy),s()})}));A("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=k(e,r);e._x_doHide||(e._x_doHide=()=>{T(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{T(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let o=()=>{e._x_doHide(),e._x_isShown=!1},a=()=>{e._x_doShow(),e._x_isShown=!0},s=()=>setTimeout(a),u=wt(m=>m?a():o(),m=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,m,a,o):m?s():o()}),l,f=!0;n(()=>i(m=>{!f&&m===l||(t.includes("immediate")&&(m?s():o()),u(m),l=m,f=!1)}))});A("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=Yo(t),o=k(e,i.items),a=k(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>Go(e,i,o,a)),n(()=>{Object.values(e._x_lookup).forEach(s=>s.remove()),delete e._x_prevKeys,delete e._x_lookup})});function Go(e,t,r,n){let i=a=>typeof a=="object"&&!Array.isArray(a),o=e;r(a=>{Xo(a)&&a>=0&&(a=Array.from(Array(a).keys(),d=>d+1)),a===void 0&&(a=[]);let s=e._x_lookup,u=e._x_prevKeys,l=[],f=[];if(i(a))a=Object.entries(a).map(([d,v])=>{let y=pr(t,v,d,a);n(O=>f.push(O),{scope:g({index:d},y)}),l.push(y)});else for(let d=0;d<a.length;d++){let v=pr(t,a[d],d,a);n(y=>f.push(y),{scope:g({index:d},v)}),l.push(v)}let m=[],b=[],I=[],E=[];for(let d=0;d<u.length;d++){let v=u[d];f.indexOf(v)===-1&&I.push(v)}u=u.filter(d=>!I.includes(d));let se="template";for(let d=0;d<f.length;d++){let v=f[d],y=u.indexOf(v);if(y===-1)u.splice(d,0,v),m.push([se,d]);else if(y!==d){let O=u.splice(d,1)[0],L=u.splice(y-1,1)[0];u.splice(d,0,L),u.splice(y,0,O),b.push([O,L])}else E.push(v);se=v}for(let d=0;d<I.length;d++){let v=I[d];s[v]._x_effects&&s[v]._x_effects.forEach(mr),s[v].remove(),s[v]=null,delete s[v]}for(let d=0;d<b.length;d++){let[v,y]=b[d],O=s[v],L=s[y],G=document.createElement("div");T(()=>{L.after(G),O.after(L),L._x_currentIfEl&&L.after(L._x_currentIfEl),G.before(O),O._x_currentIfEl&&O.after(O._x_currentIfEl),G.remove()}),ur(L,l[f.indexOf(y)])}for(let d=0;d<m.length;d++){let[v,y]=m[d],O=v==="template"?o:s[v];O._x_currentIfEl&&(O=O._x_currentIfEl);let L=l[y],G=f[y],D=document.importNode(o.content,!0).firstElementChild;Te(D,de(L),o),T(()=>{O.after(D),X(D)}),typeof G=="object"&&ce("x-for key cannot be an object, it must be a string or an integer",o),s[G]=D}for(let d=0;d<E.length;d++)ur(s[E[d]],l[f.indexOf(E[d])]);o._x_prevKeys=f})}function Yo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let a=i[1].replace(r,"").trim(),s=a.match(t);return s?(o.item=a.replace(t,"").trim(),o.index=s[1].trim(),s[2]&&(o.collection=s[2].trim())):o.item=a,o}function pr(e,t,r,n){let i={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(a=>a.trim()).forEach((a,s)=>{i[a]=t[s]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(a=>a.trim()).forEach(a=>{i[a]=t[a]}):i[e.item]=t,e.index&&(i[e.index]=r),e.collection&&(i[e.collection]=n),i}function Xo(e){return!Array.isArray(e)&&!isNaN(e)}function Mn(){}Mn.inline=(e,{expression:t},{cleanup:r})=>{let n=je(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};A("ref",Mn);A("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=k(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let s=e.content.cloneNode(!0).firstElementChild;return Te(s,{},e),T(()=>{e.after(s),X(s)}),e._x_currentIfEl=s,e._x_undoIf=()=>{ie(s,u=>{u._x_effects&&u._x_effects.forEach(mr)}),s.remove(),delete e._x_currentIfEl},s},a=()=>{e._x_undoIf&&(e._x_undoIf(),delete e._x_undoIf)};r(()=>i(s=>{s?o():a()})),n(()=>e._x_undoIf&&e._x_undoIf())});A("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach(i=>Do(e,i))});Pt(Rr("@",Lr(pe("on:"))));A("on",qe((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?k(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let a=On(e,t,r,s=>{o(()=>{},{scope:{$event:s},params:[s]})});i(()=>a())}));et("Collapse","collapse","collapse");et("Intersect","intersect","intersect");et("Focus","trap","focus");et("Mask","mask","mask");function et(e,t,r){A(t,n=>ce(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}Oe.setEvaluator(Cr);Oe.setReactivityEngine({reactive:Vt,effect:po,release:mo,raw:x});var Jo=Oe,Wt=Jo;var Zo=class{constructor(e){ut(this,"el");ut(this,"traversals",{first:"firstElementChild",next:"nextElementSibling",parent:"parentElement"});this.el=e}nodes(){return this.traversals={first:"firstChild",next:"nextSibling",parent:"parentNode"},this}first(){return this.teleportTo(this.el[this.traversals.first])}next(){return this.teleportTo(this.teleportBack(this.el[this.traversals.next]))}before(e){return this.el[this.traversals.parent].insertBefore(e,this.el),e}replace(e){return this.el[this.traversals.parent].replaceChild(e,this.el),e}append(e){return this.el.appendChild(e),e}teleportTo(e){return e&&(e._x_teleport?e._x_teleport:e)}teleportBack(e){return e&&(e._x_teleportBack?e._x_teleportBack:e)}};function C(e){return new Zo(e)}function Qo(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function ea(e){return e.nodeType===3||e.nodeType===8}var kn=()=>{},Nn=()=>{};async function Ut(e,t,r){let n,i,o,a,s,u,l,f,m,b,I;function E(c){if(I)return Nn((c||"").replace(`
6
- `,"\\n"),n,i),new Promise(p=>kn=()=>p())}function se(c={}){let p=B=>B.getAttribute("key"),h=()=>{};s=c.updating||h,u=c.updated||h,l=c.removing||h,f=c.removed||h,m=c.adding||h,b=c.added||h,o=c.key||p,a=c.lookahead||!1,I=c.debug||!1}async function d(c,p){if(v(c,p)){let B=y(c,p);return await E("Swap elements"),B}let h=!1;if(!me(s,c,p,()=>h=!0)){if(window.Alpine&&ta(c,p,()=>h=!0),ea(p)){await O(c,p),u(c,p);return}h||await L(c,p),u(c,p),await G(c,p)}}function v(c,p){return c.nodeType!=p.nodeType||c.nodeName!=p.nodeName||D(c)!=D(p)}function y(c,p){if(me(l,c))return;let h=p.cloneNode(!0);me(m,h)||(C(c).replace(h),f(c),b(h))}async function O(c,p){let h=p.nodeValue;c.nodeValue!==h&&(c.nodeValue=h,await E("Change text node to: "+h))}async function L(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let h=Array.from(c.attributes),B=Array.from(p.attributes);for(let W=h.length-1;W>=0;W--){let H=h[W].name;p.hasAttribute(H)||(c.removeAttribute(H),await E("Remove attribute"))}for(let W=B.length-1;W>=0;W--){let H=B[W].name,w=B[W].value;c.getAttribute(H)!==w&&(c.setAttribute(H,w),await E(`Set [${H}] attribute to: "${w}"`))}}async function G(c,p){let h=c.childNodes,B=p.childNodes,W=nr(B),H=nr(h),w=C(p).nodes().first(),_=C(c).nodes().first(),Q={};for(;w;){let $=D(w),q=D(_);if(!_)if($&&Q[$]){let P=Q[$];C(c).append(P),_=P,await E("Add element (from key)")}else{let P=Wn(w,c)||{};await E("Add element: "+(P.outerHTML||P.nodeValue)),w=C(w).nodes().next();continue}if(a){let P=C(w).next(),ir=!1;for(;!ir&&P;)_.isEqualNode(P)&&(ir=!0,_=ot(w,_),q=D(_),await E("Move element (lookahead)")),P=C(P).next()}if($!==q){if(!$&&q){Q[q]=_,_=ot(w,_),Q[q].remove(),_=C(_).nodes().next(),w=C(w).nodes().next(),await E('No "to" key');continue}if($&&!q&&H[$]&&(_=C(_).replace(H[$]),await E('No "from" key')),$&&q){Q[q]=_;let P=H[$];if(P)_=C(_).replace(P),await E('Move "from" key');else{Q[q]=_,_=ot(w,_),Q[q].remove(),_=C(_).next(),w=C(w).next(),await E("Swap elements with keys");continue}}}let Un=_&&C(_).nodes().next();await d(_,w),w=w&&C(w).nodes().next(),_=Un}let at=[];for(;_;)me(l,_)||at.push(_),_=C(_).nodes().next();for(;at.length;){let $=at.shift();$.remove(),await E("remove el"),f($)}}function D(c){return c&&c.nodeType===1&&o(c)}function nr(c){let p={};return c.forEach(h=>{let B=D(h);B&&(p[B]=h)}),p}function Wn(c,p){if(!me(m,c)){let h=c.cloneNode(!0);return C(p).append(h),b(h),h}return null}function ot(c,p){if(!me(m,c)){let h=c.cloneNode(!0);return C(p).before(h),b(h),h}return p}return se(r),n=e,i=Qo(t),window.Alpine&&window.Alpine.closestDataStack&&!e._x_dataStack&&(i._x_dataStack=window.Alpine.closestDataStack(e),i._x_dataStack&&window.Alpine.clone(e,i)),await E(),await d(e,i),n=void 0,i=void 0,e}Ut.step=()=>kn();Ut.log=e=>{Nn=e};function me(e,...t){let r=!1;return e(...t,()=>r=!0),r}function ta(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function ra(e){e.morph=Ut}var Rn=ra;Wt.plugin(Rn);var na=/INPUT/i,ia=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,oa=/TEXTAREA/i;function aa(e,t,r,n){if(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)return;if(e.tagName.match(oa)||e.tagName.match(na)&&e.getAttribute("type").match(ia))return n()}function sa(e,t){e.forEach(r=>Wt.morph(r,t,{updating:aa}))}var Ln=sa;function ua(e,t,r){if(e.match(/^dispatch(Event)?$/))return ar(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Ln(r,t[0]);if(e.endsWith("="))return r.forEach(n=>n[e.slice(0,-1).trim()]=t[0]);r.forEach(n=>n[e].apply(n,t))}function la(){let e=JSON.parse(this.templateContent.textContent),{id:t,selector:r,receiver:n,method:i,args:o}=e,a=[self];r&&(a=Array.from(document.querySelectorAll(r))),n&&(a=a.map(s=>{let u=s,l=n.split(".");for(;l.length>0;)u=u[l.shift()];return u})),ua(i,o,a)}var Gt=la;if(!self.Turbo)throw new Error("`Turbo` is not defined! Be sure to import `@turbo-boost/streams` after `@hotwired/turbo` or `@hotwired/turbo-rails`.");if(!Turbo.StreamActions)throw new Error("`Turbo.StreamActions` is not defined! Verify that you are running >= `7.2.0` of `@hotwired/turbo`.");Turbo.StreamActions.invoke=Gt;self.TurboBoost=self.TurboBoost||{};self.TurboBoost.Streams={invoke:Gt};console.info("@turbo-boost/streams has initialized and registered new stream actions with Turbo.");var Yt=class{get element(){return document.querySelector('meta[name="turbo-boost"]')}get token(){return this.element.getAttribute("content")}get busy(){return this.element.dataset.busy==="true"}set busy(t){return this.element.dataset.busy=!!t}},S=new Yt;var N={start:"turbo-boost:command:start",success:"turbo-boost:command:success",finish:"turbo-boost:command:finish",abort:"turbo-boost:command:abort",clientError:"turbo-boost:command:client-error",serverError:"turbo-boost:command:server-error"},V={stateLoad:"turbo-boost:state:load",stateChange:"turbo-boost:state:change"},U=g(g({},N),V);function M(e,t,r={}){r=r||{},r.detail=r.detail||{},t=t||document;let n=new CustomEvent(e,R(g({},r),{bubbles:!0}));return t.dispatchEvent(n),n}var Xt;function tt(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],M(V.stateChange,S.element,{detail:{state:Xt}}),!0},set(n,i,o,a){return n[i]=tt(o,this),M(V.stateChange,S.element,{detail:{state:Xt}}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=tt(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=tt(i,r);return t||(Xt=r),r}var $n=tt;var Jt,he,Me,Pn;function In(){if(!S.element)return _e();let e=atob(S.element.dataset.state);Me={},he=$n(JSON.parse(e)),Jt=g({},he),delete S.element.dataset.clientStateChange,setTimeout(()=>M(V.stateLoad,S.element,{detail:{state:he}}))}function _e(){clearTimeout(Pn),Pn=setTimeout(In,10)}Jt||In();addEventListener("DOMContentLoaded",_e);addEventListener("load",_e);addEventListener("turbo:load",_e);addEventListener("turbo:frame-load",_e);addEventListener(N.success,_e);addEventListener(V.stateChange,e=>{Me={};for(let[t,r]of Object.entries(he))Jt[t]!==r&&(Me[t]=r);S.element.dataset.clientStateChange=!0,S.element.dataset.state=btoa(JSON.stringify(he))});var oe={events:V,get current(){return he},get delta(){return Me},get payloadChunks(){return btoa(JSON.stringify(Me)).match(/.{1,2000}/g)}};function ca(e){let t="<html",r="</html",n=e.indexOf(t),i=e.lastIndexOf(r);if(n>=0&&i>=0){let o=e.slice(e.indexOf(">",n)+1,i);document.documentElement.innerHTML=o}}function fa(e){document.body.insertAdjacentHTML("beforeend",e)}var ae={append:fa,replaceDocument:ca};var rt={};function da(e){rt[e.id]=e}function pa(e){delete rt[e]}var nt={add:da,remove:pa,get commands(){return[...Object.values(rt)]},get length(){return Object.keys(rt).length}};function Bn(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>M(N.finish,e.target,{detail:e.detail}),25)}addEventListener(N.serverError,Bn);addEventListener(N.success,Bn);addEventListener(N.finish,e=>nt.remove(e.detail.id),!0);var ke={events:N};var Zt={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:r}=e.detail;if(S.busy){let n=["text/vnd.turbo-boost.html",r.headers.Accept];n=n.filter(i=>i&&i.trim().length>0).join(", "),r.headers.Accept=n,r.headers["TurboBoost-Token"]=S.token}oe.payloadChunks.forEach((n,i)=>{r.headers[`TurboBoost-State-${i.toString().padStart(4,"0")}`]=n})});addEventListener("turbo:before-fetch-response",e=>{let t=e.target.closest("turbo-frame"),{fetchResponse:r}=e.detail;if(t&&(Zt[t.id]=t.src),r.header("TurboBoost")){if(r.statusCode<200||r.statusCode>399){let n=`Server returned a ${r.statusCode} status code! TurboBoost Commands require 2XX-3XX status codes.`;M(ke.events.clientError,document,{detail:R(g({},e.detail),{error:n})},!0)}r.header("TurboBoost")==="Append"&&(e.preventDefault(),r.responseText.then(n=>ae.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboBoostSrc=Zt[t.id]||t.src||t.dataset.turboBoostSrc,delete Zt[t.id]});var ma={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",commandAttribute:"data-command"},K=g({},ma);var it={},Dn;function ha(e,t){it[e]=t,document.addEventListener(e,Dn,!0)}function _a(e){return Object.keys(it).find(t=>!!it[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function ga(e,t){return e===_a(t)}var Z={events:it,register:ha,isRegisteredForElement:ga,set handler(e){Dn=e}};function va(e){return e.closest(`[${K.commandAttribute}]`)}function ba(e){return e.closest("turbo-frame")}function xa(e,t={}){if(e.tagName.toLowerCase()!=="select")return t.value=e.value||null;if(!e.multiple)return t.value=e.options[e.selectedIndex].value;t.values=Array.from(e.options).reduce((r,n)=>(n.selected&&r.push(n.value),r),[])}function ya(e){let t=Array.from(e.attributes).reduce((r,n)=>{let i=n.value;return r[n.name]=i,r},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,xa(e,t),delete t.class,delete t.action,delete t.href,delete t[K.commandAttribute],delete t[K.frameAttribute],t}var Ne={buildAttributePayload:ya,findClosestCommand:va,findClosestFrame:ba};function wa(e,t={}){t.token=S.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_boost_command",r.value=JSON.stringify(t),e.appendChild(r)}var Fn={invokeCommand:wa};function Ea(e,t={}){let r=document.createElement("a");r.href=e;let n=new URL(r);return n.searchParams.set("turbo_boost_command",JSON.stringify(t)),n}var ge={build:Ea};function Aa(e,t){let r=t.src;t=g({},t),delete t.src,e.src=ge.build(r,t)}var Qt={invokeCommand:Aa};function Sa(e,t={}){let r=t.src;t=g({},t),delete t.src,delete t.href,e.setAttribute("href",ge.build(r,t))}var jn={invokeCommand:Sa};function Ta(e){let t=e.target;M(ke.events.abort,document,{detail:R(g({},e.detail),{xhr:t})})}function er(e){let t=e.target;t.getResponseHeader("TurboBoost")==="Append"?ae.append(t.responseText):ae.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboBoost Commands require 2XX-3XX status codes.`;M(ke.events.clientError,document,{detail:R(g({},e.detail),{error:r,xhr:t})},!0)}function Ca(e){let t=e.target;if(t.status<200||t.status>399)return er(e);let r=t.responseText;t.getResponseHeader("TurboBoost")==="Append"?ae.append(t.responseText):ae.replaceDocument(t.responseText)}function Oa(e){let t=e.src;e=g({},e),delete e.src;try{let r=new XMLHttpRequest;r.open("GET",ge.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-boost.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboBoost-Token",S.token),oe.payloadChunks.forEach((n,i)=>r.setRequestHeader(`TurboBoost-State-${i.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",Ta),r.addEventListener("error",er),r.addEventListener("load",Ca),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;er(r,{detail:{message:n}})}}var Kn={invokeCommand:Oa};function tr(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboBoostSrc||location.href}function Ma(e){let t=Ne.findClosestFrame(e),{turboFrame:r,turboMethod:n}=e.dataset;return e.tagName.toLowerCase()==="form"?{name:"form",reason:"Element is a form.",frame:t,src:e.action,invokeCommand:Fn.invokeCommand}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeCommand:jn.invokeCommand}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:tr(e,t),invokeCommand:Qt.invokeCommand}):(!r||r==="_self")&&t?{name:"frame",reason:"element does NOT target a frame or targets _self and is contained by a frame",frame:t,src:tr(e,t),invokeCommand:Qt.invokeCommand}:{name:"window",reason:"element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)",frame:null,src:tr(e),invokeCommand:Kn.invokeCommand}}var rr={find:Ma};var Re="unknown",Hn={debug:Object.values(U),info:Object.values(U),warn:[U.abort,U.clientError,U.serverError],error:[U.clientError,U.serverError],unknown:[]};Object.values(U).forEach(e=>{addEventListener(e,t=>{Hn[Re].includes(t.type)&&console[Re==="debug"?"log":Re](t.type,{target:t.target,detail:t.detail})})});var qn={get level(){return Re},set level(e){return Object.keys(Hn).includes(e)||(e="unknown"),Re=e}};function ka(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var zn={v4:ka};function Vn(e,t){return{id:e,name:t.dataset.command,elementId:t.id.length>0?t.id:null,elementAttributes:Ne.buildAttributePayload(t),startedAt:new Date().getTime()}}function Na(e){let t,r={};try{if(t=Ne.findClosestCommand(e.target),!t||!Z.isRegisteredForElement(e.type,t))return;let n=`command-${zn.v4()}`,i=rr.find(t),o=R(g({},Vn(n,t)),{driver:i.name,frameId:i.frame?i.frame.id:null,src:i.src}),a=M(N.start,t,{cancelable:!0,detail:o});if(a.defaultPrevented)return M(N.abort,t,{detail:{message:`An event handler for '${N.start}' prevented default behavior and blocked command invocation!`,source:a}});switch(i=rr.find(t),o=R(g({},Vn(n,t)),{driver:i.name,frameId:i.frame?i.frame.id:null,src:i.src}),nt.add(o),["frame","window"].includes(i.name)&&e.preventDefault(),S.busy=!0,setTimeout(()=>S.busy=!1,10),i.name){case"method":return i.invokeCommand(t,o);case"form":return i.invokeCommand(t,o);case"frame":return i.invokeCommand(i.frame,o);case"window":return i.invokeCommand(o)}}catch(n){M(N.clientError,t,{detail:R(g({},r),{error:n})})}}Z.handler=Na;Z.register("change",[`input[${K.commandAttribute}]`,`select[${K.commandAttribute}]`,`textarea[${K.commandAttribute}]`]);Z.register("submit",[`form[${K.commandAttribute}]`]);Z.register("click",[`[${K.commandAttribute}]`]);self.TurboBoost=self.TurboBoost||{};self.TurboBoost=R(g({},self.TurboBoost),{stateEvents:V,get state(){return oe.current},get stateDelta(){return oe.delta}});self.TurboBoost.Commands={logger:qn,schema:K,events:N,registerEventDelegate:Z.register,get eventDelegates(){return g({},Z.events)}};var vu=self.TurboBoost.Commands;export{vu as default};
5
+ `:""}`,t),setTimeout(()=>{throw e},0)}var Pe=!0;function gi(e){let t=Pe;Pe=!1,e(),Pe=t}function ue(e,t,r={}){let n;return k(e,t)(i=>n=i,r),n}function k(...e){return Tr(...e)}var Tr=Cr;function vi(e){Tr=e}function Cr(e,t){let r={};gt(r,e);let n=[r,...le(e)];if(typeof t=="function")return bi(n,t);let i=yi(n,t,e);return _i.bind(null,e,t,i)}function bi(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Ce([n,...e]),i);Be(r,o)}}var ct={};function xi(e,t){if(ct[e])return ct[e];let r=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)\s/.test(e)?`(() => { ${e} })()`:e,o=(()=>{try{return new r(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`)}catch(a){return Ae(a,t,e),Promise.resolve()}})();return ct[e]=o,o}function yi(e,t,r){let n=xi(t,r);return(i=()=>{},{scope:o={},params:a=[]}={})=>{n.result=void 0,n.finished=!1;let s=Ce([o,...e]);if(typeof n=="function"){let u=n(n,s).catch(l=>Ae(l,r,t));n.finished?(Be(i,n.result,s,a,r),n.result=void 0):u.then(l=>{Be(i,l,s,a,r)}).catch(l=>Ae(l,r,t)).finally(()=>n.result=void 0)}}}function Be(e,t,r,n,i){if(Pe&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(a=>Be(e,a,r,n)).catch(a=>Ae(a,i,t)):e(o)}else e(t)}var Lt="x-";function pe(e=""){return Lt+e}function wi(e){Lt=e}var Or={};function A(e,t){Or[e]=t}function $t(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([s,u])=>({name:s,value:u})),a=Mr(o);o=o.map(s=>a.find(u=>u.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),t=t.concat(o)}let n={};return t.map($r((o,a)=>n[o]=a)).filter(Ir).map(Si(n,r)).sort(Ti).map(o=>Ai(e,o))}function Mr(e){return Array.from(e).map($r()).filter(t=>!Ir(t))}var vt=!1,xe=new Map,kr=Symbol();function Ei(e){vt=!0;let t=Symbol();kr=t,xe.set(t,[]);let r=()=>{for(;xe.get(t).length;)xe.get(t).shift()();xe.delete(t)},n=()=>{vt=!1,r()};e(r),n()}function Nr(e){let t=[],r=s=>t.push(s),[n,i]=ai(e);return t.push(i),[{Alpine:Oe,effect:n,cleanup:r,evaluateLater:k.bind(k,e),evaluate:ue.bind(ue,e)},()=>t.forEach(s=>s())]}function Ai(e,t){let r=()=>{},n=Or[t.type]||r,[i,o]=Nr(e);li(e,t.original,o);let a=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),vt?xe.get(kr).push(n):n())};return a.runCleanups=o,a}var Rr=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Lr=e=>e;function $r(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Pr.reduce((o,a)=>a(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Pr=[];function Pt(e){Pr.push(e)}function Ir({name:e}){return Br().test(e)}var Br=()=>new RegExp(`^${Lt}([^:^.]+)\\b`);function Si(e,t){return({name:r,value:n})=>{let i=r.match(Br()),o=r.match(/:([a-zA-Z0-9\-:]+)/),a=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],s=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:a.map(u=>u.replace(".","")),expression:n,original:s}}}var bt="DEFAULT",Le=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",bt,"teleport"];function Ti(e,t){let r=Le.indexOf(e.type)===-1?bt:e.type,n=Le.indexOf(t.type)===-1?bt:t.type;return Le.indexOf(r)-Le.indexOf(n)}function we(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var xt=[],It=!1;function Dr(e=()=>{}){return queueMicrotask(()=>{It||setTimeout(()=>{yt()})}),new Promise(t=>{xt.push(()=>{e(),t()})})}function yt(){for(It=!1;xt.length;)xt.shift()()}function Ci(){It=!0}function ie(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>ie(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)ie(n,t,!1),n=n.nextElementSibling}function ce(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function Oi(){document.body||ce("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),we(document,"alpine:init"),we(document,"alpine:initializing"),yr(),si(t=>X(t,ie)),br(t=>ki(t)),ui((t,r)=>{$t(t,r).forEach(n=>n())});let e=t=>!je(t.parentElement,!0);Array.from(document.querySelectorAll(Kr())).filter(e).forEach(t=>{X(t)}),we(document,"alpine:initialized")}var Bt=[],Fr=[];function jr(){return Bt.map(e=>e())}function Kr(){return Bt.concat(Fr).map(e=>e())}function Hr(e){Bt.push(e)}function qr(e){Fr.push(e)}function je(e,t=!1){return Ke(e,r=>{if((t?Kr():jr()).some(i=>r.matches(i)))return!0})}function Ke(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return Ke(e.parentElement,t)}}function Mi(e){return jr().some(t=>e.matches(t))}function X(e,t=ie){Ei(()=>{t(e,(r,n)=>{$t(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function ki(e){ie(e,t=>xr(t))}function Dt(e,t){return Array.isArray(t)?lr(e,t.join(" ")):typeof t=="object"&&t!==null?Ni(e,t):typeof t=="function"?Dt(e,t()):lr(e,t)}function lr(e,t){let r=o=>o.split(" ").filter(Boolean),n=o=>o.split(" ").filter(a=>!e.classList.contains(a)).filter(Boolean),i=o=>(e.classList.add(...o),()=>{e.classList.remove(...o)});return t=t===!0?t="":t||"",i(n(t))}function Ni(e,t){let r=s=>s.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([s,u])=>u?r(s):!1).filter(Boolean),i=Object.entries(t).flatMap(([s,u])=>u?!1:r(s)).filter(Boolean),o=[],a=[];return i.forEach(s=>{e.classList.contains(s)&&(e.classList.remove(s),a.push(s))}),n.forEach(s=>{e.classList.contains(s)||(e.classList.add(s),o.push(s))}),()=>{a.forEach(s=>e.classList.add(s)),o.forEach(s=>e.classList.remove(s))}}function He(e,t){return typeof t=="object"&&t!==null?Ri(e,t):Li(e,t)}function Ri(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],n.startsWith("--")||(n=$i(n)),e.style.setProperty(n,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{He(e,r)}}function Li(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function $i(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function wt(e,t=()=>{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}A("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{typeof n=="function"&&(n=i(n)),n?Pi(e,n,t):Ii(e,r,t)});function Pi(e,t,r){zr(e,Dt,""),{enter:i=>{e._x_transition.enter.during=i},"enter-start":i=>{e._x_transition.enter.start=i},"enter-end":i=>{e._x_transition.enter.end=i},leave:i=>{e._x_transition.leave.during=i},"leave-start":i=>{e._x_transition.leave.start=i},"leave-end":i=>{e._x_transition.leave.end=i}}[r](t)}function Ii(e,t,r){zr(e,He);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);t.includes("in")&&!n&&(t=t.filter((v,y)=>y<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((v,y)=>y>t.indexOf("out")));let a=!t.includes("opacity")&&!t.includes("scale"),s=a||t.includes("opacity"),u=a||t.includes("scale"),l=s?0:1,f=u?ve(t,"scale",95)/100:1,m=ve(t,"delay",0),b=ve(t,"origin","center"),I="opacity, transform",E=ve(t,"duration",150)/1e3,se=ve(t,"duration",75)/1e3,d="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:b,transitionDelay:m,transitionProperty:I,transitionDuration:`${E}s`,transitionTimingFunction:d},e._x_transition.enter.start={opacity:l,transform:`scale(${f})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:b,transitionDelay:m,transitionProperty:I,transitionDuration:`${se}s`,transitionTimingFunction:d},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:l,transform:`scale(${f})`})}function zr(e,t,r={}){e._x_transition||(e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Et(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Et(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(t){e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):o():e._x_transition?e._x_transition.in(r):o();return}e._x_hidePromise=e._x_transition?new Promise((a,s)=>{e._x_transition.out(()=>{},()=>a(n)),e._x_transitioning.beforeCancel(()=>s({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let a=Vr(e);a?(a._x_hideChildren||(a._x_hideChildren=[]),a._x_hideChildren.push(e)):i(()=>{let s=u=>{let l=Promise.all([u._x_hidePromise,...(u._x_hideChildren||[]).map(s)]).then(([f])=>f());return delete u._x_hidePromise,delete u._x_hideChildren,l};s(e).catch(u=>{if(!u.isFromCancelledTransition)throw u})})})};function Vr(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:Vr(t)}function Et(e,t,{during:r,start:n,end:i}={},o=()=>{},a=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),a();return}let s,u,l;Bi(e,{start(){s=t(e,n)},during(){u=t(e,r)},before:o,end(){s(),l=t(e,i)},after:a,cleanup(){u(),l()}})}function Bi(e,t){let r,n,i,o=wt(()=>{T(()=>{r=!0,n||t.before(),i||(t.end(),yt()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(a){this.beforeCancels.push(a)},cancel:wt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},T(()=>{t.start(),t.during()}),Ci(),requestAnimationFrame(()=>{if(r)return;let a=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,s=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;a===0&&(a=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),T(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{r||(T(()=>{t.end()}),yt(),setTimeout(e._x_transitioning.finish,a+s),i=!0)})})}function ve(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n||t==="scale"&&isNaN(n))return r;if(t==="duration"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}var At=!1;function qe(e,t=()=>{}){return(...r)=>At?t(...r):e(...r)}function Di(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),At=!0,ji(()=>{Fi(t)}),At=!1}function Fi(e){let t=!1;X(e,(n,i)=>{ie(n,(o,a)=>{if(t&&Mi(o))return a();t=!0,i(o,a)})})}function ji(e){let t=Se;sr((r,n)=>{let i=t(r);return Fe(i),()=>{}}),e(),sr(t)}function Wr(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=de({})),e._x_bindings[t]=r,t=n.includes("camel")?Ui(t):t,t){case"value":Ki(e,r);break;case"style":qi(e,r);break;case"class":Hi(e,r);break;default:zi(e,t,r);break}}function Ki(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=cr(e.value,t));else if(e.type==="checkbox")Number.isInteger(t)?e.value=t:!Number.isInteger(t)&&!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(r=>cr(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")Wi(e,t);else{if(e.value===t)return;e.value=t}}function Hi(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Dt(e,t)}function qi(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=He(e,t)}function zi(e,t,r){[null,void 0,!1].includes(r)&&Gi(t)?e.removeAttribute(t):(Ur(t)&&(r=t),Vi(e,t,r))}function Vi(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function Wi(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function Ui(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function cr(e,t){return e==t}function Ur(e){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}function Gi(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Yi(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];let n=e.getAttribute(t);return n===null?typeof r=="function"?r():r:n===""?!0:Ur(t)?!![t,"true"].includes(n):n}function Gr(e,t){var r;return function(){var n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function Yr(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function Xi(e){e(Oe)}var ee={},fr=!1;function Ji(e,t){if(fr||(ee=de(ee),fr=!0),t===void 0)return ee[e];ee[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&ee[e].init(),Er(ee[e])}function Zi(){return ee}var Xr={};function Qi(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?Jr(e,r()):Xr[e]=r}function eo(e){return Object.entries(Xr).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function Jr(e,t,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(t).map(([a,s])=>({name:a,value:s})),o=Mr(i);i=i.map(a=>o.find(s=>s.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),$t(e,i,r).map(a=>{n.push(a.runCleanups),a()})}var Zr={};function to(e,t){Zr[e]=t}function ro(e,t){return Object.entries(Zr).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var no={get reactive(){return de},get release(){return Fe},get effect(){return Se},get raw(){return hr},version:"3.10.5",flushAndStopDeferringMutations:mi,dontAutoEvaluateFunctions:gi,disableEffectScheduling:ii,setReactivityEngine:oi,closestDataStack:le,skipDuringClone:qe,addRootSelector:Hr,addInitSelector:qr,addScopeToNode:Te,deferMutations:pi,mapAttributes:Pt,evaluateLater:k,setEvaluator:vi,mergeProxies:Ce,findClosest:Ke,closestRoot:je,interceptor:Ar,transition:Et,setStyles:He,mutateDom:T,directive:A,throttle:Yr,debounce:Gr,evaluate:ue,initTree:X,nextTick:Dr,prefixed:pe,prefix:wi,plugin:Xi,magic:K,store:Ji,start:Oi,clone:Di,bound:Yi,$data:wr,data:to,bind:Qi},Oe=no;function Qr(e,t){let r=Object.create(null),n=e.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return t?i=>!!r[i.toLowerCase()]:i=>!!r[i]}var io="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",$a=Qr(io+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),oo=Object.freeze({}),Pa=Object.freeze([]),en=Object.assign,ao=Object.prototype.hasOwnProperty,ze=(e,t)=>ao.call(e,t),re=Array.isArray,Ee=e=>tn(e)==="[object Map]",so=e=>typeof e=="string",Ft=e=>typeof e=="symbol",Ve=e=>e!==null&&typeof e=="object",uo=Object.prototype.toString,tn=e=>uo.call(e),rn=e=>tn(e).slice(8,-1),jt=e=>so(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,We=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},lo=/-(\w)/g,Ia=We(e=>e.replace(lo,(t,r)=>r?r.toUpperCase():"")),co=/\B([A-Z])/g,Ba=We(e=>e.replace(co,"-$1").toLowerCase()),nn=We(e=>e.charAt(0).toUpperCase()+e.slice(1)),Da=We(e=>e?`on${nn(e)}`:""),on=(e,t)=>e!==t&&(e===e||t===t),St=new WeakMap,be=[],z,ne=Symbol("iterate"),Tt=Symbol("Map key iterate");function fo(e){return e&&e._isEffect===!0}function po(e,t=oo){fo(e)&&(e=e.raw);let r=_o(e,t);return t.lazy||r(),r}function mo(e){e.active&&(an(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var ho=0;function _o(e,t){let r=function(){if(!r.active)return e();if(!be.includes(r)){an(r);try{return vo(),be.push(r),z=r,e()}finally{be.pop(),sn(),z=be[be.length-1]}}};return r.id=ho++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function an(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var fe=!0,Kt=[];function go(){Kt.push(fe),fe=!1}function vo(){Kt.push(fe),fe=!0}function sn(){let e=Kt.pop();fe=e===void 0?!0:e}function j(e,t,r){if(!fe||z===void 0)return;let n=St.get(e);n||St.set(e,n=new Map);let i=n.get(r);i||n.set(r,i=new Set),i.has(z)||(i.add(z),z.deps.push(i),z.options.onTrack&&z.options.onTrack({effect:z,target:e,type:t,key:r}))}function J(e,t,r,n,i,o){let a=St.get(e);if(!a)return;let s=new Set,u=f=>{f&&f.forEach(m=>{(m!==z||m.allowRecurse)&&s.add(m)})};if(t==="clear")a.forEach(u);else if(r==="length"&&re(e))a.forEach((f,m)=>{(m==="length"||m>=n)&&u(f)});else switch(r!==void 0&&u(a.get(r)),t){case"add":re(e)?jt(r)&&u(a.get("length")):(u(a.get(ne)),Ee(e)&&u(a.get(Tt)));break;case"delete":re(e)||(u(a.get(ne)),Ee(e)&&u(a.get(Tt)));break;case"set":Ee(e)&&u(a.get(ne));break}let l=f=>{f.options.onTrigger&&f.options.onTrigger({effect:f,target:e,key:r,type:t,newValue:n,oldValue:i,oldTarget:o}),f.options.scheduler?f.options.scheduler(f):f()};s.forEach(l)}var bo=Qr("__proto__,__v_isRef,__isVue"),un=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Ft)),xo=Ue(),yo=Ue(!1,!0),wo=Ue(!0),Eo=Ue(!0,!0),De={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];De[e]=function(...r){let n=x(this);for(let o=0,a=this.length;o<a;o++)j(n,"get",o+"");let i=t.apply(n,r);return i===-1||i===!1?t.apply(n,r.map(x)):i}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];De[e]=function(...r){go();let n=t.apply(this,r);return sn(),n}});function Ue(e=!1,t=!1){return function(n,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_raw"&&o===(e?t?Lo:wn:t?Ro:yn).get(n))return n;let a=re(n);if(!e&&a&&ze(De,i))return Reflect.get(De,i,o);let s=Reflect.get(n,i,o);return(Ft(i)?un.has(i):bo(i))||(e||j(n,"get",i),t)?s:Ct(s)?!a||!jt(i)?s.value:s:Ve(s)?e?En(s):Vt(s):s}}var Ao=ln(),So=ln(!0);function ln(e=!1){return function(r,n,i,o){let a=r[n];if(!e&&(i=x(i),a=x(a),!re(r)&&Ct(a)&&!Ct(i)))return a.value=i,!0;let s=re(r)&&jt(n)?Number(n)<r.length:ze(r,n),u=Reflect.set(r,n,i,o);return r===x(o)&&(s?on(i,a)&&J(r,"set",n,i,a):J(r,"add",n,i)),u}}function To(e,t){let r=ze(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&J(e,"delete",t,void 0,n),i}function Co(e,t){let r=Reflect.has(e,t);return(!Ft(t)||!un.has(t))&&j(e,"has",t),r}function Oo(e){return j(e,"iterate",re(e)?"length":ne),Reflect.ownKeys(e)}var cn={get:xo,set:Ao,deleteProperty:To,has:Co,ownKeys:Oo},fn={get:wo,set(e,t){return console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},Fa=en({},cn,{get:yo,set:So}),ja=en({},fn,{get:Eo}),Ht=e=>Ve(e)?Vt(e):e,qt=e=>Ve(e)?En(e):e,zt=e=>e,Ge=e=>Reflect.getPrototypeOf(e);function Ye(e,t,r=!1,n=!1){e=e.__v_raw;let i=x(e),o=x(t);t!==o&&!r&&j(i,"get",t),!r&&j(i,"get",o);let{has:a}=Ge(i),s=n?zt:r?qt:Ht;if(a.call(i,t))return s(e.get(t));if(a.call(i,o))return s(e.get(o));e!==i&&e.get(t)}function Xe(e,t=!1){let r=this.__v_raw,n=x(r),i=x(e);return e!==i&&!t&&j(n,"has",e),!t&&j(n,"has",i),e===i?r.has(e):r.has(e)||r.has(i)}function Je(e,t=!1){return e=e.__v_raw,!t&&j(x(e),"iterate",ne),Reflect.get(e,"size",e)}function dn(e){e=x(e);let t=x(this);return Ge(t).has.call(t,e)||(t.add(e),J(t,"add",e,e)),this}function pn(e,t){t=x(t);let r=x(this),{has:n,get:i}=Ge(r),o=n.call(r,e);o?xn(r,n,e):(e=x(e),o=n.call(r,e));let a=i.call(r,e);return r.set(e,t),o?on(t,a)&&J(r,"set",e,t,a):J(r,"add",e,t),this}function mn(e){let t=x(this),{has:r,get:n}=Ge(t),i=r.call(t,e);i?xn(t,r,e):(e=x(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,a=t.delete(e);return i&&J(t,"delete",e,void 0,o),a}function hn(){let e=x(this),t=e.size!==0,r=Ee(e)?new Map(e):new Set(e),n=e.clear();return t&&J(e,"clear",void 0,void 0,r),n}function Ze(e,t){return function(n,i){let o=this,a=o.__v_raw,s=x(a),u=t?zt:e?qt:Ht;return!e&&j(s,"iterate",ne),a.forEach((l,f)=>n.call(i,u(l),u(f),o))}}function $e(e,t,r){return function(...n){let i=this.__v_raw,o=x(i),a=Ee(o),s=e==="entries"||e===Symbol.iterator&&a,u=e==="keys"&&a,l=i[e](...n),f=r?zt:t?qt:Ht;return!t&&j(o,"iterate",u?Tt:ne),{next(){let{value:m,done:b}=l.next();return b?{value:m,done:b}:{value:s?[f(m[0]),f(m[1])]:f(m),done:b}},[Symbol.iterator](){return this}}}}function Y(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${nn(e)} operation ${r}failed: target is readonly.`,x(this))}return e==="delete"?!1:this}}var _n={get(e){return Ye(this,e)},get size(){return Je(this)},has:Xe,add:dn,set:pn,delete:mn,clear:hn,forEach:Ze(!1,!1)},gn={get(e){return Ye(this,e,!1,!0)},get size(){return Je(this)},has:Xe,add:dn,set:pn,delete:mn,clear:hn,forEach:Ze(!1,!0)},vn={get(e){return Ye(this,e,!0)},get size(){return Je(this,!0)},has(e){return Xe.call(this,e,!0)},add:Y("add"),set:Y("set"),delete:Y("delete"),clear:Y("clear"),forEach:Ze(!0,!1)},bn={get(e){return Ye(this,e,!0,!0)},get size(){return Je(this,!0)},has(e){return Xe.call(this,e,!0)},add:Y("add"),set:Y("set"),delete:Y("delete"),clear:Y("clear"),forEach:Ze(!0,!0)},Mo=["keys","values","entries",Symbol.iterator];Mo.forEach(e=>{_n[e]=$e(e,!1,!1),vn[e]=$e(e,!0,!1),gn[e]=$e(e,!1,!0),bn[e]=$e(e,!0,!0)});function Qe(e,t){let r=t?e?bn:gn:e?vn:_n;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(ze(r,i)&&i in n?r:n,i,o)}var ko={get:Qe(!1,!1)},Ka={get:Qe(!1,!0)},No={get:Qe(!0,!1)},Ha={get:Qe(!0,!0)};function xn(e,t,r){let n=x(r);if(n!==r&&t.call(e,n)){let i=rn(e);console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var yn=new WeakMap,Ro=new WeakMap,wn=new WeakMap,Lo=new WeakMap;function $o(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Po(e){return e.__v_skip||!Object.isExtensible(e)?0:$o(rn(e))}function Vt(e){return e&&e.__v_isReadonly?e:An(e,!1,cn,ko,yn)}function En(e){return An(e,!0,fn,No,wn)}function An(e,t,r,n,i){if(!Ve(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;let o=i.get(e);if(o)return o;let a=Po(e);if(a===0)return e;let s=new Proxy(e,a===2?n:r);return i.set(e,s),s}function x(e){return e&&x(e.__v_raw)||e}function Ct(e){return Boolean(e&&e.__v_isRef===!0)}K("nextTick",()=>Dr);K("dispatch",e=>we.bind(we,e));K("watch",(e,{evaluateLater:t,effect:r})=>(n,i)=>{let o=t(n),a=!0,s,u=r(()=>o(l=>{JSON.stringify(l),a?s=l:queueMicrotask(()=>{i(l,s),s=l}),a=!1}));e._x_effects.delete(u)});K("store",Zi);K("data",e=>wr(e));K("root",e=>je(e));K("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Ce(Io(e))),e._x_refs_proxy));function Io(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var ft={};function Sn(e){return ft[e]||(ft[e]=0),++ft[e]}function Bo(e,t){return Ke(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function Do(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Sn(t))}K("id",e=>(t,r=null)=>{let n=Bo(e,t),i=n?n._x_ids[t]:Sn(t);return r?`${t}-${i}-${r}`:`${t}-${i}`});K("el",e=>e);Tn("Focus","focus","focus");Tn("Persist","persist","persist");function Tn(e,t,r){K(t,n=>ce(`You can't use [$${directiveName}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}A("modelable",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t),o=()=>{let l;return i(f=>l=f),l},a=n(`${t} = __placeholder`),s=l=>a(()=>{},{scope:{__placeholder:l}}),u=o();s(u),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let l=e._x_model.get,f=e._x_model.set;r(()=>s(l())),r(()=>f(o()))})});A("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&ce("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||ce(`Cannot find x-teleport element for selector: "${t}"`);let i=e.content.cloneNode(!0).firstElementChild;e._x_teleport=i,i._x_teleportBack=e,e._x_forwardEvents&&e._x_forwardEvents.forEach(o=>{i.addEventListener(o,a=>{a.stopPropagation(),e.dispatchEvent(new a.constructor(a.type,a))})}),Te(i,{},e),T(()=>{n.appendChild(i),X(i),i._x_ignore=!0}),r(()=>i.remove())});var Cn=()=>{};Cn.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};A("ignore",Cn);A("effect",(e,{expression:t},{effect:r})=>r(k(e,t)));function On(e,t,r,n){let i=e,o=u=>n(u),a={},s=(u,l)=>f=>l(u,f);if(r.includes("dot")&&(t=Fo(t)),r.includes("camel")&&(t=jo(t)),r.includes("passive")&&(a.passive=!0),r.includes("capture")&&(a.capture=!0),r.includes("window")&&(i=window),r.includes("document")&&(i=document),r.includes("prevent")&&(o=s(o,(u,l)=>{l.preventDefault(),u(l)})),r.includes("stop")&&(o=s(o,(u,l)=>{l.stopPropagation(),u(l)})),r.includes("self")&&(o=s(o,(u,l)=>{l.target===e&&u(l)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=s(o,(u,l)=>{e.contains(l.target)||l.target.isConnected!==!1&&(e.offsetWidth<1&&e.offsetHeight<1||e._x_isShown!==!1&&u(l))})),r.includes("once")&&(o=s(o,(u,l)=>{u(l),i.removeEventListener(t,o,a)})),o=s(o,(u,l)=>{Ho(t)&&qo(l,r)||u(l)}),r.includes("debounce")){let u=r[r.indexOf("debounce")+1]||"invalid-wait",l=Ot(u.split("ms")[0])?Number(u.split("ms")[0]):250;o=Gr(o,l)}if(r.includes("throttle")){let u=r[r.indexOf("throttle")+1]||"invalid-wait",l=Ot(u.split("ms")[0])?Number(u.split("ms")[0]):250;o=Yr(o,l)}return i.addEventListener(t,o,a),()=>{i.removeEventListener(t,o,a)}}function Fo(e){return e.replace(/-/g,".")}function jo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ot(e){return!Array.isArray(e)&&!isNaN(e)}function Ko(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Ho(e){return["keydown","keyup"].includes(e)}function qo(e,t){let r=t.filter(o=>!["window","document","prevent","stop","once"].includes(o));if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Ot((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&dr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter(o=>r.includes(o));return r=r.filter(o=>!i.includes(o)),!(i.length>0&&i.filter(a=>((a==="cmd"||a==="super")&&(a="meta"),e[`${a}Key`])).length===i.length&&dr(e.key).includes(r[0]))}function dr(e){if(!e)return[];e=Ko(e);let t={ctrl:"control",slash:"/",space:"-",spacebar:"-",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",equal:"="};return t[e]=e,Object.keys(t).map(r=>{if(t[r]===e)return r}).filter(r=>r)}A("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=k(e,r),a=`${r} = rightSideOfExpression($event, ${r})`,s=k(e,a);var u=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let l=zo(e,t,r),f=On(e,u,t,b=>{s(()=>{},{scope:{$event:b,rightSideOfExpression:l}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=f,i(()=>e._x_removeModelListeners.default());let m=k(e,`${r} = __placeholder`);e._x_model={get(){let b;return o(I=>b=I),b},set(b){m(()=>{},{scope:{__placeholder:b}})}},e._x_forceModelUpdate=()=>{o(b=>{b===void 0&&r.match(/\./)&&(b=""),window.fromModel=!0,T(()=>Wr(e,"value",b)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function zo(e,t,r){return e.type==="radio"&&T(()=>{e.hasAttribute("name")||e.setAttribute("name",r)}),(n,i)=>T(()=>{if(n instanceof CustomEvent&&n.detail!==void 0)return n.detail||n.target.value;if(e.type==="checkbox")if(Array.isArray(i)){let o=t.includes("number")?dt(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(a=>!Vo(a,o))}else return n.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(o=>{let a=o.value||o.text;return dt(a)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?dt(o):t.includes("trim")?o.trim():o}}})}function dt(e){let t=e?parseFloat(e):null;return Wo(t)?t:e}function Vo(e,t){return e==t}function Wo(e){return!Array.isArray(e)&&!isNaN(e)}A("cloak",e=>queueMicrotask(()=>T(()=>e.removeAttribute(pe("cloak")))));qr(()=>`[${pe("init")}]`);A("init",qe((e,{expression:t},{evaluate:r})=>typeof t=="string"?!!t.trim()&&r(t,{},!1):r(t,{},!1)));A("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{T(()=>{e.textContent=o})})})});A("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{T(()=>{e.innerHTML=o,e._x_ignoreSelf=!0,X(e),delete e._x_ignoreSelf})})})});Pt(Rr(":",Lr(pe("bind:"))));A("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let s={};eo(s),k(e,n)(l=>{Jr(e,l,i)},{scope:s});return}if(t==="key")return Uo(e,n);let a=k(e,n);o(()=>a(s=>{s===void 0&&typeof n=="string"&&n.match(/\./)&&(s=""),T(()=>Wr(e,t,s,r))}))});function Uo(e,t){e._x_keyExpression=t}Hr(()=>`[${pe("data")}]`);A("data",qe((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};gt(n,e);let i={};ro(i,n);let o=ue(e,t,{scope:i});o===void 0&&(o={}),gt(o,e);let a=de(o);Er(a);let s=Te(e,a);a.init&&ue(e,a.init),r(()=>{a.destroy&&ue(e,a.destroy),s()})}));A("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=k(e,r);e._x_doHide||(e._x_doHide=()=>{T(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{T(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let o=()=>{e._x_doHide(),e._x_isShown=!1},a=()=>{e._x_doShow(),e._x_isShown=!0},s=()=>setTimeout(a),u=wt(m=>m?a():o(),m=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,m,a,o):m?s():o()}),l,f=!0;n(()=>i(m=>{!f&&m===l||(t.includes("immediate")&&(m?s():o()),u(m),l=m,f=!1)}))});A("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=Yo(t),o=k(e,i.items),a=k(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>Go(e,i,o,a)),n(()=>{Object.values(e._x_lookup).forEach(s=>s.remove()),delete e._x_prevKeys,delete e._x_lookup})});function Go(e,t,r,n){let i=a=>typeof a=="object"&&!Array.isArray(a),o=e;r(a=>{Xo(a)&&a>=0&&(a=Array.from(Array(a).keys(),d=>d+1)),a===void 0&&(a=[]);let s=e._x_lookup,u=e._x_prevKeys,l=[],f=[];if(i(a))a=Object.entries(a).map(([d,v])=>{let y=pr(t,v,d,a);n(O=>f.push(O),{scope:g({index:d},y)}),l.push(y)});else for(let d=0;d<a.length;d++){let v=pr(t,a[d],d,a);n(y=>f.push(y),{scope:g({index:d},v)}),l.push(v)}let m=[],b=[],I=[],E=[];for(let d=0;d<u.length;d++){let v=u[d];f.indexOf(v)===-1&&I.push(v)}u=u.filter(d=>!I.includes(d));let se="template";for(let d=0;d<f.length;d++){let v=f[d],y=u.indexOf(v);if(y===-1)u.splice(d,0,v),m.push([se,d]);else if(y!==d){let O=u.splice(d,1)[0],L=u.splice(y-1,1)[0];u.splice(d,0,L),u.splice(y,0,O),b.push([O,L])}else E.push(v);se=v}for(let d=0;d<I.length;d++){let v=I[d];s[v]._x_effects&&s[v]._x_effects.forEach(mr),s[v].remove(),s[v]=null,delete s[v]}for(let d=0;d<b.length;d++){let[v,y]=b[d],O=s[v],L=s[y],G=document.createElement("div");T(()=>{L.after(G),O.after(L),L._x_currentIfEl&&L.after(L._x_currentIfEl),G.before(O),O._x_currentIfEl&&O.after(O._x_currentIfEl),G.remove()}),ur(L,l[f.indexOf(y)])}for(let d=0;d<m.length;d++){let[v,y]=m[d],O=v==="template"?o:s[v];O._x_currentIfEl&&(O=O._x_currentIfEl);let L=l[y],G=f[y],F=document.importNode(o.content,!0).firstElementChild;Te(F,de(L),o),T(()=>{O.after(F),X(F)}),typeof G=="object"&&ce("x-for key cannot be an object, it must be a string or an integer",o),s[G]=F}for(let d=0;d<E.length;d++)ur(s[E[d]],l[f.indexOf(E[d])]);o._x_prevKeys=f})}function Yo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let a=i[1].replace(r,"").trim(),s=a.match(t);return s?(o.item=a.replace(t,"").trim(),o.index=s[1].trim(),s[2]&&(o.collection=s[2].trim())):o.item=a,o}function pr(e,t,r,n){let i={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(a=>a.trim()).forEach((a,s)=>{i[a]=t[s]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(a=>a.trim()).forEach(a=>{i[a]=t[a]}):i[e.item]=t,e.index&&(i[e.index]=r),e.collection&&(i[e.collection]=n),i}function Xo(e){return!Array.isArray(e)&&!isNaN(e)}function Mn(){}Mn.inline=(e,{expression:t},{cleanup:r})=>{let n=je(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};A("ref",Mn);A("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=k(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let s=e.content.cloneNode(!0).firstElementChild;return Te(s,{},e),T(()=>{e.after(s),X(s)}),e._x_currentIfEl=s,e._x_undoIf=()=>{ie(s,u=>{u._x_effects&&u._x_effects.forEach(mr)}),s.remove(),delete e._x_currentIfEl},s},a=()=>{e._x_undoIf&&(e._x_undoIf(),delete e._x_undoIf)};r(()=>i(s=>{s?o():a()})),n(()=>e._x_undoIf&&e._x_undoIf())});A("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach(i=>Do(e,i))});Pt(Rr("@",Lr(pe("on:"))));A("on",qe((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?k(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let a=On(e,t,r,s=>{o(()=>{},{scope:{$event:s},params:[s]})});i(()=>a())}));et("Collapse","collapse","collapse");et("Intersect","intersect","intersect");et("Focus","trap","focus");et("Mask","mask","mask");function et(e,t,r){A(t,n=>ce(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}Oe.setEvaluator(Cr);Oe.setReactivityEngine({reactive:Vt,effect:po,release:mo,raw:x});var Jo=Oe,Wt=Jo;var Zo=class{constructor(e){ut(this,"el");ut(this,"traversals",{first:"firstElementChild",next:"nextElementSibling",parent:"parentElement"});this.el=e}nodes(){return this.traversals={first:"firstChild",next:"nextSibling",parent:"parentNode"},this}first(){return this.teleportTo(this.el[this.traversals.first])}next(){return this.teleportTo(this.teleportBack(this.el[this.traversals.next]))}before(e){return this.el[this.traversals.parent].insertBefore(e,this.el),e}replace(e){return this.el[this.traversals.parent].replaceChild(e,this.el),e}append(e){return this.el.appendChild(e),e}teleportTo(e){return e&&(e._x_teleport?e._x_teleport:e)}teleportBack(e){return e&&(e._x_teleportBack?e._x_teleportBack:e)}};function C(e){return new Zo(e)}function Qo(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function ea(e){return e.nodeType===3||e.nodeType===8}var kn=()=>{},Nn=()=>{};async function Ut(e,t,r){let n,i,o,a,s,u,l,f,m,b,I;function E(c){if(I)return Nn((c||"").replace(`
6
+ `,"\\n"),n,i),new Promise(p=>kn=()=>p())}function se(c={}){let p=B=>B.getAttribute("key"),h=()=>{};s=c.updating||h,u=c.updated||h,l=c.removing||h,f=c.removed||h,m=c.adding||h,b=c.added||h,o=c.key||p,a=c.lookahead||!1,I=c.debug||!1}async function d(c,p){if(v(c,p)){let B=y(c,p);return await E("Swap elements"),B}let h=!1;if(!me(s,c,p,()=>h=!0)){if(window.Alpine&&ta(c,p,()=>h=!0),ea(p)){await O(c,p),u(c,p);return}h||await L(c,p),u(c,p),await G(c,p)}}function v(c,p){return c.nodeType!=p.nodeType||c.nodeName!=p.nodeName||F(c)!=F(p)}function y(c,p){if(me(l,c))return;let h=p.cloneNode(!0);me(m,h)||(C(c).replace(h),f(c),b(h))}async function O(c,p){let h=p.nodeValue;c.nodeValue!==h&&(c.nodeValue=h,await E("Change text node to: "+h))}async function L(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let h=Array.from(c.attributes),B=Array.from(p.attributes);for(let W=h.length-1;W>=0;W--){let H=h[W].name;p.hasAttribute(H)||(c.removeAttribute(H),await E("Remove attribute"))}for(let W=B.length-1;W>=0;W--){let H=B[W].name,w=B[W].value;c.getAttribute(H)!==w&&(c.setAttribute(H,w),await E(`Set [${H}] attribute to: "${w}"`))}}async function G(c,p){let h=c.childNodes,B=p.childNodes,W=nr(B),H=nr(h),w=C(p).nodes().first(),_=C(c).nodes().first(),Q={};for(;w;){let $=F(w),q=F(_);if(!_)if($&&Q[$]){let P=Q[$];C(c).append(P),_=P,await E("Add element (from key)")}else{let P=Wn(w,c)||{};await E("Add element: "+(P.outerHTML||P.nodeValue)),w=C(w).nodes().next();continue}if(a){let P=C(w).next(),ir=!1;for(;!ir&&P;)_.isEqualNode(P)&&(ir=!0,_=ot(w,_),q=F(_),await E("Move element (lookahead)")),P=C(P).next()}if($!==q){if(!$&&q){Q[q]=_,_=ot(w,_),Q[q].remove(),_=C(_).nodes().next(),w=C(w).nodes().next(),await E('No "to" key');continue}if($&&!q&&H[$]&&(_=C(_).replace(H[$]),await E('No "from" key')),$&&q){Q[q]=_;let P=H[$];if(P)_=C(_).replace(P),await E('Move "from" key');else{Q[q]=_,_=ot(w,_),Q[q].remove(),_=C(_).next(),w=C(w).next(),await E("Swap elements with keys");continue}}}let Un=_&&C(_).nodes().next();await d(_,w),w=w&&C(w).nodes().next(),_=Un}let at=[];for(;_;)me(l,_)||at.push(_),_=C(_).nodes().next();for(;at.length;){let $=at.shift();$.remove(),await E("remove el"),f($)}}function F(c){return c&&c.nodeType===1&&o(c)}function nr(c){let p={};return c.forEach(h=>{let B=F(h);B&&(p[B]=h)}),p}function Wn(c,p){if(!me(m,c)){let h=c.cloneNode(!0);return C(p).append(h),b(h),h}return null}function ot(c,p){if(!me(m,c)){let h=c.cloneNode(!0);return C(p).before(h),b(h),h}return p}return se(r),n=e,i=Qo(t),window.Alpine&&window.Alpine.closestDataStack&&!e._x_dataStack&&(i._x_dataStack=window.Alpine.closestDataStack(e),i._x_dataStack&&window.Alpine.clone(e,i)),await E(),await d(e,i),n=void 0,i=void 0,e}Ut.step=()=>kn();Ut.log=e=>{Nn=e};function me(e,...t){let r=!1;return e(...t,()=>r=!0),r}function ta(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function ra(e){e.morph=Ut}var Rn=ra;Wt.plugin(Rn);var na=/INPUT/i,ia=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,oa=/TEXTAREA/i;function aa(e,t,r,n){if(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)return;if(e.tagName.match(oa)||e.tagName.match(na)&&e.getAttribute("type").match(ia))return n()}function sa(e,t){e.forEach(r=>Wt.morph(r,t,{updating:aa}))}var Ln=sa;function ua(e,t,r){if(e.match(/^dispatch(Event)?$/))return ar(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Ln(r,t[0]);if(e.endsWith("="))return r.forEach(n=>n[e.slice(0,-1).trim()]=t[0]);r.forEach(n=>n[e].apply(n,t))}function la(){let e=JSON.parse(this.templateContent.textContent),{id:t,selector:r,receiver:n,method:i,args:o}=e,a=[self];r&&(a=Array.from(document.querySelectorAll(r))),n&&(a=a.map(s=>{let u=s,l=n.split(".");for(;l.length>0;)u=u[l.shift()];return u})),ua(i,o,a)}var Gt=la;if(!self.Turbo)throw new Error("`Turbo` is not defined! Be sure to import `@turbo-boost/streams` after `@hotwired/turbo` or `@hotwired/turbo-rails`.");if(!Turbo.StreamActions)throw new Error("`Turbo.StreamActions` is not defined! Verify that you are running >= `7.2.0` of `@hotwired/turbo`.");Turbo.StreamActions.invoke=Gt;self.TurboBoost=self.TurboBoost||{};self.TurboBoost.Streams={invoke:Gt};console.info("@turbo-boost/streams has initialized and registered new stream actions with Turbo.");var Yt=class{get element(){return document.querySelector('meta[name="turbo-boost"]')}get token(){return this.element.getAttribute("content")}get busy(){return this.element.dataset.busy==="true"}set busy(t){return this.element.dataset.busy=!!t}},S=new Yt;var N={start:"turbo-boost:command:start",success:"turbo-boost:command:success",finish:"turbo-boost:command:finish",abort:"turbo-boost:command:abort",clientError:"turbo-boost:command:client-error",serverError:"turbo-boost:command:server-error"},V={stateLoad:"turbo-boost:state:load",stateChange:"turbo-boost:state:change"},U=g(g({},N),V);function M(e,t,r={}){r=r||{},r.detail=r.detail||{},t=t||document;let n=new CustomEvent(e,R(g({},r),{bubbles:!0}));return t.dispatchEvent(n),n}var Xt;function tt(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],M(V.stateChange,S.element,{detail:{state:Xt}}),!0},set(n,i,o,a){return n[i]=tt(o,this),M(V.stateChange,S.element,{detail:{state:Xt}}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=tt(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=tt(i,r);return t||(Xt=r),r}var $n=tt;var Jt,he,Me,Pn;function In(){if(!S.element)return _e();let e=atob(S.element.dataset.state);Me={},he=$n(JSON.parse(e)),Jt=g({},he),delete S.element.dataset.clientStateChange,setTimeout(()=>M(V.stateLoad,S.element,{detail:{state:he}}))}function _e(){clearTimeout(Pn),Pn=setTimeout(In,10)}Jt||In();addEventListener("DOMContentLoaded",_e);addEventListener("load",_e);addEventListener("turbo:load",_e);addEventListener("turbo:frame-load",_e);addEventListener(N.success,_e);addEventListener(V.stateChange,e=>{Me={};for(let[t,r]of Object.entries(he))Jt[t]!==r&&(Me[t]=r);S.element.dataset.clientStateChange=!0,S.element.dataset.state=btoa(JSON.stringify(he))});var oe={events:V,get current(){return he},get delta(){return Me},get payloadChunks(){return btoa(JSON.stringify(Me)).match(/.{1,2000}/g)}};function ca(e){let t="<html",r="</html",n=e.indexOf(t),i=e.lastIndexOf(r);if(n>=0&&i>=0){let o=e.slice(e.indexOf(">",n)+1,i);document.documentElement.innerHTML=o}}function fa(e){document.body.insertAdjacentHTML("beforeend",e)}var ae={append:fa,replaceDocument:ca};var rt={};function da(e){rt[e.id]=e}function pa(e){delete rt[e]}var nt={add:da,remove:pa,get commands(){return[...Object.values(rt)]},get length(){return Object.keys(rt).length}};function Bn(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>M(N.finish,e.target,{detail:e.detail}),25)}addEventListener(N.serverError,Bn);addEventListener(N.success,Bn);addEventListener(N.finish,e=>nt.remove(e.detail.id),!0);var ke={events:N};var Zt={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:r}=e.detail;if(S.busy){let n=["text/vnd.turbo-boost.html",r.headers.Accept];n=n.filter(i=>i&&i.trim().length>0).join(", "),r.headers.Accept=n,r.headers["TurboBoost-Token"]=S.token}oe.payloadChunks.forEach((n,i)=>{r.headers[`TurboBoost-State-${i.toString().padStart(4,"0")}`]=n})});addEventListener("turbo:before-fetch-response",e=>{let t=e.target.closest("turbo-frame"),{fetchResponse:r}=e.detail;if(t&&(Zt[t.id]=t.src),r.header("TurboBoost")){if(r.statusCode<200||r.statusCode>399){let n=`Server returned a ${r.statusCode} status code! TurboBoost Commands require 2XX-3XX status codes.`;M(ke.events.clientError,document,{detail:R(g({},e.detail),{error:n})},!0)}r.header("TurboBoost")==="Append"&&(e.preventDefault(),r.responseText.then(n=>ae.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboBoostSrc=Zt[t.id]||t.src||t.dataset.turboBoostSrc,delete Zt[t.id]});var ma={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",commandAttribute:"data-turbo-command"},D=g({},ma);var it={},Dn;function ha(e,t){it[e]=t,document.addEventListener(e,Dn,!0)}function _a(e){return Object.keys(it).find(t=>!!it[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function ga(e,t){return e===_a(t)}var Z={events:it,register:ha,isRegisteredForElement:ga,set handler(e){Dn=e}};function va(e){return e.closest(`[${D.commandAttribute}]`)}function ba(e){return e.closest("turbo-frame")}function xa(e,t={}){if(e.tagName.toLowerCase()!=="select")return t.value=e.value||null;if(!e.multiple)return t.value=e.options[e.selectedIndex].value;t.values=Array.from(e.options).reduce((r,n)=>(n.selected&&r.push(n.value),r),[])}function ya(e){let t=Array.from(e.attributes).reduce((r,n)=>{let i=n.value;return r[n.name]=i,r},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,xa(e,t),delete t.class,delete t.action,delete t.href,delete t[D.commandAttribute],delete t[D.frameAttribute],t}var Ne={buildAttributePayload:ya,findClosestCommand:va,findClosestFrame:ba};function wa(e,t={}){t.token=S.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_boost_command",r.value=JSON.stringify(t),e.appendChild(r)}var Fn={invokeCommand:wa};function Ea(e,t={}){let r=document.createElement("a");r.href=e;let n=new URL(r);return n.searchParams.set("turbo_boost_command",JSON.stringify(t)),n}var ge={build:Ea};function Aa(e,t){let r=t.src;t=g({},t),delete t.src,e.src=ge.build(r,t)}var Qt={invokeCommand:Aa};function Sa(e,t={}){let r=t.src;t=g({},t),delete t.src,delete t.href,e.setAttribute("href",ge.build(r,t))}var jn={invokeCommand:Sa};function Ta(e){let t=e.target;M(ke.events.abort,document,{detail:R(g({},e.detail),{xhr:t})})}function er(e){let t=e.target;t.getResponseHeader("TurboBoost")==="Append"?ae.append(t.responseText):ae.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboBoost Commands require 2XX-3XX status codes.`;M(ke.events.clientError,document,{detail:R(g({},e.detail),{error:r,xhr:t})},!0)}function Ca(e){let t=e.target;if(t.status<200||t.status>399)return er(e);let r=t.responseText;t.getResponseHeader("TurboBoost")==="Append"?ae.append(t.responseText):ae.replaceDocument(t.responseText)}function Oa(e){let t=e.src;e=g({},e),delete e.src;try{let r=new XMLHttpRequest;r.open("GET",ge.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-boost.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboBoost-Token",S.token),oe.payloadChunks.forEach((n,i)=>r.setRequestHeader(`TurboBoost-State-${i.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",Ta),r.addEventListener("error",er),r.addEventListener("load",Ca),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;er(r,{detail:{message:n}})}}var Kn={invokeCommand:Oa};function tr(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboBoostSrc||location.href}function Ma(e){let t=Ne.findClosestFrame(e),{turboFrame:r,turboMethod:n}=e.dataset;return e.tagName.toLowerCase()==="form"?{name:"form",reason:"Element is a form.",frame:t,src:e.action,invokeCommand:Fn.invokeCommand}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeCommand:jn.invokeCommand}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:tr(e,t),invokeCommand:Qt.invokeCommand}):(!r||r==="_self")&&t?{name:"frame",reason:"element does NOT target a frame or targets _self and is contained by a frame",frame:t,src:tr(e,t),invokeCommand:Qt.invokeCommand}:{name:"window",reason:"element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)",frame:null,src:tr(e),invokeCommand:Kn.invokeCommand}}var rr={find:Ma};var Re="unknown",Hn={debug:Object.values(U),info:Object.values(U),warn:[U.abort,U.clientError,U.serverError],error:[U.clientError,U.serverError],unknown:[]};Object.values(U).forEach(e=>{addEventListener(e,t=>{Hn[Re].includes(t.type)&&console[Re==="debug"?"log":Re](t.type,{target:t.target,detail:t.detail})})});var qn={get level(){return Re},set level(e){return Object.keys(Hn).includes(e)||(e="unknown"),Re=e}};function ka(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var zn={v4:ka};function Vn(e,t){return{id:e,name:t.getAttribute(D.commandAttribute),elementId:t.id.length>0?t.id:null,elementAttributes:Ne.buildAttributePayload(t),startedAt:new Date().getTime()}}function Na(e){let t,r={};try{if(t=Ne.findClosestCommand(e.target),!t||!Z.isRegisteredForElement(e.type,t))return;let n=`turbo-command-${zn.v4()}`,i=rr.find(t),o=R(g({},Vn(n,t)),{driver:i.name,frameId:i.frame?i.frame.id:null,src:i.src}),a=M(N.start,t,{cancelable:!0,detail:o});if(a.defaultPrevented)return M(N.abort,t,{detail:{message:`An event handler for '${N.start}' prevented default behavior and blocked command invocation!`,source:a}});switch(i=rr.find(t),o=R(g({},Vn(n,t)),{driver:i.name,frameId:i.frame?i.frame.id:null,src:i.src}),nt.add(o),["frame","window"].includes(i.name)&&e.preventDefault(),S.busy=!0,setTimeout(()=>S.busy=!1,10),i.name){case"method":return i.invokeCommand(t,o);case"form":return i.invokeCommand(t,o);case"frame":return i.invokeCommand(i.frame,o);case"window":return i.invokeCommand(o)}}catch(n){M(N.clientError,t,{detail:R(g({},r),{error:n})})}}Z.handler=Na;Z.register("change",[`input[${D.commandAttribute}]`,`select[${D.commandAttribute}]`,`textarea[${D.commandAttribute}]`]);Z.register("submit",[`form[${D.commandAttribute}]`]);Z.register("click",[`[${D.commandAttribute}]`]);self.TurboBoost=self.TurboBoost||{};self.TurboBoost=R(g({},self.TurboBoost),{stateEvents:V,get state(){return oe.current},get stateDelta(){return oe.delta}});self.TurboBoost.Commands={logger:qn,schema:D,events:N,registerEventDelegate:Z.register,get eventDelegates(){return g({},Z.events)}};var vu=self.TurboBoost.Commands;export{vu as default};
7
7
  //# sourceMappingURL=commands.js.map