reflex_behaviors 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a2ded9952d73c51d862ace6ec2d23ea4276827655a42d9d018d15fff4c36ba4
4
- data.tar.gz: 034c1749804af770a17f5a1f8e09d44da6477ff057fb87aa0368f54b1eccca46
3
+ metadata.gz: db748ea8e0ff6507ed7c696832d23238c4528fa446c3bd4ab5139319f8a570ea
4
+ data.tar.gz: c76a5883e46cd32823cdc6cc750883ddb6a3b7c2414594c0f7c38194a27e74fd
5
5
  SHA512:
6
- metadata.gz: 1758aad91719cfee0d40bc167711ebe5aca0d1de3956f66691d67a0fd9d58fb76f83c6da6606b058f67f0a7e14fbf1c43b25ec546da39a22a8856a416fd18c60
7
- data.tar.gz: 585dd1041cf4346de8649a73a896cf205513f945bd5fe1fe5265b9a4be6b04045e1ce5d3dec135c5cbc19994567fdbc31bca0bf9b4c4d303bdc492ec276af0f5
6
+ metadata.gz: 7e8dc54f1fab34fbc39cc5f1e07415935eb5ea756b0256b1765dbcd9722d95d3ab85d37b826aa0e53b60e03448074f2fcc07b09199ac160ac4ad41d1ecc721a9
7
+ data.tar.gz: 6062a281f51f792eb43d49562891b842956aaf557aab1064fb016575ebb579ae4d3f359ead662038037177ff6866dd4b3f5d0d1975ac5211c0490d2cc914a4f4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- reflex_behaviors (0.0.2)
4
+ reflex_behaviors (0.0.4)
5
5
  rails (>= 6.1)
6
6
  turbo-rails (>= 1.1)
7
7
  turbo_ready (>= 0.1.2)
@@ -87,13 +87,17 @@ GEM
87
87
  activesupport (>= 5.0)
88
88
  i18n (1.12.0)
89
89
  concurrent-ruby (~> 1.0)
90
- json (2.6.2)
90
+ json (2.6.3)
91
+ language_server-protocol (3.17.0.2)
91
92
  loofah (2.19.0)
92
93
  crass (~> 1.0.2)
93
94
  nokogiri (>= 1.5.9)
94
95
  magic_frozen_string_literal (1.2.0)
95
- mail (2.7.1)
96
+ mail (2.8.0)
96
97
  mini_mime (>= 0.1.1)
98
+ net-imap
99
+ net-pop
100
+ net-smtp
97
101
  marcel (1.0.2)
98
102
  method_source (1.0.0)
99
103
  mini_mime (1.1.2)
@@ -107,7 +111,7 @@ GEM
107
111
  net-protocol
108
112
  net-pop (0.1.2)
109
113
  net-protocol
110
- net-protocol (0.1.3)
114
+ net-protocol (0.2.0)
111
115
  timeout
112
116
  net-smtp (0.3.3)
113
117
  net-protocol
@@ -123,7 +127,7 @@ GEM
123
127
  pry-byebug (3.10.1)
124
128
  byebug (~> 11.0)
125
129
  pry (>= 0.13, < 0.15)
126
- racc (1.6.0)
130
+ racc (1.6.1)
127
131
  rack (2.2.4)
128
132
  rack-test (2.0.2)
129
133
  rack (>= 1.3)
@@ -167,19 +171,20 @@ GEM
167
171
  rubocop-ast (>= 1.23.0, < 2.0)
168
172
  ruby-progressbar (~> 1.7)
169
173
  unicode-display_width (>= 1.4.0, < 3.0)
170
- rubocop-ast (1.23.0)
174
+ rubocop-ast (1.24.0)
171
175
  parser (>= 3.1.1.0)
172
176
  rubocop-performance (1.15.1)
173
177
  rubocop (>= 1.7.0, < 2.0)
174
178
  rubocop-ast (>= 0.4.0)
175
179
  ruby-progressbar (1.11.0)
176
- standard (1.18.1)
180
+ standard (1.19.1)
181
+ language_server-protocol (~> 3.17.0.2)
177
182
  rubocop (= 1.39.0)
178
183
  rubocop-performance (= 1.15.1)
179
184
  standardrb (1.0.1)
180
185
  standard
181
186
  thor (1.2.1)
182
- timeout (0.3.0)
187
+ timeout (0.3.1)
183
188
  turbo-rails (1.3.2)
184
189
  actionpack (>= 6.0.0)
185
190
  activejob (>= 6.0.0)
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  </h1>
5
5
  <p align="center">
6
6
  <a href="http://blog.codinghorror.com/the-best-code-is-no-code-at-all/">
7
- <img alt="Lines of Code" src="https://img.shields.io/badge/loc-228-47d299.svg" />
7
+ <img alt="Lines of Code" src="https://img.shields.io/badge/loc-774-47d299.svg" />
8
8
  </a>
9
9
  <a href="https://codeclimate.com/github/hopsoft/reflex_behaviors/maintainability">
10
10
  <img src="https://api.codeclimate.com/v1/badges/7aac6daed3e4032e292e/maintainability" />
@@ -1,7 +1,137 @@
1
- function Wn(e,t,r={}){let n=new CustomEvent(t,r);e.forEach(i=>i.dispatchEvent(n))}var rr=Wn;var dt=!1,pt=!1,ee=[];function Un(e){Gn(e)}function Gn(e){ee.includes(e)||ee.push(e),Yn()}function cr(e){let t=ee.indexOf(e);t!==-1&&ee.splice(t,1)}function Yn(){!pt&&!dt&&(dt=!0,queueMicrotask(Xn))}function Xn(){dt=!1,pt=!0;for(let e=0;e<ee.length;e++)ee[e]();ee.length=0,pt=!1}var pe,Se,je,fr,ht=!0;function Jn(e){ht=!1,e(),ht=!0}function Zn(e){pe=e.reactive,je=e.release,Se=t=>e.effect(t,{scheduler:r=>{ht?Un(r):r()}}),fr=e.raw}function nr(e){Se=e}function Qn(e){let t=()=>{};return[n=>{let i=Se(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),je(i))},i},()=>{t()}]}var dr=[],pr=[],hr=[];function ei(e){hr.push(e)}function mr(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,pr.push(t))}function ti(e){dr.push(e)}function ri(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function _r(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 Ct=new MutationObserver(kt),Rt=!1;function gr(){Ct.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Rt=!0}function ni(){ii(),Ct.disconnect(),Rt=!1}var ye=[],lt=!1;function ii(){ye=ye.concat(Ct.takeRecords()),ye.length&&!lt&&(lt=!0,queueMicrotask(()=>{oi(),lt=!1}))}function oi(){kt(ye),ye.length=0}function S(e){if(!Rt)return e();ni();let t=e();return gr(),t}var Mt=!1,Ie=[];function ai(){Mt=!0}function si(){Mt=!1,kt(Ie),Ie=[]}function kt(e){if(Mt){Ie=Ie.concat(e);return}let t=[],r=[],n=new Map,i=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&(e[o].type==="childList"&&(e[o].addedNodes.forEach(a=>a.nodeType===1&&t.push(a)),e[o].removedNodes.forEach(a=>a.nodeType===1&&r.push(a))),e[o].type==="attributes")){let a=e[o].target,s=e[o].attributeName,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)=>{_r(a,o)}),n.forEach((o,a)=>{dr.forEach(s=>s(a,o))});for(let o of r)if(!t.includes(o)&&(pr.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,hr.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 vr(e){return Oe(ce(e))}function Te(e,t,r){return e._x_dataStack=[t,...ce(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function ir(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function ce(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?ce(e.host):e.parentNode?ce(e.parentNode):[]}function Oe(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,{...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 xr(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 br(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>li(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 li(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 yr={};function D(e,t){yr[e]=t}function _t(e,t){return Object.entries(yr).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){let[i,o]=Or(t);return i={interceptor:br,...i},mr(t,o),n(t,i)},enumerable:!1})}),e}function ui(e,t,r,...n){try{return r(...n)}catch(i){Ae(i,e,t)}}function Ae(e,t,r=void 0){Object.assign(e,{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
1
+ function ui(e,t,r={}){let n=new CustomEvent(t,r);e.forEach(i=>i.dispatchEvent(n))}var dr=ui;var Et=!1,wt=!1,te=[];function ci(e){fi(e)}function fi(e){te.includes(e)||te.push(e),di()}function br(e){let t=te.indexOf(e);t!==-1&&te.splice(t,1)}function di(){!wt&&!Et&&(Et=!0,queueMicrotask(pi))}function pi(){Et=!1,wt=!0;for(let e=0;e<te.length;e++)te[e]();te.length=0,wt=!1}var me,Ce,Ue,yr,St=!0;function hi(e){St=!1,e(),St=!0}function mi(e){me=e.reactive,Ue=e.release,Ce=t=>e.effect(t,{scheduler:r=>{St?ci(r):r()}}),yr=e.raw}function pr(e){Ce=e}function gi(e){let t=()=>{};return[n=>{let i=Ce(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),Ue(i))},i},()=>{t()}]}var Er=[],wr=[],Sr=[];function vi(e){Sr.push(e)}function Ar(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,wr.push(t))}function _i(e){Er.push(e)}function xi(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function Tr(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 Ht=new MutationObserver(Kt),jt=!1;function Cr(){Ht.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),jt=!0}function bi(){yi(),Ht.disconnect(),jt=!1}var we=[],_t=!1;function yi(){we=we.concat(Ht.takeRecords()),we.length&&!_t&&(_t=!0,queueMicrotask(()=>{Ei(),_t=!1}))}function Ei(){Kt(we),we.length=0}function A(e){if(!jt)return e();bi();let t=e();return Cr(),t}var Ft=!1,ze=[];function wi(){Ft=!0}function Si(){Ft=!1,Kt(ze),ze=[]}function Kt(e){if(Ft){ze=ze.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(s=>s.nodeType===1&&t.push(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&r.push(s))),e[o].type==="attributes")){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,u=()=>{n.has(s)||n.set(s,[]),n.get(s).push({name:a,value:s.getAttribute(a)})},f=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&l===null?u():s.hasAttribute(a)?(f(),u()):f()}i.forEach((o,s)=>{Tr(s,o)}),n.forEach((o,s)=>{Er.forEach(a=>a(s,o))});for(let o of r)if(!t.includes(o)&&(wr.forEach(s=>s(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,Sr.forEach(s=>s(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 kr(e){return Oe(de(e))}function ke(e,t,r){return e._x_dataStack=[t,...de(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(n=>n!==t)}}function hr(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([n,i])=>{r[n]=i})}function de(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?de(e.host):e.parentNode?de(e.parentNode):[]}function Oe(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 s=o.get,a=o.set,l=o;s=s&&s.bind(t),a=a&&a.bind(t),s&&(s._x_alreadyBound=!0),a&&(a._x_alreadyBound=!0),Object.defineProperty(i,n,{...l,get:s,set:a})}return!0}return!1})||{})[n],set:(r,n,i)=>{let o=e.find(s=>s.hasOwnProperty(n));return o?o[n]=i:e[e.length-1][n]=i,!0}});return t}function Or(e){let t=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([o,{value:s,enumerable:a}])=>{if(a===!1||s===void 0)return;let l=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?n[o]=s.initialize(e,l,o):t(s)&&s!==n&&!(s instanceof Element)&&r(s,l)})};return r(e)}function Rr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return e(this.initialValue,()=>Ai(n,i),s=>At(n,i,s),i,o)}};return t(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a)=>{let l=n.initialize(o,s,a);return r.initialValue=l,i(o,s,a)}}else r.initialValue=n;return r}}function Ai(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function At(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]]={}),At(e[t[0]],t.slice(1),r)}}var Lr={};function H(e,t){Lr[e]=t}function Tt(e,t){return Object.entries(Lr).forEach(([r,n])=>{Object.defineProperty(e,`$${r}`,{get(){let[i,o]=Dr(t);return i={interceptor:Rr,...i},Ar(t,o),n(t,i)},enumerable:!1})}),e}function Ti(e,t,r,...n){try{return r(...n)}catch(i){Te(i,e,t)}}function Te(e,t,r=void 0){Object.assign(e,{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
2
2
 
3
3
  ${r?'Expression: "'+r+`"
4
4
 
5
- `:""}`,t),setTimeout(()=>{throw e},0)}var Pe=!0;function ci(e){let t=Pe;Pe=!1,e(),Pe=t}function ue(e,t,r={}){let n;return R(e,t)(i=>n=i,r),n}function R(...e){return Er(...e)}var Er=wr;function fi(e){Er=e}function wr(e,t){let r={};_t(r,e);let n=[r,...ce(e)];if(typeof t=="function")return di(n,t);let i=hi(n,t,e);return ui.bind(null,e,t,i)}function di(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Oe([n,...e]),i);De(r,o)}}var ut={};function pi(e,t){if(ut[e])return ut[e];let r=Object.getPrototypeOf(async function(){}).constructor,n=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)\s/.test(e)?`(() => { ${e} })()`:e,o=(()=>{try{return new r(["__self","scope"],`with (scope) { __self.result = ${n} }; __self.finished = true; return __self.result;`)}catch(a){return Ae(a,t,e),Promise.resolve()}})();return ut[e]=o,o}function hi(e,t,r){let n=pi(t,r);return(i=()=>{},{scope:o={},params:a=[]}={})=>{n.result=void 0,n.finished=!1;let s=Oe([o,...e]);if(typeof n=="function"){let l=n(n,s).catch(u=>Ae(u,r,t));n.finished?(De(i,n.result,s,a,r),n.result=void 0):l.then(u=>{De(i,u,s,a,r)}).catch(u=>Ae(u,r,t)).finally(()=>n.result=void 0)}}}function De(e,t,r,n,i){if(Pe&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(a=>De(e,a,r,n)).catch(a=>Ae(a,i,t)):e(o)}else e(t)}var Lt="x-";function he(e=""){return Lt+e}function mi(e){Lt=e}var Ar={};function w(e,t){Ar[e]=t}function Nt(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=Sr(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(Mr((o,a)=>n[o]=a)).filter(Lr).map(vi(n,r)).sort(xi).map(o=>gi(e,o))}function Sr(e){return Array.from(e).map(Mr()).filter(t=>!Lr(t))}var gt=!1,be=new Map,Tr=Symbol();function _i(e){gt=!0;let t=Symbol();Tr=t,be.set(t,[]);let r=()=>{for(;be.get(t).length;)be.get(t).shift()();be.delete(t)},n=()=>{gt=!1,r()};e(r),n()}function Or(e){let t=[],r=s=>t.push(s),[n,i]=Qn(e);return t.push(i),[{Alpine:Ce,effect:n,cleanup:r,evaluateLater:R.bind(R,e),evaluate:ue.bind(ue,e)},()=>t.forEach(s=>s())]}function gi(e,t){let r=()=>{},n=Ar[t.type]||r,[i,o]=Or(e);ri(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),gt?be.get(Tr).push(n):n())};return a.runCleanups=o,a}var Cr=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),Rr=e=>e;function Mr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=kr.reduce((o,a)=>a(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var kr=[];function $t(e){kr.push(e)}function Lr({name:e}){return Nr().test(e)}var Nr=()=>new RegExp(`^${Lt}([^:^.]+)\\b`);function vi(e,t){return({name:r,value:n})=>{let i=r.match(Nr()),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 vt="DEFAULT",Ne=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",vt,"teleport"];function xi(e,t){let r=Ne.indexOf(e.type)===-1?vt:e.type,n=Ne.indexOf(t.type)===-1?vt: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 xt=[],Pt=!1;function $r(e=()=>{}){return queueMicrotask(()=>{Pt||setTimeout(()=>{bt()})}),new Promise(t=>{xt.push(()=>{e(),t()})})}function bt(){for(Pt=!1;xt.length;)xt.shift()()}function bi(){Pt=!0}function ne(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>ne(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;for(;n;)ne(n,t,!1),n=n.nextElementSibling}function fe(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function yi(){document.body||fe("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"),gr(),ei(t=>W(t,ne)),mr(t=>wi(t)),ti((t,r)=>{Nt(t,r).forEach(n=>n())});let e=t=>!Ke(t.parentElement,!0);Array.from(document.querySelectorAll(Dr())).filter(e).forEach(t=>{W(t)}),Ee(document,"alpine:initialized")}var It=[],Pr=[];function Ir(){return It.map(e=>e())}function Dr(){return It.concat(Pr).map(e=>e())}function Fr(e){It.push(e)}function jr(e){Pr.push(e)}function Ke(e,t=!1){return He(e,r=>{if((t?Dr():Ir()).some(i=>r.matches(i)))return!0})}function He(e,t){if(!!e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return He(e.parentElement,t)}}function Ei(e){return Ir().some(t=>e.matches(t))}function W(e,t=ne){_i(()=>{t(e,(r,n)=>{Nt(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function wi(e){ne(e,t=>_r(t))}function Dt(e,t){return Array.isArray(t)?or(e,t.join(" ")):typeof t=="object"&&t!==null?Ai(e,t):typeof t=="function"?Dt(e,t()):or(e,t)}function or(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 Ai(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 Be(e,t){return typeof t=="object"&&t!==null?Si(e,t):Ti(e,t)}function Si(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],n.startsWith("--")||(n=Oi(n)),e.style.setProperty(n,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{Be(e,r)}}function Ti(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Oi(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function yt(e,t=()=>{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}w("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{typeof n=="function"&&(n=i(n)),n?Ci(e,n,t):Ri(e,r,t)});function Ci(e,t,r){Kr(e,Dt,""),{enter:i=>{e._x_transition.enter.during=i},"enter-start":i=>{e._x_transition.enter.start=i},"enter-end":i=>{e._x_transition.enter.end=i},leave:i=>{e._x_transition.leave.during=i},"leave-start":i=>{e._x_transition.leave.start=i},"leave-end":i=>{e._x_transition.leave.end=i}}[r](t)}function Ri(e,t,r){Kr(e,Be);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,b)=>b<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((g,b)=>b>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?ve(t,"scale",95)/100:1,h=ve(t,"delay",0),v=ve(t,"origin","center"),N="opacity, transform",E=ve(t,"duration",150)/1e3,le=ve(t,"duration",75)/1e3,d="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:v,transitionDelay:h,transitionProperty:N,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:v,transitionDelay:h,transitionProperty:N,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 Kr(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=Hr(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 Hr(e){let t=e.parentNode;if(!!t)return t._x_hidePromise?t:Hr(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;Mi(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 Mi(e,t){let r,n,i,o=yt(()=>{S(()=>{r=!0,n||t.before(),i||(t.end(),bt()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(a){this.beforeCancels.push(a)},cancel:yt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},S(()=>{t.start(),t.during()}),bi(),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),S(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{r||(S(()=>{t.end()}),bt(),setTimeout(e._x_transitioning.finish,a+s),i=!0)})})}function ve(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n||t==="scale"&&isNaN(n))return r;if(t==="duration"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[n,e[e.indexOf(t)+2]].join(" "):n}var wt=!1;function qe(e,t=()=>{}){return(...r)=>wt?t(...r):e(...r)}function ki(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),wt=!0,Ni(()=>{Li(t)}),wt=!1}function Li(e){let t=!1;W(e,(n,i)=>{ne(n,(o,a)=>{if(t&&Ei(o))return a();t=!0,i(o,a)})})}function Ni(e){let t=Se;nr((r,n)=>{let i=t(r);return je(i),()=>{}}),e(),nr(t)}function Br(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=pe({})),e._x_bindings[t]=r,t=n.includes("camel")?Ki(t):t,t){case"value":$i(e,r);break;case"style":Ii(e,r);break;case"class":Pi(e,r);break;default:Di(e,t,r);break}}function $i(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=ar(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=>ar(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")ji(e,t);else{if(e.value===t)return;e.value=t}}function Pi(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Dt(e,t)}function Ii(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=Be(e,t)}function Di(e,t,r){[null,void 0,!1].includes(r)&&Hi(t)?e.removeAttribute(t):(qr(t)&&(r=t),Fi(e,t,r))}function Fi(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function ji(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function Ki(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function ar(e,t){return e==t}function qr(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 Hi(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Bi(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:qr(t)?!![t,"true"].includes(n):n}function zr(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 Vr(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function qi(e){e(Ce)}var Q={},sr=!1;function zi(e,t){if(sr||(Q=pe(Q),sr=!0),t===void 0)return Q[e];Q[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&Q[e].init(),xr(Q[e])}function Vi(){return Q}var Wr={};function Wi(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?Ur(e,r()):Wr[e]=r}function Ui(e){return Object.entries(Wr).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function Ur(e,t,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(t).map(([a,s])=>({name:a,value:s})),o=Sr(i);i=i.map(a=>o.find(s=>s.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),Nt(e,i,r).map(a=>{n.push(a.runCleanups),a()})}var Gr={};function Gi(e,t){Gr[e]=t}function Yi(e,t){return Object.entries(Gr).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var Xi={get reactive(){return pe},get release(){return je},get effect(){return Se},get raw(){return fr},version:"3.10.5",flushAndStopDeferringMutations:si,dontAutoEvaluateFunctions:ci,disableEffectScheduling:Jn,setReactivityEngine:Zn,closestDataStack:ce,skipDuringClone:qe,addRootSelector:Fr,addInitSelector:jr,addScopeToNode:Te,deferMutations:ai,mapAttributes:$t,evaluateLater:R,setEvaluator:fi,mergeProxies:Oe,findClosest:He,closestRoot:Ke,interceptor:br,transition:Et,setStyles:Be,mutateDom:S,directive:w,throttle:Vr,debounce:zr,evaluate:ue,initTree:W,nextTick:$r,prefixed:he,prefix:mi,plugin:qi,magic:D,store:zi,start:yi,clone:ki,bound:Bi,$data:vr,data:Gi,bind:Wi},Ce=Xi;function Yr(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 Ji="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Oa=Yr(Ji+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),Zi=Object.freeze({}),Ca=Object.freeze([]),Xr=Object.assign,Qi=Object.prototype.hasOwnProperty,ze=(e,t)=>Qi.call(e,t),te=Array.isArray,we=e=>Jr(e)==="[object Map]",eo=e=>typeof e=="string",Ft=e=>typeof e=="symbol",Ve=e=>e!==null&&typeof e=="object",to=Object.prototype.toString,Jr=e=>to.call(e),Zr=e=>Jr(e).slice(8,-1),jt=e=>eo(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,We=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},ro=/-(\w)/g,Ra=We(e=>e.replace(ro,(t,r)=>r?r.toUpperCase():"")),no=/\B([A-Z])/g,Ma=We(e=>e.replace(no,"-$1").toLowerCase()),Qr=We(e=>e.charAt(0).toUpperCase()+e.slice(1)),ka=We(e=>e?`on${Qr(e)}`:""),en=(e,t)=>e!==t&&(e===e||t===t),At=new WeakMap,xe=[],B,re=Symbol("iterate"),St=Symbol("Map key iterate");function io(e){return e&&e._isEffect===!0}function oo(e,t=Zi){io(e)&&(e=e.raw);let r=lo(e,t);return t.lazy||r(),r}function ao(e){e.active&&(tn(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var so=0;function lo(e,t){let r=function(){if(!r.active)return e();if(!xe.includes(r)){tn(r);try{return co(),xe.push(r),B=r,e()}finally{xe.pop(),rn(),B=xe[xe.length-1]}}};return r.id=so++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function tn(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var de=!0,Kt=[];function uo(){Kt.push(de),de=!1}function co(){Kt.push(de),de=!0}function rn(){let e=Kt.pop();de=e===void 0?!0:e}function I(e,t,r){if(!de||B===void 0)return;let n=At.get(e);n||At.set(e,n=new Map);let i=n.get(r);i||n.set(r,i=new Set),i.has(B)||(i.add(B),B.deps.push(i),B.options.onTrack&&B.options.onTrack({effect:B,target:e,type:t,key:r}))}function U(e,t,r,n,i,o){let a=At.get(e);if(!a)return;let s=new Set,l=f=>{f&&f.forEach(h=>{(h!==B||h.allowRecurse)&&s.add(h)})};if(t==="clear")a.forEach(l);else if(r==="length"&&te(e))a.forEach((f,h)=>{(h==="length"||h>=n)&&l(f)});else switch(r!==void 0&&l(a.get(r)),t){case"add":te(e)?jt(r)&&l(a.get("length")):(l(a.get(re)),we(e)&&l(a.get(St)));break;case"delete":te(e)||(l(a.get(re)),we(e)&&l(a.get(St)));break;case"set":we(e)&&l(a.get(re));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 fo=Yr("__proto__,__v_isRef,__isVue"),nn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Ft)),po=Ue(),ho=Ue(!1,!0),mo=Ue(!0),_o=Ue(!0,!0),Fe={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];Fe[e]=function(...r){let n=x(this);for(let o=0,a=this.length;o<a;o++)I(n,"get",o+"");let i=t.apply(n,r);return i===-1||i===!1?t.apply(n,r.map(x)):i}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];Fe[e]=function(...r){uo();let n=t.apply(this,r);return rn(),n}});function Ue(e=!1,t=!1){return function(n,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_raw"&&o===(e?t?To:vn:t?So:gn).get(n))return n;let a=te(n);if(!e&&a&&ze(Fe,i))return Reflect.get(Fe,i,o);let s=Reflect.get(n,i,o);return(Ft(i)?nn.has(i):fo(i))||(e||I(n,"get",i),t)?s:Tt(s)?!a||!jt(i)?s.value:s:Ve(s)?e?xn(s):zt(s):s}}var go=on(),vo=on(!0);function on(e=!1){return function(r,n,i,o){let a=r[n];if(!e&&(i=x(i),a=x(a),!te(r)&&Tt(a)&&!Tt(i)))return a.value=i,!0;let s=te(r)&&jt(n)?Number(n)<r.length:ze(r,n),l=Reflect.set(r,n,i,o);return r===x(o)&&(s?en(i,a)&&U(r,"set",n,i,a):U(r,"add",n,i)),l}}function xo(e,t){let r=ze(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&U(e,"delete",t,void 0,n),i}function bo(e,t){let r=Reflect.has(e,t);return(!Ft(t)||!nn.has(t))&&I(e,"has",t),r}function yo(e){return I(e,"iterate",te(e)?"length":re),Reflect.ownKeys(e)}var an={get:po,set:go,deleteProperty:xo,has:bo,ownKeys:yo},sn={get:mo,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}},La=Xr({},an,{get:ho,set:vo}),Na=Xr({},sn,{get:_o}),Ht=e=>Ve(e)?zt(e):e,Bt=e=>Ve(e)?xn(e):e,qt=e=>e,Ge=e=>Reflect.getPrototypeOf(e);function Ye(e,t,r=!1,n=!1){e=e.__v_raw;let i=x(e),o=x(t);t!==o&&!r&&I(i,"get",t),!r&&I(i,"get",o);let{has:a}=Ge(i),s=n?qt:r?Bt:Ht;if(a.call(i,t))return s(e.get(t));if(a.call(i,o))return s(e.get(o));e!==i&&e.get(t)}function Xe(e,t=!1){let r=this.__v_raw,n=x(r),i=x(e);return e!==i&&!t&&I(n,"has",e),!t&&I(n,"has",i),e===i?r.has(e):r.has(e)||r.has(i)}function Je(e,t=!1){return e=e.__v_raw,!t&&I(x(e),"iterate",re),Reflect.get(e,"size",e)}function ln(e){e=x(e);let t=x(this);return Ge(t).has.call(t,e)||(t.add(e),U(t,"add",e,e)),this}function un(e,t){t=x(t);let r=x(this),{has:n,get:i}=Ge(r),o=n.call(r,e);o?_n(r,n,e):(e=x(e),o=n.call(r,e));let a=i.call(r,e);return r.set(e,t),o?en(t,a)&&U(r,"set",e,t,a):U(r,"add",e,t),this}function cn(e){let t=x(this),{has:r,get:n}=Ge(t),i=r.call(t,e);i?_n(t,r,e):(e=x(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,a=t.delete(e);return i&&U(t,"delete",e,void 0,o),a}function fn(){let e=x(this),t=e.size!==0,r=we(e)?new Map(e):new Set(e),n=e.clear();return t&&U(e,"clear",void 0,void 0,r),n}function Ze(e,t){return function(n,i){let o=this,a=o.__v_raw,s=x(a),l=t?qt:e?Bt:Ht;return!e&&I(s,"iterate",re),a.forEach((u,f)=>n.call(i,l(u),l(f),o))}}function $e(e,t,r){return function(...n){let i=this.__v_raw,o=x(i),a=we(o),s=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,u=i[e](...n),f=r?qt:t?Bt:Ht;return!t&&I(o,"iterate",l?St:re),{next(){let{value:h,done:v}=u.next();return v?{value:h,done:v}:{value:s?[f(h[0]),f(h[1])]:f(h),done:v}},[Symbol.iterator](){return this}}}}function V(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${Qr(e)} operation ${r}failed: target is readonly.`,x(this))}return e==="delete"?!1:this}}var dn={get(e){return Ye(this,e)},get size(){return Je(this)},has:Xe,add:ln,set:un,delete:cn,clear:fn,forEach:Ze(!1,!1)},pn={get(e){return Ye(this,e,!1,!0)},get size(){return Je(this)},has:Xe,add:ln,set:un,delete:cn,clear:fn,forEach:Ze(!1,!0)},hn={get(e){return Ye(this,e,!0)},get size(){return Je(this,!0)},has(e){return Xe.call(this,e,!0)},add:V("add"),set:V("set"),delete:V("delete"),clear:V("clear"),forEach:Ze(!0,!1)},mn={get(e){return Ye(this,e,!0,!0)},get size(){return Je(this,!0)},has(e){return Xe.call(this,e,!0)},add:V("add"),set:V("set"),delete:V("delete"),clear:V("clear"),forEach:Ze(!0,!0)},Eo=["keys","values","entries",Symbol.iterator];Eo.forEach(e=>{dn[e]=$e(e,!1,!1),hn[e]=$e(e,!0,!1),pn[e]=$e(e,!1,!0),mn[e]=$e(e,!0,!0)});function Qe(e,t){let r=t?e?mn:pn:e?hn:dn;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(ze(r,i)&&i in n?r:n,i,o)}var wo={get:Qe(!1,!1)},$a={get:Qe(!1,!0)},Ao={get:Qe(!0,!1)},Pa={get:Qe(!0,!0)};function _n(e,t,r){let n=x(r);if(n!==r&&t.call(e,n)){let i=Zr(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 gn=new WeakMap,So=new WeakMap,vn=new WeakMap,To=new WeakMap;function Oo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Co(e){return e.__v_skip||!Object.isExtensible(e)?0:Oo(Zr(e))}function zt(e){return e&&e.__v_isReadonly?e:bn(e,!1,an,wo,gn)}function xn(e){return bn(e,!0,sn,Ao,vn)}function bn(e,t,r,n,i){if(!Ve(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;let o=i.get(e);if(o)return o;let a=Co(e);if(a===0)return e;let s=new Proxy(e,a===2?n:r);return i.set(e,s),s}function x(e){return e&&x(e.__v_raw)||e}function Tt(e){return Boolean(e&&e.__v_isRef===!0)}D("nextTick",()=>$r);D("dispatch",e=>Ee.bind(Ee,e));D("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)});D("store",Vi);D("data",e=>vr(e));D("root",e=>Ke(e));D("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Oe(Ro(e))),e._x_refs_proxy));function Ro(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var ct={};function yn(e){return ct[e]||(ct[e]=0),++ct[e]}function Mo(e,t){return He(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function ko(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=yn(t))}D("id",e=>(t,r=null)=>{let n=Mo(e,t),i=n?n._x_ids[t]:yn(t);return r?`${t}-${i}-${r}`:`${t}-${i}`});D("el",e=>e);En("Focus","focus","focus");En("Persist","persist","persist");function En(e,t,r){D(t,n=>fe(`You can't use [$${directiveName}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}w("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()))})});w("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&fe("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||fe(`Cannot find x-teleport element for selector: "${t}"`);let i=e.content.cloneNode(!0).firstElementChild;e._x_teleport=i,i._x_teleportBack=e,e._x_forwardEvents&&e._x_forwardEvents.forEach(o=>{i.addEventListener(o,a=>{a.stopPropagation(),e.dispatchEvent(new a.constructor(a.type,a))})}),Te(i,{},e),S(()=>{n.appendChild(i),W(i),i._x_ignore=!0}),r(()=>i.remove())});var wn=()=>{};wn.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})};w("ignore",wn);w("effect",(e,{expression:t},{effect:r})=>r(R(e,t)));function An(e,t,r,n){let i=e,o=l=>n(l),a={},s=(l,u)=>f=>u(l,f);if(r.includes("dot")&&(t=Lo(t)),r.includes("camel")&&(t=No(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)=>{Po(t)&&Io(u,r)||l(u)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",u=Ot(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=zr(o,u)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",u=Ot(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=Vr(o,u)}return i.addEventListener(t,o,a),()=>{i.removeEventListener(t,o,a)}}function Lo(e){return e.replace(/-/g,".")}function No(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ot(e){return!Array.isArray(e)&&!isNaN(e)}function $o(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Po(e){return["keydown","keyup"].includes(e)}function Io(e,t){let r=t.filter(o=>!["window","document","prevent","stop","once"].includes(o));if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Ot((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&lr(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&&lr(e.key).includes(r[0]))}function lr(e){if(!e)return[];e=$o(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)}w("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=R(e,r),a=`${r} = rightSideOfExpression($event, ${r})`,s=R(e,a);var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let u=Do(e,t,r),f=An(e,l,t,v=>{s(()=>{},{scope:{$event:v,rightSideOfExpression:u}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=f,i(()=>e._x_removeModelListeners.default());let h=R(e,`${r} = __placeholder`);e._x_model={get(){let v;return o(N=>v=N),v},set(v){h(()=>{},{scope:{__placeholder:v}})}},e._x_forceModelUpdate=()=>{o(v=>{v===void 0&&r.match(/\./)&&(v=""),window.fromModel=!0,S(()=>Br(e,"value",v)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function Do(e,t,r){return e.type==="radio"&&S(()=>{e.hasAttribute("name")||e.setAttribute("name",r)}),(n,i)=>S(()=>{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")?ft(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(a=>!Fo(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 ft(a)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?ft(o):t.includes("trim")?o.trim():o}}})}function ft(e){let t=e?parseFloat(e):null;return jo(t)?t:e}function Fo(e,t){return e==t}function jo(e){return!Array.isArray(e)&&!isNaN(e)}w("cloak",e=>queueMicrotask(()=>S(()=>e.removeAttribute(he("cloak")))));jr(()=>`[${he("init")}]`);w("init",qe((e,{expression:t},{evaluate:r})=>typeof t=="string"?!!t.trim()&&r(t,{},!1):r(t,{},!1)));w("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{S(()=>{e.textContent=o})})})});w("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{S(()=>{e.innerHTML=o,e._x_ignoreSelf=!0,W(e),delete e._x_ignoreSelf})})})});$t(Cr(":",Rr(he("bind:"))));w("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let s={};Ui(s),R(e,n)(u=>{Ur(e,u,i)},{scope:s});return}if(t==="key")return Ko(e,n);let a=R(e,n);o(()=>a(s=>{s===void 0&&typeof n=="string"&&n.match(/\./)&&(s=""),S(()=>Br(e,t,s,r))}))});function Ko(e,t){e._x_keyExpression=t}Fr(()=>`[${he("data")}]`);w("data",qe((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};_t(n,e);let i={};Yi(i,n);let o=ue(e,t,{scope:i});o===void 0&&(o={}),_t(o,e);let a=pe(o);xr(a);let s=Te(e,a);a.init&&ue(e,a.init),r(()=>{a.destroy&&ue(e,a.destroy),s()})}));w("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=R(e,r);e._x_doHide||(e._x_doHide=()=>{S(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{S(()=>{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=yt(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)}))});w("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=Bo(t),o=R(e,i.items),a=R(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>Ho(e,i,o,a)),n(()=>{Object.values(e._x_lookup).forEach(s=>s.remove()),delete e._x_prevKeys,delete e._x_lookup})});function Ho(e,t,r,n){let i=a=>typeof a=="object"&&!Array.isArray(a),o=e;r(a=>{qo(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 b=ur(t,g,d,a);n(O=>f.push(O),{scope:{index:d,...b}}),u.push(b)});else for(let d=0;d<a.length;d++){let g=ur(t,a[d],d,a);n(b=>f.push(b),{scope:{index:d,...g}}),u.push(g)}let h=[],v=[],N=[],E=[];for(let d=0;d<l.length;d++){let g=l[d];f.indexOf(g)===-1&&N.push(g)}l=l.filter(d=>!N.includes(d));let le="template";for(let d=0;d<f.length;d++){let g=f[d],b=l.indexOf(g);if(b===-1)l.splice(d,0,g),h.push([le,d]);else if(b!==d){let O=l.splice(d,1)[0],M=l.splice(b-1,1)[0];l.splice(d,0,M),l.splice(b,0,O),v.push([O,M])}else E.push(g);le=g}for(let d=0;d<N.length;d++){let g=N[d];s[g]._x_effects&&s[g]._x_effects.forEach(cr),s[g].remove(),s[g]=null,delete s[g]}for(let d=0;d<v.length;d++){let[g,b]=v[d],O=s[g],M=s[b],z=document.createElement("div");S(()=>{M.after(z),O.after(M),M._x_currentIfEl&&M.after(M._x_currentIfEl),z.before(O),O._x_currentIfEl&&O.after(O._x_currentIfEl),z.remove()}),ir(M,u[f.indexOf(b)])}for(let d=0;d<h.length;d++){let[g,b]=h[d],O=g==="template"?o:s[g];O._x_currentIfEl&&(O=O._x_currentIfEl);let M=u[b],z=f[b],P=document.importNode(o.content,!0).firstElementChild;Te(P,pe(M),o),S(()=>{O.after(P),W(P)}),typeof z=="object"&&fe("x-for key cannot be an object, it must be a string or an integer",o),s[z]=P}for(let d=0;d<E.length;d++)ir(s[E[d]],u[f.indexOf(E[d])]);o._x_prevKeys=f})}function Bo(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 ur(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 qo(e){return!Array.isArray(e)&&!isNaN(e)}function Sn(){}Sn.inline=(e,{expression:t},{cleanup:r})=>{let n=Ke(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",Sn);w("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=R(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let s=e.content.cloneNode(!0).firstElementChild;return Te(s,{},e),S(()=>{e.after(s),W(s)}),e._x_currentIfEl=s,e._x_undoIf=()=>{ne(s,l=>{l._x_effects&&l._x_effects.forEach(cr)}),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())});w("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach(i=>ko(e,i))});$t(Cr("@",Rr(he("on:"))));w("on",qe((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?R(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let a=An(e,t,r,s=>{o(()=>{},{scope:{$event:s},params:[s]})});i(()=>a())}));et("Collapse","collapse","collapse");et("Intersect","intersect","intersect");et("Focus","trap","focus");et("Mask","mask","mask");function et(e,t,r){w(t,n=>fe(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}Ce.setEvaluator(wr);Ce.setReactivityEngine({reactive:zt,effect:oo,release:ao,raw:x});var zo=Ce,Vt=zo;var Vo=class{el=void 0;constructor(e){this.el=e}traversals={first:"firstElementChild",next:"nextElementSibling",parent:"parentElement"};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 T(e){return new Vo(e)}function Wo(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function Uo(e){return e.nodeType===3||e.nodeType===8}var Tn=()=>{},On=()=>{};async function Wt(e,t,r){let n,i,o,a,s,l,u,f,h,v,N;function E(c){if(!!N)return On((c||"").replace(`
6
- `,"\\n"),n,i),new Promise(p=>Tn=()=>p())}function le(c={}){let p=$=>$.getAttribute("key"),m=()=>{};s=c.updating||m,l=c.updated||m,u=c.removing||m,f=c.removed||m,h=c.adding||m,v=c.added||m,o=c.key||p,a=c.lookahead||!1,N=c.debug||!1}async function d(c,p){if(g(c,p)){let $=b(c,p);return await E("Swap elements"),$}let m=!1;if(!me(s,c,p,()=>m=!0)){if(window.Alpine&&Go(c,p,()=>m=!0),Uo(p)){await O(c,p),l(c,p);return}m||await M(c,p),l(c,p),await z(c,p)}}function g(c,p){return c.nodeType!=p.nodeType||c.nodeName!=p.nodeName||P(c)!=P(p)}function b(c,p){if(me(u,c))return;let m=p.cloneNode(!0);me(h,m)||(T(c).replace(m),f(c),v(m))}async function O(c,p){let m=p.nodeValue;c.nodeValue!==m&&(c.nodeValue=m,await E("Change text node to: "+m))}async function M(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let m=Array.from(c.attributes),$=Array.from(p.attributes);for(let q=m.length-1;q>=0;q--){let K=m[q].name;p.hasAttribute(K)||(c.removeAttribute(K),await E("Remove attribute"))}for(let q=$.length-1;q>=0;q--){let K=$[q].name,y=$[q].value;c.getAttribute(K)!==y&&(c.setAttribute(K,y),await E(`Set [${K}] attribute to: "${y}"`))}}async function z(c,p){let m=c.childNodes,$=p.childNodes,q=er($),K=er(m),y=T(p).nodes().first(),_=T(c).nodes().first(),Z={};for(;y;){let k=P(y),H=P(_);if(!_)if(k&&Z[k]){let L=Z[k];T(c).append(L),_=L,await E("Add element (from key)")}else{let L=zn(y,c)||{};await E("Add element: "+(L.outerHTML||L.nodeValue)),y=T(y).nodes().next();continue}if(a){let L=T(y).next(),tr=!1;for(;!tr&&L;)_.isEqualNode(L)&&(tr=!0,_=at(y,_),H=P(_),await E("Move element (lookahead)")),L=T(L).next()}if(k!==H){if(!k&&H){Z[H]=_,_=at(y,_),Z[H].remove(),_=T(_).nodes().next(),y=T(y).nodes().next(),await E('No "to" key');continue}if(k&&!H&&K[k]&&(_=T(_).replace(K[k]),await E('No "from" key')),k&&H){Z[H]=_;let L=K[k];if(L)_=T(_).replace(L),await E('Move "from" key');else{Z[H]=_,_=at(y,_),Z[H].remove(),_=T(_).next(),y=T(y).next(),await E("Swap elements with keys");continue}}}let Vn=_&&T(_).nodes().next();await d(_,y),y=y&&T(y).nodes().next(),_=Vn}let st=[];for(;_;)me(u,_)||st.push(_),_=T(_).nodes().next();for(;st.length;){let k=st.shift();k.remove(),await E("remove el"),f(k)}}function P(c){return c&&c.nodeType===1&&o(c)}function er(c){let p={};return c.forEach(m=>{let $=P(m);$&&(p[$]=m)}),p}function zn(c,p){if(!me(h,c)){let m=c.cloneNode(!0);return T(p).append(m),v(m),m}return null}function at(c,p){if(!me(h,c)){let m=c.cloneNode(!0);return T(p).before(m),v(m),m}return p}return le(r),n=e,i=Wo(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}Wt.step=()=>Tn();Wt.log=e=>{On=e};function me(e,...t){let r=!1;return e(...t,()=>r=!0),r}function Go(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function Yo(e){e.morph=Wt}var Cn=Yo;Vt.plugin(Cn);var Xo=/INPUT/i,Jo=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,Zo=/TEXTAREA/i;function Qo(e,t,r,n){if(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)return;if(e.tagName.match(Zo)||e.tagName.match(Xo)&&e.getAttribute("type").match(Jo))return n()}function ea(e,t){e.forEach(r=>Vt.morph(r,t,{updating:Qo}))}var Rn=ea;function ta(e,t,r){if(e.match(/^dispatch(Event)?$/))return rr(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return Rn(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 ra(){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})),ta(i,o,a)}var Mn=ra;function na(e){e.invoke=Mn}var kn={initialize:na};var Ut=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}},A=new Ut;var G={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"},Y={stateLoad:"turbo-reflex:state-load",stateChange:"turbo-reflex:state-change"},F={...G,...Y};function C(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;C(G.clientError,t,{error:i,...r},!0)}}var Gt;function tt(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],C(Y.stateChange,A.element,{state:Gt}),!0},set(n,i,o,a){return n[i]=tt(o,this),C(Y.stateChange,A.element,{state:Gt}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=tt(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=tt(i,r);return t||(Gt=r),r}var Ln=tt;var Yt,ie,rt,Nn;function $n(){if(!A.element)return _e();let e=atob(A.element.dataset.state);rt={},ie=Ln(JSON.parse(e)),Yt={...ie},delete A.element.dataset.clientStateChange,setTimeout(()=>C(Y.stateLoad,A.element,{state:ie}))}function _e(){clearTimeout(Nn),Nn=setTimeout($n,10)}Yt||$n();addEventListener("DOMContentLoaded",_e);addEventListener("load",_e);addEventListener("turbo:load",_e);addEventListener("turbo:frame-load",_e);addEventListener("turbo-reflex:success",_e);addEventListener(Y.stateChange,e=>{rt={};for(let[t,r]of Object.entries(ie))Yt[t]!==r&&(rt[t]=r);A.element.dataset.clientStateChange=!0,A.element.dataset.state=btoa(JSON.stringify(ie))});var oe={events:Y,get current(){return ie},get delta(){return rt},get payloadChunks(){return btoa(JSON.stringify(ie)).match(/.{1,2000}/g)}};function ia(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 oa(e){document.body.insertAdjacentHTML("beforeend",e)}var ae={append:oa,replaceDocument:ia};var nt={};function aa(e){nt[e.id]=e}function sa(e){delete nt[e]}var it={add:aa,remove:sa,get reflexes(){return[...Object.values(nt)]},get length(){return Object.keys(nt).length}};function Pn(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>C(G.finish,e.target,e.detail),20)}addEventListener(G.serverError,Pn);addEventListener(G.success,Pn);addEventListener(G.finish,e=>it.remove(e.detail.id),!0);var X={events:G};var Xt={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:r}=e.detail;if(A.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"]=A.token}oe.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&&(Xt[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.`;C(X.events.clientError,document,{...e.detail,error:n},!0)}r.header("TurboReflex")==="Append"&&(e.preventDefault(),r.responseText.then(n=>ae.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboReflexSrc=Xt[t.id]||t.src||t.dataset.turboReflexSrc,delete Xt[t.id]});var la={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",reflexAttribute:"data-turbo-reflex"},j={...la};var ot={},In;function ua(e,t){ot[e]=t,document.addEventListener(e,In,!0)}function ca(e){return Object.keys(ot).find(t=>!!ot[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function fa(e,t){return e===ca(t)}var J={events:ot,register:ua,isRegisteredForElement:fa,set handler(e){In=e}};function da(e){return e.closest(`[${j.reflexAttribute}]`)}function pa(e){return e.closest("turbo-frame")}function ha(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 ma(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,ha(e,t),delete t.class,delete t.action,delete t.href,delete t[j.reflexAttribute],delete t[j.frameAttribute],t}var Re={buildAttributePayload:ma,findClosestReflex:da,findClosestFrame:pa};function _a(e,t={}){t.token=A.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_reflex",r.value=JSON.stringify(t),e.appendChild(r)}var Dn={invokeReflex:_a};function ga(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 ge={build:ga};function va(e,t){let r=t.src;t={...t},delete t.src,e.src=ge.build(r,t)}var Jt={invokeReflex:va};function xa(e,t={}){let r=t.src;t={...t},delete t.src,delete t.href,e.setAttribute("href",ge.build(r,t))}var Fn={invokeReflex:xa};function ba(e){let t=e.target;C(X.events.abort,document,{xhr:t,...e.detail})}function Zt(e){let t=e.target;t.getResponseHeader("TurboReflex")==="Append"?ae.append(t.responseText):ae.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboReflex requires 2XX-3XX status codes.`;C(X.events.clientError,document,{xhr:t,...e.detail,error:r},!0)}function ya(e){let t=e.target;if(t.status<200||t.status>399)return Zt(e);let r=t.responseText;t.getResponseHeader("TurboReflex")==="Append"?ae.append(t.responseText):ae.replaceDocument(t.responseText)}function Ea(e){let t=e.src;e={...e},delete e.src;try{let r=new XMLHttpRequest;r.open("GET",ge.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-reflex.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboReflex-Token",A.token),oe.payloadChunks.forEach((n,i)=>r.setRequestHeader(`TurboReflex-State-${i.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",ba),r.addEventListener("error",Zt),r.addEventListener("load",ya),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;Zt(r,{detail:{message:n}})}}var jn={invokeReflex:Ea};function Qt(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboReflexSrc||location.href}function wa(e){let t=Re.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:Dn.invokeReflex}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeReflex:Fn.invokeReflex}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:Qt(e,t),invokeReflex:Jt.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:Qt(e,t),invokeReflex:Jt.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:Qt(e),invokeReflex:jn.invokeReflex}}var Kn={find:wa};var Me="unknown",Hn={debug:Object.values(F),info:Object.values(F),warn:[F.abort,F.clientError,F.serverError],error:[F.clientError,F.serverError],unknown:[]};Object.values(F).forEach(e=>{addEventListener(e,t=>{Hn[Me].includes(t.type)&&console[Me==="debug"?"log":Me](t.type,{target:t.target,detail:t.detail})})});var Bn={get level(){return Me},set level(e){return Object.keys(Hn).includes(e)||(e="unknown"),Me=e}};function Aa(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var qn={v4:Aa};function Sa(e){let t,r={};try{if(t=Re.findClosestReflex(e.target),!t||!J.isRegisteredForElement(e.type,t))return;let n=Kn.find(t);switch(r={id:`reflex-${qn.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:Re.buildAttributePayload(t),startedAt:new Date().getTime()},it.add(r),C(X.events.start,t,r),["frame","window"].includes(n.name)&&e.preventDefault(),A.busy=!0,setTimeout(()=>A.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){C(X.events.clientError,t,{error:n,...r})}}J.handler=Sa;J.register("change",[`input[${j.reflexAttribute}]`,`select[${j.reflexAttribute}]`,`textarea[${j.reflexAttribute}]`]);J.register("submit",[`form[${j.reflexAttribute}]`]);J.register("click",[`[${j.reflexAttribute}]`]);var tl=self.TurboReflex={logger:Bn,schema:j,registerEventDelegate:J.register,get eventDelegates(){return{...J.events}},get events(){return{...F}},get state(){return oe.current},get stateDelta(){return oe.delta}};var se=class extends HTMLElement{connectedCallback(){this.ensureId()}ensureId(){this.id.trim().length||(this.id=`${this.tagName}-${this.uuidv4()}`.toLowerCase())}uuidv4(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}};var ke=class extends se{};var Le=class extends se{collapse(){try{this.target.remove(),this.setAttribute("aria-expanded",!1)}catch(t){console.error("Failed to collapse toggle-trigger target!",t)}}get controls(){return this.getAttribute("aria-controls")}get expanded(){return this.getAttribute("aria-expanded")==="true"}get target(){return document.getElementById(this.controls)}get active(){return this.getAttribute("data-active")==="true"}set active(t){this.setAttribute("data-active",!!t)}};addEventListener(TurboReflex.events.start,e=>e.target.active=!0);addEventListener(TurboReflex.events.success,e=>e.target.active=!1);addEventListener(TurboReflex.events.finish,e=>e.target.active=!1);addEventListener("click",e=>{setTimeout(()=>{let t='toggle-trigger[aria-controls][aria-expanded="true"][data-auto-collapse="true"]';document.querySelectorAll(t).forEach(r=>r.collapse())})});customElements.define("toggle-target",ke);customElements.define("toggle-trigger",Le);kn.initialize(Turbo.StreamActions);
5
+ `:""}`,t),setTimeout(()=>{throw e},0)}var qe=!0;function Ci(e){let t=qe;qe=!1,e(),qe=t}function fe(e,t,r={}){let n;return O(e,t)(i=>n=i,r),n}function O(...e){return Mr(...e)}var Mr=$r;function ki(e){Mr=e}function $r(e,t){let r={};Tt(r,e);let n=[r,...de(e)];if(typeof t=="function")return Oi(n,t);let i=Li(n,t,e);return Ti.bind(null,e,t,i)}function Oi(e,t){return(r=()=>{},{scope:n={},params:i=[]}={})=>{let o=t.apply(Oe([n,...e]),i);Ve(r,o)}}var xt={};function Ri(e,t){if(xt[e])return xt[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(s){return Te(s,t,e),Promise.resolve()}})();return xt[e]=o,o}function Li(e,t,r){let n=Ri(t,r);return(i=()=>{},{scope:o={},params:s=[]}={})=>{n.result=void 0,n.finished=!1;let a=Oe([o,...e]);if(typeof n=="function"){let l=n(n,a).catch(u=>Te(u,r,t));n.finished?(Ve(i,n.result,a,s,r),n.result=void 0):l.then(u=>{Ve(i,u,a,s,r)}).catch(u=>Te(u,r,t)).finally(()=>n.result=void 0)}}}function Ve(e,t,r,n,i){if(qe&&typeof t=="function"){let o=t.apply(r,n);o instanceof Promise?o.then(s=>Ve(e,s,r,n)).catch(s=>Te(s,i,t)):e(o)}else e(t)}var Bt="x-";function ge(e=""){return Bt+e}function Mi(e){Bt=e}var Nr={};function w(e,t){Nr[e]=t}function qt(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),s=Ir(o);o=o.map(a=>s.find(l=>l.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),t=t.concat(o)}let n={};return t.map(Fr((o,s)=>n[o]=s)).filter(Br).map(Ii(n,r)).sort(Pi).map(o=>Ni(e,o))}function Ir(e){return Array.from(e).map(Fr()).filter(t=>!Br(t))}var Ct=!1,Ee=new Map,Pr=Symbol();function $i(e){Ct=!0;let t=Symbol();Pr=t,Ee.set(t,[]);let r=()=>{for(;Ee.get(t).length;)Ee.get(t).shift()();Ee.delete(t)},n=()=>{Ct=!1,r()};e(r),n()}function Dr(e){let t=[],r=a=>t.push(a),[n,i]=gi(e);return t.push(i),[{Alpine:Re,effect:n,cleanup:r,evaluateLater:O.bind(O,e),evaluate:fe.bind(fe,e)},()=>t.forEach(a=>a())]}function Ni(e,t){let r=()=>{},n=Nr[t.type]||r,[i,o]=Dr(e);xi(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),Ct?Ee.get(Pr).push(n):n())};return s.runCleanups=o,s}var Hr=(e,t)=>({name:r,value:n})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:n}),jr=e=>e;function Fr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Kr.reduce((o,s)=>s(o),{name:t,value:r});return n!==t&&e(n,t),{name:n,value:i}}}var Kr=[];function zt(e){Kr.push(e)}function Br({name:e}){return qr().test(e)}var qr=()=>new RegExp(`^${Bt}([^:^.]+)\\b`);function Ii(e,t){return({name:r,value:n})=>{let i=r.match(qr()),o=r.match(/:([a-zA-Z0-9\-:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map(l=>l.replace(".","")),expression:n,original:a}}}var kt="DEFAULT",Ke=["ignore","ref","data","id","radio","tabs","switch","disclosure","menu","listbox","list","item","combobox","bind","init","for","mask","model","modelable","transition","show","if",kt,"teleport"];function Pi(e,t){let r=Ke.indexOf(e.type)===-1?kt:e.type,n=Ke.indexOf(t.type)===-1?kt:t.type;return Ke.indexOf(r)-Ke.indexOf(n)}function Se(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}var Ot=[],Vt=!1;function zr(e=()=>{}){return queueMicrotask(()=>{Vt||setTimeout(()=>{Rt()})}),new Promise(t=>{Ot.push(()=>{e(),t()})})}function Rt(){for(Vt=!1;Ot.length;)Ot.shift()()}function Di(){Vt=!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 pe(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function Hi(){document.body||pe("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),Se(document,"alpine:init"),Se(document,"alpine:initializing"),Cr(),vi(t=>U(t,ie)),Ar(t=>Fi(t)),_i((t,r)=>{qt(t,r).forEach(n=>n())});let e=t=>!Ge(t.parentElement,!0);Array.from(document.querySelectorAll(Ur())).filter(e).forEach(t=>{U(t)}),Se(document,"alpine:initialized")}var Wt=[],Vr=[];function Wr(){return Wt.map(e=>e())}function Ur(){return Wt.concat(Vr).map(e=>e())}function Gr(e){Wt.push(e)}function Xr(e){Vr.push(e)}function Ge(e,t=!1){return Xe(e,r=>{if((t?Ur():Wr()).some(i=>r.matches(i)))return!0})}function Xe(e,t){if(!!e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return Xe(e.parentElement,t)}}function ji(e){return Wr().some(t=>e.matches(t))}function U(e,t=ie){$i(()=>{t(e,(r,n)=>{qt(r,r.attributes).forEach(i=>i()),r._x_ignore&&n()})})}function Fi(e){ie(e,t=>Tr(t))}function Ut(e,t){return Array.isArray(t)?mr(e,t.join(" ")):typeof t=="object"&&t!==null?Ki(e,t):typeof t=="function"?Ut(e,t()):mr(e,t)}function mr(e,t){let r=o=>o.split(" ").filter(Boolean),n=o=>o.split(" ").filter(s=>!e.classList.contains(s)).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=a=>a.split(" ").filter(Boolean),n=Object.entries(t).flatMap(([a,l])=>l?r(a):!1).filter(Boolean),i=Object.entries(t).flatMap(([a,l])=>l?!1:r(a)).filter(Boolean),o=[],s=[];return i.forEach(a=>{e.classList.contains(a)&&(e.classList.remove(a),s.push(a))}),n.forEach(a=>{e.classList.contains(a)||(e.classList.add(a),o.push(a))}),()=>{s.forEach(a=>e.classList.add(a)),o.forEach(a=>e.classList.remove(a))}}function Ye(e,t){return typeof t=="object"&&t!==null?Bi(e,t):qi(e,t)}function Bi(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{r[n]=e.style[n],n.startsWith("--")||(n=zi(n)),e.style.setProperty(n,i)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{Ye(e,r)}}function qi(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function zi(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Lt(e,t=()=>{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}w("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{typeof n=="function"&&(n=i(n)),n?Vi(e,n,t):Wi(e,r,t)});function Vi(e,t,r){Yr(e,Ut,""),{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 Wi(e,t,r){Yr(e,Ye);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,b)=>b<t.indexOf("out"))),t.includes("out")&&!n&&(t=t.filter((v,b)=>b>t.indexOf("out")));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),u=a?0:1,f=l?be(t,"scale",95)/100:1,h=be(t,"delay",0),_=be(t,"origin","center"),N="opacity, transform",E=be(t,"duration",150)/1e3,ce=be(t,"duration",75)/1e3,d="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(e._x_transition.enter.during={transformOrigin:_,transitionDelay:h,transitionProperty:N,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:_,transitionDelay:h,transitionProperty:N,transitionDuration:`${ce}s`,transitionTimingFunction:d},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:u,transform:`scale(${f})`})}function Yr(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=()=>{}){Mt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Mt(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((s,a)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=Jr(e);s?(s._x_hideChildren||(s._x_hideChildren=[]),s._x_hideChildren.push(e)):i(()=>{let a=l=>{let u=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([f])=>f());return delete l._x_hidePromise,delete l._x_hideChildren,u};a(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function Jr(e){let t=e.parentNode;if(!!t)return t._x_hidePromise?t:Jr(t)}function Mt(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,u;Ui(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),u=t(e,i)},after:s,cleanup(){l(),u()}})}function Ui(e,t){let r,n,i,o=Lt(()=>{A(()=>{r=!0,n||t.before(),i||(t.end(),Rt()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Lt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},A(()=>{t.start(),t.during()}),Di(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;s===0&&(s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),A(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{r||(A(()=>{t.end()}),Rt(),setTimeout(e._x_transitioning.finish,s+a),i=!0)})})}function be(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 $t=!1;function Je(e,t=()=>{}){return(...r)=>$t?t(...r):e(...r)}function Gi(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),$t=!0,Yi(()=>{Xi(t)}),$t=!1}function Xi(e){let t=!1;U(e,(n,i)=>{ie(n,(o,s)=>{if(t&&ji(o))return s();t=!0,i(o,s)})})}function Yi(e){let t=Ce;pr((r,n)=>{let i=t(r);return Ue(i),()=>{}}),e(),pr(t)}function Zr(e,t,r,n=[]){switch(e._x_bindings||(e._x_bindings=me({})),e._x_bindings[t]=r,t=n.includes("camel")?no(t):t,t){case"value":Ji(e,r);break;case"style":Qi(e,r);break;case"class":Zi(e,r);break;default:eo(e,t,r);break}}function Ji(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=gr(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=>gr(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")ro(e,t);else{if(e.value===t)return;e.value=t}}function Zi(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=Ut(e,t)}function Qi(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=Ye(e,t)}function eo(e,t,r){[null,void 0,!1].includes(r)&&io(t)?e.removeAttribute(t):(Qr(t)&&(r=t),to(e,t,r))}function to(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function ro(e,t){let r=[].concat(t).map(n=>n+"");Array.from(e.options).forEach(n=>{n.selected=r.includes(n.value)})}function no(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function gr(e,t){return e==t}function Qr(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 io(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function oo(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:Qr(t)?!![t,"true"].includes(n):n}function en(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 tn(e,t){let r;return function(){let n=this,i=arguments;r||(e.apply(n,i),r=!0,setTimeout(()=>r=!1,t))}}function so(e){e(Re)}var ee={},vr=!1;function ao(e,t){if(vr||(ee=me(ee),vr=!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(),Or(ee[e])}function lo(){return ee}var rn={};function uo(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?nn(e,r()):rn[e]=r}function co(e){return Object.entries(rn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function nn(e,t,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Ir(i);i=i.map(s=>o.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),qt(e,i,r).map(s=>{n.push(s.runCleanups),s()})}var on={};function fo(e,t){on[e]=t}function po(e,t){return Object.entries(on).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}var ho={get reactive(){return me},get release(){return Ue},get effect(){return Ce},get raw(){return yr},version:"3.10.5",flushAndStopDeferringMutations:Si,dontAutoEvaluateFunctions:Ci,disableEffectScheduling:hi,setReactivityEngine:mi,closestDataStack:de,skipDuringClone:Je,addRootSelector:Gr,addInitSelector:Xr,addScopeToNode:ke,deferMutations:wi,mapAttributes:zt,evaluateLater:O,setEvaluator:ki,mergeProxies:Oe,findClosest:Xe,closestRoot:Ge,interceptor:Rr,transition:Mt,setStyles:Ye,mutateDom:A,directive:w,throttle:tn,debounce:en,evaluate:fe,initTree:U,nextTick:zr,prefixed:ge,prefix:Mi,plugin:so,magic:H,store:ao,start:Hi,clone:Gi,bound:oo,$data:kr,data:fo,bind:uo},Re=ho;function sn(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 mo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Zs=sn(mo+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),go=Object.freeze({}),Qs=Object.freeze([]),an=Object.assign,vo=Object.prototype.hasOwnProperty,Ze=(e,t)=>vo.call(e,t),re=Array.isArray,Ae=e=>ln(e)==="[object Map]",_o=e=>typeof e=="string",Gt=e=>typeof e=="symbol",Qe=e=>e!==null&&typeof e=="object",xo=Object.prototype.toString,ln=e=>xo.call(e),un=e=>ln(e).slice(8,-1),Xt=e=>_o(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,et=e=>{let t=Object.create(null);return r=>t[r]||(t[r]=e(r))},bo=/-(\w)/g,ea=et(e=>e.replace(bo,(t,r)=>r?r.toUpperCase():"")),yo=/\B([A-Z])/g,ta=et(e=>e.replace(yo,"-$1").toLowerCase()),cn=et(e=>e.charAt(0).toUpperCase()+e.slice(1)),ra=et(e=>e?`on${cn(e)}`:""),fn=(e,t)=>e!==t&&(e===e||t===t),Nt=new WeakMap,ye=[],q,ne=Symbol("iterate"),It=Symbol("Map key iterate");function Eo(e){return e&&e._isEffect===!0}function wo(e,t=go){Eo(e)&&(e=e.raw);let r=To(e,t);return t.lazy||r(),r}function So(e){e.active&&(dn(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var Ao=0;function To(e,t){let r=function(){if(!r.active)return e();if(!ye.includes(r)){dn(r);try{return ko(),ye.push(r),q=r,e()}finally{ye.pop(),pn(),q=ye[ye.length-1]}}};return r.id=Ao++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function dn(e){let{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var he=!0,Yt=[];function Co(){Yt.push(he),he=!1}function ko(){Yt.push(he),he=!0}function pn(){let e=Yt.pop();he=e===void 0?!0:e}function D(e,t,r){if(!he||q===void 0)return;let n=Nt.get(e);n||Nt.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 s=Nt.get(e);if(!s)return;let a=new Set,l=f=>{f&&f.forEach(h=>{(h!==q||h.allowRecurse)&&a.add(h)})};if(t==="clear")s.forEach(l);else if(r==="length"&&re(e))s.forEach((f,h)=>{(h==="length"||h>=n)&&l(f)});else switch(r!==void 0&&l(s.get(r)),t){case"add":re(e)?Xt(r)&&l(s.get("length")):(l(s.get(ne)),Ae(e)&&l(s.get(It)));break;case"delete":re(e)||(l(s.get(ne)),Ae(e)&&l(s.get(It)));break;case"set":Ae(e)&&l(s.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()};a.forEach(u)}var Oo=sn("__proto__,__v_isRef,__isVue"),hn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Gt)),Ro=tt(),Lo=tt(!1,!0),Mo=tt(!0),$o=tt(!0,!0),We={};["includes","indexOf","lastIndexOf"].forEach(e=>{let t=Array.prototype[e];We[e]=function(...r){let n=x(this);for(let o=0,s=this.length;o<s;o++)D(n,"get",o+"");let i=t.apply(n,r);return i===-1||i===!1?t.apply(n,r.map(x)):i}});["push","pop","shift","unshift","splice"].forEach(e=>{let t=Array.prototype[e];We[e]=function(...r){Co();let n=t.apply(this,r);return pn(),n}});function tt(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?qo:kn:t?Bo:Cn).get(n))return n;let s=re(n);if(!e&&s&&Ze(We,i))return Reflect.get(We,i,o);let a=Reflect.get(n,i,o);return(Gt(i)?hn.has(i):Oo(i))||(e||D(n,"get",i),t)?a:Pt(a)?!s||!Xt(i)?a.value:a:Qe(a)?e?On(a):er(a):a}}var No=mn(),Io=mn(!0);function mn(e=!1){return function(r,n,i,o){let s=r[n];if(!e&&(i=x(i),s=x(s),!re(r)&&Pt(s)&&!Pt(i)))return s.value=i,!0;let a=re(r)&&Xt(n)?Number(n)<r.length:Ze(r,n),l=Reflect.set(r,n,i,o);return r===x(o)&&(a?fn(i,s)&&G(r,"set",n,i,s):G(r,"add",n,i)),l}}function Po(e,t){let r=Ze(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&r&&G(e,"delete",t,void 0,n),i}function Do(e,t){let r=Reflect.has(e,t);return(!Gt(t)||!hn.has(t))&&D(e,"has",t),r}function Ho(e){return D(e,"iterate",re(e)?"length":ne),Reflect.ownKeys(e)}var gn={get:Ro,set:No,deleteProperty:Po,has:Do,ownKeys:Ho},vn={get:Mo,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}},na=an({},gn,{get:Lo,set:Io}),ia=an({},vn,{get:$o}),Jt=e=>Qe(e)?er(e):e,Zt=e=>Qe(e)?On(e):e,Qt=e=>e,rt=e=>Reflect.getPrototypeOf(e);function nt(e,t,r=!1,n=!1){e=e.__v_raw;let i=x(e),o=x(t);t!==o&&!r&&D(i,"get",t),!r&&D(i,"get",o);let{has:s}=rt(i),a=n?Qt:r?Zt:Jt;if(s.call(i,t))return a(e.get(t));if(s.call(i,o))return a(e.get(o));e!==i&&e.get(t)}function it(e,t=!1){let r=this.__v_raw,n=x(r),i=x(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 ot(e,t=!1){return e=e.__v_raw,!t&&D(x(e),"iterate",ne),Reflect.get(e,"size",e)}function _n(e){e=x(e);let t=x(this);return rt(t).has.call(t,e)||(t.add(e),G(t,"add",e,e)),this}function xn(e,t){t=x(t);let r=x(this),{has:n,get:i}=rt(r),o=n.call(r,e);o?Tn(r,n,e):(e=x(e),o=n.call(r,e));let s=i.call(r,e);return r.set(e,t),o?fn(t,s)&&G(r,"set",e,t,s):G(r,"add",e,t),this}function bn(e){let t=x(this),{has:r,get:n}=rt(t),i=r.call(t,e);i?Tn(t,r,e):(e=x(e),i=r.call(t,e));let o=n?n.call(t,e):void 0,s=t.delete(e);return i&&G(t,"delete",e,void 0,o),s}function yn(){let e=x(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 st(e,t){return function(n,i){let o=this,s=o.__v_raw,a=x(s),l=t?Qt:e?Zt:Jt;return!e&&D(a,"iterate",ne),s.forEach((u,f)=>n.call(i,l(u),l(f),o))}}function Be(e,t,r){return function(...n){let i=this.__v_raw,o=x(i),s=Ae(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,u=i[e](...n),f=r?Qt:t?Zt:Jt;return!t&&D(o,"iterate",l?It:ne),{next(){let{value:h,done:_}=u.next();return _?{value:h,done:_}:{value:a?[f(h[0]),f(h[1])]:f(h),done:_}},[Symbol.iterator](){return this}}}}function W(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";console.warn(`${cn(e)} operation ${r}failed: target is readonly.`,x(this))}return e==="delete"?!1:this}}var En={get(e){return nt(this,e)},get size(){return ot(this)},has:it,add:_n,set:xn,delete:bn,clear:yn,forEach:st(!1,!1)},wn={get(e){return nt(this,e,!1,!0)},get size(){return ot(this)},has:it,add:_n,set:xn,delete:bn,clear:yn,forEach:st(!1,!0)},Sn={get(e){return nt(this,e,!0)},get size(){return ot(this,!0)},has(e){return it.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:st(!0,!1)},An={get(e){return nt(this,e,!0,!0)},get size(){return ot(this,!0)},has(e){return it.call(this,e,!0)},add:W("add"),set:W("set"),delete:W("delete"),clear:W("clear"),forEach:st(!0,!0)},jo=["keys","values","entries",Symbol.iterator];jo.forEach(e=>{En[e]=Be(e,!1,!1),Sn[e]=Be(e,!0,!1),wn[e]=Be(e,!1,!0),An[e]=Be(e,!0,!0)});function at(e,t){let r=t?e?An:wn:e?Sn:En;return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(Ze(r,i)&&i in n?r:n,i,o)}var Fo={get:at(!1,!1)},oa={get:at(!1,!0)},Ko={get:at(!0,!1)},sa={get:at(!0,!0)};function Tn(e,t,r){let n=x(r);if(n!==r&&t.call(e,n)){let i=un(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 Cn=new WeakMap,Bo=new WeakMap,kn=new WeakMap,qo=new WeakMap;function zo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Vo(e){return e.__v_skip||!Object.isExtensible(e)?0:zo(un(e))}function er(e){return e&&e.__v_isReadonly?e:Rn(e,!1,gn,Fo,Cn)}function On(e){return Rn(e,!0,vn,Ko,kn)}function Rn(e,t,r,n,i){if(!Qe(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 s=Vo(e);if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function x(e){return e&&x(e.__v_raw)||e}function Pt(e){return Boolean(e&&e.__v_isRef===!0)}H("nextTick",()=>zr);H("dispatch",e=>Se.bind(Se,e));H("watch",(e,{evaluateLater:t,effect:r})=>(n,i)=>{let o=t(n),s=!0,a,l=r(()=>o(u=>{JSON.stringify(u),s?a=u:queueMicrotask(()=>{i(u,a),a=u}),s=!1}));e._x_effects.delete(l)});H("store",lo);H("data",e=>kr(e));H("root",e=>Ge(e));H("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Oe(Wo(e))),e._x_refs_proxy));function Wo(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var bt={};function Ln(e){return bt[e]||(bt[e]=0),++bt[e]}function Uo(e,t){return Xe(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function Go(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Ln(t))}H("id",e=>(t,r=null)=>{let n=Uo(e,t),i=n?n._x_ids[t]:Ln(t);return r?`${t}-${i}-${r}`:`${t}-${i}`});H("el",e=>e);Mn("Focus","focus","focus");Mn("Persist","persist","persist");function Mn(e,t,r){H(t,n=>pe(`You can't use [$${directiveName}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}w("modelable",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t),o=()=>{let u;return i(f=>u=f),u},s=n(`${t} = __placeholder`),a=u=>s(()=>{},{scope:{__placeholder:u}}),l=o();a(l),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let u=e._x_model.get,f=e._x_model.set;r(()=>a(u())),r(()=>f(o()))})});w("teleport",(e,{expression:t},{cleanup:r})=>{e.tagName.toLowerCase()!=="template"&&pe("x-teleport can only be used on a <template> tag",e);let n=document.querySelector(t);n||pe(`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,s=>{s.stopPropagation(),e.dispatchEvent(new s.constructor(s.type,s))})}),ke(i,{},e),A(()=>{n.appendChild(i),U(i),i._x_ignore=!0}),r(()=>i.remove())});var $n=()=>{};$n.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})};w("ignore",$n);w("effect",(e,{expression:t},{effect:r})=>r(O(e,t)));function Nn(e,t,r,n){let i=e,o=l=>n(l),s={},a=(l,u)=>f=>u(l,f);if(r.includes("dot")&&(t=Xo(t)),r.includes("camel")&&(t=Yo(t)),r.includes("passive")&&(s.passive=!0),r.includes("capture")&&(s.capture=!0),r.includes("window")&&(i=window),r.includes("document")&&(i=document),r.includes("prevent")&&(o=a(o,(l,u)=>{u.preventDefault(),l(u)})),r.includes("stop")&&(o=a(o,(l,u)=>{u.stopPropagation(),l(u)})),r.includes("self")&&(o=a(o,(l,u)=>{u.target===e&&l(u)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=a(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=a(o,(l,u)=>{l(u),i.removeEventListener(t,o,s)})),o=a(o,(l,u)=>{Zo(t)&&Qo(u,r)||l(u)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",u=Dt(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=en(o,u)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",u=Dt(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=tn(o,u)}return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Xo(e){return e.replace(/-/g,".")}function Yo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Dt(e){return!Array.isArray(e)&&!isNaN(e)}function Jo(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Zo(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,Dt((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&_r(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(s=>((s==="cmd"||s==="super")&&(s="meta"),e[`${s}Key`])).length===i.length&&_r(e.key).includes(r[0]))}function _r(e){if(!e)return[];e=Jo(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)}w("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=O(e,r),s=`${r} = rightSideOfExpression($event, ${r})`,a=O(e,s);var l=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let u=es(e,t,r),f=Nn(e,l,t,_=>{a(()=>{},{scope:{$event:_,rightSideOfExpression:u}})});e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=f,i(()=>e._x_removeModelListeners.default());let h=O(e,`${r} = __placeholder`);e._x_model={get(){let _;return o(N=>_=N),_},set(_){h(()=>{},{scope:{__placeholder:_}})}},e._x_forceModelUpdate=()=>{o(_=>{_===void 0&&r.match(/\./)&&(_=""),window.fromModel=!0,A(()=>Zr(e,"value",_)),delete window.fromModel})},n(()=>{t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate()})});function es(e,t,r){return e.type==="radio"&&A(()=>{e.hasAttribute("name")||e.setAttribute("name",r)}),(n,i)=>A(()=>{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")?yt(n.target.value):n.target.value;return n.target.checked?i.concat([o]):i.filter(s=>!ts(s,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 s=o.value||o.text;return yt(s)}):Array.from(n.target.selectedOptions).map(o=>o.value||o.text);{let o=n.target.value;return t.includes("number")?yt(o):t.includes("trim")?o.trim():o}}})}function yt(e){let t=e?parseFloat(e):null;return rs(t)?t:e}function ts(e,t){return e==t}function rs(e){return!Array.isArray(e)&&!isNaN(e)}w("cloak",e=>queueMicrotask(()=>A(()=>e.removeAttribute(ge("cloak")))));Xr(()=>`[${ge("init")}]`);w("init",Je((e,{expression:t},{evaluate:r})=>typeof t=="string"?!!t.trim()&&r(t,{},!1):r(t,{},!1)));w("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{A(()=>{e.textContent=o})})})});w("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i(o=>{A(()=>{e.innerHTML=o,e._x_ignoreSelf=!0,U(e),delete e._x_ignoreSelf})})})});zt(Hr(":",jr(ge("bind:"))));w("bind",(e,{value:t,modifiers:r,expression:n,original:i},{effect:o})=>{if(!t){let a={};co(a),O(e,n)(u=>{nn(e,u,i)},{scope:a});return}if(t==="key")return ns(e,n);let s=O(e,n);o(()=>s(a=>{a===void 0&&typeof n=="string"&&n.match(/\./)&&(a=""),A(()=>Zr(e,t,a,r))}))});function ns(e,t){e._x_keyExpression=t}Gr(()=>`[${ge("data")}]`);w("data",Je((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let n={};Tt(n,e);let i={};po(i,n);let o=fe(e,t,{scope:i});o===void 0&&(o={}),Tt(o,e);let s=me(o);Or(s);let a=ke(e,s);s.init&&fe(e,s.init),r(()=>{s.destroy&&fe(e,s.destroy),a()})}));w("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=O(e,r);e._x_doHide||(e._x_doHide=()=>{A(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{A(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=Lt(h=>h?s():o(),h=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,h,s,o):h?a():o()}),u,f=!0;n(()=>i(h=>{!f&&h===u||(t.includes("immediate")&&(h?a():o()),l(h),u=h,f=!1)}))});w("for",(e,{expression:t},{effect:r,cleanup:n})=>{let i=os(t),o=O(e,i.items),s=O(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>is(e,i,o,s)),n(()=>{Object.values(e._x_lookup).forEach(a=>a.remove()),delete e._x_prevKeys,delete e._x_lookup})});function is(e,t,r,n){let i=s=>typeof s=="object"&&!Array.isArray(s),o=e;r(s=>{ss(s)&&s>=0&&(s=Array.from(Array(s).keys(),d=>d+1)),s===void 0&&(s=[]);let a=e._x_lookup,l=e._x_prevKeys,u=[],f=[];if(i(s))s=Object.entries(s).map(([d,v])=>{let b=xr(t,v,d,s);n(C=>f.push(C),{scope:{index:d,...b}}),u.push(b)});else for(let d=0;d<s.length;d++){let v=xr(t,s[d],d,s);n(b=>f.push(b),{scope:{index:d,...v}}),u.push(v)}let h=[],_=[],N=[],E=[];for(let d=0;d<l.length;d++){let v=l[d];f.indexOf(v)===-1&&N.push(v)}l=l.filter(d=>!N.includes(d));let ce="template";for(let d=0;d<f.length;d++){let v=f[d],b=l.indexOf(v);if(b===-1)l.splice(d,0,v),h.push([ce,d]);else if(b!==d){let C=l.splice(d,1)[0],R=l.splice(b-1,1)[0];l.splice(d,0,R),l.splice(b,0,C),_.push([C,R])}else E.push(v);ce=v}for(let d=0;d<N.length;d++){let v=N[d];a[v]._x_effects&&a[v]._x_effects.forEach(br),a[v].remove(),a[v]=null,delete a[v]}for(let d=0;d<_.length;d++){let[v,b]=_[d],C=a[v],R=a[b],V=document.createElement("div");A(()=>{R.after(V),C.after(R),R._x_currentIfEl&&R.after(R._x_currentIfEl),V.before(C),C._x_currentIfEl&&C.after(C._x_currentIfEl),V.remove()}),hr(R,u[f.indexOf(b)])}for(let d=0;d<h.length;d++){let[v,b]=h[d],C=v==="template"?o:a[v];C._x_currentIfEl&&(C=C._x_currentIfEl);let R=u[b],V=f[b],P=document.importNode(o.content,!0).firstElementChild;ke(P,me(R),o),A(()=>{C.after(P),U(P)}),typeof V=="object"&&pe("x-for key cannot be an object, it must be a string or an integer",o),a[V]=P}for(let d=0;d<E.length;d++)hr(a[E[d]],u[f.indexOf(E[d])]);o._x_prevKeys=f})}function os(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 s=i[1].replace(r,"").trim(),a=s.match(t);return a?(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2]&&(o.collection=a[2].trim())):o.item=s,o}function xr(e,t,r,n){let i={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(s=>s.trim()).forEach((s,a)=>{i[s]=t[a]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(s=>s.trim()).forEach(s=>{i[s]=t[s]}):i[e.item]=t,e.index&&(i[e.index]=r),e.collection&&(i[e.collection]=n),i}function ss(e){return!Array.isArray(e)&&!isNaN(e)}function In(){}In.inline=(e,{expression:t},{cleanup:r})=>{let n=Ge(e);n._x_refs||(n._x_refs={}),n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",In);w("if",(e,{expression:t},{effect:r,cleanup:n})=>{let i=O(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return ke(a,{},e),A(()=>{e.after(a),U(a)}),e._x_currentIfEl=a,e._x_undoIf=()=>{ie(a,l=>{l._x_effects&&l._x_effects.forEach(br)}),a.remove(),delete e._x_currentIfEl},a},s=()=>{!e._x_undoIf||(e._x_undoIf(),delete e._x_undoIf)};r(()=>i(a=>{a?o():s()})),n(()=>e._x_undoIf&&e._x_undoIf())});w("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach(i=>Go(e,i))});zt(Hr("@",jr(ge("on:"))));w("on",Je((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?O(e,n):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=Nn(e,t,r,a=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));lt("Collapse","collapse","collapse");lt("Intersect","intersect","intersect");lt("Focus","trap","focus");lt("Mask","mask","mask");function lt(e,t,r){w(t,n=>pe(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}Re.setEvaluator($r);Re.setReactivityEngine({reactive:er,effect:wo,release:So,raw:x});var as=Re,tr=as;var ls=class{el=void 0;constructor(e){this.el=e}traversals={first:"firstElementChild",next:"nextElementSibling",parent:"parentElement"};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 T(e){return new ls(e)}function us(e){let t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild}function cs(e){return e.nodeType===3||e.nodeType===8}var Pn=()=>{},Dn=()=>{};async function rr(e,t,r){let n,i,o,s,a,l,u,f,h,_,N;function E(c){if(!!N)return Dn((c||"").replace(`
6
+ `,"\\n"),n,i),new Promise(p=>Pn=()=>p())}function ce(c={}){let p=I=>I.getAttribute("key"),m=()=>{};a=c.updating||m,l=c.updated||m,u=c.removing||m,f=c.removed||m,h=c.adding||m,_=c.added||m,o=c.key||p,s=c.lookahead||!1,N=c.debug||!1}async function d(c,p){if(v(c,p)){let I=b(c,p);return await E("Swap elements"),I}let m=!1;if(!ve(a,c,p,()=>m=!0)){if(window.Alpine&&fs(c,p,()=>m=!0),cs(p)){await C(c,p),l(c,p);return}m||await R(c,p),l(c,p),await V(c,p)}}function v(c,p){return c.nodeType!=p.nodeType||c.nodeName!=p.nodeName||P(c)!=P(p)}function b(c,p){if(ve(u,c))return;let m=p.cloneNode(!0);ve(h,m)||(T(c).replace(m),f(c),_(m))}async function C(c,p){let m=p.nodeValue;c.nodeValue!==m&&(c.nodeValue=m,await E("Change text node to: "+m))}async function R(c,p){if(c._x_isShown&&!p._x_isShown||!c._x_isShown&&p._x_isShown)return;let m=Array.from(c.attributes),I=Array.from(p.attributes);for(let z=m.length-1;z>=0;z--){let K=m[z].name;p.hasAttribute(K)||(c.removeAttribute(K),await E("Remove attribute"))}for(let z=I.length-1;z>=0;z--){let K=I[z].name,y=I[z].value;c.getAttribute(K)!==y&&(c.setAttribute(K,y),await E(`Set [${K}] attribute to: "${y}"`))}}async function V(c,p){let m=c.childNodes,I=p.childNodes,z=cr(I),K=cr(m),y=T(p).nodes().first(),g=T(c).nodes().first(),Q={};for(;y;){let L=P(y),B=P(g);if(!g)if(L&&Q[L]){let M=Q[L];T(c).append(M),g=M,await E("Add element (from key)")}else{let M=ai(y,c)||{};await E("Add element: "+(M.outerHTML||M.nodeValue)),y=T(y).nodes().next();continue}if(s){let M=T(y).next(),fr=!1;for(;!fr&&M;)g.isEqualNode(M)&&(fr=!0,g=gt(y,g),B=P(g),await E("Move element (lookahead)")),M=T(M).next()}if(L!==B){if(!L&&B){Q[B]=g,g=gt(y,g),Q[B].remove(),g=T(g).nodes().next(),y=T(y).nodes().next(),await E('No "to" key');continue}if(L&&!B&&K[L]&&(g=T(g).replace(K[L]),await E('No "from" key')),L&&B){Q[B]=g;let M=K[L];if(M)g=T(g).replace(M),await E('Move "from" key');else{Q[B]=g,g=gt(y,g),Q[B].remove(),g=T(g).next(),y=T(y).next(),await E("Swap elements with keys");continue}}}let li=g&&T(g).nodes().next();await d(g,y),y=y&&T(y).nodes().next(),g=li}let vt=[];for(;g;)ve(u,g)||vt.push(g),g=T(g).nodes().next();for(;vt.length;){let L=vt.shift();L.remove(),await E("remove el"),f(L)}}function P(c){return c&&c.nodeType===1&&o(c)}function cr(c){let p={};return c.forEach(m=>{let I=P(m);I&&(p[I]=m)}),p}function ai(c,p){if(!ve(h,c)){let m=c.cloneNode(!0);return T(p).append(m),_(m),m}return null}function gt(c,p){if(!ve(h,c)){let m=c.cloneNode(!0);return T(p).before(m),_(m),m}return p}return ce(r),n=e,i=us(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}rr.step=()=>Pn();rr.log=e=>{Dn=e};function ve(e,...t){let r=!1;return e(...t,()=>r=!0),r}function fs(e,t,r){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function ds(e){e.morph=rr}var Hn=ds;tr.plugin(Hn);var ps=/INPUT/i,hs=/date|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/i,ms=/TEXTAREA/i;function gs(e,t,r,n){if(e.nodeType!==Node.ELEMENT_NODE||e!==document.activeElement)return;if(e.tagName.match(ms)||e.tagName.match(ps)&&e.getAttribute("type").match(hs))return n()}function vs(e,t){e.forEach(r=>tr.morph(r,t,{updating:gs}))}var jn=vs;function _s(e,t,r){if(e.match(/^dispatch(Event)?$/))return dr(r,t[0],t[1]||{});if(e.match(/^morph|mutate$/))return jn(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 xs(){let e=JSON.parse(this.templateContent.textContent),{id:t,selector:r,receiver:n,method:i,args:o}=e,s=[self];r&&(s=Array.from(document.querySelectorAll(r))),n&&(s=s.map(a=>{let l=a,u=n.split(".");for(;u.length>0;)l=l[u.shift()];return l})),_s(i,o,s)}var Fn=xs;function bs(e){e.invoke=Fn}var Kn={initialize:bs};var nr=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 nr;var X={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"},Y={stateLoad:"turbo-reflex:state-load",stateChange:"turbo-reflex:state-change"},j={...X,...Y};function k(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;k(X.clientError,t,{error:i,...r},!0)}}var ir;function ut(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,i){return delete n[i],k(Y.stateChange,S.element,{state:ir}),!0},set(n,i,o,s){return n[i]=ut(o,this),k(Y.stateChange,S.element,{state:ir}),!0}});if(Array.isArray(e))e.forEach((n,i)=>e[i]=ut(n,r));else if(typeof e=="object")for(let[n,i]of Object.entries(e))e[n]=ut(i,r);return t||(ir=r),r}var Bn=ut;var or,oe,ct,qn;function zn(){if(!S.element)return _e();let e=atob(S.element.dataset.state);ct={},oe=Bn(JSON.parse(e)),or={...oe},delete S.element.dataset.clientStateChange,setTimeout(()=>k(Y.stateLoad,S.element,{state:oe}))}function _e(){clearTimeout(qn),qn=setTimeout(zn,10)}or||zn();addEventListener("DOMContentLoaded",_e);addEventListener("load",_e);addEventListener("turbo:load",_e);addEventListener("turbo:frame-load",_e);addEventListener("turbo-reflex:success",_e);addEventListener(Y.stateChange,e=>{ct={};for(let[t,r]of Object.entries(oe))or[t]!==r&&(ct[t]=r);S.element.dataset.clientStateChange=!0,S.element.dataset.state=btoa(JSON.stringify(oe))});var se={events:Y,get current(){return oe},get delta(){return ct},get payloadChunks(){return btoa(JSON.stringify(oe)).match(/.{1,2000}/g)}};function ys(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 Es(e){document.body.insertAdjacentHTML("beforeend",e)}var ae={append:Es,replaceDocument:ys};var ft={};function ws(e){ft[e.id]=e}function Ss(e){delete ft[e]}var dt={add:ws,remove:Ss,get reflexes(){return[...Object.values(ft)]},get length(){return Object.keys(ft).length}};function Vn(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>k(X.finish,e.target,e.detail),20)}addEventListener(X.serverError,Vn);addEventListener(X.success,Vn);addEventListener(X.finish,e=>dt.remove(e.detail.id),!0);var J={events:X};var sr={};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&&(sr[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.`;k(J.events.clientError,document,{...e.detail,error:n},!0)}r.header("TurboReflex")==="Append"&&(e.preventDefault(),r.responseText.then(n=>ae.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboReflexSrc=sr[t.id]||t.src||t.dataset.turboReflexSrc,delete sr[t.id]});var As={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",reflexAttribute:"data-turbo-reflex"},F={...As};var pt={},Wn;function Ts(e,t){pt[e]=t,document.addEventListener(e,Wn,!0)}function Cs(e){return Object.keys(pt).find(t=>!!pt[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function ks(e,t){return e===Cs(t)}var Z={events:pt,register:Ts,isRegisteredForElement:ks,set handler(e){Wn=e}};function Os(e){return e.closest(`[${F.reflexAttribute}]`)}function Rs(e){return e.closest("turbo-frame")}function Ls(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 Ms(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,Ls(e,t),delete t.class,delete t.action,delete t.href,delete t[F.reflexAttribute],delete t[F.frameAttribute],t}var Le={buildAttributePayload:Ms,findClosestReflex:Os,findClosestFrame:Rs};function $s(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 Un={invokeReflex:$s};function Ns(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 xe={build:Ns};function Is(e,t){let r=t.src;t={...t},delete t.src,e.src=xe.build(r,t)}var ar={invokeReflex:Is};function Ps(e,t={}){let r=t.src;t={...t},delete t.src,delete t.href,e.setAttribute("href",xe.build(r,t))}var Gn={invokeReflex:Ps};function Ds(e){let t=e.target;k(J.events.abort,document,{xhr:t,...e.detail})}function lr(e){let t=e.target;t.getResponseHeader("TurboReflex")==="Append"?ae.append(t.responseText):ae.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboReflex requires 2XX-3XX status codes.`;k(J.events.clientError,document,{xhr:t,...e.detail,error:r},!0)}function Hs(e){let t=e.target;if(t.status<200||t.status>399)return lr(e);let r=t.responseText;t.getResponseHeader("TurboReflex")==="Append"?ae.append(t.responseText):ae.replaceDocument(t.responseText)}function js(e){let t=e.src;e={...e},delete e.src;try{let r=new XMLHttpRequest;r.open("GET",xe.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",Ds),r.addEventListener("error",lr),r.addEventListener("load",Hs),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;lr(r,{detail:{message:n}})}}var Xn={invokeReflex:js};function ur(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboReflexSrc||location.href}function Fs(e){let t=Le.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:Un.invokeReflex}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeReflex:Gn.invokeReflex}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:ur(e,t),invokeReflex:ar.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:ur(e,t),invokeReflex:ar.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:ur(e),invokeReflex:Xn.invokeReflex}}var Yn={find:Fs};var Me="unknown",Jn={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=>{Jn[Me].includes(t.type)&&console[Me==="debug"?"log":Me](t.type,{target:t.target,detail:t.detail})})});var Zn={get level(){return Me},set level(e){return Object.keys(Jn).includes(e)||(e="unknown"),Me=e}};function Ks(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var Qn={v4:Ks};function Bs(e){let t,r={};try{if(t=Le.findClosestReflex(e.target),!t||!Z.isRegisteredForElement(e.type,t))return;let n=Yn.find(t);switch(r={id:`reflex-${Qn.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:Le.buildAttributePayload(t),startedAt:new Date().getTime()},dt.add(r),k(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){k(J.events.clientError,t,{error:n,...r})}}Z.handler=Bs;Z.register("change",[`input[${F.reflexAttribute}]`,`select[${F.reflexAttribute}]`,`textarea[${F.reflexAttribute}]`]);Z.register("submit",[`form[${F.reflexAttribute}]`]);Z.register("click",[`[${F.reflexAttribute}]`]);var Tl=self.TurboReflex={logger:Zn,schema:F,registerEventDelegate:Z.register,get eventDelegates(){return{...Z.events}},get events(){return{...j}},get state(){return se.current},get stateDelta(){return se.delta}};var le=class extends HTMLElement{constructor(){super(),this.devtool="unknown",this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML="<slot></slot>"}connectedCallback(){this.ensureId(),this.dataset.elementOrigin="hopsoft/reflex_behaviors"}ensureId(){this.id.trim().length||(this.id=`${this.tagName}-${this.uuidv4()}`.toLowerCase())}uuidv4(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}get viewStack(){return this.dataset.viewStack?JSON.parse(this.dataset.viewStack):[]}get partial(){return this.viewStack[0]}get coordinates(){let t=this.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY,width:this.offsetWidth,height:this.offsetHeight}}};var $e=class extends le{};function qs(e){let t=document.createElement("template");return t.innerHTML=e,t}function Ne(e,t){return t=t||document.body,t.appendChild(qs(e).content.cloneNode(!0))}function ht(e,t={}){if(!e)return;let{color:r,offset:n,width:i}=t;r=r||"red",n=n||"0px",i=i||"3px";let{outline:o,outlineOffset:s}=e.style;e.originalStyles=e.originalStyles||{outline:o,outlineOffset:s},e.style.outline=`dotted ${i} ${r}`,e.style.outlineOffset=n}function mt(e){if(e&&e.originalStyles){for(let[t,r]of Object.entries(e.originalStyles))r?e.style[t]=r:e.style[t]="";delete e.originalStyles}}var Ie=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.labelElement.addEventListener("click",t=>{t.preventDefault(),this.toggle()}),this.checkboxElement.addEventListener("change",t=>this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}toggle(){this.checked?this.uncheck():this.check()}check(){this.checkboxElement.checked=!0,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}uncheck(){this.checkboxElement.checked=!1,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}get name(){return this.getAttribute("name")}get checked(){return this.checkboxElement.checked}get checkboxElement(){return this.shadowRoot.querySelector("input")}get labelElement(){return this.shadowRoot.querySelector("label")}get html(){return`
7
+ <style>${this.stylesheet}</style>
8
+ <div>
9
+ <input name="checkbox" type="checkbox">
10
+ <label for="checkbox"><slot name="label"></slot></label>
11
+ </div>
12
+ `}get stylesheet(){return`
13
+ div {
14
+ display: flex;
15
+ }
16
+ `}};var Pe=class extends HTMLElement{constructor(){super(),this.enabledDevtools={},this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html,this.shadowRoot.querySelector('button[data-role="closer"]').addEventListener("click",()=>this.close()),this.addEventListener("change",t=>{let r=t.target,{checked:n,name:i}=r;n?this.enableDevtool(i):this.disableDevtool(i)})}enableDevtool(t){this.enabledDevtools[t]||(this.enabledDevtools[t]=!0,this.dispatchEvent(new CustomEvent("reflex-behaviors:devtool-enable",{bubbles:!0,detail:{name:t}})))}disableDevtool(t){!this.enabledDevtools[t]||(delete this.enabledDevtools[t],this.dispatchEvent(new CustomEvent("reflex-behaviors:devtool-disable",{bubbles:!0,detail:{name:t}})))}close(){this.devtoolElements.forEach(t=>{t.checked&&t.uncheck()}),this.remove()}get devtoolElements(){return this.querySelectorAll('[slot="devtool"]')}get closeElement(){return this.querySelector('button[data-role="closer"]')}get html(){return`
17
+ <style>${this.stylesheet}</style>
18
+ <div data-role="container">
19
+ <strong>ReflexBehaviors</strong>
20
+ <slot name="devtool"></slot>
21
+ <button data-role='closer'>X</button>
22
+ </div>
23
+ `}get stylesheet(){return`
24
+ :host {
25
+ background-color: ghostwhite;
26
+ border-radius: 10px;
27
+ outline: solid 1px gainsboro;
28
+ bottom: 20px;
29
+ display: block;
30
+ filter: drop-shadow(0 4px 3px rgba(0,0,0,.07));
31
+ left: 50%;
32
+ padding: 5px 10px;
33
+ position: fixed;
34
+ transform: translateX(-50%);
35
+ z-index: 10000;
36
+ }
37
+
38
+ :host, :host * {
39
+ -webkit-user-select: none;
40
+ user-select: none;
41
+ }
42
+
43
+ strong {
44
+ color: silver;
45
+ font-weight: 600;
46
+ }
47
+
48
+ div[data-role="container"] {
49
+ display: flex;
50
+ gap: 0 5px;
51
+ }
52
+
53
+ button[data-role="closer"] {
54
+ border: none;
55
+ background-color: gainsboro;
56
+ border-radius: 50%;
57
+ color: white;
58
+ font-size: 12px;
59
+ height: 18px;
60
+ line-height: 18px;
61
+ margin: 0 -5px 0 10px;
62
+ padding: 0 3px;
63
+ width: 18px;
64
+ }
65
+ `}};var De=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=this.html}get color(){return this.getAttribute("color")||"darkslategray"}get emphasisColor(){return this.getAttribute("emphasis-color")||"black"}get backgroundColor(){return this.getAttribute("background-color")||"gainsboro"}get position(){return this.getAttribute("position")||"top"}get cssArrow(){switch(this.position){case"bottom":return`transparent transparent ${this.emphasisColor} transparent`;default:return`${this.emphasisColor} transparent transparent transparent;`}}get html(){return`
66
+ <style>${this.stylesheet}</style>
67
+ <div role="tooltip">
68
+ <slot name="title"></slot>
69
+ <hr>
70
+ <slot name="normal"></slot>
71
+ <slot name="emphasis"></slot>
72
+ </div>
73
+ `}get stylesheet(){return`
74
+ :host {
75
+ display: block;
76
+ position: absolute;
77
+ z-index: 10000;
78
+ }
79
+
80
+ * {
81
+ color: ${this.color}
82
+ }
83
+
84
+ [role="tooltip"] {
85
+ background-color: ${this.backgroundColor};
86
+ border-radius: 5px;
87
+ filter: drop-shadow(3px 3px 3px rgba(0,0,0,0.3));
88
+ font-family: monospace;
89
+ left: 50px;
90
+ min-height: 30px;
91
+ min-width: 100px;
92
+ opacity: 0.9;
93
+ outline: solid 2px ${this.emphasisColor};
94
+ padding: 8px 12px 8px 12px;
95
+ white-space: nowrap;
96
+ }
97
+
98
+ [role="tooltip"]::after {
99
+ border-color: ${this.cssArrow};
100
+ border-style: solid;
101
+ border-width: 5px;
102
+ content: "";
103
+ margin-left: -5px;
104
+ position: absolute;
105
+ top: ${this.position==="bottom"?"-10px":"100%"};
106
+ }
107
+
108
+ slot[name="title"] {
109
+ color: ${this.emphasisColor};
110
+ font-weight: bold;
111
+ }
112
+
113
+ slot[name="emphasis"] {
114
+ color: ${this.emphasisColor};
115
+ font-weight: normal;
116
+ opacity: 0.7;
117
+ }
118
+
119
+ hr {
120
+ background-color: ${this.emphasisColor};
121
+ border: none;
122
+ height: 1px;
123
+ margin-bottom: 4px;
124
+ margin-top: 4px;
125
+ opacity: 0.3;
126
+ }
127
+ `}};customElements.define("reflex-behaviors-devtool",Ie);customElements.define("reflex-behaviors-devtool-supervisor",Pe);customElements.define("reflex-behaviors-devools-tooltip",De);var $;function ti(){!$||($.close(),$.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-stop",{bubbles:!0})),$=null)}function ri(){Ne("<reflex-behaviors-devtool-supervisor></reflex-behaviors-devtool-supervisor>"),$=document.body.querySelector("reflex-behaviors-devtool-supervisor"),$.dispatchEvent(new CustomEvent("reflex-behaviors:devtools-start",{bubbles:!0}))}function zs(){let e=$?Object.keys($.enabledDevtools):[];ti(),ri(),$.devtoolElements.forEach(t=>{e.includes(t.name)&&t.check()})}var ei;function He(){clearTimeout(ei),ei=setTimeout(zs,25)}addEventListener("turbo:load",He);addEventListener("turbo-frame:load",He);addEventListener("turbo-reflex:success",He);addEventListener("turbo-reflex:finish",He);function Vs(e,t){if(!!$)return Ne(`
128
+ <reflex-behaviors-devtool name="${e}" slot="devtool">
129
+ <span slot="label">${t}</span>
130
+ </reflex-behaviors-devtool>
131
+ `,$)}function Ws(e){return $?$.enabledDevtools[e]:!1}var ue={enabled:Ws,register:Vs,restart:He,start:ri,stop:ti};document.addEventListener("reflex-behaviors:devtools-start",()=>ue.register("toggle","toggles<small>(trigger/target)</small>"));var ii="toggle-trigger-tooltip",oi="toggle-target-tooltip";addEventListener("click",()=>setTimeout(Us));function Us(){[ii,oi].forEach(t=>{let r=document.getElementById(t);r&&r.remove()})}function ni(e,t,r,n={}){let{backgroundColor:i,color:o,emphaisColor:s,position:a}=n;return o=o||"white",a=a||"top",Ne(`
132
+ <reflex-behaviors-devools-tooltip id="${e}" position="${a}" background-color="${i}" color="${o}" emphasis-color="${s}">
133
+ <div slot='title'>${t}</div>
134
+ ${r}
135
+ </reflex-behaviors-devools-tooltip>
136
+ `),document.getElementById(e)}var je=class{constructor(t){this.name="toggle",this.reflex=t.dataset.turboReflex,this.trigger=t,this.target=t.target,this.renderingPartial=t.renderingPartial,this.renderingElement=t.renderingElement,this.renderingElementId=this.renderingElement?this.renderingElement.id:null,document.addEventListener("reflex-behaviors:devtool-enable",r=>{let{name:n}=r.detail;n===this.name&&ht(this.trigger,{color:"red",offset:"2px"})}),document.addEventListener("reflex-behaviors:devtool-disable",r=>{let{name:n}=r.detail;n===this.name&&mt(this.trigger)})}get enabled(){return ue.enabled(this.name)}show(){!this.enabled||(this.hide(),this.createTriggerTooltip(),this.createTargetTooltip(),ht(this.target,{color:"blue",offset:"-2px"}),ht(this.renderingElement,{color:"turquoise",offset:"4px",width:"4px"}),console.table({trigger:{id:this.trigger.id,partial:this.trigger.partial},target:{id:this.target.id,partial:this.target.partial},[this.reflex]:{id:this.renderingElementId,partial:this.renderingPartial}}))}hide(){this.destroyTriggerTooltip(),this.destroyTargetTooltip(),mt(this.target),mt(this.renderingElement)}createTriggerTooltip(){let t=`TRIGGER (targets: ${this.trigger.controls})`,r=this.trigger.viewStack.map(s=>this.trigger.sharedViews.includes(s)?`<div slot="emphasis">${s}</div>`:`<div slot="normal">${s}</div>`,this).join("");this.triggerTooltip=ni(ii,t,r,{backgroundColor:"pink",emphaisColor:"darkred"});let n=this.trigger.coordinates,i=Math.ceil(n.top-this.triggerTooltip.offsetHeight-5),o=Math.ceil(n.left);this.triggerTooltip.style.top=`${i}px`,this.triggerTooltip.style.left=`${o}px`}destroyTriggerTooltip(){!this.triggerTooltip||(this.triggerTooltip.remove(),delete this.triggerTooltip)}createTargetTooltip(){if(!this.target)return;let t=`TARGET (id: ${this.target.id})`,r=this.target.viewStack.map(s=>this.trigger.sharedViews.includes(s)?`<div slot="emphasis">${s}</div>`:`<div slot="normal">${s}</div>`,this).join("");this.targetTooltip=ni(oi,t,r,{backgroundColor:"lightskyblue",emphaisColor:"blue",position:"bottom"});let n=this.target.coordinates,i=Math.ceil(n.top+n.height+4),o=Math.ceil(n.left);this.targetTooltip.style.top=`${i}px`,this.targetTooltip.style.left=`${o}px`}destroyTargetTooltip(){!this.targetTooltip||(this.targetTooltip.remove(),delete this.targetTooltip)}};var Fe=class extends le{connectedCallback(){super.connectedCallback();let t=()=>this.devtool.show(),r=()=>this.devtool.hide();document.addEventListener("reflex-behaviors:devtools-start",()=>{this.devtool=new je(this),this.addEventListener("mouseenter",t),this.addEventListener("mouseleave",r)}),document.addEventListener("reflex-behaviors:devtools-stop",()=>{this.removeEventListener("mouseenter",t),this.removeEventListener("mouseleave",r),delete this.devtool}),ue.restart()}collapse(){try{this.target.remove(),this.setAttribute("aria-expanded",!1)}catch(t){console.error("Failed to collapse toggle-trigger target!",t)}}get sharedViews(){if(!this.target)return[];let t=(r,n)=>(this.target.viewStack.includes(n)&&r.push(n),r);return this.viewStack.reduce(t.bind(this),[])}get renderingInfo(){return this.dataset.render?JSON.parse(this.dataset.render):{}}get renderingPartial(){return this.renderingInfo.partial}get renderingElement(){let{id:t}=this.renderingInfo;return t?document.getElementById(t):null}get expanded(){return this.getAttribute("aria-expanded")==="true"}get controls(){return this.getAttribute("aria-controls")}get target(){return document.getElementById(this.controls)}get active(){return this.getAttribute("data-active")==="true"}set active(t){this.setAttribute("data-active",!!t)}};addEventListener(TurboReflex.events.start,e=>e.target.active=!0);addEventListener(TurboReflex.events.success,e=>e.target.active=!1);addEventListener(TurboReflex.events.finish,e=>e.target.active=!1);addEventListener("click",e=>{e.target.tagName.match(/reflex-behaviors-devtool/i)||setTimeout(()=>{let t='toggle-trigger[aria-controls][aria-expanded="true"][data-auto-collapse="true"]';document.querySelectorAll(t).forEach(r=>r.collapse())})});customElements.define("toggle-target",$e);customElements.define("toggle-trigger",Fe);var{restart:Gs,start:Xs,stop:Ys}=ue,si={restart:Gs,start:Xs,stop:Ys};Kn.initialize(Turbo.StreamActions);self.ReflexBehaviors={devtools:si};
7
137
  //# sourceMappingURL=reflex_behaviors.js.map