turbo_reflex 0.0.30 → 0.0.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +5 -5
- data/app/assets/builds/turbo_reflex.js +3 -3
- data/app/assets/builds/turbo_reflex.js.map +3 -3
- data/app/javascript/drivers/window.js +4 -2
- data/app/javascript/events.js +7 -13
- data/app/javascript/index.js +36 -11
- data/app/javascript/lifecycle.js +4 -1
- data/app/javascript/state/index.js +3 -1
- data/app/javascript/state/observable.js +2 -2
- data/app/javascript/turbo.js +1 -1
- data/lib/turbo_reflex/engine.rb +1 -0
- data/lib/turbo_reflex/version.rb +1 -1
- data/package.json +1 -1
- data/tags +1045 -930
- data/yarn.lock +161 -161
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acf5c4f78b582fb1be1f7eea54814e3462283706997aa36d9d55fad654e50488
|
4
|
+
data.tar.gz: f525fe14b4a6ff3466a8739d1b2bea26878f4c0ca44b7f22f3beec965e36720f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99bd64c26d106a660a72d2e5eaff986e1ffc492ea52de1ca43ab349744a565b6a33760d34f86f3d37252ff44d2d6d82fb71da6399ed03a34ba79d9a51f7d9c2d
|
7
|
+
data.tar.gz: 6ab5aea273a137de2ae417e8b212d5da27b4077156d33d1864bccce9157f12117d1159c3da48da4286b25696541a5a504e498ce5d21339d6f86c1ace6a8f6c9b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
turbo_reflex (0.0.
|
4
|
+
turbo_reflex (0.0.31)
|
5
5
|
rails (>= 6.1)
|
6
6
|
turbo-rails (>= 1.1)
|
7
7
|
turbo_ready (>= 0.1.4)
|
@@ -96,7 +96,7 @@ GEM
|
|
96
96
|
cuprite (0.14.3)
|
97
97
|
capybara (~> 3.0)
|
98
98
|
ferrum (~> 0.13.0)
|
99
|
-
date (3.3.
|
99
|
+
date (3.3.2)
|
100
100
|
erubi (1.11.0)
|
101
101
|
ferrum (0.13)
|
102
102
|
addressable (~> 2.5)
|
@@ -113,7 +113,7 @@ GEM
|
|
113
113
|
railties (>= 6.0.0)
|
114
114
|
json (2.6.3)
|
115
115
|
language_server-protocol (3.17.0.2)
|
116
|
-
loofah (2.19.
|
116
|
+
loofah (2.19.1)
|
117
117
|
crass (~> 1.0.2)
|
118
118
|
nokogiri (>= 1.5.9)
|
119
119
|
magic_frozen_string_literal (1.2.0)
|
@@ -184,8 +184,8 @@ GEM
|
|
184
184
|
rails-dom-testing (2.0.3)
|
185
185
|
activesupport (>= 4.2.0)
|
186
186
|
nokogiri (>= 1.6)
|
187
|
-
rails-html-sanitizer (1.4.
|
188
|
-
loofah (~> 2.
|
187
|
+
rails-html-sanitizer (1.4.4)
|
188
|
+
loofah (~> 2.19, >= 2.19.1)
|
189
189
|
railties (7.0.4)
|
190
190
|
actionpack (= 7.0.4)
|
191
191
|
activesupport (= 7.0.4)
|
@@ -197,7 +197,7 @@ GEM
|
|
197
197
|
rake (13.0.6)
|
198
198
|
regexp_parser (2.6.1)
|
199
199
|
rexml (3.2.5)
|
200
|
-
rouge (4.0.
|
200
|
+
rouge (4.0.1)
|
201
201
|
rubocop (1.39.0)
|
202
202
|
json (~> 2.3)
|
203
203
|
parallel (~> 1.10)
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
</h1>
|
9
9
|
<p align="center">
|
10
10
|
<a href="http://blog.codinghorror.com/the-best-code-is-no-code-at-all/">
|
11
|
-
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-
|
11
|
+
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-1268-47d299.svg" />
|
12
12
|
</a>
|
13
13
|
<a href="https://codeclimate.com/github/hopsoft/turbo_reflex/maintainability">
|
14
14
|
<img src="https://api.codeclimate.com/v1/badges/fe1162a742fe83a4fdfd/maintainability" />
|
@@ -244,19 +244,19 @@ Just specify the `data-turbo-reflex` attribute on the form.
|
|
244
244
|
```erb
|
245
245
|
# app/views/posts/post.html.erb
|
246
246
|
<%= turbo_frame_tag dom_id(@post) do %>
|
247
|
-
<%= form_with model: @post,
|
247
|
+
<%= form_with model: @post, data: { turbo_reflex: "ExampleReflex#work" } do |form| %>
|
248
248
|
...
|
249
249
|
<% end %>
|
250
250
|
<% end %>
|
251
251
|
|
252
252
|
<%= turbo_frame_tag dom_id(@post) do %>
|
253
|
-
<%= form_for @post, remote: true,
|
253
|
+
<%= form_for @post, remote: true, data: { turbo_reflex: "ExampleReflex#work" } do |form| %>
|
254
254
|
...
|
255
255
|
<% end %>
|
256
256
|
<% end %>
|
257
257
|
|
258
258
|
<%= form_with model: @post,
|
259
|
-
|
259
|
+
data: { turbo_frame: dom_id(@post), turbo_reflex: "ExampleReflex#work" } do |form| %>
|
260
260
|
...
|
261
261
|
<% end %>
|
262
262
|
```
|
@@ -272,7 +272,7 @@ Here's an example.
|
|
272
272
|
<a data-turbo-reflex="DemoReflex#example">
|
273
273
|
```
|
274
274
|
|
275
|
-
Server side reflexes can live anywhere in your app; however, we recommend you keep them in the `app` directory.
|
275
|
+
Server side reflexes can live anywhere in your app; however, we recommend you keep them in the `app/reflexes` directory.
|
276
276
|
|
277
277
|
```diff
|
278
278
|
|- app
|
@@ -1,7 +1,7 @@
|
|
1
|
-
var
|
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},$=(e,t)=>Yn(e,Xn(t));var lt=(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,ht=!1,te=[];function ei(e){ti(e)}function ti(e){te.includes(e)||te.push(e),ri()}function hr(e){let t=te.indexOf(e);t!==-1&&te.splice(t,1)}function ri(){!ht&&!pt&&(pt=!0,queueMicrotask(ni))}function ni(){pt=!1,ht=!0;for(let e=0;e<te.length;e++)te[e]();te.length=0,ht=!1}var he,Te,Fe,_r,_t=!0;function ii(e){_t=!1,e(),_t=!0}function oi(e){he=e.reactive,Fe=e.release,Te=t=>e.effect(t,{scheduler:r=>{_t?ei(r):r()}}),_r=e.raw}function sr(e){Te=e}function ai(e){let t=()=>{};return[n=>{let i=Te(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 mr=[],gr=[],vr=[];function si(e){vr.push(e)}function xr(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,gr.push(t))}function li(e){mr.push(e)}function ui(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function br(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 Rt=new MutationObserver(Nt),Mt=!1;function yr(){Rt.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Mt=!0}function ci(){fi(),Rt.disconnect(),Mt=!1}var we=[],ut=!1;function fi(){we=we.concat(Rt.takeRecords()),we.length&&!ut&&(ut=!0,queueMicrotask(()=>{di(),ut=!1}))}function di(){Nt(we),we.length=0}function T(e){if(!Mt)return e();ci();let t=e();return yr(),t}var kt=!1,Pe=[];function pi(){kt=!0}function hi(){kt=!1,Nt(Pe),Pe=[]}function Nt(e){if(kt){Pe=Pe.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,l=e[o].oldValue,u=()=>{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)&&l===null?u():a.hasAttribute(s)?(f(),u()):f()}i.forEach((o,a)=>{br(a,o)}),n.forEach((o,a)=>{mr.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(fe(e))}function Oe(e,t,r){return e._x_dataStack=[t,...fe(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function lr(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function fe(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?fe(e.host):e.parentNode?fe(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,l=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,$(g({},l),{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 l=i===""?o:`${i}.${o}`;typeof a=="object"&&a!==null&&a._x_interceptor?n[o]=a.initialize(e,l,o):t(a)&&a!==n&&!(a instanceof Element)&&r(a,l)})};return r(e)}function Ar(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>_i(n,i),a=>mt(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 l=n.initialize(o,a,s);return r.initialValue=l,i(o,a,s)}}else r.initialValue=n;return r}}function _i(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function mt(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]]={}),mt(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]=kr(t);return i=g({interceptor:Ar},i),xr(t,o),n(t,i)},enumerable:!1})}),e}function mi(e,t,r,...n){try{return r(...n)}catch(i){Se(i,e,t)}}function Se(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 $e=!0;function mi(e){let t=$e;$e=!1,e(),$e=t}function ce(e,t,r={}){let n;return M(e,t)(i=>n=i,r),n}function M(...e){return Sr(...e)}var Sr=Tr;function gi(e){Sr=e}function Tr(e,t){let r={};gt(r,e);let n=[r,...fe(e)];if(typeof t=="function")return vi(n,t);let i=bi(n,t,e);return _i.bind(null,e,t,i)}function vi(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Ce([n,...e]),i);Ie(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 Se(a,t,e),Promise.resolve()}})();return ct[e]=o,o}function bi(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 l=n(n,s).catch(u=>Se(u,r,t));n.finished?(Ie(i,n.result,s,a,r),n.result=void 0):l.then(u=>{Ie(i,u,s,a,r)}).catch(u=>Se(u,r,t)).finally(()=>n.result=void 0)}}}function Ie(e,t,r,n,i){if($e&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(a=>Ie(e,a,r,n)).catch(a=>Se(a,i,t)):e(o)}else e(t)}var Lt="x-";function _e(e=""){return Lt+e}function yi(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,l])=>({name:s,value:l})),a=Cr(o);o=o.map(s=>a.find(l=>l.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),t=t.concat(o)}let n={};return t.map(Lr((o,a)=>n[o]=a)).filter(Pr).map(Ai(n,r)).sort(Si).map(o=>Ei(e,o))}function Cr(e){return Array.from(e).map(Lr()).filter(t=>!Pr(t))}var vt=!1,ye=new Map,Rr=Symbol();function wi(e){vt=!0;let t=Symbol();Rr=t,ye.set(t,[]);let r=()=>{for(;ye.get(t).length;)ye.get(t).shift()();ye.delete(t)},n=()=>{vt=!1,r()};e(r),n()}function Mr(e){let t=[],r=s=>t.push(s),[n,i]=oi(e);return t.push(i),[{Alpine:Re,effect:n,cleanup:r,evaluateLater:M.bind(M,e),evaluate:ce.bind(ce,e)},()=>t.forEach(s=>s())]}function Ei(e,t){let r=()=>{},n=Or[t.type]||r,[i,o]=Mr(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?ye.get(Rr).push(n):n())};return a.runCleanups=o,a}var kr=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Nr=e=>e;function Lr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=$r.reduce((o,a)=>a(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var $r=[];function Pt(e){$r.push(e)}function Pr({name:e}){return Ir().test(e)}var Ir=()=>new RegExp(`^${Lt}([^:^.]+)\\b`);function Ai(e,t){return({name:r,value:n})=>{let i=r.match(Ir()),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(l=>l.replace(".","")),expression:n,original:s}}}var xt="DEFAULT",Ne=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",xt,"teleport"];function Si(e,t){let r=Ne.indexOf(e.type)===-1?xt:e.type,n=Ne.indexOf(t.type)===-1?xt:t.type;return Ne.indexOf(r)-Ne.indexOf(n)}function Ee(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var bt=[],It=!1;function Dr(e=()=>{}){return queueMicrotask(()=>{It||setTimeout(()=>{yt()})}),new Promise(t=>{bt.push(()=>{e(),t()})})}function yt(){for(It=!1;bt.length;)bt.shift()()}function Ti(){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 de(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function Oi(){document.body||de("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),Ee(document,"alpine:init"),Ee(document,"alpine:initializing"),br(),ai(t=>U(t,ie)),vr(t=>Ri(t)),si((t,r)=>{$t(t,r).forEach(n=>n())});let e=t=>!je(t.parentElement,!0);Array.from(document.querySelectorAll(Kr())).filter(e).forEach(t=>{U(t)}),Ee(document,"alpine:initialized")}var Dt=[],Fr=[];function jr(){return Dt.map(e=>e())}function Kr(){return Dt.concat(Fr).map(e=>e())}function Hr(e){Dt.push(e)}function Br(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 Ci(e){return jr().some(t=>e.matches(t))}function U(e,t=ie){wi(()=>{t(e,(r,n)=>{$t(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function Ri(e){ie(e,t=>xr(t))}function Ft(e,t){return Array.isArray(t)?lr(e,t.join(" ")):typeof t=="object"&&t!==null?Mi(e,t):typeof t=="function"?Ft(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 Mi(e,t){let r=s=>s.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([s,l])=>l?r(s):!1).filter(Boolean),i=Object.entries(t).flatMap(([s,l])=>l?!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?ki(e,t):Ni(e,t)}function ki(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],n.startsWith("--")||(n=Li(n)),e.style.setProperty(n,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{He(e,r)}}function Ni(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Li(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?$i(e,n,t):Pi(e,r,t)});function $i(e,t,r){qr(e,Ft,""),{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 Pi(e,t,r){qr(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((g,y)=>y<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((g,y)=>y>t.indexOf("out")));let a=!t.includes("opacity")&&!t.includes("scale"),s=a||t.includes("opacity"),l=a||t.includes("scale"),u=s?0:1,f=l?xe(t,"scale",95)/100:1,h=xe(t,"delay",0),x=xe(t,"origin","center"),$="opacity, transform",E=xe(t,"duration",150)/1e3,le=xe(t,"duration",75)/1e3,d="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:x,transitionDelay:h,transitionProperty:$,transitionDuration:`${E}s`,transitionTimingFunction:d},e._x_transition.enter.start={opacity:u,transform:`scale(${f})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:x,transitionDelay:h,transitionProperty:$,transitionDuration:`${le}s`,transitionTimingFunction:d},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:u,transform:`scale(${f})`})}function qr(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=zr(e);a?(a._x_hideChildren||(a._x_hideChildren=[]),a._x_hideChildren.push(e)):i(()=>{let s=l=>{let u=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(s)]).then(([f])=>f());return delete l._x_hidePromise,delete l._x_hideChildren,u};s(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function zr(e){let t=e.parentNode;if(!!t)return t._x_hidePromise?t:zr(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,l,u;Ii(e,{start(){s=t(e,n)},during(){l=t(e,r)},before:o,end(){s(),u=t(e,i)},after:a,cleanup(){l(),u()}})}function Ii(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()}),Ti(),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 xe(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 Be(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;U(e,(n,i)=>{ie(n,(o,a)=>{if(t&&Ci(o))return a();t=!0,i(o,a)})})}function ji(e){let t=Te;ar((r,n)=>{let i=t(r);return Fe(i),()=>{}}),e(),ar(t)}function Vr(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=he({})),e._x_bindings[t]=r,t=n.includes("camel")?Wi(t):t,t){case"value":Ki(e,r);break;case"style":Bi(e,r);break;case"class":Hi(e,r);break;default:qi(e,t,r);break}}function Ki(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=ur(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=>ur(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")Vi(e,t);else{if(e.value===t)return;e.value=t}}function Hi(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Ft(e,t)}function Bi(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=He(e,t)}function qi(e,t,r){[null,void 0,!1].includes(r)&&Ui(t)?e.removeAttribute(t):(Wr(t)&&(r=t),zi(e,t,r))}function zi(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function Vi(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function Wi(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function ur(e,t){return e==t}function Wr(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 Ui(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Gi(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:Wr(t)?!![t,"true"].includes(n):n}function Ur(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 Gr(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function Yi(e){e(Re)}var ee={},cr=!1;function Xi(e,t){if(cr||(ee=he(ee),cr=!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(),wr(ee[e])}function Ji(){return ee}var Yr={};function Zi(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?Xr(e,r()):Yr[e]=r}function Qi(e){return Object.entries(Yr).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function Xr(e,t,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(t).map(([a,s])=>({name:a,value:s})),o=Cr(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 Jr={};function eo(e,t){Jr[e]=t}function to(e,t){return Object.entries(Jr).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var ro={get reactive(){return he},get release(){return Fe},get effect(){return Te},get raw(){return hr},version:"3.10.5",flushAndStopDeferringMutations:pi,dontAutoEvaluateFunctions:mi,disableEffectScheduling:ni,setReactivityEngine:ii,closestDataStack:fe,skipDuringClone:Be,addRootSelector:Hr,addInitSelector:Br,addScopeToNode:Oe,deferMutations:di,mapAttributes:Pt,evaluateLater:M,setEvaluator:gi,mergeProxies:Ce,findClosest:Ke,closestRoot:je,interceptor:Er,transition:Et,setStyles:He,mutateDom:T,directive:A,throttle:Gr,debounce:Ur,evaluate:ce,initTree:U,nextTick:Dr,prefixed:_e,prefix:yi,plugin:Yi,magic:F,store:Xi,start:Oi,clone:Di,bound:Gi,$data:yr,data:eo,bind:Zi},Re=ro;function Zr(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 no="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",La=Zr(no+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),io=Object.freeze({}),$a=Object.freeze([]),Qr=Object.assign,oo=Object.prototype.hasOwnProperty,qe=(e,t)=>oo.call(e,t),re=Array.isArray,Ae=e=>en(e)==="[object Map]",ao=e=>typeof e=="string",jt=e=>typeof e=="symbol",ze=e=>e!==null&&typeof e=="object",so=Object.prototype.toString,en=e=>so.call(e),tn=e=>en(e).slice(8,-1),Kt=e=>ao(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ve=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},lo=/-(\w)/g,Pa=Ve(e=>e.replace(lo,(t,r)=>r?r.toUpperCase():"")),uo=/\B([A-Z])/g,Ia=Ve(e=>e.replace(uo,"-$1").toLowerCase()),rn=Ve(e=>e.charAt(0).toUpperCase()+e.slice(1)),Da=Ve(e=>e?`on${rn(e)}`:""),nn=(e,t)=>e!==t&&(e===e||t===t),St=new WeakMap,be=[],q,ne=Symbol("iterate"),Tt=Symbol("Map key iterate");function co(e){return e&&e._isEffect===!0}function fo(e,t=io){co(e)&&(e=e.raw);let r=_o(e,t);return t.lazy||r(),r}function po(e){e.active&&(on(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)){on(r);try{return go(),be.push(r),q=r,e()}finally{be.pop(),an(),q=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 on(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var pe=!0,Ht=[];function mo(){Ht.push(pe),pe=!1}function go(){Ht.push(pe),pe=!0}function an(){let e=Ht.pop();pe=e===void 0?!0:e}function D(e,t,r){if(!pe||q===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(q)||(i.add(q),q.deps.push(i),q.options.onTrack&&q.options.onTrack({effect:q,target:e,type:t,key:r}))}function G(e,t,r,n,i,o){let a=St.get(e);if(!a)return;let s=new Set,l=f=>{f&&f.forEach(h=>{(h!==q||h.allowRecurse)&&s.add(h)})};if(t==="clear")a.forEach(l);else if(r==="length"&&re(e))a.forEach((f,h)=>{(h==="length"||h>=n)&&l(f)});else switch(r!==void 0&&l(a.get(r)),t){case"add":re(e)?Kt(r)&&l(a.get("length")):(l(a.get(ne)),Ae(e)&&l(a.get(Tt)));break;case"delete":re(e)||(l(a.get(ne)),Ae(e)&&l(a.get(Tt)));break;case"set":Ae(e)&&l(a.get(ne));break}let u=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(u)}var vo=Zr("__proto__,__v_isRef,__isVue"),sn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(jt)),xo=We(),bo=We(!1,!0),yo=We(!0),wo=We(!0,!0),De={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];De[e]=function(...r){let n=b(this);for(let o=0,a=this.length;o<a;o++)D(n,"get",o+"");let i=t.apply(n,r);return i===-1||i===!1?t.apply(n,r.map(b)):i}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];De[e]=function(...r){mo();let n=t.apply(this,r);return an(),n}});function We(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?No:yn:t?ko:bn).get(n))return n;let a=re(n);if(!e&&a&&qe(De,i))return Reflect.get(De,i,o);let s=Reflect.get(n,i,o);return(jt(i)?sn.has(i):vo(i))||(e||D(n,"get",i),t)?s:Ot(s)?!a||!Kt(i)?s.value:s:ze(s)?e?wn(s):Vt(s):s}}var Eo=ln(),Ao=ln(!0);function ln(e=!1){return function(r,n,i,o){let a=r[n];if(!e&&(i=b(i),a=b(a),!re(r)&&Ot(a)&&!Ot(i)))return a.value=i,!0;let s=re(r)&&Kt(n)?Number(n)<r.length:qe(r,n),l=Reflect.set(r,n,i,o);return r===b(o)&&(s?nn(i,a)&&G(r,"set",n,i,a):G(r,"add",n,i)),l}}function So(e,t){let r=qe(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&G(e,"delete",t,void 0,n),i}function To(e,t){let r=Reflect.has(e,t);return(!jt(t)||!sn.has(t))&&D(e,"has",t),r}function Oo(e){return D(e,"iterate",re(e)?"length":ne),Reflect.ownKeys(e)}var un={get:xo,set:Eo,deleteProperty:So,has:To,ownKeys:Oo},cn={get:yo,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=Qr({},un,{get:bo,set:Ao}),ja=Qr({},cn,{get:wo}),Bt=e=>ze(e)?Vt(e):e,qt=e=>ze(e)?wn(e):e,zt=e=>e,Ue=e=>Reflect.getPrototypeOf(e);function Ge(e,t,r=!1,n=!1){e=e.__v_raw;let i=b(e),o=b(t);t!==o&&!r&&D(i,"get",t),!r&&D(i,"get",o);let{has:a}=Ue(i),s=n?zt:r?qt:Bt;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 Ye(e,t=!1){let r=this.__v_raw,n=b(r),i=b(e);return e!==i&&!t&&D(n,"has",e),!t&&D(n,"has",i),e===i?r.has(e):r.has(e)||r.has(i)}function Xe(e,t=!1){return e=e.__v_raw,!t&&D(b(e),"iterate",ne),Reflect.get(e,"size",e)}function fn(e){e=b(e);let t=b(this);return Ue(t).has.call(t,e)||(t.add(e),G(t,"add",e,e)),this}function dn(e,t){t=b(t);let r=b(this),{has:n,get:i}=Ue(r),o=n.call(r,e);o?xn(r,n,e):(e=b(e),o=n.call(r,e));let a=i.call(r,e);return r.set(e,t),o?nn(t,a)&&G(r,"set",e,t,a):G(r,"add",e,t),this}function pn(e){let t=b(this),{has:r,get:n}=Ue(t),i=r.call(t,e);i?xn(t,r,e):(e=b(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,a=t.delete(e);return i&&G(t,"delete",e,void 0,o),a}function hn(){let e=b(this),t=e.size!==0,r=Ae(e)?new Map(e):new Set(e),n=e.clear();return t&&G(e,"clear",void 0,void 0,r),n}function Je(e,t){return function(n,i){let o=this,a=o.__v_raw,s=b(a),l=t?zt:e?qt:Bt;return!e&&D(s,"iterate",ne),a.forEach((u,f)=>n.call(i,l(u),l(f),o))}}function Le(e,t,r){return function(...n){let i=this.__v_raw,o=b(i),a=Ae(o),s=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,u=i[e](...n),f=r?zt:t?qt:Bt;return!t&&D(o,"iterate",l?Tt:ne),{next(){let{value:h,done:x}=u.next();return x?{value:h,done:x}:{value:s?[f(h[0]),f(h[1])]:f(h),done:x}},[Symbol.iterator](){return this}}}}function W(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${rn(e)} operation ${r}failed: target is readonly.`,b(this))}return e==="delete"?!1:this}}var _n={get(e){return Ge(this,e)},get size(){return Xe(this)},has:Ye,add:fn,set:dn,delete:pn,clear:hn,forEach:Je(!1,!1)},mn={get(e){return Ge(this,e,!1,!0)},get size(){return Xe(this)},has:Ye,add:fn,set:dn,delete:pn,clear:hn,forEach:Je(!1,!0)},gn={get(e){return Ge(this,e,!0)},get size(){return Xe(this,!0)},has(e){return Ye.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:Je(!0,!1)},vn={get(e){return Ge(this,e,!0,!0)},get size(){return Xe(this,!0)},has(e){return Ye.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:Je(!0,!0)},Co=["keys","values","entries",Symbol.iterator];Co.forEach(e=>{_n[e]=Le(e,!1,!1),gn[e]=Le(e,!0,!1),mn[e]=Le(e,!1,!0),vn[e]=Le(e,!0,!0)});function Ze(e,t){let r=t?e?vn:mn:e?gn:_n;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(qe(r,i)&&i in n?r:n,i,o)}var Ro={get:Ze(!1,!1)},Ka={get:Ze(!1,!0)},Mo={get:Ze(!0,!1)},Ha={get:Ze(!0,!0)};function xn(e,t,r){let n=b(r);if(n!==r&&t.call(e,n)){let i=tn(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 bn=new WeakMap,ko=new WeakMap,yn=new WeakMap,No=new WeakMap;function Lo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $o(e){return e.__v_skip||!Object.isExtensible(e)?0:Lo(tn(e))}function Vt(e){return e&&e.__v_isReadonly?e:En(e,!1,un,Ro,bn)}function wn(e){return En(e,!0,cn,Mo,yn)}function En(e,t,r,n,i){if(!ze(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=$o(e);if(a===0)return e;let s=new Proxy(e,a===2?n:r);return i.set(e,s),s}function b(e){return e&&b(e.__v_raw)||e}function Ot(e){return Boolean(e&&e.__v_isRef===!0)}F("nextTick",()=>Dr);F("dispatch",e=>Ee.bind(Ee,e));F("watch",(e,{evaluateLater:t,effect:r})=>(n,i)=>{let o=t(n),a=!0,s,l=r(()=>o(u=>{JSON.stringify(u),a?s=u:queueMicrotask(()=>{i(u,s),s=u}),a=!1}));e._x_effects.delete(l)});F("store",Ji);F("data",e=>yr(e));F("root",e=>je(e));F("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Ce(Po(e))),e._x_refs_proxy));function Po(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var ft={};function An(e){return ft[e]||(ft[e]=0),++ft[e]}function Io(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]=An(t))}F("id",e=>(t,r=null)=>{let n=Io(e,t),i=n?n._x_ids[t]:An(t);return r?`${t}-${i}-${r}`:`${t}-${i}`});F("el",e=>e);Sn("Focus","focus","focus");Sn("Persist","persist","persist");function Sn(e,t,r){F(t,n=>de(`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 u;return i(f=>u=f),u},a=n(`${t} = __placeholder`),s=u=>a(()=>{},{scope:{__placeholder:u}}),l=o();s(l),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let u=e._x_model.get,f=e._x_model.set;r(()=>s(u())),r(()=>f(o()))})});A("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&de("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||de(`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))})}),Oe(i,{},e),T(()=>{n.appendChild(i),U(i),i._x_ignore=!0}),r(()=>i.remove())});var Tn=()=>{};Tn.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",Tn);A("effect",(e,{expression:t},{effect:r})=>r(M(e,t)));function On(e,t,r,n){let i=e,o=l=>n(l),a={},s=(l,u)=>f=>u(l,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,(l,u)=>{u.preventDefault(),l(u)})),r.includes("stop")&&(o=s(o,(l,u)=>{u.stopPropagation(),l(u)})),r.includes("self")&&(o=s(o,(l,u)=>{u.target===e&&l(u)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=s(o,(l,u)=>{e.contains(u.target)||u.target.isConnected!==!1&&(e.offsetWidth<1&&e.offsetHeight<1||e._x_isShown!==!1&&l(u))})),r.includes("once")&&(o=s(o,(l,u)=>{l(u),i.removeEventListener(t,o,a)})),o=s(o,(l,u)=>{Ho(t)&&Bo(u,r)||l(u)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",u=Ct(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=Ur(o,u)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",u=Ct(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=Gr(o,u)}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 Ct(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 Bo(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,Ct((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&fr(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&&fr(e.key).includes(r[0]))}function fr(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=M(e,r),a=`${r} = rightSideOfExpression($event, ${r})`,s=M(e,a);var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let u=qo(e,t,r),f=On(e,l,t,x=>{s(()=>{},{scope:{$event:x,rightSideOfExpression:u}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=f,i(()=>e._x_removeModelListeners.default());let h=M(e,`${r} = __placeholder`);e._x_model={get(){let x;return o($=>x=$),x},set(x){h(()=>{},{scope:{__placeholder:x}})}},e._x_forceModelUpdate=()=>{o(x=>{x===void 0&&r.match(/\./)&&(x=""),window.fromModel=!0,T(()=>Vr(e,"value",x)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function qo(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=>!zo(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 Vo(t)?t:e}function zo(e,t){return e==t}function Vo(e){return!Array.isArray(e)&&!isNaN(e)}A("cloak",e=>queueMicrotask(()=>T(()=>e.removeAttribute(_e("cloak")))));Br(()=>`[${_e("init")}]`);A("init",Be((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,U(e),delete e._x_ignoreSelf})})})});Pt(kr(":",Nr(_e("bind:"))));A("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let s={};Qi(s),M(e,n)(u=>{Xr(e,u,i)},{scope:s});return}if(t==="key")return Wo(e,n);let a=M(e,n);o(()=>a(s=>{s===void 0&&typeof n=="string"&&n.match(/\./)&&(s=""),T(()=>Vr(e,t,s,r))}))});function Wo(e,t){e._x_keyExpression=t}Hr(()=>`[${_e("data")}]`);A("data",Be((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};gt(n,e);let i={};to(i,n);let o=ce(e,t,{scope:i});o===void 0&&(o={}),gt(o,e);let a=he(o);wr(a);let s=Oe(e,a);a.init&&ce(e,a.init),r(()=>{a.destroy&&ce(e,a.destroy),s()})}));A("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=M(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),l=wt(h=>h?a():o(),h=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,h,a,o):h?s():o()}),u,f=!0;n(()=>i(h=>{!f&&h===u||(t.includes("immediate")&&(h?s():o()),l(h),u=h,f=!1)}))});A("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=Go(t),o=M(e,i.items),a=M(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>Uo(e,i,o,a)),n(()=>{Object.values(e._x_lookup).forEach(s=>s.remove()),delete e._x_prevKeys,delete e._x_lookup})});function Uo(e,t,r,n){let i=a=>typeof a=="object"&&!Array.isArray(a),o=e;r(a=>{Yo(a)&&a>=0&&(a=Array.from(Array(a).keys(),d=>d+1)),a===void 0&&(a=[]);let s=e._x_lookup,l=e._x_prevKeys,u=[],f=[];if(i(a))a=Object.entries(a).map(([d,g])=>{let y=dr(t,g,d,a);n(C=>f.push(C),{scope:v({index:d},y)}),u.push(y)});else for(let d=0;d<a.length;d++){let g=dr(t,a[d],d,a);n(y=>f.push(y),{scope:v({index:d},g)}),u.push(g)}let h=[],x=[],$=[],E=[];for(let d=0;d<l.length;d++){let g=l[d];f.indexOf(g)===-1&&$.push(g)}l=l.filter(d=>!$.includes(d));let le="template";for(let d=0;d<f.length;d++){let g=f[d],y=l.indexOf(g);if(y===-1)l.splice(d,0,g),h.push([le,d]);else if(y!==d){let C=l.splice(d,1)[0],k=l.splice(y-1,1)[0];l.splice(d,0,k),l.splice(y,0,C),x.push([C,k])}else E.push(g);le=g}for(let d=0;d<$.length;d++){let g=$[d];s[g]._x_effects&&s[g]._x_effects.forEach(pr),s[g].remove(),s[g]=null,delete s[g]}for(let d=0;d<x.length;d++){let[g,y]=x[d],C=s[g],k=s[y],V=document.createElement("div");T(()=>{k.after(V),C.after(k),k._x_currentIfEl&&k.after(k._x_currentIfEl),V.before(C),C._x_currentIfEl&&C.after(C._x_currentIfEl),V.remove()}),sr(k,u[f.indexOf(y)])}for(let d=0;d<h.length;d++){let[g,y]=h[d],C=g==="template"?o:s[g];C._x_currentIfEl&&(C=C._x_currentIfEl);let k=u[y],V=f[y],I=document.importNode(o.content,!0).firstElementChild;Oe(I,he(k),o),T(()=>{C.after(I),U(I)}),typeof V=="object"&&de("x-for key cannot be an object, it must be a string or an integer",o),s[V]=I}for(let d=0;d<E.length;d++)sr(s[E[d]],u[f.indexOf(E[d])]);o._x_prevKeys=f})}function Go(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 dr(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 Yo(e){return!Array.isArray(e)&&!isNaN(e)}function Cn(){}Cn.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",Cn);A("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=M(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let s=e.content.cloneNode(!0).firstElementChild;return Oe(s,{},e),T(()=>{e.after(s),U(s)}),e._x_currentIfEl=s,e._x_undoIf=()=>{ie(s,l=>{l._x_effects&&l._x_effects.forEach(pr)}),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(kr("@",Nr(_e("on:"))));A("on",Be((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?M(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())}));Qe("Collapse","collapse","collapse");Qe("Intersect","intersect","intersect");Qe("Focus","trap","focus");Qe("Mask","mask","mask");function Qe(e,t,r){A(t,n=>de(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}Re.setEvaluator(Tr);Re.setReactivityEngine({reactive:Vt,effect:fo,release:po,raw:b});var Xo=Re,Wt=Xo;var Jo=class{constructor(e){lt(this,"el");lt(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 O(e){return new Jo(e)}function Zo(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function Qo(e){return e.nodeType===3||e.nodeType===8}var Rn=()=>{},Mn=()=>{};async function Ut(e,t,r){let n,i,o,a,s,l,u,f,h,x,$;function E(c){if(!!$)return Mn((c||"").replace(`
|
6
|
-
`,"\\n"),n,i),new Promise(p=>Rn=()=>p())}function le(c={}){let p=P=>P.getAttribute("key"),_=()=>{};s=c.updating||_,l=c.updated||_,u=c.removing||_,f=c.removed||_,h=c.adding||_,x=c.added||_,o=c.key||p,a=c.lookahead||!1,$=c.debug||!1}async function d(c,p){if(g(c,p)){let P=y(c,p);return await E("Swap elements"),P}let _=!1;if(!me(s,c,p,()=>_=!0)){if(window.Alpine&&ea(c,p,()=>_=!0),Qo(p)){await C(c,p),l(c,p);return}_||await k(c,p),l(c,p),await V(c,p)}}function g(c,p){return c.nodeType!=p.nodeType||c.nodeName!=p.nodeName||I(c)!=I(p)}function y(c,p){if(me(u,c))return;let _=p.cloneNode(!0);me(h,_)||(O(c).replace(_),f(c),x(_))}async function C(c,p){let _=p.nodeValue;c.nodeValue!==_&&(c.nodeValue=_,await E("Change text node to: "+_))}async function k(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let _=Array.from(c.attributes),P=Array.from(p.attributes);for(let z=_.length-1;z>=0;z--){let H=_[z].name;p.hasAttribute(H)||(c.removeAttribute(H),await E("Remove attribute"))}for(let z=P.length-1;z>=0;z--){let H=P[z].name,w=P[z].value;c.getAttribute(H)!==w&&(c.setAttribute(H,w),await E(`Set [${H}] attribute to: "${w}"`))}}async function V(c,p){let _=c.childNodes,P=p.childNodes,z=rr(P),H=rr(_),w=O(p).nodes().first(),m=O(c).nodes().first(),Q={};for(;w;){let N=I(w),B=I(m);if(!m)if(N&&Q[N]){let L=Q[N];O(c).append(L),m=L,await E("Add element (from key)")}else{let L=Vn(w,c)||{};await E("Add element: "+(L.outerHTML||L.nodeValue)),w=O(w).nodes().next();continue}if(a){let L=O(w).next(),nr=!1;for(;!nr&&L;)m.isEqualNode(L)&&(nr=!0,m=ot(w,m),B=I(m),await E("Move element (lookahead)")),L=O(L).next()}if(N!==B){if(!N&&B){Q[B]=m,m=ot(w,m),Q[B].remove(),m=O(m).nodes().next(),w=O(w).nodes().next(),await E('No "to" key');continue}if(N&&!B&&H[N]&&(m=O(m).replace(H[N]),await E('No "from" key')),N&&B){Q[B]=m;let L=H[N];if(L)m=O(m).replace(L),await E('Move "from" key');else{Q[B]=m,m=ot(w,m),Q[B].remove(),m=O(m).next(),w=O(w).next(),await E("Swap elements with keys");continue}}}let Wn=m&&O(m).nodes().next();await d(m,w),w=w&&O(w).nodes().next(),m=Wn}let at=[];for(;m;)me(u,m)||at.push(m),m=O(m).nodes().next();for(;at.length;){let N=at.shift();N.remove(),await E("remove el"),f(N)}}function I(c){return c&&c.nodeType===1&&o(c)}function rr(c){let p={};return c.forEach(_=>{let P=I(_);P&&(p[P]=_)}),p}function Vn(c,p){if(!me(h,c)){let _=c.cloneNode(!0);return O(p).append(_),x(_),_}return null}function ot(c,p){if(!me(h,c)){let _=c.cloneNode(!0);return O(p).before(_),x(_),_}return p}return le(r),n=e,i=Zo(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=()=>Rn();Ut.log=e=>{Mn=e};function me(e,...t){let r=!1;return e(...t,()=>r=!0),r}function ea(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function ta(e){e.morph=Ut}var kn=ta;Wt.plugin(kn);var ra=/INPUT/i,na=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,ia=/TEXTAREA/i;function oa(e,t,r,n){if(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)return;if(e.tagName.match(ia)||e.tagName.match(ra)&&e.getAttribute("type").match(na))return n()}function aa(e,t){e.forEach(r=>Wt.morph(r,t,{updating:oa}))}var Nn=aa;function sa(e,t,r){if(e.match(/^dispatch(Event)?$/))return or(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Nn(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 l=s,u=n.split(".");for(;u.length>0;)l=l[u.shift()];return l})),sa(i,o,a)}var Gt=la;if(!self.Turbo)throw new Error("`Turbo` is not defined! Be sure to import `turbo_ready` 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.TurboReady={StreamActions:{invoke:Gt}};console.info("TurboReady has initialized and has registered new stream actions with Turbo.");var Yt=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}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 Y={start:"turbo-reflex:start",success:"turbo-reflex:success",finish:"turbo-reflex:finish",abort:"turbo-reflex:abort",clientError:"turbo-reflex:client-error",serverError:"turbo-reflex:server-error"},X={stateLoad:"turbo-reflex:state-load",stateChange:"turbo-reflex:state-change"},j=v(v({},Y),X);function R(e,t=document,r={},n=!1){try{t=t||document;let i=new CustomEvent(e,{detail:r,cancelable:!1,bubbles:!0});t.dispatchEvent(i)}catch(i){if(n)throw i;R(Y.clientError,t,v({error:i},r),!0)}}var Xt;function et(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],R(X.stateChange,S.element,{state:Xt}),!0},set(n,i,o,a){return n[i]=et(o,this),R(X.stateChange,S.element,{state:Xt}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=et(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=et(i,r);return t||(Xt=r),r}var Ln=et;var Jt,oe,tt,$n;function Pn(){if(!S.element)return ge();let e=atob(S.element.dataset.state);tt={},oe=Ln(JSON.parse(e)),Jt=v({},oe),delete S.element.dataset.clientStateChange,setTimeout(()=>R(X.stateLoad,S.element,{state:oe}))}function ge(){clearTimeout($n),$n=setTimeout(Pn,10)}Jt||Pn();addEventListener("DOMContentLoaded",ge);addEventListener("load",ge);addEventListener("turbo:load",ge);addEventListener("turbo:frame-load",ge);addEventListener("turbo-reflex:success",ge);addEventListener(X.stateChange,e=>{tt={};for(let[t,r]of Object.entries(oe))Jt[t]!==r&&(tt[t]=r);S.element.dataset.clientStateChange=!0,S.element.dataset.state=btoa(JSON.stringify(oe))});var ae={events:X,get current(){return oe},get delta(){return tt},get payloadChunks(){return btoa(JSON.stringify(oe)).match(/.{1,2000}/g)}};function ua(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 ca(e){document.body.insertAdjacentHTML("beforeend",e)}var se={append:ca,replaceDocument:ua};var rt={};function fa(e){rt[e.id]=e}function da(e){delete rt[e]}var nt={add:fa,remove:da,get reflexes(){return[...Object.values(rt)]},get length(){return Object.keys(rt).length}};function In(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>R(Y.finish,e.target,e.detail),20)}addEventListener(Y.serverError,In);addEventListener(Y.success,In);addEventListener(Y.finish,e=>nt.remove(e.detail.id),!0);var J={events:Y};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-reflex.html",r.headers.Accept];n=n.filter(i=>i&&i.trim().length>0).join(", "),r.headers.Accept=n,r.headers["TurboReflex-Token"]=S.token}ae.payloadChunks.forEach((n,i)=>{r.headers[`TurboReflex-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("TurboReflex")){if(r.statusCode<200||r.statusCode>399){let n=`Server returned a ${r.statusCode} status code! TurboReflex requires 2XX-3XX status codes.`;R(J.events.clientError,document,ue(v({},e.detail),{error:n}),!0)}r.header("TurboReflex")==="Append"&&(e.preventDefault(),r.responseText.then(n=>se.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboReflexSrc=Zt[t.id]||t.src||t.dataset.turboReflexSrc,delete Zt[t.id]});var pa={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",reflexAttribute:"data-turbo-reflex"},K=v({},pa);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 ma(e,t){return e===_a(t)}var Z={events:it,register:ha,isRegisteredForElement:ma,set handler(e){Dn=e}};function ga(e){return e.closest(`[${K.reflexAttribute}]`)}function va(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 ba(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.reflexAttribute],delete t[K.frameAttribute],t}var Me={buildAttributePayload:ba,findClosestReflex:ga,findClosestFrame:va};function ya(e,t={}){t.token=S.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_reflex",r.value=JSON.stringify(t),e.appendChild(r)}var Fn={invokeReflex:ya};function wa(e,t={}){let r=document.createElement("a");r.href=e;let n=new URL(r);return n.searchParams.set("turbo_reflex",JSON.stringify(t)),n}var ve={build:wa};function Ea(e,t){let r=t.src;t=v({},t),delete t.src,e.src=ve.build(r,t)}var Qt={invokeReflex:Ea};function Aa(e,t={}){let r=t.src;t=v({},t),delete t.src,delete t.href,e.setAttribute("href",ve.build(r,t))}var jn={invokeReflex:Aa};function Sa(e){let t=e.target;R(J.events.abort,document,v({xhr:t},e.detail))}function er(e){let t=e.target;t.getResponseHeader("TurboReflex")==="Append"?se.append(t.responseText):se.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboReflex requires 2XX-3XX status codes.`;R(J.events.clientError,document,ue(v({xhr:t},e.detail),{error:r}),!0)}function Ta(e){let t=e.target;if(t.status<200||t.status>399)return er(e);let r=t.responseText;t.getResponseHeader("TurboReflex")==="Append"?se.append(t.responseText):se.replaceDocument(t.responseText)}function Oa(e){let t=e.src;e=v({},e),delete e.src;try{let r=new XMLHttpRequest;r.open("GET",ve.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-reflex.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboReflex-Token",S.token),ae.payloadChunks.forEach((n,i)=>r.setRequestHeader(`TurboReflex-State-${i.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",Sa),r.addEventListener("error",er),r.addEventListener("load",Ta),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;er(r,{detail:{message:n}})}}var Kn={invokeReflex:Oa};function tr(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboReflexSrc||location.href}function Ca(e){let t=Me.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,invokeReflex:Fn.invokeReflex}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeReflex:jn.invokeReflex}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:tr(e,t),invokeReflex:Qt.invokeReflex}):(!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),invokeReflex:Qt.invokeReflex}:{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),invokeReflex:Kn.invokeReflex}}var Hn={find:Ca};var ke="unknown",Bn={debug:Object.values(j),info:Object.values(j),warn:[j.abort,j.clientError,j.serverError],error:[j.clientError,j.serverError],unknown:[]};Object.values(j).forEach(e=>{addEventListener(e,t=>{Bn[ke].includes(t.type)&&console[ke==="debug"?"log":ke](t.type,{target:t.target,detail:t.detail})})});var qn={get level(){return ke},set level(e){return Object.keys(Bn).includes(e)||(e="unknown"),ke=e}};function Ra(){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:Ra};function Ma(e){let t,r={};try{if(t=Me.findClosestReflex(e.target),!t||!Z.isRegisteredForElement(e.type,t))return;let n=Hn.find(t);switch(r={id:`reflex-${zn.v4()}`,name:t.dataset.turboReflex,driver:n.name,src:n.src,frameId:n.frame?n.frame.id:null,elementId:t.id.length>0?t.id:null,elementAttributes:Me.buildAttributePayload(t),startedAt:new Date().getTime()},nt.add(r),R(J.events.start,t,r),["frame","window"].includes(n.name)&&e.preventDefault(),S.busy=!0,setTimeout(()=>S.busy=!1,10),n.name){case"method":return n.invokeReflex(t,r);case"form":return n.invokeReflex(t,r);case"frame":return n.invokeReflex(n.frame,r);case"window":return n.invokeReflex(r)}}catch(n){R(J.events.clientError,t,v({error:n},r))}}Z.handler=Ma;Z.register("change",[`input[${K.reflexAttribute}]`,`select[${K.reflexAttribute}]`,`textarea[${K.reflexAttribute}]`]);Z.register("submit",[`form[${K.reflexAttribute}]`]);Z.register("click",[`[${K.reflexAttribute}]`]);self.TurboReflex={logger:qn,schema:K,registerEventDelegate:Z.register,get eventDelegates(){return v({},Z.events)},get events(){return v({},j)},get state(){return ae.current},get stateDelta(){return ae.delta}};var ml=self.TurboReflex;export{ml as default};
|
5
|
+
`:""}`,t),setTimeout(()=>{throw e},0)}var $e=!0;function gi(e){let t=$e;$e=!1,e(),$e=t}function ce(e,t,r={}){let n;return M(e,t)(i=>n=i,r),n}function M(...e){return Tr(...e)}var Tr=Or;function vi(e){Tr=e}function Or(e,t){let r={};gt(r,e);let n=[r,...fe(e)];if(typeof t=="function")return xi(n,t);let i=yi(n,t,e);return mi.bind(null,e,t,i)}function xi(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Ce([n,...e]),i);Ie(r,o)}}var ct={};function bi(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 Se(a,t,e),Promise.resolve()}})();return ct[e]=o,o}function yi(e,t,r){let n=bi(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 l=n(n,s).catch(u=>Se(u,r,t));n.finished?(Ie(i,n.result,s,a,r),n.result=void 0):l.then(u=>{Ie(i,u,s,a,r)}).catch(u=>Se(u,r,t)).finally(()=>n.result=void 0)}}}function Ie(e,t,r,n,i){if($e&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(a=>Ie(e,a,r,n)).catch(a=>Se(a,i,t)):e(o)}else e(t)}var Lt="x-";function _e(e=""){return Lt+e}function wi(e){Lt=e}var Cr={};function A(e,t){Cr[e]=t}function $t(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([s,l])=>({name:s,value:l})),a=Rr(o);o=o.map(s=>a.find(l=>l.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 Rr(e){return Array.from(e).map($r()).filter(t=>!Ir(t))}var vt=!1,ye=new Map,Mr=Symbol();function Ei(e){vt=!0;let t=Symbol();Mr=t,ye.set(t,[]);let r=()=>{for(;ye.get(t).length;)ye.get(t).shift()();ye.delete(t)},n=()=>{vt=!1,r()};e(r),n()}function kr(e){let t=[],r=s=>t.push(s),[n,i]=ai(e);return t.push(i),[{Alpine:Re,effect:n,cleanup:r,evaluateLater:M.bind(M,e),evaluate:ce.bind(ce,e)},()=>t.forEach(s=>s())]}function Ai(e,t){let r=()=>{},n=Cr[t.type]||r,[i,o]=kr(e);ui(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?ye.get(Mr).push(n):n())};return a.runCleanups=o,a}var Nr=(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 Dr().test(e)}var Dr=()=>new RegExp(`^${Lt}([^:^.]+)\\b`);function Si(e,t){return({name:r,value:n})=>{let i=r.match(Dr()),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(l=>l.replace(".","")),expression:n,original:s}}}var xt="DEFAULT",Ne=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",xt,"teleport"];function Ti(e,t){let r=Ne.indexOf(e.type)===-1?xt:e.type,n=Ne.indexOf(t.type)===-1?xt:t.type;return Ne.indexOf(r)-Ne.indexOf(n)}function Ee(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var bt=[],It=!1;function Fr(e=()=>{}){return queueMicrotask(()=>{It||setTimeout(()=>{yt()})}),new Promise(t=>{bt.push(()=>{e(),t()})})}function yt(){for(It=!1;bt.length;)bt.shift()()}function Oi(){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 de(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function Ci(){document.body||de("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),Ee(document,"alpine:init"),Ee(document,"alpine:initializing"),yr(),si(t=>Y(t,ie)),xr(t=>Mi(t)),li((t,r)=>{$t(t,r).forEach(n=>n())});let e=t=>!je(t.parentElement,!0);Array.from(document.querySelectorAll(Hr())).filter(e).forEach(t=>{Y(t)}),Ee(document,"alpine:initialized")}var Dt=[],jr=[];function Kr(){return Dt.map(e=>e())}function Hr(){return Dt.concat(jr).map(e=>e())}function Br(e){Dt.push(e)}function qr(e){jr.push(e)}function je(e,t=!1){return Ke(e,r=>{if((t?Hr():Kr()).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 Ri(e){return Kr().some(t=>e.matches(t))}function Y(e,t=ie){Ei(()=>{t(e,(r,n)=>{$t(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function Mi(e){ie(e,t=>br(t))}function Ft(e,t){return Array.isArray(t)?ur(e,t.join(" ")):typeof t=="object"&&t!==null?ki(e,t):typeof t=="function"?Ft(e,t()):ur(e,t)}function ur(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 ki(e,t){let r=s=>s.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([s,l])=>l?r(s):!1).filter(Boolean),i=Object.entries(t).flatMap(([s,l])=>l?!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?Ni(e,t):Li(e,t)}function Ni(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,Ft,""),{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"),l=a||t.includes("scale"),u=s?0:1,f=l?xe(t,"scale",95)/100:1,h=xe(t,"delay",0),x=xe(t,"origin","center"),P="opacity, transform",E=xe(t,"duration",150)/1e3,ue=xe(t,"duration",75)/1e3,d="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:x,transitionDelay:h,transitionProperty:P,transitionDuration:`${E}s`,transitionTimingFunction:d},e._x_transition.enter.start={opacity:u,transform:`scale(${f})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:x,transitionDelay:h,transitionProperty:P,transitionDuration:`${ue}s`,transitionTimingFunction:d},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:u,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=l=>{let u=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(s)]).then(([f])=>f());return delete l._x_hidePromise,delete l._x_hideChildren,u};s(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};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,l,u;Di(e,{start(){s=t(e,n)},during(){l=t(e,r)},before:o,end(){s(),u=t(e,i)},after:a,cleanup(){l(),u()}})}function Di(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()}),Oi(),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 xe(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 Be(e,t=()=>{}){return(...r)=>At?t(...r):e(...r)}function Fi(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),At=!0,Ki(()=>{ji(t)}),At=!1}function ji(e){let t=!1;Y(e,(n,i)=>{ie(n,(o,a)=>{if(t&&Ri(o))return a();t=!0,i(o,a)})})}function Ki(e){let t=Te;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=he({})),e._x_bindings[t]=r,t=n.includes("camel")?Ui(t):t,t){case"value":Hi(e,r);break;case"style":qi(e,r);break;case"class":Bi(e,r);break;default:zi(e,t,r);break}}function Hi(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 Bi(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Ft(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(Re)}var ee={},fr=!1;function Ji(e,t){if(fr||(ee=he(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=Rr(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 he},get release(){return Fe},get effect(){return Te},get raw(){return _r},version:"3.10.5",flushAndStopDeferringMutations:hi,dontAutoEvaluateFunctions:gi,disableEffectScheduling:ii,setReactivityEngine:oi,closestDataStack:fe,skipDuringClone:Be,addRootSelector:Br,addInitSelector:qr,addScopeToNode:Oe,deferMutations:pi,mapAttributes:Pt,evaluateLater:M,setEvaluator:vi,mergeProxies:Ce,findClosest:Ke,closestRoot:je,interceptor:Ar,transition:Et,setStyles:He,mutateDom:T,directive:A,throttle:Yr,debounce:Gr,evaluate:ce,initTree:Y,nextTick:Fr,prefixed:_e,prefix:wi,plugin:Xi,magic:j,store:Ji,start:Ci,clone:Fi,bound:Yi,$data:wr,data:to,bind:Qi},Re=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,qe=(e,t)=>ao.call(e,t),re=Array.isArray,Ae=e=>tn(e)==="[object Map]",so=e=>typeof e=="string",jt=e=>typeof e=="symbol",ze=e=>e!==null&&typeof e=="object",lo=Object.prototype.toString,tn=e=>lo.call(e),rn=e=>tn(e).slice(8,-1),Kt=e=>so(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ve=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},uo=/-(\w)/g,Ia=Ve(e=>e.replace(uo,(t,r)=>r?r.toUpperCase():"")),co=/\B([A-Z])/g,Da=Ve(e=>e.replace(co,"-$1").toLowerCase()),nn=Ve(e=>e.charAt(0).toUpperCase()+e.slice(1)),Fa=Ve(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=mo(e,t);return t.lazy||r(),r}function ho(e){e.active&&(an(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var _o=0;function mo(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=_o++,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 pe=!0,Ht=[];function go(){Ht.push(pe),pe=!1}function vo(){Ht.push(pe),pe=!0}function sn(){let e=Ht.pop();pe=e===void 0?!0:e}function F(e,t,r){if(!pe||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 X(e,t,r,n,i,o){let a=St.get(e);if(!a)return;let s=new Set,l=f=>{f&&f.forEach(h=>{(h!==z||h.allowRecurse)&&s.add(h)})};if(t==="clear")a.forEach(l);else if(r==="length"&&re(e))a.forEach((f,h)=>{(h==="length"||h>=n)&&l(f)});else switch(r!==void 0&&l(a.get(r)),t){case"add":re(e)?Kt(r)&&l(a.get("length")):(l(a.get(ne)),Ae(e)&&l(a.get(Tt)));break;case"delete":re(e)||(l(a.get(ne)),Ae(e)&&l(a.get(Tt)));break;case"set":Ae(e)&&l(a.get(ne));break}let u=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(u)}var xo=Qr("__proto__,__v_isRef,__isVue"),ln=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(jt)),bo=We(),yo=We(!1,!0),wo=We(!0),Eo=We(!0,!0),De={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];De[e]=function(...r){let n=b(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(b)):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 We(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?No:yn).get(n))return n;let a=re(n);if(!e&&a&&qe(De,i))return Reflect.get(De,i,o);let s=Reflect.get(n,i,o);return(jt(i)?ln.has(i):xo(i))||(e||F(n,"get",i),t)?s:Ot(s)?!a||!Kt(i)?s.value:s:ze(s)?e?En(s):Vt(s):s}}var Ao=un(),So=un(!0);function un(e=!1){return function(r,n,i,o){let a=r[n];if(!e&&(i=b(i),a=b(a),!re(r)&&Ot(a)&&!Ot(i)))return a.value=i,!0;let s=re(r)&&Kt(n)?Number(n)<r.length:qe(r,n),l=Reflect.set(r,n,i,o);return r===b(o)&&(s?on(i,a)&&X(r,"set",n,i,a):X(r,"add",n,i)),l}}function To(e,t){let r=qe(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&X(e,"delete",t,void 0,n),i}function Oo(e,t){let r=Reflect.has(e,t);return(!jt(t)||!ln.has(t))&&F(e,"has",t),r}function Co(e){return F(e,"iterate",re(e)?"length":ne),Reflect.ownKeys(e)}var cn={get:bo,set:Ao,deleteProperty:To,has:Oo,ownKeys:Co},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}},ja=en({},cn,{get:yo,set:So}),Ka=en({},fn,{get:Eo}),Bt=e=>ze(e)?Vt(e):e,qt=e=>ze(e)?En(e):e,zt=e=>e,Ue=e=>Reflect.getPrototypeOf(e);function Ge(e,t,r=!1,n=!1){e=e.__v_raw;let i=b(e),o=b(t);t!==o&&!r&&F(i,"get",t),!r&&F(i,"get",o);let{has:a}=Ue(i),s=n?zt:r?qt:Bt;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 Ye(e,t=!1){let r=this.__v_raw,n=b(r),i=b(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 Xe(e,t=!1){return e=e.__v_raw,!t&&F(b(e),"iterate",ne),Reflect.get(e,"size",e)}function dn(e){e=b(e);let t=b(this);return Ue(t).has.call(t,e)||(t.add(e),X(t,"add",e,e)),this}function pn(e,t){t=b(t);let r=b(this),{has:n,get:i}=Ue(r),o=n.call(r,e);o?bn(r,n,e):(e=b(e),o=n.call(r,e));let a=i.call(r,e);return r.set(e,t),o?on(t,a)&&X(r,"set",e,t,a):X(r,"add",e,t),this}function hn(e){let t=b(this),{has:r,get:n}=Ue(t),i=r.call(t,e);i?bn(t,r,e):(e=b(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,a=t.delete(e);return i&&X(t,"delete",e,void 0,o),a}function _n(){let e=b(this),t=e.size!==0,r=Ae(e)?new Map(e):new Set(e),n=e.clear();return t&&X(e,"clear",void 0,void 0,r),n}function Je(e,t){return function(n,i){let o=this,a=o.__v_raw,s=b(a),l=t?zt:e?qt:Bt;return!e&&F(s,"iterate",ne),a.forEach((u,f)=>n.call(i,l(u),l(f),o))}}function Le(e,t,r){return function(...n){let i=this.__v_raw,o=b(i),a=Ae(o),s=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,u=i[e](...n),f=r?zt:t?qt:Bt;return!t&&F(o,"iterate",l?Tt:ne),{next(){let{value:h,done:x}=u.next();return x?{value:h,done:x}:{value:s?[f(h[0]),f(h[1])]:f(h),done:x}},[Symbol.iterator](){return this}}}}function G(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${nn(e)} operation ${r}failed: target is readonly.`,b(this))}return e==="delete"?!1:this}}var mn={get(e){return Ge(this,e)},get size(){return Xe(this)},has:Ye,add:dn,set:pn,delete:hn,clear:_n,forEach:Je(!1,!1)},gn={get(e){return Ge(this,e,!1,!0)},get size(){return Xe(this)},has:Ye,add:dn,set:pn,delete:hn,clear:_n,forEach:Je(!1,!0)},vn={get(e){return Ge(this,e,!0)},get size(){return Xe(this,!0)},has(e){return Ye.call(this,e,!0)},add:G("add"),set:G("set"),delete:G("delete"),clear:G("clear"),forEach:Je(!0,!1)},xn={get(e){return Ge(this,e,!0,!0)},get size(){return Xe(this,!0)},has(e){return Ye.call(this,e,!0)},add:G("add"),set:G("set"),delete:G("delete"),clear:G("clear"),forEach:Je(!0,!0)},Ro=["keys","values","entries",Symbol.iterator];Ro.forEach(e=>{mn[e]=Le(e,!1,!1),vn[e]=Le(e,!0,!1),gn[e]=Le(e,!1,!0),xn[e]=Le(e,!0,!0)});function Ze(e,t){let r=t?e?xn:gn:e?vn:mn;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(qe(r,i)&&i in n?r:n,i,o)}var Mo={get:Ze(!1,!1)},Ha={get:Ze(!1,!0)},ko={get:Ze(!0,!1)},Ba={get:Ze(!0,!0)};function bn(e,t,r){let n=b(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,No=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,Mo,yn)}function En(e){return An(e,!0,fn,ko,wn)}function An(e,t,r,n,i){if(!ze(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 b(e){return e&&b(e.__v_raw)||e}function Ot(e){return Boolean(e&&e.__v_isRef===!0)}j("nextTick",()=>Fr);j("dispatch",e=>Ee.bind(Ee,e));j("watch",(e,{evaluateLater:t,effect:r})=>(n,i)=>{let o=t(n),a=!0,s,l=r(()=>o(u=>{JSON.stringify(u),a?s=u:queueMicrotask(()=>{i(u,s),s=u}),a=!1}));e._x_effects.delete(l)});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 Do(e,t){return Ke(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function Fo(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=Do(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=>de(`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 u;return i(f=>u=f),u},a=n(`${t} = __placeholder`),s=u=>a(()=>{},{scope:{__placeholder:u}}),l=o();s(l),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let u=e._x_model.get,f=e._x_model.set;r(()=>s(u())),r(()=>f(o()))})});A("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&de("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||de(`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))})}),Oe(i,{},e),T(()=>{n.appendChild(i),Y(i),i._x_ignore=!0}),r(()=>i.remove())});var On=()=>{};On.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",On);A("effect",(e,{expression:t},{effect:r})=>r(M(e,t)));function Cn(e,t,r,n){let i=e,o=l=>n(l),a={},s=(l,u)=>f=>u(l,f);if(r.includes("dot")&&(t=jo(t)),r.includes("camel")&&(t=Ko(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,(l,u)=>{u.preventDefault(),l(u)})),r.includes("stop")&&(o=s(o,(l,u)=>{u.stopPropagation(),l(u)})),r.includes("self")&&(o=s(o,(l,u)=>{u.target===e&&l(u)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=s(o,(l,u)=>{e.contains(u.target)||u.target.isConnected!==!1&&(e.offsetWidth<1&&e.offsetHeight<1||e._x_isShown!==!1&&l(u))})),r.includes("once")&&(o=s(o,(l,u)=>{l(u),i.removeEventListener(t,o,a)})),o=s(o,(l,u)=>{Bo(t)&&qo(u,r)||l(u)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",u=Ct(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=Gr(o,u)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",u=Ct(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=Yr(o,u)}return i.addEventListener(t,o,a),()=>{i.removeEventListener(t,o,a)}}function jo(e){return e.replace(/-/g,".")}function Ko(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ct(e){return!Array.isArray(e)&&!isNaN(e)}function Ho(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Bo(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,Ct((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=Ho(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=M(e,r),a=`${r} = rightSideOfExpression($event, ${r})`,s=M(e,a);var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let u=zo(e,t,r),f=Cn(e,l,t,x=>{s(()=>{},{scope:{$event:x,rightSideOfExpression:u}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=f,i(()=>e._x_removeModelListeners.default());let h=M(e,`${r} = __placeholder`);e._x_model={get(){let x;return o(P=>x=P),x},set(x){h(()=>{},{scope:{__placeholder:x}})}},e._x_forceModelUpdate=()=>{o(x=>{x===void 0&&r.match(/\./)&&(x=""),window.fromModel=!0,T(()=>Wr(e,"value",x)),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(_e("cloak")))));qr(()=>`[${_e("init")}]`);A("init",Be((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,Y(e),delete e._x_ignoreSelf})})})});Pt(Nr(":",Lr(_e("bind:"))));A("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let s={};eo(s),M(e,n)(u=>{Jr(e,u,i)},{scope:s});return}if(t==="key")return Uo(e,n);let a=M(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}Br(()=>`[${_e("data")}]`);A("data",Be((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};gt(n,e);let i={};ro(i,n);let o=ce(e,t,{scope:i});o===void 0&&(o={}),gt(o,e);let a=he(o);Er(a);let s=Oe(e,a);a.init&&ce(e,a.init),r(()=>{a.destroy&&ce(e,a.destroy),s()})}));A("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=M(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),l=wt(h=>h?a():o(),h=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,h,a,o):h?s():o()}),u,f=!0;n(()=>i(h=>{!f&&h===u||(t.includes("immediate")&&(h?s():o()),l(h),u=h,f=!1)}))});A("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=Yo(t),o=M(e,i.items),a=M(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,l=e._x_prevKeys,u=[],f=[];if(i(a))a=Object.entries(a).map(([d,v])=>{let y=pr(t,v,d,a);n(C=>f.push(C),{scope:g({index:d},y)}),u.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)}),u.push(v)}let h=[],x=[],P=[],E=[];for(let d=0;d<l.length;d++){let v=l[d];f.indexOf(v)===-1&&P.push(v)}l=l.filter(d=>!P.includes(d));let ue="template";for(let d=0;d<f.length;d++){let v=f[d],y=l.indexOf(v);if(y===-1)l.splice(d,0,v),h.push([ue,d]);else if(y!==d){let C=l.splice(d,1)[0],k=l.splice(y-1,1)[0];l.splice(d,0,k),l.splice(y,0,C),x.push([C,k])}else E.push(v);ue=v}for(let d=0;d<P.length;d++){let v=P[d];s[v]._x_effects&&s[v]._x_effects.forEach(hr),s[v].remove(),s[v]=null,delete s[v]}for(let d=0;d<x.length;d++){let[v,y]=x[d],C=s[v],k=s[y],U=document.createElement("div");T(()=>{k.after(U),C.after(k),k._x_currentIfEl&&k.after(k._x_currentIfEl),U.before(C),C._x_currentIfEl&&C.after(C._x_currentIfEl),U.remove()}),lr(k,u[f.indexOf(y)])}for(let d=0;d<h.length;d++){let[v,y]=h[d],C=v==="template"?o:s[v];C._x_currentIfEl&&(C=C._x_currentIfEl);let k=u[y],U=f[y],D=document.importNode(o.content,!0).firstElementChild;Oe(D,he(k),o),T(()=>{C.after(D),Y(D)}),typeof U=="object"&&de("x-for key cannot be an object, it must be a string or an integer",o),s[U]=D}for(let d=0;d<E.length;d++)lr(s[E[d]],u[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 Rn(){}Rn.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",Rn);A("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=M(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let s=e.content.cloneNode(!0).firstElementChild;return Oe(s,{},e),T(()=>{e.after(s),Y(s)}),e._x_currentIfEl=s,e._x_undoIf=()=>{ie(s,l=>{l._x_effects&&l._x_effects.forEach(hr)}),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=>Fo(e,i))});Pt(Nr("@",Lr(_e("on:"))));A("on",Be((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?M(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let a=Cn(e,t,r,s=>{o(()=>{},{scope:{$event:s},params:[s]})});i(()=>a())}));Qe("Collapse","collapse","collapse");Qe("Intersect","intersect","intersect");Qe("Focus","trap","focus");Qe("Mask","mask","mask");function Qe(e,t,r){A(t,n=>de(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}Re.setEvaluator(Or);Re.setReactivityEngine({reactive:Vt,effect:po,release:ho,raw:b});var Jo=Re,Wt=Jo;var Zo=class{constructor(e){lt(this,"el");lt(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 O(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 Mn=()=>{},kn=()=>{};async function Ut(e,t,r){let n,i,o,a,s,l,u,f,h,x,P;function E(c){if(P)return kn((c||"").replace(`
|
6
|
+
`,"\\n"),n,i),new Promise(p=>Mn=()=>p())}function ue(c={}){let p=I=>I.getAttribute("key"),_=()=>{};s=c.updating||_,l=c.updated||_,u=c.removing||_,f=c.removed||_,h=c.adding||_,x=c.added||_,o=c.key||p,a=c.lookahead||!1,P=c.debug||!1}async function d(c,p){if(v(c,p)){let I=y(c,p);return await E("Swap elements"),I}let _=!1;if(!me(s,c,p,()=>_=!0)){if(window.Alpine&&ta(c,p,()=>_=!0),ea(p)){await C(c,p),l(c,p);return}_||await k(c,p),l(c,p),await U(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(u,c))return;let _=p.cloneNode(!0);me(h,_)||(O(c).replace(_),f(c),x(_))}async function C(c,p){let _=p.nodeValue;c.nodeValue!==_&&(c.nodeValue=_,await E("Change text node to: "+_))}async function k(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let _=Array.from(c.attributes),I=Array.from(p.attributes);for(let W=_.length-1;W>=0;W--){let B=_[W].name;p.hasAttribute(B)||(c.removeAttribute(B),await E("Remove attribute"))}for(let W=I.length-1;W>=0;W--){let B=I[W].name,w=I[W].value;c.getAttribute(B)!==w&&(c.setAttribute(B,w),await E(`Set [${B}] attribute to: "${w}"`))}}async function U(c,p){let _=c.childNodes,I=p.childNodes,W=nr(I),B=nr(_),w=O(p).nodes().first(),m=O(c).nodes().first(),Q={};for(;w;){let N=D(w),q=D(m);if(!m)if(N&&Q[N]){let L=Q[N];O(c).append(L),m=L,await E("Add element (from key)")}else{let L=Wn(w,c)||{};await E("Add element: "+(L.outerHTML||L.nodeValue)),w=O(w).nodes().next();continue}if(a){let L=O(w).next(),ir=!1;for(;!ir&&L;)m.isEqualNode(L)&&(ir=!0,m=ot(w,m),q=D(m),await E("Move element (lookahead)")),L=O(L).next()}if(N!==q){if(!N&&q){Q[q]=m,m=ot(w,m),Q[q].remove(),m=O(m).nodes().next(),w=O(w).nodes().next(),await E('No "to" key');continue}if(N&&!q&&B[N]&&(m=O(m).replace(B[N]),await E('No "from" key')),N&&q){Q[q]=m;let L=B[N];if(L)m=O(m).replace(L),await E('Move "from" key');else{Q[q]=m,m=ot(w,m),Q[q].remove(),m=O(m).next(),w=O(w).next(),await E("Swap elements with keys");continue}}}let Un=m&&O(m).nodes().next();await d(m,w),w=w&&O(w).nodes().next(),m=Un}let at=[];for(;m;)me(u,m)||at.push(m),m=O(m).nodes().next();for(;at.length;){let N=at.shift();N.remove(),await E("remove el"),f(N)}}function D(c){return c&&c.nodeType===1&&o(c)}function nr(c){let p={};return c.forEach(_=>{let I=D(_);I&&(p[I]=_)}),p}function Wn(c,p){if(!me(h,c)){let _=c.cloneNode(!0);return O(p).append(_),x(_),_}return null}function ot(c,p){if(!me(h,c)){let _=c.cloneNode(!0);return O(p).before(_),x(_),_}return p}return ue(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=()=>Mn();Ut.log=e=>{kn=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 Nn=ra;Wt.plugin(Nn);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 la(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 ua(){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 l=s,u=n.split(".");for(;u.length>0;)l=l[u.shift()];return l})),la(i,o,a)}var Gt=ua;if(!self.Turbo)throw new Error("`Turbo` is not defined! Be sure to import `turbo_ready` 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.TurboReady={StreamActions:{invoke:Gt}};console.info("TurboReady has initialized and has registered new stream actions with Turbo.");var Yt=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}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 oe={start:"turbo-reflex:start",success:"turbo-reflex:success",finish:"turbo-reflex:finish",abort:"turbo-reflex:abort",clientError:"turbo-reflex:client-error",serverError:"turbo-reflex:server-error"},J={stateLoad:"turbo-reflex:state-load",stateChange:"turbo-reflex:state-change"},K=g(g({},oe),J);function R(e,t,r={}){r=r||{},r.detail=r.detail||{},t=t||document;let n=new CustomEvent(e,$(g({},r),{bubbles:!0}));return t.dispatchEvent(n),n}var Xt;function et(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],R(J.stateChange,S.element,{detail:{state:Xt}}),!0},set(n,i,o,a){return n[i]=et(o,this),R(J.stateChange,S.element,{detail:{state:Xt}}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=et(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=et(i,r);return t||(Xt=r),r}var $n=et;var Jt,ae,tt,Pn;function In(){if(!S.element)return ge();let e=atob(S.element.dataset.state);tt={},ae=$n(JSON.parse(e)),Jt=g({},ae),delete S.element.dataset.clientStateChange,setTimeout(()=>R(J.stateLoad,S.element,{detail:{state:ae}}))}function ge(){clearTimeout(Pn),Pn=setTimeout(In,10)}Jt||In();addEventListener("DOMContentLoaded",ge);addEventListener("load",ge);addEventListener("turbo:load",ge);addEventListener("turbo:frame-load",ge);addEventListener("turbo-reflex:success",ge);addEventListener(J.stateChange,e=>{tt={};for(let[t,r]of Object.entries(ae))Jt[t]!==r&&(tt[t]=r);S.element.dataset.clientStateChange=!0,S.element.dataset.state=btoa(JSON.stringify(ae))});var se={events:J,get current(){return ae},get delta(){return tt},get payloadChunks(){return btoa(JSON.stringify(ae)).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 le={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 reflexes(){return[...Object.values(rt)]},get length(){return Object.keys(rt).length}};function Dn(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>R(oe.finish,e.target,{detail:e.detail}),25)}addEventListener(oe.serverError,Dn);addEventListener(oe.success,Dn);addEventListener(oe.finish,e=>nt.remove(e.detail.id),!0);var V={events:oe};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-reflex.html",r.headers.Accept];n=n.filter(i=>i&&i.trim().length>0).join(", "),r.headers.Accept=n,r.headers["TurboReflex-Token"]=S.token}se.payloadChunks.forEach((n,i)=>{r.headers[`TurboReflex-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("TurboReflex")){if(r.statusCode<200||r.statusCode>399){let n=`Server returned a ${r.statusCode} status code! TurboReflex requires 2XX-3XX status codes.`;R(V.events.clientError,document,{detail:$(g({},e.detail),{error:n})},!0)}r.header("TurboReflex")==="Append"&&(e.preventDefault(),r.responseText.then(n=>le.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboReflexSrc=Zt[t.id]||t.src||t.dataset.turboReflexSrc,delete Zt[t.id]});var ha={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",reflexAttribute:"data-turbo-reflex"},H=g({},ha);var it={},Fn;function _a(e,t){it[e]=t,document.addEventListener(e,Fn,!0)}function ma(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===ma(t)}var Z={events:it,register:_a,isRegisteredForElement:ga,set handler(e){Fn=e}};function va(e){return e.closest(`[${H.reflexAttribute}]`)}function xa(e){return e.closest("turbo-frame")}function ba(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,ba(e,t),delete t.class,delete t.action,delete t.href,delete t[H.reflexAttribute],delete t[H.frameAttribute],t}var Me={buildAttributePayload:ya,findClosestReflex:va,findClosestFrame:xa};function wa(e,t={}){t.token=S.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_reflex",r.value=JSON.stringify(t),e.appendChild(r)}var jn={invokeReflex:wa};function Ea(e,t={}){let r=document.createElement("a");r.href=e;let n=new URL(r);return n.searchParams.set("turbo_reflex",JSON.stringify(t)),n}var ve={build:Ea};function Aa(e,t){let r=t.src;t=g({},t),delete t.src,e.src=ve.build(r,t)}var Qt={invokeReflex:Aa};function Sa(e,t={}){let r=t.src;t=g({},t),delete t.src,delete t.href,e.setAttribute("href",ve.build(r,t))}var Kn={invokeReflex:Sa};function Ta(e){let t=e.target;R(V.events.abort,document,{detail:$(g({},e.detail),{xhr:t})})}function er(e){let t=e.target;t.getResponseHeader("TurboReflex")==="Append"?le.append(t.responseText):le.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboReflex requires 2XX-3XX status codes.`;R(V.events.clientError,document,{detail:$(g({},e.detail),{error:r,xhr:t})},!0)}function Oa(e){let t=e.target;if(t.status<200||t.status>399)return er(e);let r=t.responseText;t.getResponseHeader("TurboReflex")==="Append"?le.append(t.responseText):le.replaceDocument(t.responseText)}function Ca(e){let t=e.src;e=g({},e),delete e.src;try{let r=new XMLHttpRequest;r.open("GET",ve.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-reflex.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboReflex-Token",S.token),se.payloadChunks.forEach((n,i)=>r.setRequestHeader(`TurboReflex-State-${i.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",Ta),r.addEventListener("error",er),r.addEventListener("load",Oa),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;er(r,{detail:{message:n}})}}var Hn={invokeReflex:Ca};function tr(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboReflexSrc||location.href}function Ra(e){let t=Me.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,invokeReflex:jn.invokeReflex}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeReflex:Kn.invokeReflex}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:tr(e,t),invokeReflex:Qt.invokeReflex}):(!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),invokeReflex:Qt.invokeReflex}:{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),invokeReflex:Hn.invokeReflex}}var rr={find:Ra};var ke="unknown",Bn={debug:Object.values(K),info:Object.values(K),warn:[K.abort,K.clientError,K.serverError],error:[K.clientError,K.serverError],unknown:[]};Object.values(K).forEach(e=>{addEventListener(e,t=>{Bn[ke].includes(t.type)&&console[ke==="debug"?"log":ke](t.type,{target:t.target,detail:t.detail})})});var qn={get level(){return ke},set level(e){return Object.keys(Bn).includes(e)||(e="unknown"),ke=e}};function Ma(){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:Ma};function Vn(e,t){return{id:e,name:t.dataset.turboReflex,elementId:t.id.length>0?t.id:null,elementAttributes:Me.buildAttributePayload(t),startedAt:new Date().getTime()}}function ka(e){let t,r={};try{if(t=Me.findClosestReflex(e.target),!t||!Z.isRegisteredForElement(e.type,t))return;let n=`reflex-${zn.v4()}`,i=rr.find(t),o=$(g({},Vn(n,t)),{driver:i.name,frameId:i.frame?i.frame.id:null,src:i.src}),a=R(V.events.start,t,{cancelable:!0,detail:o});if(a.defaultPrevented)return R(V.events.abort,t,{detail:{message:`An event handler for '${V.events.start}' prevented default behavior and blocked reflex invocation!`,source:a}});switch(i=rr.find(t),o=$(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.invokeReflex(t,o);case"form":return i.invokeReflex(t,o);case"frame":return i.invokeReflex(i.frame,o);case"window":return i.invokeReflex(o)}}catch(n){R(V.events.clientError,t,{detail:$(g({},r),{error:n})})}}Z.handler=ka;Z.register("change",[`input[${H.reflexAttribute}]`,`select[${H.reflexAttribute}]`,`textarea[${H.reflexAttribute}]`]);Z.register("submit",[`form[${H.reflexAttribute}]`]);Z.register("click",[`[${H.reflexAttribute}]`]);self.TurboReflex={logger:qn,schema:H,registerEventDelegate:Z.register,get eventDelegates(){return g({},Z.events)},get events(){return g({},K)},get state(){return se.current},get stateDelta(){return se.delta}};var gl=self.TurboReflex;export{gl as default};
|
7
7
|
//# sourceMappingURL=turbo_reflex.js.map
|