@livx.cc/bare-v3 0.1.0-alpha.88 → 0.1.0-alpha.90

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.
@@ -5,7 +5,7 @@
5
5
  * <script type="application/json"> child holding the array) and listen for `b3-change`, whose
6
6
  * detail carries the full, plain `columns` after every user edit plus the `action` that made it.
7
7
  * `#tag` and `@mention` words in a title or description become filter labels; a trailing run of
8
- * them is shown as labels instead of title text. `search` narrows the cards to those whose text holds every word typed;
8
+ * them is shown as labels instead of title text. `search` narrows the cards to those whose text (comments included) holds every word typed;
9
9
  * `addCard()` starts a new card in the `default-column`. Starred cards stay above the rest of their column. Opt-in entry: `@livx.cc/bare-v3/components/board`.
10
10
  */
11
11
  import { Base } from './base';
@@ -166,7 +166,7 @@ export declare class B3Board extends Base {
166
166
  get filter(): string[];
167
167
  set filter(value: string[]);
168
168
  /**
169
- * Text search: only cards whose title, description, subtasks or tags hold every word (case-insensitive, any order)
169
+ * Text search: only cards whose title, description, subtasks, tags or comments hold every word (case-insensitive, any order)
170
170
  * are shown; counts read shown/total. Works with `filter`. The `search` attribute sets it too.
171
171
  */
172
172
  get search(): string;
@@ -1,10 +1,10 @@
1
- var{defineProperty:at,getOwnPropertyNames:hi,getOwnPropertyDescriptor:pi}=Object,bi=Object.prototype.hasOwnProperty;function mi(e){return this[e]}var gi=(e)=>{var t=(dr??=new WeakMap).get(e),r;if(t)return t;if(t=at({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of hi(e))if(!bi.call(t,n))at(t,n,{get:mi.bind(e,n),enumerable:!(r=pi(e,n))||r.enumerable})}return dr.set(e,t),t},dr;var xi=(e)=>e;function yi(e,t){this[e]=xi.bind(null,t)}var vi=(e,t)=>{for(var r in t)at(e,r,{get:t[r],enumerable:!0,configurable:!0,set:yi.bind(t,r)})};var wi=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wn={};vi(Wn,{Alpine:()=>Vn,default:()=>ea});function Ei(e){Si(e)}function ki(){Pt=!0}function Ai(){Pt=!1,Sr()}function Si(e){if(!P.includes(e)){if(P.push(e),e._x_schedulerPriority!==void 0)ze=!0}Sr()}function $t(e){let t=P.indexOf(e);if(t!==-1&&t>xt)P.splice(t,1)}function Sr(){if(!gt&&!mt){if(Pt)return;mt=!0,queueMicrotask(Ci)}}function Ci(){mt=!1,gt=!0;for(let e=0;e<P.length;e++){if(ze)Ti(e);P[e](),xt=e}P.length=0,xt=-1,ze=!1,gt=!1}function Ti(e){let t=new Map,r=P.slice(e).sort((n,i)=>Oi(n,i,t));for(let n=0;n<r.length;n++)P[e+n]=r[n];ze=!1}function Oi(e,t,r){if(!lt(e))return lt(t)?1:0;if(!lt(t))return-1;return hr(e._x_schedulerPriority.el,r)-hr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function lt(e){return e._x_schedulerPriority!==void 0}function hr(e,t){if(t.has(e))return t.get(e);let r=0,n=e;while(e)if(r++,e._x_teleportBack)e=e._x_teleportBack;else if(typeof ShadowRoot==="function"&&e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else e=e.parentElement;return t.set(n,r),r}function Ii(e){yt=!1,e(),yt=!0}function Li(e){le=e.reactive,ce=e.release,re=(t)=>e.effect(t,{scheduler:(r)=>{if(yt)Ei(r);else r()}}),Cr=e.raw}function pr(e){re=e}function Di(e){let t=()=>{};return[(n,i)=>{let o=i?.priority==="structural"?Mi++:void 0,s=re(n);if(o!==void 0&&s!==void 0)s._x_schedulerPriority={el:e,order:o};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((a)=>a())};return e._x_effects.add(s),t=()=>{if(s===void 0)return;e._x_effects.delete(s),ce(s)},s},()=>{t()}]}function Tr(e,t){let r=!0,n,i,o=re(()=>{let s=e(),a=JSON.stringify(s);if(!r){if(typeof s==="object"||s!==n){let l=typeof n==="object"?JSON.parse(i):n;queueMicrotask(()=>{t(s,l)})}}n=s,i=a,r=!1});return()=>{$t(o),ce(o)}}async function Ni(e){ki();try{await e(),await Promise.resolve()}finally{Ai()}}function Bi(e){Ir.push(e)}function Rt(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,Mr.push(t)}function Lr(e){Or.push(e)}function Dr(e,t,r){if(!e._x_attributeCleanups)e._x_attributeCleanups={};if(!e._x_attributeCleanups[t])e._x_attributeCleanups[t]=[];e._x_attributeCleanups[t].push(r)}function Nr(e,t){if(!e._x_attributeCleanups)return;Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{if(t===void 0||t.includes(r))n.forEach((i)=>i()),delete e._x_attributeCleanups[r]})}function Pi(e){e._x_effects?.forEach($t);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Ht(){Ve.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),zt=!0}function Br(){$i(),Ve.disconnect(),zt=!1}function $i(){let e=Ve.takeRecords();F.push(()=>e.length>0&&We(e));let t=F.length;queueMicrotask(()=>{if(F.length===t)while(F.length>0)F.shift()()})}function Ri(){while(F.length>0)F.shift()();let e=Ve.takeRecords();if(e.length>0)We(e)}function _(e){if(!zt)return e();Br();try{return e()}finally{Ht()}}function zi(){Ut=!0}function Hi(){Ut=!1,We(He),He=[]}function We(e){if(Ut){He=He.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let o=0;o<e.length;o++){if(e[o].target._x_ignoreMutationObserver)continue;if(e[o].type==="childList")e[o].removedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(!s._x_marker)return;r.add(s)}),e[o].addedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(r.has(s)){r.delete(s);return}if(s._x_marker)return;t.push(s)});if(e[o].type==="attributes"){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,c=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:a,value:s.getAttribute(a)})},d=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(a)};if(s.hasAttribute(a)&&l===null)c();else if(s.hasAttribute(a))d(),c();else d()}}i.forEach((o,s)=>{Nr(s,o)}),n.forEach((o,s)=>{Or.forEach((a)=>a(s,o))});for(let o of r){if(t.some((s)=>s.contains(o)))continue;Mr.forEach((s)=>s(o))}for(let o of t){if(!o.isConnected)continue;Ir.forEach((s)=>s(o))}t=null,r=null,n=null,i=null}function Pr(e){return G(ae(e))}function Se(e,t,r){return e._x_dataStack=[t,...ae(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function ae(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return ae(e.host);if(!e.parentNode)return[];return ae(e.parentNode)}function G(e){return new Proxy({objects:e},Ui)}function $r(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return $r(Object.getPrototypeOf(e),t)}function ji(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function jt(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,o="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:a,enumerable:l}])=>{if(l===!1||a===void 0)return;if(typeof a==="object"&&a!==null&&a.__v_skip)return;let c=o===""?s:`${o}.${s}`;if(typeof a==="object"&&a!==null&&a._x_interceptor)i[s]=a.initialize(e,c,s,t);else if(r(a)&&a!==i&&!(a instanceof Element))n(a,c)})};return n(e)}function Rr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o,s){return e(this.initialValue,()=>qi(n,i),(a)=>vt(n,i,a),i,o,s)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a,l)=>{let c=n.initialize(o,s,a,l);return r.initialValue=c,i(o,s,a,l)}}else r.initialValue=n;return r}}function qi(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function vt(e,t,r){if(typeof t==="string")t=t.split(".");if(t.length===1)e[t[0]]=r;else if(t.length===0)throw error;else if(e[t[0]])return vt(e[t[0]],t.slice(1),r);else return e[t[0]]={},vt(e[t[0]],t.slice(1),r)}function M(e,t){zr[e]=t}function Ue(e,t){let r=Fi(t);return Object.entries(zr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Fi(e){let[t,r]=Vr(e),n={interceptor:Rr,...t};return Rt(e,r),n}function Ki(e,t,r,...n){try{return r(...n)}catch(i){Ye(i,e,t)}}function Ye(...e){return Hr(...e)}function Vi(e){Hr=e}function Wi(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
1
+ var{defineProperty:at,getOwnPropertyNames:bi,getOwnPropertyDescriptor:mi}=Object,gi=Object.prototype.hasOwnProperty;function xi(e){return this[e]}var vi=(e)=>{var t=(ur??=new WeakMap).get(e),r;if(t)return t;if(t=at({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of bi(e))if(!gi.call(t,n))at(t,n,{get:xi.bind(e,n),enumerable:!(r=mi(e,n))||r.enumerable})}return ur.set(e,t),t},ur;var yi=(e)=>e;function wi(e,t){this[e]=yi.bind(null,t)}var _i=(e,t)=>{for(var r in t)at(e,r,{get:t[r],enumerable:!0,configurable:!0,set:wi.bind(t,r)})};var Ei=(e,t)=>()=>(e&&(t=e(e=0)),t);var Yn={};_i(Yn,{Alpine:()=>Wn,default:()=>ra});function Ai(e){Ti(e)}function Si(){Pt=!0}function Ci(){Pt=!1,Cr()}function Ti(e){if(!P.includes(e)){if(P.push(e),e._x_schedulerPriority!==void 0)He=!0}Cr()}function $t(e){let t=P.indexOf(e);if(t!==-1&&t>xt)P.splice(t,1)}function Cr(){if(!gt&&!mt){if(Pt)return;mt=!0,queueMicrotask(Oi)}}function Oi(){mt=!1,gt=!0;for(let e=0;e<P.length;e++){if(He)Mi(e);P[e](),xt=e}P.length=0,xt=-1,He=!1,gt=!1}function Mi(e){let t=new Map,r=P.slice(e).sort((n,i)=>Ii(n,i,t));for(let n=0;n<r.length;n++)P[e+n]=r[n];He=!1}function Ii(e,t,r){if(!lt(e))return lt(t)?1:0;if(!lt(t))return-1;return pr(e._x_schedulerPriority.el,r)-pr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function lt(e){return e._x_schedulerPriority!==void 0}function pr(e,t){if(t.has(e))return t.get(e);let r=0,n=e;while(e)if(r++,e._x_teleportBack)e=e._x_teleportBack;else if(typeof ShadowRoot==="function"&&e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else e=e.parentElement;return t.set(n,r),r}function Di(e){vt=!1,e(),vt=!0}function Ni(e){le=e.reactive,ce=e.release,re=(t)=>e.effect(t,{scheduler:(r)=>{if(vt)Ai(r);else r()}}),Tr=e.raw}function br(e){re=e}function Bi(e){let t=()=>{};return[(n,i)=>{let o=i?.priority==="structural"?Li++:void 0,s=re(n);if(o!==void 0&&s!==void 0)s._x_schedulerPriority={el:e,order:o};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((a)=>a())};return e._x_effects.add(s),t=()=>{if(s===void 0)return;e._x_effects.delete(s),ce(s)},s},()=>{t()}]}function Or(e,t){let r=!0,n,i,o=re(()=>{let s=e(),a=JSON.stringify(s);if(!r){if(typeof s==="object"||s!==n){let l=typeof n==="object"?JSON.parse(i):n;queueMicrotask(()=>{t(s,l)})}}n=s,i=a,r=!1});return()=>{$t(o),ce(o)}}async function Pi(e){Si();try{await e(),await Promise.resolve()}finally{Ci()}}function $i(e){Lr.push(e)}function Rt(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,Ir.push(t)}function Dr(e){Mr.push(e)}function Nr(e,t,r){if(!e._x_attributeCleanups)e._x_attributeCleanups={};if(!e._x_attributeCleanups[t])e._x_attributeCleanups[t]=[];e._x_attributeCleanups[t].push(r)}function Br(e,t){if(!e._x_attributeCleanups)return;Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{if(t===void 0||t.includes(r))n.forEach((i)=>i()),delete e._x_attributeCleanups[r]})}function Ri(e){e._x_effects?.forEach($t);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Ht(){We.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),zt=!0}function Pr(){zi(),We.disconnect(),zt=!1}function zi(){let e=We.takeRecords();F.push(()=>e.length>0&&Ye(e));let t=F.length;queueMicrotask(()=>{if(F.length===t)while(F.length>0)F.shift()()})}function Hi(){while(F.length>0)F.shift()();let e=We.takeRecords();if(e.length>0)Ye(e)}function _(e){if(!zt)return e();Pr();try{return e()}finally{Ht()}}function Ui(){Ut=!0}function ji(){Ut=!1,Ye(Ue),Ue=[]}function Ye(e){if(Ut){Ue=Ue.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let o=0;o<e.length;o++){if(e[o].target._x_ignoreMutationObserver)continue;if(e[o].type==="childList")e[o].removedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(!s._x_marker)return;r.add(s)}),e[o].addedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(r.has(s)){r.delete(s);return}if(s._x_marker)return;t.push(s)});if(e[o].type==="attributes"){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,c=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:a,value:s.getAttribute(a)})},d=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(a)};if(s.hasAttribute(a)&&l===null)c();else if(s.hasAttribute(a))d(),c();else d()}}i.forEach((o,s)=>{Br(s,o)}),n.forEach((o,s)=>{Mr.forEach((a)=>a(s,o))});for(let o of r){if(t.some((s)=>s.contains(o)))continue;Ir.forEach((s)=>s(o))}for(let o of t){if(!o.isConnected)continue;Lr.forEach((s)=>s(o))}t=null,r=null,n=null,i=null}function $r(e){return G(ae(e))}function Ce(e,t,r){return e._x_dataStack=[t,...ae(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function ae(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return ae(e.host);if(!e.parentNode)return[];return ae(e.parentNode)}function G(e){return new Proxy({objects:e},qi)}function Rr(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Rr(Object.getPrototypeOf(e),t)}function Fi(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function jt(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,o="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:a,enumerable:l}])=>{if(l===!1||a===void 0)return;if(typeof a==="object"&&a!==null&&a.__v_skip)return;let c=o===""?s:`${o}.${s}`;if(typeof a==="object"&&a!==null&&a._x_interceptor)i[s]=a.initialize(e,c,s,t);else if(r(a)&&a!==i&&!(a instanceof Element))n(a,c)})};return n(e)}function zr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o,s){return e(this.initialValue,()=>Ki(n,i),(a)=>yt(n,i,a),i,o,s)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a,l)=>{let c=n.initialize(o,s,a,l);return r.initialValue=c,i(o,s,a,l)}}else r.initialValue=n;return r}}function Ki(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function yt(e,t,r){if(typeof t==="string")t=t.split(".");if(t.length===1)e[t[0]]=r;else if(t.length===0)throw error;else if(e[t[0]])return yt(e[t[0]],t.slice(1),r);else return e[t[0]]={},yt(e[t[0]],t.slice(1),r)}function M(e,t){Hr[e]=t}function je(e,t){let r=Vi(t);return Object.entries(Hr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Vi(e){let[t,r]=Wr(e),n={interceptor:zr,...t};return Rt(e,r),n}function Wi(e,t,r,...n){try{return r(...n)}catch(i){Je(i,e,t)}}function Je(...e){return Ur(...e)}function Yi(e){Ur=e}function Ji(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{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)}function Ur(e){let t=W;W=!1;let r=e();return W=t,r}function Y(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return jr(...e)}function Yi(e){jr=e}function Ji(e){qr=e}function Gi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!W){wt(r,t,G([n,...e]),i);return}let s=t.apply(G([n,...e]),i);wt(r,s)}}function wt(e,t,r,n,i){if(W&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>wt(e,s,r,n)).catch((s)=>Ye(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Xi(...e){return qr(...e)}function de(e=""){return qt+e}function Zi(e){qt=e}function E(e,t){return je[e]=t,{before(r){if(!je[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=V.indexOf(r);V.splice(n>=0?n:V.indexOf("DEFAULT"),0,e)}}}function Qi(e){return Object.keys(je).includes(e)}function Je(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=Fr(o);o=o.map((a)=>{if(s.find((l)=>l.name===a.name))return{name:`x-bind:${a.name}`,value:`"${a.value}"`};return a}),t=t.concat(o)}let n={};return t.map(Jr((o,s)=>n[o]=s)).filter(Xr).map(rs(n,r)).sort(ns).map((o)=>ts(e,o))}function Fr(e){return Array.from(e).map(Jr()).filter((t)=>!Xr(t))}function es(e){_t=!0;let t=Symbol();Kr=t,be.set(t,[]);let r=()=>{while(be.get(t).length)be.get(t).shift()();be.delete(t)},n=()=>{_t=!1,r()};e(r),n()}function Vr(e){let t=[],r=(a)=>t.push(a),[n,i]=Di(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:Y.bind(Y,e)},()=>t.forEach((a)=>a())]}function ts(e,t){let r=()=>{},n=je[t.type]||r,[i,o]=Vr(e);Dr(e,t.original,o);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),_t?be.get(Kr).push(n):n()};return s.runCleanups=o,s}function Jr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Gr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Ft(e){Gr.push(e)}function Xr({name:e}){return Zr().test(e)}function rs(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Zr()),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}}}function ns(e,t){let r=V.indexOf(e.type)===-1?Et:e.type,n=V.indexOf(t.type)===-1?Et:t.type;return V.indexOf(r)-V.indexOf(n)}function X(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>X(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)X(n,t,!1),n=n.nextElementSibling}function R(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function is(e){return(...t)=>j&&e(...t)}function Ce(e){Qr.push(e)}function ss(e,t){Qr.forEach((r)=>r(e,t)),j=!0,en(()=>{D(t,(r,n)=>{n(r,()=>{})})}),j=!1}function os(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,kt=!0,en(()=>{as(t)}),j=!1,kt=!1}function as(e){let t=!1;D(e,(n,i)=>{X(n,(o,s)=>{if(t&&hs(o))return s();t=!0,i(o,s)})})}function en(e){let t=re;pr((r,n)=>{let i=t(r);return ce(i),()=>{}}),e(),pr(t)}function ls(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Ge++}r.pending++,Promise.resolve(t).catch((n)=>{try{Ye(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>cs(e,r))}function cs(e,t){if(t.pending--,t.pending>0)return;if(Ri(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Ge--,!e.isConnected)return;us(t),D(e)}function ds(e,t){if(Ge===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return tn(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function tn(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function us(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=T(r,(o)=>o._x_deferInit);if(n){tn(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((o)=>r.hasAttribute(o)).map((o)=>({name:o,value:r.getAttribute(o)}));if(i.length===0)return;Je(r,i).forEach((o)=>o())})}function me(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function fs(){if(br)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(br=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");me(document,"alpine:init"),me(document,"alpine:initializing"),Ht(),Bi((t)=>D(t,X)),Rt((t)=>ne(t)),Lr((t,r)=>{if(ds(t,r))return;Je(t,r).forEach((n)=>n())});let e=(t)=>!Xe(t.parentElement,!0);Array.from(document.querySelectorAll(sn().join(","))).filter(e).forEach((t)=>{D(t)}),me(document,"alpine:initialized"),setTimeout(()=>{ms()})}function nn(){return Kt.map((e)=>e())}function sn(){return Kt.concat(rn).map((e)=>e())}function on(e){Kt.push(e)}function an(e){rn.push(e)}function Xe(e,t=!1){return T(e,(r)=>{if((t?sn():nn()).some((i)=>r.matches(i)))return!0})}function T(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return T(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return T(e.parentNode.host,t);if(!e.parentElement)return;return T(e.parentElement,t)}function hs(e){return nn().some((t)=>e.matches(t))}function ps(e){ln.push(e)}function D(e,t=X,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;es(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),ln.forEach((o)=>o(n,i)),Je(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=bs++;n._x_ignore&&i()})})}function ne(e,t=X){t(e,(r)=>{Pi(r),Nr(r),delete r._x_marker})}function ms(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Qi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Wt(e=()=>{}){return queueMicrotask(()=>{Vt||setTimeout(()=>{St()})}),new Promise((t)=>{At.push(()=>{e(),t()})})}function St(){Vt=!1;while(At.length)At.shift()()}function gs(){Vt=!0}function Yt(e,t){if(Array.isArray(t))return mr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return xs(e,t);else if(typeof t==="function")return Yt(e,t());return mr(e,t)}function Ct(e){return e.split(/\s/).filter(Boolean)}function mr(e,t){let r=(i)=>Ct(i).filter((o)=>!e.classList.contains(o)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function xs(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?Ct(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?Ct(s):!1).filter(Boolean),i=[],o=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),o.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{o.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function Ze(e,t){if(typeof t==="object"&&t!==null)return ys(e,t);return vs(e,t)}function ys(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=ws(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Ze(e,r)}}function vs(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function ws(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Tt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function _s(e,t,r){cn(e,Yt,""),{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 Es(e,t,r){cn(e,Ze);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);if(t.includes("in")&&!n)t=t.filter((f,x)=>x<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((f,x)=>x>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),c=a?0:1,d=l?he(t,"scale",95)/100:1,u=he(t,"delay",0)/1000,p=he(t,"origin","center"),b="opacity, transform",m=he(t,"duration",150)/1000,h=he(t,"duration",75)/1000,g="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${m}s`,transitionTimingFunction:g},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${h}s`,transitionTimingFunction:g},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function cn(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Ot(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Ot(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function dn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:dn(t)}function Ot(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,c;ks(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function ks(e,t){let r,n,i,o=Tt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),St();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Tt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),gs(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;_(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;_(()=>{t.end()}),St(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function he(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function un(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Ls(t):t,t){case"value":As(e,r);break;case"style":Cs(e,r);break;case"class":Ss(e,r);break;case"selected":case"checked":Ts(e,t,r);break;default:Jt(e,t,r);break}}function As(e,t){if(Gt(e)){if(e.attributes.value===void 0)e.value=t}else if(qe(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>Ds(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Is(e,t);else if(e.tagName==="OPTION")Jt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Ss(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Yt(e,t)}function Cs(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Ze(e,t)}function Ts(e,t,r){Jt(e,t,r),Ms(e,t,r)}function Jt(e,t,r){if([null,void 0,!1].includes(r)&&Bs(t))e.removeAttribute(t);else{if(fn(t))r=t;if(Ps(r))r=JSON.stringify(r);Os(e,t,r)}}function Os(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Ms(e,t,r){if(e[t]!==r)e[t]=r}function Is(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Ls(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ds(e,t){return e==t}function Re(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function fn(e){return Ns.has(e)}function Bs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Ps(e){return typeof e==="object"&&e!==null}function $s(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return hn(e,t,r)}function Rs(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,Ur(()=>Y(e,i.expression))}return hn(e,t,r)}function hn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(fn(t))return!![t,"true"].includes(n);return n}function qe(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Gt(e){return e.type==="radio"||e.localName==="ui-radio"}function pn(e,t){let r;return function(){let n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function bn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function mn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=re(()=>{let l=e(),c=r();if(i)n(ct(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==o)n(ct(l));else if(d!==u)t(ct(c))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{$t(a),ce(a)}}function ct(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function zs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function Hs(e,t){if(!gr)B=le(B),gr=!0;if(t===void 0)return B[e];if(B[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)B[e]=t.initialize(B,e,e,()=>{});else jt(B[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")B[e].init()}function Us(){return B}function js(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return xn(e,r());else gn[e]=r;return()=>{}}function qs(e){return Object.entries(gn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function xn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Fr(i);return i=i.map((s)=>{if(o.find((a)=>a.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),Je(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Fs(e,t){yn[e]=t}function Ks(e,t){return Object.entries(yn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function wn(e){try{let r=new Ys(e).tokenize(),i=new Js(r).parse(),o=new Gs;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Xs(e,t,r={}){let n=_n(e),i=G([r.scope??{},...n]),o=r.params??[],a=wn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&W)return a.apply(i,o);return a}function Zs(e,t){let r=_n(e);if(typeof t==="function")return Gi(r,t);let n=Qs(e,t,r);return Ki.bind(null,e,t,n)}function _n(e){let t={};return Ue(t,e),[t,...ae(e)]}function Qs(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:o=[]}={})=>{let s=G([i,...r]),l=wn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(W&&typeof l==="function"){let c=l.apply(l,o);if(c instanceof Promise)c.then((d)=>n(d));else n(c)}else if(typeof l==="object"&&l instanceof Promise)l.then((c)=>n(c));else n(l)}}function En(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function Z(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function oo(e,t=!1){if(e.flags|=8,t){e.next=ye,ye=e;return}e.next=xe,xe=e}function Zt(){Cn++}function Qt(){if(--Cn>0)return;if(ye){let t=ye;ye=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(xe){let t=xe;xe=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function Tn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function On(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;er(n),lo(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function It(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ao(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function ao(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Fe)return;if(e.globalVersion=Fe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!It(e)))return;e.flags|=2;let t=e.dep,r=y,n=O;y=e,O=!0;try{Tn(e);let i=e.fn(e._value);if(t.version===0||K(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{y=r,O=n,On(e),e.flags&=-3}}function er(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let o=r.computed.deps;o;o=o.nextDep)er(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function lo(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function co(e,t){if(e.effect instanceof yr)e=e.effect.fn;let r=new yr(e);if(t)we(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function uo(e){e.effect.stop()}function fo(){Mn.push(O),O=!1}function ho(){let e=Mn.pop();O=e===void 0?!0:e}function vr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=y;y=void 0;try{t()}finally{y=r}}}function In(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)In(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function S(e,t,r){if(O&&y){let n=Lt.get(e);if(!n)Lt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new bo),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function U(e,t,r,n,i,o){let s=Lt.get(e);if(!s){Fe++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Zt(),t==="clear")s.forEach(a);else{let l=_e(e),c=l&&Xt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,p)=>{if(p==="length"||p===ke||!Te(p)&&p>=d)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(c)a(s.get(ke));switch(t){case"add":if(!l){if(a(s.get(J)),ge(e))a(s.get(Dt))}else if(c)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(J)),ge(e))a(s.get(Dt))}break;case"set":if(ge(e))a(s.get(J));break}}}Qt()}function se(e){let t=v(e);if(t===e)return t;return S(t,"iterate",ke),ee(e)?t:t.map(te)}function tr(e){return S(e=v(e),"iterate",ke),e}function I(e,t){if(Q(e))return Rn(e)?Ae(te(t)):Ae(t);return te(t)}function ft(e,t,r){let n=tr(e),i=n[t]();if(n!==e&&!ee(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function N(e,t,r,n,i,o){let s=tr(e),a=s!==e&&!ee(e),l=s[t];if(l!==go[t]){let u=l.apply(e,o);return a?te(u):u}let c=r;if(s!==e){if(a)c=function(u,p){return r.call(this,I(e,u),p,e)};else if(r.length>2)c=function(u,p){return r.call(this,u,p,e)}}let d=l.call(s,c,n);return a&&i?i(d):d}function wr(e,t,r,n){let i=tr(e),o=i!==e&&!ee(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(c,d,u){if(a)a=!1,c=I(e,c);return r.call(this,c,I(e,d),u,e)};else if(r.length>3)s=function(c,d,u){return r.call(this,c,d,u,e)}}let l=i[t](s,...n);return a?I(e,l):l}function ht(e,t,r){let n=v(e);S(n,"iterate",ke);let i=n[t](...r);if((i===-1||i===!1)&&Io(r[0]))return r[0]=v(r[0]),n[t](...r);return i}function pe(e,t,r=[]){fo(),Zt();let n=v(e)[t].apply(e,r);return Qt(),ho(),n}function yo(e){if(!Te(e))e=String(e);let t=v(this);return S(t,"has",e),t.hasOwnProperty(e)}function ko(e,t,r){return function(...n){let i=this.__v_raw,o=v(i),s=ge(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?Nt:t?Ae:te;return!t&&S(o,"iterate",l?Dt:J),we(Object.create(c),{next(){let{value:u,done:p}=c.next();return p?{value:u,done:p}:{value:a?[d(u[0]),d(u[1])]:d(u),done:p}}})}}function Pe(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";Z(`${Sn(e)} operation ${r}failed: target is readonly.`,v(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Ao(e,t){let r={get(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(K(i,a))S(s,"get",i);S(s,"get",a)}let{has:l}=Be(s),c=t?Nt:e?Ae:te;if(l.call(s,i))return c(o.get(i));else if(l.call(s,a))return c(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&S(v(i),"iterate",J),i.size},has(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(K(i,a))S(s,"has",i);S(s,"has",a)}return i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){let s=this,a=s.__v_raw,l=v(a),c=t?Nt:e?Ae:te;return!e&&S(l,"iterate",J),a.forEach((d,u)=>i.call(o,c(d),c(u),s))}};return we(r,e?{add:Pe("add"),set:Pe("set"),delete:Pe("delete"),clear:Pe("clear")}:{add(i){let o=v(this),s=Be(o),a=v(i),l=!t&&!ee(i)&&!Q(i)?a:i;if(!(s.has.call(o,l)||K(i,l)&&s.has.call(o,i)||K(a,l)&&s.has.call(o,a)))o.add(l),U(o,"add",l,l);return this},set(i,o){if(!t&&!ee(o)&&!Q(o))o=v(o);let s=v(this),{has:a,get:l}=Be(s),c=a.call(s,i);if(!c)i=v(i),c=a.call(s,i);else _r(s,a,i);let d=l.call(s,i);if(s.set(i,o),!c)U(s,"add",i,o);else if(K(o,d))U(s,"set",i,o,d);return this},delete(i){let o=v(this),{has:s,get:a}=Be(o),l=s.call(o,i);if(!l)i=v(i),l=s.call(o,i);else _r(o,s,i);let c=a?a.call(o,i):void 0,d=o.delete(i);if(l)U(o,"delete",i,void 0,c);return d},clear(){let i=v(this),o=i.size!==0,s=ge(i)?new Map(i):new Set(i),a=i.clear();if(o)U(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=ko(i,e,t)}),r}function Nn(e,t){let r=Ao(e,t);return(n,i,o)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(Mt(r,i)&&i in n?r:n,i,o)}}function _r(e,t,r){let n=v(r);if(n!==r&&t.call(e,n)){let i=An(e);Z(`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.`)}}function Mo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rr(e){if(Q(e))return e;return $n(e,!1,_o,So,Bn)}function Bt(e){return $n(e,!0,Eo,Co,Pn)}function $n(e,t,r,n,i){if(!Ee(e))return Z(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let o=i.get(e);if(o)return o;let s=Mo(An(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Rn(e){if(Q(e))return Rn(e.__v_raw);return!!(e&&e.__v_isReactive)}function Q(e){return!!(e&&e.__v_isReadonly)}function ee(e){return!!(e&&e.__v_isShallow)}function Io(e){return e?!!e.__v_raw:!1}function v(e){let t=e&&e.__v_raw;return t?v(t):e}function ve(e){return e?e.__v_isRef===!0:!1}function Lo(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function zn(e){if(!pt[e])pt[e]=0;return++pt[e]}function Do(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function No(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=zn(t)}function Bo(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function Hn(e,t,r){M(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function Er(e){let t=R(()=>document.querySelector(e),()=>Po)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=$o(t);if(r.includes("camel"))t=Ro(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(o=jn(r,o),r.includes("prevent"))o=a(o,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))o=a(o,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))o=a(o,(l,c)=>{l(c),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,c)=>{if(e.contains(c.target))return;if(c.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(c)});if(r.includes("self"))o=a(o,(l,c)=>{c.target===e&&l(c)});if(t==="submit")o=a(o,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(Ho(t)||qn(t))o=a(o,(l,c)=>{if(jo(c,r))return;l(c)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function jn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Ke(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=pn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Ke(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=bn(t,n)}return t}function $o(e){return e.replace(/-/g,".")}function Ro(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ke(e){return!Array.isArray(e)&&!isNaN(e)}function zo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Ho(e){return["keydown","keyup"].includes(e)}function qn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function jo(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!Uo.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Ke((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Ke((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&kr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((o)=>r.includes(o));if(r=r.filter((o)=>!i.includes(o)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(qn(e.type))return!1;if(kr(e.key).includes(r[0]))return!1}}return!0}function kr(e){if(!e)return[];e=zo(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:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function $e(e,t,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(qe(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=bt(r.target.value);else if(t.includes("boolean"))i=Re(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!qo(o,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return bt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return Re(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Gt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return bt(i);else if(t.includes("boolean"))return Re(i);else if(t.includes("trim"))return i.trim();else return i}})}function bt(e){let t=e?parseFloat(e):null;return Fo(t)?t:e}function qo(e,t){return e==t}function Fo(e){return!Array.isArray(e)&&!isNaN(e)}function Ar(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Ko(e,t){e._x_keyExpression=t}function Vo(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function Wo(e){if(!j)return!1;if(kt)return!0;return e.hasAttribute("data-has-alpine-state")}function Yo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function Jo(e,t,r,n){r((i)=>{if(Zo(i))i=Array.from({length:i},(c,d)=>d+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let o=e._x_lookup,s=new Map;e._x_lookup=s;let a=Qo(i),l=Object.entries(i).map(([c,d])=>{if(!a)c=parseInt(c);let u=Xo(t,d,c,i),p;return n((b)=>{if(typeof b==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(b))s.set(b,o.get(b)),o.delete(b);p=b},{scope:{index:c,...u}}),[p,u]});_(()=>{o.forEach((u)=>{ne(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,p])=>{if(s.has(u)){let h=s.get(u);if(h._x_refreshXForScope(p),d.nextElementSibling!==h){if(d.nextElementSibling)h.replaceWith(d.nextElementSibling);d.after(h)}if(d=h,h._x_currentIfEl){if(h.nextElementSibling!==h._x_currentIfEl)d.after(h._x_currentIfEl);d=h._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let b=document.importNode(e.content,!0).firstElementChild,m=le(p);Se(b,m,e),b._x_refreshXForScope=Yo(m),s.set(u,b),c.add(b),d.after(b),d=b}),c.forEach((u)=>D(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function Go(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\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);if(a){if(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2])o.collection=a[2].trim()}else o.item=s;return o}function Xo(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,a)=>{i[s]=t[a]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function Zo(e){return typeof e!=="object"&&!isNaN(e)}function Qo(e){return typeof e==="object"&&!Array.isArray(e)}function Kn(){}function et(e,t,r){E(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var mt=!1,gt=!1,P,xt=-1,ze=!1,Pt=!1,le,re,ce,Cr,Mi=0,yt=!0,Or,Mr,Ir,Ve,zt=!1,F,Ut=!1,He,Ui,zr,Hr,W=!0,jr=()=>{},qr,qt="x-",je,_t=!1,be,Kr,Wr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Yr=(e)=>e,Gr,Zr=()=>new RegExp(`^${qt}([^:^.]+)\\b`),Et="DEFAULT",V,j=!1,Qr,kt=!1,Ge=0,br=!1,Kt,rn,ln,bs=1,At,Vt=!1,Ns,B,gr=!1,gn,yn,Vs,ue,xr,vn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Ws,Ys=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new k("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
5
+ `:""}`,t),setTimeout(()=>{throw e},0)}function jr(e){let t=W;W=!1;let r=e();return W=t,r}function Y(e,t,r={}){let n;return S(e,t)((i)=>n=i,r),n}function S(...e){return qr(...e)}function Gi(e){qr=e}function Xi(e){Fr=e}function Zi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!W){wt(r,t,G([n,...e]),i);return}let s=t.apply(G([n,...e]),i);wt(r,s)}}function wt(e,t,r,n,i){if(W&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>wt(e,s,r,n)).catch((s)=>Je(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Qi(...e){return Fr(...e)}function de(e=""){return qt+e}function es(e){qt=e}function E(e,t){return qe[e]=t,{before(r){if(!qe[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=V.indexOf(r);V.splice(n>=0?n:V.indexOf("DEFAULT"),0,e)}}}function ts(e){return Object.keys(qe).includes(e)}function Ge(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=Kr(o);o=o.map((a)=>{if(s.find((l)=>l.name===a.name))return{name:`x-bind:${a.name}`,value:`"${a.value}"`};return a}),t=t.concat(o)}let n={};return t.map(Gr((o,s)=>n[o]=s)).filter(Zr).map(is(n,r)).sort(ss).map((o)=>ns(e,o))}function Kr(e){return Array.from(e).map(Gr()).filter((t)=>!Zr(t))}function rs(e){_t=!0;let t=Symbol();Vr=t,me.set(t,[]);let r=()=>{while(me.get(t).length)me.get(t).shift()();me.delete(t)},n=()=>{_t=!1,r()};e(r),n()}function Wr(e){let t=[],r=(a)=>t.push(a),[n,i]=Bi(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:S.bind(S,e),evaluate:Y.bind(Y,e)},()=>t.forEach((a)=>a())]}function ns(e,t){let r=()=>{},n=qe[t.type]||r,[i,o]=Wr(e);Nr(e,t.original,o);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),_t?me.get(Vr).push(n):n()};return s.runCleanups=o,s}function Gr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Xr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Ft(e){Xr.push(e)}function Zr({name:e}){return Qr().test(e)}function is(e,t){return({name:r,value:n})=>{if(r===n)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}}}function ss(e,t){let r=V.indexOf(e.type)===-1?Et:e.type,n=V.indexOf(t.type)===-1?Et:t.type;return V.indexOf(r)-V.indexOf(n)}function X(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>X(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)X(n,t,!1),n=n.nextElementSibling}function R(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function os(e){return(...t)=>j&&e(...t)}function Te(e){en.push(e)}function as(e,t){en.forEach((r)=>r(e,t)),j=!0,tn(()=>{D(t,(r,n)=>{n(r,()=>{})})}),j=!1}function ls(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,kt=!0,tn(()=>{cs(t)}),j=!1,kt=!1}function cs(e){let t=!1;D(e,(n,i)=>{X(n,(o,s)=>{if(t&&bs(o))return s();t=!0,i(o,s)})})}function tn(e){let t=re;br((r,n)=>{let i=t(r);return ce(i),()=>{}}),e(),br(t)}function ds(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Xe++}r.pending++,Promise.resolve(t).catch((n)=>{try{Je(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>us(e,r))}function us(e,t){if(t.pending--,t.pending>0)return;if(Hi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Xe--,!e.isConnected)return;hs(t),D(e)}function fs(e,t){if(Xe===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return rn(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function rn(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function hs(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=T(r,(o)=>o._x_deferInit);if(n){rn(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((o)=>r.hasAttribute(o)).map((o)=>({name:o,value:r.getAttribute(o)}));if(i.length===0)return;Ge(r,i).forEach((o)=>o())})}function ge(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function ps(){if(mr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(mr=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");ge(document,"alpine:init"),ge(document,"alpine:initializing"),Ht(),$i((t)=>D(t,X)),Rt((t)=>ne(t)),Dr((t,r)=>{if(fs(t,r))return;Ge(t,r).forEach((n)=>n())});let e=(t)=>!Ze(t.parentElement,!0);Array.from(document.querySelectorAll(on().join(","))).filter(e).forEach((t)=>{D(t)}),ge(document,"alpine:initialized"),setTimeout(()=>{xs()})}function sn(){return Kt.map((e)=>e())}function on(){return Kt.concat(nn).map((e)=>e())}function an(e){Kt.push(e)}function ln(e){nn.push(e)}function Ze(e,t=!1){return T(e,(r)=>{if((t?on():sn()).some((i)=>r.matches(i)))return!0})}function T(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return T(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return T(e.parentNode.host,t);if(!e.parentElement)return;return T(e.parentElement,t)}function bs(e){return sn().some((t)=>e.matches(t))}function ms(e){cn.push(e)}function D(e,t=X,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;rs(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),cn.forEach((o)=>o(n,i)),Ge(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=gs++;n._x_ignore&&i()})})}function ne(e,t=X){t(e,(r)=>{Ri(r),Br(r),delete r._x_marker})}function xs(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(ts(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Wt(e=()=>{}){return queueMicrotask(()=>{Vt||setTimeout(()=>{St()})}),new Promise((t)=>{At.push(()=>{e(),t()})})}function St(){Vt=!1;while(At.length)At.shift()()}function vs(){Vt=!0}function Yt(e,t){if(Array.isArray(t))return gr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return ys(e,t);else if(typeof t==="function")return Yt(e,t());return gr(e,t)}function Ct(e){return e.split(/\s/).filter(Boolean)}function gr(e,t){let r=(i)=>Ct(i).filter((o)=>!e.classList.contains(o)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function ys(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?Ct(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?Ct(s):!1).filter(Boolean),i=[],o=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),o.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{o.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function Qe(e,t){if(typeof t==="object"&&t!==null)return ws(e,t);return _s(e,t)}function ws(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=Es(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Qe(e,r)}}function _s(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Es(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Tt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function ks(e,t,r){dn(e,Yt,""),{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 As(e,t,r){dn(e,Qe);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);if(t.includes("in")&&!n)t=t.filter((f,v)=>v<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((f,v)=>v>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),c=a?0:1,d=l?pe(t,"scale",95)/100:1,u=pe(t,"delay",0)/1000,p=pe(t,"origin","center"),b="opacity, transform",m=pe(t,"duration",150)/1000,h=pe(t,"duration",75)/1000,g="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${m}s`,transitionTimingFunction:g},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:b,transitionDuration:`${h}s`,transitionTimingFunction:g},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function dn(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Ot(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Ot(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function un(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:un(t)}function Ot(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,c;Ss(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function Ss(e,t){let r,n,i,o=Tt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),St();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Tt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),vs(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;_(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;_(()=>{t.end()}),St(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function pe(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function fn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Ns(t):t,t){case"value":Cs(e,r);break;case"style":Os(e,r);break;case"class":Ts(e,r);break;case"selected":case"checked":Ms(e,t,r);break;default:Jt(e,t,r);break}}function Cs(e,t){if(Gt(e)){if(e.attributes.value===void 0)e.value=t}else if(Fe(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>Bs(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Ds(e,t);else if(e.tagName==="OPTION")Jt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Ts(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Yt(e,t)}function Os(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Qe(e,t)}function Ms(e,t,r){Jt(e,t,r),Ls(e,t,r)}function Jt(e,t,r){if([null,void 0,!1].includes(r)&&$s(t))e.removeAttribute(t);else{if(hn(t))r=t;if(Rs(r))r=JSON.stringify(r);Is(e,t,r)}}function Is(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Ls(e,t,r){if(e[t]!==r)e[t]=r}function Ds(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Ns(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Bs(e,t){return e==t}function ze(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function hn(e){return Ps.has(e)}function $s(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Rs(e){return typeof e==="object"&&e!==null}function zs(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return pn(e,t,r)}function Hs(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,jr(()=>Y(e,i.expression))}return pn(e,t,r)}function pn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(hn(t))return!![t,"true"].includes(n);return n}function Fe(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Gt(e){return e.type==="radio"||e.localName==="ui-radio"}function bn(e,t){let r;return function(){let n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function mn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function gn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=re(()=>{let l=e(),c=r();if(i)n(ct(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==o)n(ct(l));else if(d!==u)t(ct(c))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{$t(a),ce(a)}}function ct(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Us(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function js(e,t){if(!xr)B=le(B),xr=!0;if(t===void 0)return B[e];if(B[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)B[e]=t.initialize(B,e,e,()=>{});else jt(B[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")B[e].init()}function qs(){return B}function Fs(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return vn(e,r());else xn[e]=r;return()=>{}}function Ks(e){return Object.entries(xn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function vn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Kr(i);return i=i.map((s)=>{if(o.find((a)=>a.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),Ge(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Vs(e,t){yn[e]=t}function Ws(e,t){return Object.entries(yn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function _n(e){try{let r=new Gs(e).tokenize(),i=new Xs(r).parse(),o=new Zs;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Qs(e,t,r={}){let n=En(e),i=G([r.scope??{},...n]),o=r.params??[],a=_n(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&W)return a.apply(i,o);return a}function eo(e,t){let r=En(e);if(typeof t==="function")return Zi(r,t);let n=to(e,t,r);return Wi.bind(null,e,t,n)}function En(e){let t={};return je(t,e),[t,...ae(e)]}function to(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:o=[]}={})=>{let s=G([i,...r]),l=_n(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(W&&typeof l==="function"){let c=l.apply(l,o);if(c instanceof Promise)c.then((d)=>n(d));else n(c)}else if(typeof l==="object"&&l instanceof Promise)l.then((c)=>n(c));else n(l)}}function kn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function Z(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function lo(e,t=!1){if(e.flags|=8,t){e.next=ye,ye=e;return}e.next=ve,ve=e}function Zt(){Tn++}function Qt(){if(--Tn>0)return;if(ye){let t=ye;ye=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(ve){let t=ve;ve=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function On(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Mn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;er(n),uo(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function It(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(co(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function co(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Ke)return;if(e.globalVersion=Ke,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!It(e)))return;e.flags|=2;let t=e.dep,r=y,n=O;y=e,O=!0;try{On(e);let i=e.fn(e._value);if(t.version===0||K(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{y=r,O=n,Mn(e),e.flags&=-3}}function er(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let o=r.computed.deps;o;o=o.nextDep)er(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function uo(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function fo(e,t){if(e.effect instanceof yr)e=e.effect.fn;let r=new yr(e);if(t)_e(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function ho(e){e.effect.stop()}function po(){In.push(O),O=!1}function bo(){let e=In.pop();O=e===void 0?!0:e}function wr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=y;y=void 0;try{t()}finally{y=r}}}function Ln(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Ln(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function C(e,t,r){if(O&&y){let n=Lt.get(e);if(!n)Lt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new go),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function U(e,t,r,n,i,o){let s=Lt.get(e);if(!s){Ke++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Zt(),t==="clear")s.forEach(a);else{let l=Ee(e),c=l&&Xt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,p)=>{if(p==="length"||p===Ae||!Oe(p)&&p>=d)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(c)a(s.get(Ae));switch(t){case"add":if(!l){if(a(s.get(J)),xe(e))a(s.get(Dt))}else if(c)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(J)),xe(e))a(s.get(Dt))}break;case"set":if(xe(e))a(s.get(J));break}}}Qt()}function se(e){let t=w(e);if(t===e)return t;return C(t,"iterate",Ae),ee(e)?t:t.map(te)}function tr(e){return C(e=w(e),"iterate",Ae),e}function I(e,t){if(Q(e))return zn(e)?Se(te(t)):Se(t);return te(t)}function ft(e,t,r){let n=tr(e),i=n[t]();if(n!==e&&!ee(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function N(e,t,r,n,i,o){let s=tr(e),a=s!==e&&!ee(e),l=s[t];if(l!==vo[t]){let u=l.apply(e,o);return a?te(u):u}let c=r;if(s!==e){if(a)c=function(u,p){return r.call(this,I(e,u),p,e)};else if(r.length>2)c=function(u,p){return r.call(this,u,p,e)}}let d=l.call(s,c,n);return a&&i?i(d):d}function _r(e,t,r,n){let i=tr(e),o=i!==e&&!ee(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(c,d,u){if(a)a=!1,c=I(e,c);return r.call(this,c,I(e,d),u,e)};else if(r.length>3)s=function(c,d,u){return r.call(this,c,d,u,e)}}let l=i[t](s,...n);return a?I(e,l):l}function ht(e,t,r){let n=w(e);C(n,"iterate",Ae);let i=n[t](...r);if((i===-1||i===!1)&&Do(r[0]))return r[0]=w(r[0]),n[t](...r);return i}function be(e,t,r=[]){po(),Zt();let n=w(e)[t].apply(e,r);return Qt(),bo(),n}function wo(e){if(!Oe(e))e=String(e);let t=w(this);return C(t,"has",e),t.hasOwnProperty(e)}function So(e,t,r){return function(...n){let i=this.__v_raw,o=w(i),s=xe(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?Nt:t?Se:te;return!t&&C(o,"iterate",l?Dt:J),_e(Object.create(c),{next(){let{value:u,done:p}=c.next();return p?{value:u,done:p}:{value:a?[d(u[0]),d(u[1])]:d(u),done:p}}})}}function $e(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";Z(`${Cn(e)} operation ${r}failed: target is readonly.`,w(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Co(e,t){let r={get(i){let o=this.__v_raw,s=w(o),a=w(i);if(!e){if(K(i,a))C(s,"get",i);C(s,"get",a)}let{has:l}=Pe(s),c=t?Nt:e?Se:te;if(l.call(s,i))return c(o.get(i));else if(l.call(s,a))return c(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&C(w(i),"iterate",J),i.size},has(i){let o=this.__v_raw,s=w(o),a=w(i);if(!e){if(K(i,a))C(s,"has",i);C(s,"has",a)}return i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){let s=this,a=s.__v_raw,l=w(a),c=t?Nt:e?Se:te;return!e&&C(l,"iterate",J),a.forEach((d,u)=>i.call(o,c(d),c(u),s))}};return _e(r,e?{add:$e("add"),set:$e("set"),delete:$e("delete"),clear:$e("clear")}:{add(i){let o=w(this),s=Pe(o),a=w(i),l=!t&&!ee(i)&&!Q(i)?a:i;if(!(s.has.call(o,l)||K(i,l)&&s.has.call(o,i)||K(a,l)&&s.has.call(o,a)))o.add(l),U(o,"add",l,l);return this},set(i,o){if(!t&&!ee(o)&&!Q(o))o=w(o);let s=w(this),{has:a,get:l}=Pe(s),c=a.call(s,i);if(!c)i=w(i),c=a.call(s,i);else Er(s,a,i);let d=l.call(s,i);if(s.set(i,o),!c)U(s,"add",i,o);else if(K(o,d))U(s,"set",i,o,d);return this},delete(i){let o=w(this),{has:s,get:a}=Pe(o),l=s.call(o,i);if(!l)i=w(i),l=s.call(o,i);else Er(o,s,i);let c=a?a.call(o,i):void 0,d=o.delete(i);if(l)U(o,"delete",i,void 0,c);return d},clear(){let i=w(this),o=i.size!==0,s=xe(i)?new Map(i):new Set(i),a=i.clear();if(o)U(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=So(i,e,t)}),r}function Bn(e,t){let r=Co(e,t);return(n,i,o)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(Mt(r,i)&&i in n?r:n,i,o)}}function Er(e,t,r){let n=w(r);if(n!==r&&t.call(e,n)){let i=Sn(e);Z(`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.`)}}function Lo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rr(e){if(Q(e))return e;return Rn(e,!1,ko,To,Pn)}function Bt(e){return Rn(e,!0,Ao,Oo,$n)}function Rn(e,t,r,n,i){if(!ke(e))return Z(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let o=i.get(e);if(o)return o;let s=Lo(Sn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function zn(e){if(Q(e))return zn(e.__v_raw);return!!(e&&e.__v_isReactive)}function Q(e){return!!(e&&e.__v_isReadonly)}function ee(e){return!!(e&&e.__v_isShallow)}function Do(e){return e?!!e.__v_raw:!1}function w(e){let t=e&&e.__v_raw;return t?w(t):e}function we(e){return e?e.__v_isRef===!0:!1}function No(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Hn(e){if(!pt[e])pt[e]=0;return++pt[e]}function Bo(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Po(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Hn(t)}function $o(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function Un(e,t,r){M(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function kr(e){let t=R(()=>document.querySelector(e),()=>Ro)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=zo(t);if(r.includes("camel"))t=Ho(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(o=qn(r,o),r.includes("prevent"))o=a(o,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))o=a(o,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))o=a(o,(l,c)=>{l(c),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,c)=>{if(e.contains(c.target))return;if(c.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(c)});if(r.includes("self"))o=a(o,(l,c)=>{c.target===e&&l(c)});if(t==="submit")o=a(o,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(jo(t)||Fn(t))o=a(o,(l,c)=>{if(Fo(c,r))return;l(c)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function qn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Ve(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=bn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Ve(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=mn(t,n)}return t}function zo(e){return e.replace(/-/g,".")}function Ho(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ve(e){return!Array.isArray(e)&&!isNaN(e)}function Uo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function jo(e){return["keydown","keyup"].includes(e)}function Fn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Fo(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!qo.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Ve((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Ve((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&Ar(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((o)=>r.includes(o));if(r=r.filter((o)=>!i.includes(o)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(Fn(e.type))return!1;if(Ar(e.key).includes(r[0]))return!1}}return!0}function Ar(e){if(!e)return[];e=Uo(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:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function Re(e,t,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Fe(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=bt(r.target.value);else if(t.includes("boolean"))i=ze(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!Ko(o,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return bt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return ze(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Gt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return bt(i);else if(t.includes("boolean"))return ze(i);else if(t.includes("trim"))return i.trim();else return i}})}function bt(e){let t=e?parseFloat(e):null;return Vo(t)?t:e}function Ko(e,t){return e==t}function Vo(e){return!Array.isArray(e)&&!isNaN(e)}function Sr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Wo(e,t){e._x_keyExpression=t}function Yo(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function Jo(e){if(!j)return!1;if(kt)return!0;return e.hasAttribute("data-has-alpine-state")}function Go(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function Xo(e,t,r,n){r((i)=>{if(ea(i))i=Array.from({length:i},(c,d)=>d+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let o=e._x_lookup,s=new Map;e._x_lookup=s;let a=ta(i),l=Object.entries(i).map(([c,d])=>{if(!a)c=parseInt(c);let u=Qo(t,d,c,i),p;return n((b)=>{if(typeof b==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(b))s.set(b,o.get(b)),o.delete(b);p=b},{scope:{index:c,...u}}),[p,u]});_(()=>{o.forEach((u)=>{ne(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,p])=>{if(s.has(u)){let h=s.get(u);if(h._x_refreshXForScope(p),d.nextElementSibling!==h){if(d.nextElementSibling)h.replaceWith(d.nextElementSibling);d.after(h)}if(d=h,h._x_currentIfEl){if(h.nextElementSibling!==h._x_currentIfEl)d.after(h._x_currentIfEl);d=h._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let b=document.importNode(e.content,!0).firstElementChild,m=le(p);Ce(b,m,e),b._x_refreshXForScope=Go(m),s.set(u,b),c.add(b),d.after(b),d=b}),c.forEach((u)=>D(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function Zo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\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);if(a){if(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2])o.collection=a[2].trim()}else o.item=s;return o}function Qo(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,a)=>{i[s]=t[a]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function ea(e){return typeof e!=="object"&&!isNaN(e)}function ta(e){return typeof e==="object"&&!Array.isArray(e)}function Vn(){}function tt(e,t,r){E(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var mt=!1,gt=!1,P,xt=-1,He=!1,Pt=!1,le,re,ce,Tr,Li=0,vt=!0,Mr,Ir,Lr,We,zt=!1,F,Ut=!1,Ue,qi,Hr,Ur,W=!0,qr=()=>{},Fr,qt="x-",qe,_t=!1,me,Vr,Yr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Jr=(e)=>e,Xr,Qr=()=>new RegExp(`^${qt}([^:^.]+)\\b`),Et="DEFAULT",V,j=!1,en,kt=!1,Xe=0,mr=!1,Kt,nn,cn,gs=1,At,Vt=!1,Ps,B,xr=!1,xn,yn,Ys,ue,vr,wn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Js,Gs=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new k("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
6
6
  `)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){let e=this.position,t=!1;while(this.position<this.input.length){let n=this.input[this.position];if(this.isDigit(n))this.position++;else if(n==="."&&!t)t=!0,this.position++;else break}let r=this.input.slice(e,this.position);this.tokens.push(new k("NUMBER",parseFloat(r),e,this.position))}readIdentifierOrKeyword(){let e=this.position;while(this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]))this.position++;let t=this.input.slice(e,this.position);if(["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(t))if(t==="true"||t==="false")this.tokens.push(new k("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new k("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new k("UNDEFINED",void 0,e,this.position));else this.tokens.push(new k("KEYWORD",t,e,this.position));else this.tokens.push(new k("IDENTIFIER",t,e,this.position))}readString(){let e=this.position,t=this.input[this.position];this.position++;let r="",n=!1;while(this.position<this.input.length){let i=this.input[this.position];if(n){switch(i){case"n":r+=`
7
- `;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let o=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(o))r+=String.fromCharCode(parseInt(o,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new k("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},Js=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return Ws.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},Gs=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let g=t[e.name];if(this.checkForDangerousValues(g),typeof g==="function")return g.bind(t);return g}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let o;if(e.computed)o=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else o=e.property.name;this.checkForDangerousKeywords(o);let s=i[o];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let a=e.arguments.map((g)=>this.evaluate({node:g,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let g=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f;if(e.callee.computed)f=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else f=e.callee.property.name;this.checkForDangerousKeywords(f);let x=g[f];if(typeof x!=="function")throw Error("Value is not a function");l=x.apply(g,a)}else if(e.callee.type==="Identifier"){let g=e.callee.name,f;if(g in t)f=t[g];else throw Error(`Undefined variable: ${g}`);if(typeof f!=="function")throw Error("Value is not a function");let x=r!==null?r:t;l=f.apply(x,a)}else{let g=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof g!=="function")throw Error("Value is not a function");l=g.apply(r,a)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let c=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!c;case"-":return-c;case"+":return+c;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let g=e.argument.name;if(!(g in t))throw Error(`Undefined variable: ${g}`);let f=t[g];if(e.operator==="++")t[g]=f+1;else if(e.operator==="--")t[g]=f-1;return e.prefix?t[g]:f}else if(e.argument.type==="MemberExpression"){let g=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(g))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(f);let x=g[f];if(e.operator==="++")g[f]=x+1;else if(e.operator==="--")g[f]=x-1;return e.prefix?g[f]:x}throw Error("Invalid update expression target");case"BinaryExpression":let d=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return d&&u();if(e.operator==="||")return d||u();let p=u();switch(e.operator){case"+":return d+p;case"-":return d-p;case"*":return d*p;case"/":return d/p;case"%":return d%p;case"==":return d==p;case"!=":return d!=p;case"===":return d===p;case"!==":return d!==p;case"<":return d<p;case">":return d>p;case"<=":return d<=p;case">=":return d>=p;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let m=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=m,m;else if(e.left.type==="MemberExpression"){let g=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(g))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(f),g[f]=m,m}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((g)=>this.evaluate({node:g,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let h={};for(let g of e.properties){let f=g.computed?this.evaluate({node:g.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):g.key.type==="Identifier"?g.key.name:this.evaluate({node:g.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),x=this.evaluate({node:g.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});h[f]=x}return h;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(xr.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(vn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return xr.set(e,!0),!0}},Oa,Ma,we,eo,Mt=(e,t)=>eo.call(e,t),_e,ge=(e)=>kn(e)==="[object Map]",to=(e)=>typeof e==="string",Te=(e)=>typeof e==="symbol",Ee=(e)=>e!==null&&typeof e==="object",ro,kn=(e)=>ro.call(e),An=(e)=>kn(e).slice(8,-1),Xt=(e)=>to(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qe=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},no,Ia,io,La,Sn,Da,K=(e,t)=>!Object.is(e,t),so="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Na,dt,y,ut,yr=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,dt)if(dt.active)dt.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ut.has(this))ut.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))oo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,vr(this),Tn(this);let e=y,t=O;y=this,O=!0;try{return this.fn()}finally{if(y!==this)Z("Active effect was not restored correctly - this is likely a Vue internal bug.");On(this),y=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)er(e);this.deps=this.depsTail=void 0,vr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ut.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(It(this))this.run()}get dirty(){return It(this)}},Cn=0,xe,ye,O=!0,Mn,Fe=0,po=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},bo=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!y||!O||y===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==y){if(t=this.activeLink=new po(y,this),!y.deps)y.deps=y.depsTail=t;else t.prevDep=y.depsTail,y.depsTail.nextDep=t,y.depsTail=t;In(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=y.depsTail,t.nextDep=void 0,y.depsTail.nextDep=t,y.depsTail=t,y.deps===t)y.deps=r}}if(y.onTrack)y.onTrack(we({effect:y},e));return t}trigger(e){this.version++,Fe++,this.notify(e)}notify(e){Zt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(we({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Qt()}}},Lt,J,Dt,ke,mo,go,xo,Ln,Dn=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?Oo:Pn:i?To:Bn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=_e(e);if(!n){let a;if(o&&(a=mo[t]))return a;if(t==="hasOwnProperty")return yo}let s=Reflect.get(e,t,ve(e)?e:r);if(Te(t)?Ln.has(t):xo(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ve(s)){let a=o&&Xt(t)?s:s.value;return n&&Ee(a)?Bt(a):a}if(Ee(s))return n?Bt(s):rr(s);return s}},vo,wo,_o,Eo,Nt=(e)=>e,Be=(e)=>Reflect.getPrototypeOf(e),So,Co,Bn,To,Pn,Oo,te=(e)=>Ee(e)?rr(e):e,Ae=(e)=>Ee(e)?Bt(e):e,pt,Po,Un=()=>{},Uo,Fn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};qs(l),A(e,n)((d)=>{xn(e,d,i)},{scope:l});return}if(t==="key")return Ko(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=A(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>un(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},q,Vn,ea;var Yn=wi(()=>{P=[];Or=[],Mr=[],Ir=[];Ve=new MutationObserver(We);F=[];He=[];Ui={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return ji;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=$r(s,t),i)break;if(!i)i=e[e.length-1];let o=Object.getOwnPropertyDescriptor(i,t);if(o?.set&&o?.get)return o.set.call(n,r)||!0;return Reflect.set(i,t,r)}};zr={};Hr=Wi;je={};be=new Map,Kr=Symbol();Gr=[];V=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",Et,"teleport"];Qr=[];Ce((e,t)=>{if(Ge===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(T(e,(r)=>r._x_deferInit))t._x_ignore=!0});Kt=[],rn=[];ln=[];At=[];E("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")Es(e,r,t);else _s(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(t){if(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();else 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&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=dn(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Ns=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);B={};gn={};yn={};Vs={get reactive(){return le},get release(){return ce},get effect(){return re},get raw(){return Cr},get transaction(){return Ni},version:"3.17.4",flushAndStopDeferringMutations:Hi,dontAutoEvaluateFunctions:Ur,disableEffectScheduling:Ii,startObservingMutations:Ht,stopObservingMutations:Br,setReactivityEngine:Li,onAttributeRemoved:Dr,onAttributesAdded:Lr,closestDataStack:ae,skipDuringClone:R,onlyDuringClone:is,addRootSelector:on,addInitSelector:an,setErrorHandler:Vi,interceptClone:Ce,addScopeToNode:Se,deferMutations:zi,mapAttributes:Ft,evaluateLater:A,interceptInit:ps,initInterceptors:jt,injectMagics:Ue,setEvaluator:Yi,setRawEvaluator:Ji,mergeProxies:G,extractProp:Rs,findClosest:T,onElRemoved:Rt,closestRoot:Xe,destroyTree:ne,interceptor:Rr,transition:Ot,setStyles:Ze,mutateDom:_,deferInit:ls,directive:E,entangle:mn,throttle:bn,debounce:pn,evaluate:Y,evaluateRaw:Xi,initTree:D,nextTick:Wt,prefixed:de,prefix:Zi,plugin:zs,magic:M,store:Hs,start:fs,clone:os,cloneNode:ss,bound:$s,$data:Pr,watch:Tr,walk:X,data:Fs,bind:js},ue=Vs,xr=new WeakMap,vn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}vn.add(t)});Ws=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];Oa=Object.freeze({}),Ma=Object.freeze([]),we=Object.assign,eo=Object.prototype.hasOwnProperty,_e=Array.isArray,ro=Object.prototype.toString,no=/-\w/g,Ia=Qe((e)=>e.replace(no,(t)=>t.slice(1).toUpperCase())),io=/\B([A-Z])/g,La=Qe((e)=>e.replace(io,"-$1").toLowerCase()),Sn=Qe((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Da=Qe((e)=>e?`on${Sn(e)}`:""),Na=En(so+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ut=new WeakSet;Mn=[];Lt=new WeakMap,J=Symbol("Object iterate"),Dt=Symbol("Map keys iterate"),ke=Symbol("Array iterate");mo={__proto__:null,[Symbol.iterator](){return ft(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>_e(t)?se(t):t))},entries(){return ft(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return N(this,"every",e,t,void 0,arguments)},filter(e,t){return N(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return N(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return N(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return N(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return N(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return N(this,"forEach",e,t,void 0,arguments)},includes(...e){return ht(this,"includes",e)},indexOf(...e){return ht(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return ht(this,"lastIndexOf",e)},map(e,t){return N(this,"map",e,t,void 0,arguments)},pop(){return pe(this,"pop")},push(...e){return pe(this,"push",e)},reduce(e,...t){return wr(this,"reduce",e,t)},reduceRight(e,...t){return wr(this,"reduceRight",e,t)},shift(){return pe(this,"shift")},some(e,t){return N(this,"some",e,t,void 0,arguments)},splice(...e){return pe(this,"splice",e)},toReversed(){return se(this).toReversed()},toSorted(e){return se(this).toSorted(e)},toSpliced(...e){return se(this).toSpliced(...e)},unshift(...e){return pe(this,"unshift",e)},values(){return ft(this,"values",(e)=>I(this,e))}};go=Array.prototype;xo=En("__proto__,__v_isRef,__isVue"),Ln=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Te));vo=class extends Dn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=_e(e)&&Xt(t);if(!this._isShallow){let l=Q(i);if(!ee(r)&&!Q(r))i=v(i),r=v(r);if(!o&&ve(i)&&!ve(r))if(l)return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=o?Number(t)<e.length:Mt(e,t),a=Reflect.set(e,t,r,ve(e)?e:n);if(e===v(n)&&a){if(!s)U(e,"add",t,r);else if(K(r,i))U(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=Mt(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)U(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Te(t)||!Ln.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",_e(e)?"length":J),Reflect.ownKeys(e)}},wo=class extends Dn{constructor(e=!1){super(!0,e)}set(e,t){return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return Z(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},_o=new vo,Eo=new wo;So={get:Nn(!1,!1)},Co={get:Nn(!0,!1)};Bn=new WeakMap,To=new WeakMap,Pn=new WeakMap,Oo=new WeakMap;M("nextTick",()=>Wt);M("dispatch",(e)=>me.bind(me,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=Tr(()=>{let l;return o((c)=>l=c),l},i);r(a)});M("store",Us);M("data",(e)=>Pr(e));M("root",(e)=>Xe(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=G(Lo(e)),e._x_refs_proxy});pt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return Bo(e,i,t,()=>{let o=Do(e,r),s=o?o._x_ids[r]:zn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Ce((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Hn("Focus","focus","focus");Hn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let d;return o((u)=>d=u),d},a=n(`${t} = __placeholder`),l=(d)=>a(()=>{},{scope:{__placeholder:d}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let d=e._x_model.get,u=e._x_model.setWithModifiers,p=mn({get(){return d()},set(b){u(b)}},{get(){return s()},set(b){l(b)}});i(p)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=Er(r),o=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((a)=>{o.addEventListener(a,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Se(o,{},e);let s=(a,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(a,l);else if(c.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};_(()=>{R(()=>{s(o,i,t),D(o)})()}),e._x_teleportPutBack=()=>{let a=Er(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),ne(o)}))});Po=document.createElement("div");Un.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})};E("ignore",Un);E("effect",R((e,{expression:t},{effect:r})=>{r(A(e,t))}));Uo=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];E("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=T(e,(h)=>h!==e);let s=A(o,r),a;if(typeof r==="string")a=A(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=A(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let h;return s((g)=>h=g),Ar(h)?h.get():h},c=(h)=>{let g;if(s((f)=>g=f),Ar(g))g.set(h);else a(()=>{},{scope:{__placeholder:h}})};if(typeof r==="string"&&e.type==="radio")_(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let d=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),p=t.includes("enter"),b=d||u||p,m;if(j)m=()=>{};else if(b){let h=[],g=(f)=>c($e(e,t,f,l()));if(d)h.push(oe(e,"change",t,g));if(u){if(h.push(oe(e,"blur",t,g)),e.form){let f=e.form,x=()=>g({target:e});if(!f._x_pendingModelUpdates)f._x_pendingModelUpdates=[];f._x_pendingModelUpdates.push(x),i(()=>{if(f._x_pendingModelUpdates)f._x_pendingModelUpdates.splice(f._x_pendingModelUpdates.indexOf(x),1)})}}if(p)h.push(oe(e,"keydown",t,(f)=>{if(f.key==="Enter")g(f)}));m=()=>h.forEach((f)=>f())}else{let h=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=oe(e,h,t,(g)=>{c($e(e,t,g,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||qe(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c($e(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=m,i(()=>e._x_removeModelListeners.default()),e.form){let h=oe(e.form,"reset",[],(g)=>{Wt(()=>e._x_model&&e._x_model.set($e(e,t,{target:e},l())))});i(()=>h())}if(e._x_model={get(){return l()},set(h){c(h)},setWithModifiers:jn(t,c)},e._x_forceModelUpdate=(h)=>{if(h===void 0&&typeof r==="string"&&r.match(/\./))h="";_(()=>{if(qe(e))if(Array.isArray(h))e.checked=h.some((g)=>g==e.value);else e.checked=!!h;else if(Gt(e))if(typeof h==="boolean")e.checked=Re(e.value)===h;else e.checked=e.value==h;else un(e,"value",h)})},e.tagName==="SELECT"){let h=new MutationObserver(()=>{e._x_forceModelUpdate(l())});h.observe(e,{childList:!0}),i(()=>h.disconnect())}n(()=>{let h=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(h)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(de("cloak")))));an(()=>`[${de("init")}]`);E("init",R((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));E("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>ne(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Ft(Wr(":",Yr(de("bind:"))));Fn.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};E("bind",Fn);on(()=>`[${de("data")}]`);q=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Wo(e))return;let n=e[q];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Ue(i,e);let o={};Ks(o,i);let s=Y(e,t,{scope:o});if(s===void 0||s===!0)s={};Ue(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Vo(a,s);let c={expression:t};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})}else a=le(s);jt(a,r);let l=Se(e,a);R(()=>{a.init&&Y(e,a.init)})(),r(()=>{a.destroy&&Y(e,a.destroy),l();let c={reactiveData:a};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})})});Ce((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});E("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=A(e,r);if(!e._x_doHide)e._x_doHide=()=>{_(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{_(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else 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=Tt((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?a():o();l(u),c=u,d=!1}))});E("for",R((e,{expression:t},{effect:r,cleanup:n})=>{let i=Go(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>Jo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{ne(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Kn.inline=(e,{expression:t},{cleanup:r})=>{let n=Xe(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Kn);E("if",R((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=A(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Se(a,{},e),_(()=>{e.after(a),D(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{ne(a),a.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},a},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((a)=>{a?o():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>No(e,i))});Ce((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Ft(Wr("@",Yr(de("on:"))));E("on",R((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?A(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let s=oe(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));et("Collapse","collapse","collapse");et("Intersect","intersect","intersect");et("Focus","trap","focus");et("Mask","mask","mask");E("html",(e,{expression:t})=>{Ye(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(Zs);ue.setRawEvaluator(Xs);ue.setReactivityEngine({reactive:rr,effect:(e,t={})=>{let r;return r=co(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:uo,raw:v});Vn=ue,ea=Vn;/*! Bundled license information:
7
+ `;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let o=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(o))r+=String.fromCharCode(parseInt(o,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new k("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},Xs=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return Js.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},Zs=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let g=t[e.name];if(this.checkForDangerousValues(g),typeof g==="function")return g.bind(t);return g}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let o;if(e.computed)o=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else o=e.property.name;this.checkForDangerousKeywords(o);let s=i[o];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let a=e.arguments.map((g)=>this.evaluate({node:g,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let g=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f;if(e.callee.computed)f=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else f=e.callee.property.name;this.checkForDangerousKeywords(f);let v=g[f];if(typeof v!=="function")throw Error("Value is not a function");l=v.apply(g,a)}else if(e.callee.type==="Identifier"){let g=e.callee.name,f;if(g in t)f=t[g];else throw Error(`Undefined variable: ${g}`);if(typeof f!=="function")throw Error("Value is not a function");let v=r!==null?r:t;l=f.apply(v,a)}else{let g=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof g!=="function")throw Error("Value is not a function");l=g.apply(r,a)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let c=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!c;case"-":return-c;case"+":return+c;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let g=e.argument.name;if(!(g in t))throw Error(`Undefined variable: ${g}`);let f=t[g];if(e.operator==="++")t[g]=f+1;else if(e.operator==="--")t[g]=f-1;return e.prefix?t[g]:f}else if(e.argument.type==="MemberExpression"){let g=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(g))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(f);let v=g[f];if(e.operator==="++")g[f]=v+1;else if(e.operator==="--")g[f]=v-1;return e.prefix?g[f]:v}throw Error("Invalid update expression target");case"BinaryExpression":let d=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return d&&u();if(e.operator==="||")return d||u();let p=u();switch(e.operator){case"+":return d+p;case"-":return d-p;case"*":return d*p;case"/":return d/p;case"%":return d%p;case"==":return d==p;case"!=":return d!=p;case"===":return d===p;case"!==":return d!==p;case"<":return d<p;case">":return d>p;case"<=":return d<=p;case">=":return d>=p;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let m=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=m,m;else if(e.left.type==="MemberExpression"){let g=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(g))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(f),g[f]=m,m}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((g)=>this.evaluate({node:g,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let h={};for(let g of e.properties){let f=g.computed?this.evaluate({node:g.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):g.key.type==="Identifier"?g.key.name:this.evaluate({node:g.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),v=this.evaluate({node:g.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});h[f]=v}return h;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(vr.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(wn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return vr.set(e,!0),!0}},Ia,La,_e,ro,Mt=(e,t)=>ro.call(e,t),Ee,xe=(e)=>An(e)==="[object Map]",no=(e)=>typeof e==="string",Oe=(e)=>typeof e==="symbol",ke=(e)=>e!==null&&typeof e==="object",io,An=(e)=>io.call(e),Sn=(e)=>An(e).slice(8,-1),Xt=(e)=>no(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,et=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},so,Da,oo,Na,Cn,Ba,K=(e,t)=>!Object.is(e,t),ao="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pa,dt,y,ut,yr=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,dt)if(dt.active)dt.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ut.has(this))ut.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))lo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,wr(this),On(this);let e=y,t=O;y=this,O=!0;try{return this.fn()}finally{if(y!==this)Z("Active effect was not restored correctly - this is likely a Vue internal bug.");Mn(this),y=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)er(e);this.deps=this.depsTail=void 0,wr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ut.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(It(this))this.run()}get dirty(){return It(this)}},Tn=0,ve,ye,O=!0,In,Ke=0,mo=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},go=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!y||!O||y===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==y){if(t=this.activeLink=new mo(y,this),!y.deps)y.deps=y.depsTail=t;else t.prevDep=y.depsTail,y.depsTail.nextDep=t,y.depsTail=t;Ln(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=y.depsTail,t.nextDep=void 0,y.depsTail.nextDep=t,y.depsTail=t,y.deps===t)y.deps=r}}if(y.onTrack)y.onTrack(_e({effect:y},e));return t}trigger(e){this.version++,Ke++,this.notify(e)}notify(e){Zt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(_e({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Qt()}}},Lt,J,Dt,Ae,xo,vo,yo,Dn,Nn=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?Io:$n:i?Mo:Pn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=Ee(e);if(!n){let a;if(o&&(a=xo[t]))return a;if(t==="hasOwnProperty")return wo}let s=Reflect.get(e,t,we(e)?e:r);if(Oe(t)?Dn.has(t):yo(t))return s;if(!n)C(e,"get",t);if(i)return s;if(we(s)){let a=o&&Xt(t)?s:s.value;return n&&ke(a)?Bt(a):a}if(ke(s))return n?Bt(s):rr(s);return s}},_o,Eo,ko,Ao,Nt=(e)=>e,Pe=(e)=>Reflect.getPrototypeOf(e),To,Oo,Pn,Mo,$n,Io,te=(e)=>ke(e)?rr(e):e,Se=(e)=>ke(e)?Bt(e):e,pt,Ro,jn=()=>{},qo,Kn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Ks(l),S(e,n)((d)=>{vn(e,d,i)},{scope:l});return}if(t==="key")return Wo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=S(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>fn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},q,Wn,ra;var Jn=Ei(()=>{P=[];Mr=[],Ir=[],Lr=[];We=new MutationObserver(Ye);F=[];Ue=[];qi={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return Fi;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=Rr(s,t),i)break;if(!i)i=e[e.length-1];let o=Object.getOwnPropertyDescriptor(i,t);if(o?.set&&o?.get)return o.set.call(n,r)||!0;return Reflect.set(i,t,r)}};Hr={};Ur=Ji;qe={};me=new Map,Vr=Symbol();Xr=[];V=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",Et,"teleport"];en=[];Te((e,t)=>{if(Xe===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(T(e,(r)=>r._x_deferInit))t._x_ignore=!0});Kt=[],nn=[];cn=[];At=[];E("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")As(e,r,t);else ks(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(t){if(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();else 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&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=un(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Ps=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);B={};xn={};yn={};Ys={get reactive(){return le},get release(){return ce},get effect(){return re},get raw(){return Tr},get transaction(){return Pi},version:"3.17.4",flushAndStopDeferringMutations:ji,dontAutoEvaluateFunctions:jr,disableEffectScheduling:Di,startObservingMutations:Ht,stopObservingMutations:Pr,setReactivityEngine:Ni,onAttributeRemoved:Nr,onAttributesAdded:Dr,closestDataStack:ae,skipDuringClone:R,onlyDuringClone:os,addRootSelector:an,addInitSelector:ln,setErrorHandler:Yi,interceptClone:Te,addScopeToNode:Ce,deferMutations:Ui,mapAttributes:Ft,evaluateLater:S,interceptInit:ms,initInterceptors:jt,injectMagics:je,setEvaluator:Gi,setRawEvaluator:Xi,mergeProxies:G,extractProp:Hs,findClosest:T,onElRemoved:Rt,closestRoot:Ze,destroyTree:ne,interceptor:zr,transition:Ot,setStyles:Qe,mutateDom:_,deferInit:ds,directive:E,entangle:gn,throttle:mn,debounce:bn,evaluate:Y,evaluateRaw:Qi,initTree:D,nextTick:Wt,prefixed:de,prefix:es,plugin:Us,magic:M,store:js,start:ps,clone:ls,cloneNode:as,bound:zs,$data:$r,watch:Or,walk:X,data:Vs,bind:Fs},ue=Ys,vr=new WeakMap,wn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}wn.add(t)});Js=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];Ia=Object.freeze({}),La=Object.freeze([]),_e=Object.assign,ro=Object.prototype.hasOwnProperty,Ee=Array.isArray,io=Object.prototype.toString,so=/-\w/g,Da=et((e)=>e.replace(so,(t)=>t.slice(1).toUpperCase())),oo=/\B([A-Z])/g,Na=et((e)=>e.replace(oo,"-$1").toLowerCase()),Cn=et((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Ba=et((e)=>e?`on${Cn(e)}`:""),Pa=kn(ao+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ut=new WeakSet;In=[];Lt=new WeakMap,J=Symbol("Object iterate"),Dt=Symbol("Map keys iterate"),Ae=Symbol("Array iterate");xo={__proto__:null,[Symbol.iterator](){return ft(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>Ee(t)?se(t):t))},entries(){return ft(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return N(this,"every",e,t,void 0,arguments)},filter(e,t){return N(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return N(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return N(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return N(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return N(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return N(this,"forEach",e,t,void 0,arguments)},includes(...e){return ht(this,"includes",e)},indexOf(...e){return ht(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return ht(this,"lastIndexOf",e)},map(e,t){return N(this,"map",e,t,void 0,arguments)},pop(){return be(this,"pop")},push(...e){return be(this,"push",e)},reduce(e,...t){return _r(this,"reduce",e,t)},reduceRight(e,...t){return _r(this,"reduceRight",e,t)},shift(){return be(this,"shift")},some(e,t){return N(this,"some",e,t,void 0,arguments)},splice(...e){return be(this,"splice",e)},toReversed(){return se(this).toReversed()},toSorted(e){return se(this).toSorted(e)},toSpliced(...e){return se(this).toSpliced(...e)},unshift(...e){return be(this,"unshift",e)},values(){return ft(this,"values",(e)=>I(this,e))}};vo=Array.prototype;yo=kn("__proto__,__v_isRef,__isVue"),Dn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Oe));_o=class extends Nn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=Ee(e)&&Xt(t);if(!this._isShallow){let l=Q(i);if(!ee(r)&&!Q(r))i=w(i),r=w(r);if(!o&&we(i)&&!we(r))if(l)return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=o?Number(t)<e.length:Mt(e,t),a=Reflect.set(e,t,r,we(e)?e:n);if(e===w(n)&&a){if(!s)U(e,"add",t,r);else if(K(r,i))U(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=Mt(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)U(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Oe(t)||!Dn.has(t))C(e,"has",t);return r}ownKeys(e){return C(e,"iterate",Ee(e)?"length":J),Reflect.ownKeys(e)}},Eo=class extends Nn{constructor(e=!1){super(!0,e)}set(e,t){return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return Z(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},ko=new _o,Ao=new Eo;To={get:Bn(!1,!1)},Oo={get:Bn(!0,!1)};Pn=new WeakMap,Mo=new WeakMap,$n=new WeakMap,Io=new WeakMap;M("nextTick",()=>Wt);M("dispatch",(e)=>ge.bind(ge,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=Or(()=>{let l;return o((c)=>l=c),l},i);r(a)});M("store",qs);M("data",(e)=>$r(e));M("root",(e)=>Ze(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=G(No(e)),e._x_refs_proxy});pt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return $o(e,i,t,()=>{let o=Bo(e,r),s=o?o._x_ids[r]:Hn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Te((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Un("Focus","focus","focus");Un("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let d;return o((u)=>d=u),d},a=n(`${t} = __placeholder`),l=(d)=>a(()=>{},{scope:{__placeholder:d}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let d=e._x_model.get,u=e._x_model.setWithModifiers,p=gn({get(){return d()},set(b){u(b)}},{get(){return s()},set(b){l(b)}});i(p)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=kr(r),o=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((a)=>{o.addEventListener(a,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Ce(o,{},e);let s=(a,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(a,l);else if(c.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};_(()=>{R(()=>{s(o,i,t),D(o)})()}),e._x_teleportPutBack=()=>{let a=kr(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),ne(o)}))});Ro=document.createElement("div");jn.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})};E("ignore",jn);E("effect",R((e,{expression:t},{effect:r})=>{r(S(e,t))}));qo=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];E("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=T(e,(h)=>h!==e);let s=S(o,r),a;if(typeof r==="string")a=S(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=S(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let h;return s((g)=>h=g),Sr(h)?h.get():h},c=(h)=>{let g;if(s((f)=>g=f),Sr(g))g.set(h);else a(()=>{},{scope:{__placeholder:h}})};if(typeof r==="string"&&e.type==="radio")_(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let d=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),p=t.includes("enter"),b=d||u||p,m;if(j)m=()=>{};else if(b){let h=[],g=(f)=>c(Re(e,t,f,l()));if(d)h.push(oe(e,"change",t,g));if(u){if(h.push(oe(e,"blur",t,g)),e.form){let f=e.form,v=()=>g({target:e});if(!f._x_pendingModelUpdates)f._x_pendingModelUpdates=[];f._x_pendingModelUpdates.push(v),i(()=>{if(f._x_pendingModelUpdates)f._x_pendingModelUpdates.splice(f._x_pendingModelUpdates.indexOf(v),1)})}}if(p)h.push(oe(e,"keydown",t,(f)=>{if(f.key==="Enter")g(f)}));m=()=>h.forEach((f)=>f())}else{let h=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=oe(e,h,t,(g)=>{c(Re(e,t,g,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Fe(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(Re(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=m,i(()=>e._x_removeModelListeners.default()),e.form){let h=oe(e.form,"reset",[],(g)=>{Wt(()=>e._x_model&&e._x_model.set(Re(e,t,{target:e},l())))});i(()=>h())}if(e._x_model={get(){return l()},set(h){c(h)},setWithModifiers:qn(t,c)},e._x_forceModelUpdate=(h)=>{if(h===void 0&&typeof r==="string"&&r.match(/\./))h="";_(()=>{if(Fe(e))if(Array.isArray(h))e.checked=h.some((g)=>g==e.value);else e.checked=!!h;else if(Gt(e))if(typeof h==="boolean")e.checked=ze(e.value)===h;else e.checked=e.value==h;else fn(e,"value",h)})},e.tagName==="SELECT"){let h=new MutationObserver(()=>{e._x_forceModelUpdate(l())});h.observe(e,{childList:!0}),i(()=>h.disconnect())}n(()=>{let h=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(h)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(de("cloak")))));ln(()=>`[${de("init")}]`);E("init",R((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));E("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>ne(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Ft(Yr(":",Jr(de("bind:"))));Kn.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};E("bind",Kn);an(()=>`[${de("data")}]`);q=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Jo(e))return;let n=e[q];if(n?.expression===t)return;t=t===""?"{}":t;let i={};je(i,e);let o={};Ws(o,i);let s=Y(e,t,{scope:o});if(s===void 0||s===!0)s={};je(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Yo(a,s);let c={expression:t};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})}else a=le(s);jt(a,r);let l=Ce(e,a);R(()=>{a.init&&Y(e,a.init)})(),r(()=>{a.destroy&&Y(e,a.destroy),l();let c={reactiveData:a};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})})});Te((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});E("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=S(e,r);if(!e._x_doHide)e._x_doHide=()=>{_(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{_(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else 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=Tt((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?a():o();l(u),c=u,d=!1}))});E("for",R((e,{expression:t},{effect:r,cleanup:n})=>{let i=Zo(t),o=S(e,i.items),s=S(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>Xo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{ne(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Vn.inline=(e,{expression:t},{cleanup:r})=>{let n=Ze(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Vn);E("if",R((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=S(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Ce(a,{},e),_(()=>{e.after(a),D(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{ne(a),a.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},a},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((a)=>{a?o():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>Po(e,i))});Te((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Ft(Yr("@",Jr(de("on:"))));E("on",R((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?S(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let s=oe(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));tt("Collapse","collapse","collapse");tt("Intersect","intersect","intersect");tt("Focus","trap","focus");tt("Mask","mask","mask");E("html",(e,{expression:t})=>{Je(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(eo);ue.setRawEvaluator(Qs);ue.setReactivityEngine({reactive:rr,effect:(e,t={})=>{let r;return r=fo(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:ho,raw:w});Wn=ue,ra=Wn;/*! Bundled license information:
8
8
 
9
9
  @vue/shared/dist/shared.esm-bundler.js:
10
10
  (**
@@ -19,7 +19,7 @@ ${r?'Expression: "'+r+`"
19
19
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
20
20
  * @license MIT
21
21
  **)
22
- */});var De=typeof HTMLElement==="function"?HTMLElement:class{};function ur(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function fr(e,t,r={},n=[]){let i=()=>{for(let s of n)if(!e.classList.contains(s))e.classList.add(s);for(let[s,a]of Object.entries(r))if(!e.hasAttribute(s))e.setAttribute(s,a)};i();let o=new MutationObserver(i);o.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>o.disconnect(),{once:!0})}var _i=Symbol.for("bare-v3.styles");function Ne(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[_i]??=new Set;if(n.has(t))return;let i=e.defaultView;if(i&&"adoptedStyleSheets"in e&&"replaceSync"in i.CSSStyleSheet.prototype){let s=new i.CSSStyleSheet;s.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,s],n.add(t);return}let o=e.createElement("style");o.id=t,o.textContent=r,e.head.append(o)}var Oe=null;function Jn(){if(Oe)return Oe;let e=(Yn(),gi(Wn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Oe=e}var Gn=(e)=>Jn().reactive(e),Xn=(e)=>Oe?Oe.raw(e):e;function Zn(e,t,r){let n=Jn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function ta(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},o=null,s=null,a=0,l=null,c=0,d=null,u=new n.MutationObserver((m)=>{if(!o.isConnected||m.some(({target:h})=>s.contains(h)&&!d.contains(h)))p()});function p(){if(!o)return;n.clearTimeout(c),u.disconnect();let m=o.dataset.b3Confirm;if(l&&m&&o.textContent===m)o.replaceChildren(...l);o.removeAttribute("data-b3-armed"),o=s=l=null,d.textContent=""}function b(m){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let h=d;o=m,a=n.performance.now(),s=m.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||m.parentElement;let g=m.dataset.b3Confirm;if(g)l=[...m.childNodes],m.replaceChildren(g);m.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),c=n.setTimeout(p,4000),n.requestAnimationFrame(()=>{if(o===m)h.textContent=g||"Press again to confirm"})}e.addEventListener("click",(m)=>{let h=m.target.closest?.("[data-b3-confirm]");if(o&&h!==o)p();if(!h||h.disabled||!e.contains(h))return;if(h===o&&n.performance.now()-a>=350)return p();if(m.preventDefault(),m.stopImmediatePropagation(),h!==o)b(h)},{...i,capture:!0}),e.addEventListener("focusout",({target:m})=>{if(m===o)n.queueMicrotask(()=>m===o&&p())},i),e.addEventListener("keydown",(m)=>{let h=m;if(h.key==="Escape")p();else if(h.repeat&&(h.key==="Enter"||h.key===" ")&&h.target.closest?.("[data-b3-confirm]"))h.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{p(),d?.remove()},{once:!0})}var Qn=Symbol.for("bare-v3.confirm");function ei(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Qn])return;e[Qn]=!0,ta(document)}var fe=1.001,ra=320,na=30,ia=350,sa="b3-image-viewer-style",oa=`
22
+ */});var Ne=typeof HTMLElement==="function"?HTMLElement:class{};function fr(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function hr(e,t,r={},n=[]){let i=()=>{for(let s of n)if(!e.classList.contains(s))e.classList.add(s);for(let[s,a]of Object.entries(r))if(!e.hasAttribute(s))e.setAttribute(s,a)};i();let o=new MutationObserver(i);o.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>o.disconnect(),{once:!0})}var ki=Symbol.for("bare-v3.styles");function Be(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[ki]??=new Set;if(n.has(t))return;let i=e.defaultView;if(i&&"adoptedStyleSheets"in e&&"replaceSync"in i.CSSStyleSheet.prototype){let s=new i.CSSStyleSheet;s.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,s],n.add(t);return}let o=e.createElement("style");o.id=t,o.textContent=r,e.head.append(o)}var Me=null;function Gn(){if(Me)return Me;let e=(Jn(),vi(Yn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Me=e}var Xn=(e)=>Gn().reactive(e),nr=(e)=>Me?Me.raw(e):e;function Zn(e,t,r){let n=Gn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function na(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},o=null,s=null,a=0,l=null,c=0,d=null,u=new n.MutationObserver((m)=>{if(!o.isConnected||m.some(({target:h})=>s.contains(h)&&!d.contains(h)))p()});function p(){if(!o)return;n.clearTimeout(c),u.disconnect();let m=o.dataset.b3Confirm;if(l&&m&&o.textContent===m)o.replaceChildren(...l);o.removeAttribute("data-b3-armed"),o=s=l=null,d.textContent=""}function b(m){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let h=d;o=m,a=n.performance.now(),s=m.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||m.parentElement;let g=m.dataset.b3Confirm;if(g)l=[...m.childNodes],m.replaceChildren(g);m.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),c=n.setTimeout(p,4000),n.requestAnimationFrame(()=>{if(o===m)h.textContent=g||"Press again to confirm"})}e.addEventListener("click",(m)=>{let h=m.target.closest?.("[data-b3-confirm]");if(o&&h!==o)p();if(!h||h.disabled||!e.contains(h))return;if(h===o&&n.performance.now()-a>=350)return p();if(m.preventDefault(),m.stopImmediatePropagation(),h!==o)b(h)},{...i,capture:!0}),e.addEventListener("focusout",({target:m})=>{if(m===o)n.queueMicrotask(()=>m===o&&p())},i),e.addEventListener("keydown",(m)=>{let h=m;if(h.key==="Escape")p();else if(h.repeat&&(h.key==="Enter"||h.key===" ")&&h.target.closest?.("[data-b3-confirm]"))h.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{p(),d?.remove()},{once:!0})}var Qn=Symbol.for("bare-v3.confirm");function ei(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Qn])return;e[Qn]=!0,na(document)}var fe=1.001,ia=320,sa=30,oa=350,aa="b3-image-viewer-style",la=`
23
23
  .b3-image-viewer{position:relative;display:block;overflow:hidden;touch-action:pan-y;
24
24
  background:var(--b3-color-canvas,#f6f5f0);color:var(--b3-color-text,#202923);
25
25
  border-radius:var(--b3-radius,.75rem);-webkit-user-select:none;user-select:none;}
@@ -38,9 +38,9 @@ ${r?'Expression: "'+r+`"
38
38
  min-height:44px;min-width:44px;}
39
39
  .b3-image-viewer>.b3-image-viewer-close{inset-inline-end:var(--b3-space,1rem);}
40
40
  .b3-image-viewer>.b3-image-viewer-fit{inset-inline-start:var(--b3-space,1rem);}
41
- `;class nr extends De{static observedAttributes=["src","alt","max-scale","open"];#t=1;#e=0;#n=0;#o=!1;#s=null;#i=new Map;#a=!1;#b=0;#r=0;#x=0;#y=0;#E=!1;#v=null;#m=null;#k=new WeakSet;#l=null;get scale(){return this.#t}get fitted(){return this.#t<=fe}get src(){return this.#l??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#l=e.src??e.default??String(e);else if(this.#l=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#w()}get alt(){return this.getAttribute("alt")??""}set alt(e){this.setAttribute("alt",e??"")}get maxScale(){let e=Number(this.getAttribute("max-scale"));return e>=1?e:8}set maxScale(e){this.setAttribute("max-scale",String(e))}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",Boolean(e))}connectedCallback(){if(this.#E)return;if(this.#E=!0,Ne(this.ownerDocument,sa,oa),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#_(),this.#w(),this.#M(),this.#m=new MutationObserver(()=>{this.#A(),this.#f()}),this.#m.observe(this,{childList:!0}),this.#A(),this.#f()}disconnectedCallback(){this.#v?.abort(),this.#v=null,this.#m?.disconnect(),this.#m=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#s=null,this.#a=!1,this.#E=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#w(),this.reset();if(e==="alt"){let n=this.#h();if(n)n.alt=this.alt;this.#_()}if(e==="open"){if(this.#A(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#t>this.maxScale)this.zoomTo(this.maxScale)}#h(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#w(){let e=this.#h(),t=this.src,r=!1;if(!e&&t)e=this.ownerDocument.createElement("img"),r=!0,this.prepend(e);if(!e)return;if(t&&e.tagName==="IMG"&&e.getAttribute("src")!==t)e.setAttribute("src",t);if(e.tagName==="IMG"&&(r||this.hasAttribute("alt")))e.alt=this.alt;if(this.#_(),e.tagName==="IMG")this.#c(e)}#_(){if(this.hasAttribute("aria-labelledby"))return;let e=this.getAttribute("alt");if(e)this.setAttribute("aria-label",e);else if(!this.hasAttribute("aria-label"))this.setAttribute("aria-label","Zoomable image")}#c(e){if(this.#k.has(e))return;if(this.#k.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#g(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#g(e)},0)}#g(e){if(this.hasAttribute("data-b3-error"))return;this.setAttribute("data-b3-error",""),this.dispatchEvent(new CustomEvent("b3-error",{bubbles:!0,composed:!0,detail:{src:e.getAttribute("src")??this.src??null}}))}#A(){if(!this.open){for(let t of this.querySelectorAll(":scope > .b3-image-viewer-close"))t.remove();return}if(this.querySelector(":scope > .b3-image-viewer-close"))return;let e=this.ownerDocument.createElement("button");e.type="button",e.className="b3-image-viewer-close",e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",(t)=>{t.preventDefault(),t.stopPropagation(),this.requestClose()}),e.addEventListener("pointerdown",(t)=>t.stopPropagation()),this.append(e)}#d(){let e=this.#h();if(!e)return null;let t=e.style.transform;e.style.transform="none";let r=this.getBoundingClientRect(),n=e.getBoundingClientRect();return e.style.transform=t,this.#o=n.width>r.width+1||n.height>r.height+1,{element:e,vw:r.width,vh:r.height,x:n.left-r.left,y:n.top-r.top,w:n.width,h:n.height}}#u(e){if(this.#t<=fe&&!this.#o){this.#e=0,this.#n=0;return}let t=e.w*this.#t,r=e.h*this.#t;this.#e=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#e)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#f(e){let t=e?.element??this.#h();if(!t)return;let r=this.#t<=fe,n=!r||this.#o;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#e&&!this.#n?"":`translate(${this.#e}px, ${this.#n}px) scale(${this.#t})`,t.style.setProperty("--b3-zoom",String(this.#t)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#S(e,t,r,n=this.#d()){if(!n)return;let i=this.#t;e=Math.max(1,Math.min(this.maxScale,e));let o=(t-this.#e)/this.#t,s=(r-this.#n)/this.#t;if(this.#e=t-o*e,this.#n=r-s*e,this.#t=e,this.#u(n),this.#f(n),i!==this.#t)this.#C()}#C(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#t,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#t!==1;this.#t=1,this.#e=0,this.#n=0;let t=this.#d();if(t)this.#u(t);if(this.#f(t),e)this.#C()}zoomTo(e){let t=this.#d();if(t)this.#S(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#T(){let e=0,t=0;for(let r of this.#i.values())e+=r.x,t+=r.y;return{x:e/this.#i.size,y:t/this.#i.size}}#O(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#v=new AbortController;let e={signal:this.#v.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#h())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#s=this.#d(),this.#i.size>1||this.#t>fe||this.#o)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#t<=fe&&!this.#o){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#s??=this.#d(),!this.#s)return;n.preventDefault();let o=this.#T(),s=i?this.#O():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let a=this.#T(),l=i?this.#O():0,c=this.getBoundingClientRect(),d=this.#t,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#t*(l/s))):this.#t,p=(o.x-c.left-this.#e)/this.#t,b=(o.y-c.top-this.#n)/this.#t;if(this.#e=a.x-c.left-p*u,this.#n=a.y-c.top-b*u,this.#t=u,this.#u(this.#s),this.#f(this.#s),this.#a=!0,d!==this.#t)this.#C()},t);let r=(n)=>{if(!this.#i.delete(n.pointerId))return;if(this.hasPointerCapture?.(n.pointerId))this.releasePointerCapture(n.pointerId);if(this.#i.size){this.#s=this.#d();return}if(this.#s=null,this.#a){this.#b=performance.now(),this.#a=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),o=Math.hypot(n.clientX-this.#x,n.clientY-this.#y)<na;if(i-this.#r<ra&&o){this.#r=0;let s=this.getBoundingClientRect();this.#S(this.#t>fe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#b=i}else this.#r=i,this.#x=n.clientX,this.#y=n.clientY};this.addEventListener("pointerup",r,e),this.addEventListener("pointercancel",r,e),this.addEventListener("click",(n)=>{if(n.target.closest?.(".b3-image-viewer-close, .b3-image-viewer-fit"))return;if(performance.now()-this.#b<ia){n.preventDefault(),n.stopPropagation();return}if(this.open&&this.fitted&&n.target===this)this.requestClose()},{...e,capture:!0}),this.addEventListener("wheel",(n)=>{let i=this.getBoundingClientRect();if(n.ctrlKey){n.preventDefault(),this.#S(this.#t*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let o=this.#d();if(!o||o.h*this.#t<=o.vh&&!this.#o)return;let s=this.#n;if(this.#n-=n.deltaY,this.#u(o),this.#n===s)return;n.preventDefault(),this.#f(o)},t);for(let n of["gesturestart","gesturechange","gestureend"])this.addEventListener(n,(i)=>i.preventDefault(),t);this.addEventListener("keydown",(n)=>{if(n.metaKey||n.altKey)return;let i=n.shiftKey?80:40,o=(s,a)=>{let l=this.#d();if(!l||this.fitted)return!1;return this.#e+=s,this.#n+=a,this.#u(l),this.#f(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#t*1.5);break;case"-":case"_":this.zoomTo(this.#t/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!o(i,0))return;break;case"ArrowRight":if(!o(-i,0))return;break;case"ArrowUp":if(!o(0,i))return;break;case"ArrowDown":if(!o(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#d();if(n)this.#u(n),this.#f(n)},e)}}var ti=nr;function ir(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=ti;return ti=class extends nr{},customElements.define(e,r),r}ir();var aa=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,la=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,ca=350,Ie=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),sr=(e)=>JSON.parse(JSON.stringify(Xn(e))),w=(e,t)=>e!=null&&String(e)===String(t),tt=(e)=>!!e&&typeof e==="object",C=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],rt=(e)=>Array.isArray(e.comments)?e.comments:[];function da(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,o]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=o)return`${Math.floor(n/o)}${i} ago`;return`${n}m ago`}var li=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function or(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Ie();t.add(String(n.id))};return e.filter(tt).map((n)=>{r(n),n.cards=li(Array.isArray(n.cards)?n.cards.filter(tt):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(tt(o))r(o)}if(Array.isArray(i.comments)){for(let o of i.comments)if(tt(o))r(o)}}return n})}function ri(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>w(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>w(o.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let o of n.cards){let s=C(o),a=s.findIndex((l)=>w(l.id,r));if(a>=0)return void s.splice(a,1)}}}var ua=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function fa(e){return[e.title??"",e.description??"",...C(e).map((t)=>t.title??""),...st(e)].join(`
42
- `).toLowerCase()}function st(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...C(e).map((n)=>n.title??"")].join(`
43
- `);for(let[,,n]of r.matchAll(aa))t.add(n.toLowerCase());return[...t]}var ni=String.raw`(<[^<>\n]+>|(?:[^()\n]|\([^()\n]*\))+)`,ha=new RegExp(String.raw`!\[([^\]\n]*)\]\(${ni}\)|\[([^\]\n]+)\]\(${ni}\)|\bhttps?:\/\/[^\s<>]+`,"giu"),pa=new Set(["javascript","data","vbscript","file","blob","about"]),ba=(e)=>{let t=e.trim();return t.startsWith("<")&&t.endsWith(">")?t.slice(1,-1):t.replace(/\s+"[^"\n]*"$/,"")};function ma(e,t=[]){if(/[\u0000-\u001f\u007f\\]/.test(e)||/\s/.test(e.replaceAll(" ",""))||e!==e.trim()||!e)return null;let r=/^([a-z][a-z\d+.-]*):/i.exec(e)?.[1].toLowerCase();if(r==="http"||r==="https"||r==="mailto")return{href:e,file:!1};if(r)return!pa.has(r)&&t.includes(r)?{href:e,file:!1}:null;return e.startsWith("//")?null:{href:e,file:!0}}var ii=(e)=>(e??"").toLowerCase().split(/[\s,]+/).map((t)=>t.replace(/:$/,"")).filter(Boolean);function lr(e,t=[]){let r=[],n=0;for(let i of e.matchAll(ha)){let o=i[2]!==void 0,[s]=i,a=o?i[1]:i[3],l=o?i[2]:i[4],c=i.index+s.length;if(!l){let u=s;for(;;){if(u=u.replace(/[.,;:!?'"\]]+$/u,""),!u.endsWith(")")||u.split("(").length>=u.split(")").length)break;u=u.slice(0,-1)}c-=s.length-u.length,s=a=l=u}else l=ba(l);let d=ma(l,t);if(!d||o&&!d.file&&!/^https?:/i.test(d.href))continue;if(i.index>n)r.push(e.slice(n,i.index));r.push({text:a,...d,...o?{image:o}:{}}),n=c}if(n<e.length)r.push(e.slice(n));return r}var si=(e,t=[])=>lr(e,t).map((r)=>typeof r==="string"?r:r.text).join(""),ar=null;function ga(e,t,r=[]){let n=e.ownerDocument;e.replaceChildren(...lr(t,r).map((i)=>{if(typeof i==="string")return n.createTextNode(i);let o=n.createElement("a");if(o.className="b3-board-ref",o.href=i.href,o.dataset.href=i.href,o.draggable=!1,i.image){let s=n.createElement("img");if(s.src=i.href,s.alt=i.text,s.loading="lazy",s.draggable=!1,o.classList.add("b3-board-image"),o.append(s),i.file)o.dataset.file="";else o.target="_blank",o.rel="noopener noreferrer";return o}if(i.file){if(o.dataset.file="",!ar){let s=n.createElement("template");s.innerHTML=wa,ar=s.content.firstElementChild}o.append(ar.cloneNode(!0))}else if(/^https?:/i.test(i.href))o.target="_blank",o.rel="noopener noreferrer";return o.append(i.text),o}))}var xa="b3-board-style",ya=`
41
+ `;class ir extends Ne{static observedAttributes=["src","alt","max-scale","open"];#t=1;#e=0;#n=0;#o=!1;#s=null;#i=new Map;#a=!1;#b=0;#r=0;#x=0;#v=0;#E=!1;#y=null;#m=null;#k=new WeakSet;#l=null;get scale(){return this.#t}get fitted(){return this.#t<=fe}get src(){return this.#l??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#l=e.src??e.default??String(e);else if(this.#l=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#w()}get alt(){return this.getAttribute("alt")??""}set alt(e){this.setAttribute("alt",e??"")}get maxScale(){let e=Number(this.getAttribute("max-scale"));return e>=1?e:8}set maxScale(e){this.setAttribute("max-scale",String(e))}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",Boolean(e))}connectedCallback(){if(this.#E)return;if(this.#E=!0,Be(this.ownerDocument,aa,la),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#_(),this.#w(),this.#M(),this.#m=new MutationObserver(()=>{this.#A(),this.#f()}),this.#m.observe(this,{childList:!0}),this.#A(),this.#f()}disconnectedCallback(){this.#y?.abort(),this.#y=null,this.#m?.disconnect(),this.#m=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#s=null,this.#a=!1,this.#E=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#w(),this.reset();if(e==="alt"){let n=this.#h();if(n)n.alt=this.alt;this.#_()}if(e==="open"){if(this.#A(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#t>this.maxScale)this.zoomTo(this.maxScale)}#h(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#w(){let e=this.#h(),t=this.src,r=!1;if(!e&&t)e=this.ownerDocument.createElement("img"),r=!0,this.prepend(e);if(!e)return;if(t&&e.tagName==="IMG"&&e.getAttribute("src")!==t)e.setAttribute("src",t);if(e.tagName==="IMG"&&(r||this.hasAttribute("alt")))e.alt=this.alt;if(this.#_(),e.tagName==="IMG")this.#c(e)}#_(){if(this.hasAttribute("aria-labelledby"))return;let e=this.getAttribute("alt");if(e)this.setAttribute("aria-label",e);else if(!this.hasAttribute("aria-label"))this.setAttribute("aria-label","Zoomable image")}#c(e){if(this.#k.has(e))return;if(this.#k.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#g(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#g(e)},0)}#g(e){if(this.hasAttribute("data-b3-error"))return;this.setAttribute("data-b3-error",""),this.dispatchEvent(new CustomEvent("b3-error",{bubbles:!0,composed:!0,detail:{src:e.getAttribute("src")??this.src??null}}))}#A(){if(!this.open){for(let t of this.querySelectorAll(":scope > .b3-image-viewer-close"))t.remove();return}if(this.querySelector(":scope > .b3-image-viewer-close"))return;let e=this.ownerDocument.createElement("button");e.type="button",e.className="b3-image-viewer-close",e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",(t)=>{t.preventDefault(),t.stopPropagation(),this.requestClose()}),e.addEventListener("pointerdown",(t)=>t.stopPropagation()),this.append(e)}#d(){let e=this.#h();if(!e)return null;let t=e.style.transform;e.style.transform="none";let r=this.getBoundingClientRect(),n=e.getBoundingClientRect();return e.style.transform=t,this.#o=n.width>r.width+1||n.height>r.height+1,{element:e,vw:r.width,vh:r.height,x:n.left-r.left,y:n.top-r.top,w:n.width,h:n.height}}#u(e){if(this.#t<=fe&&!this.#o){this.#e=0,this.#n=0;return}let t=e.w*this.#t,r=e.h*this.#t;this.#e=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#e)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#f(e){let t=e?.element??this.#h();if(!t)return;let r=this.#t<=fe,n=!r||this.#o;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#e&&!this.#n?"":`translate(${this.#e}px, ${this.#n}px) scale(${this.#t})`,t.style.setProperty("--b3-zoom",String(this.#t)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#S(e,t,r,n=this.#d()){if(!n)return;let i=this.#t;e=Math.max(1,Math.min(this.maxScale,e));let o=(t-this.#e)/this.#t,s=(r-this.#n)/this.#t;if(this.#e=t-o*e,this.#n=r-s*e,this.#t=e,this.#u(n),this.#f(n),i!==this.#t)this.#C()}#C(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#t,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#t!==1;this.#t=1,this.#e=0,this.#n=0;let t=this.#d();if(t)this.#u(t);if(this.#f(t),e)this.#C()}zoomTo(e){let t=this.#d();if(t)this.#S(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#T(){let e=0,t=0;for(let r of this.#i.values())e+=r.x,t+=r.y;return{x:e/this.#i.size,y:t/this.#i.size}}#O(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#y=new AbortController;let e={signal:this.#y.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#h())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#s=this.#d(),this.#i.size>1||this.#t>fe||this.#o)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#t<=fe&&!this.#o){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#s??=this.#d(),!this.#s)return;n.preventDefault();let o=this.#T(),s=i?this.#O():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let a=this.#T(),l=i?this.#O():0,c=this.getBoundingClientRect(),d=this.#t,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#t*(l/s))):this.#t,p=(o.x-c.left-this.#e)/this.#t,b=(o.y-c.top-this.#n)/this.#t;if(this.#e=a.x-c.left-p*u,this.#n=a.y-c.top-b*u,this.#t=u,this.#u(this.#s),this.#f(this.#s),this.#a=!0,d!==this.#t)this.#C()},t);let r=(n)=>{if(!this.#i.delete(n.pointerId))return;if(this.hasPointerCapture?.(n.pointerId))this.releasePointerCapture(n.pointerId);if(this.#i.size){this.#s=this.#d();return}if(this.#s=null,this.#a){this.#b=performance.now(),this.#a=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),o=Math.hypot(n.clientX-this.#x,n.clientY-this.#v)<sa;if(i-this.#r<ia&&o){this.#r=0;let s=this.getBoundingClientRect();this.#S(this.#t>fe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#b=i}else this.#r=i,this.#x=n.clientX,this.#v=n.clientY};this.addEventListener("pointerup",r,e),this.addEventListener("pointercancel",r,e),this.addEventListener("click",(n)=>{if(n.target.closest?.(".b3-image-viewer-close, .b3-image-viewer-fit"))return;if(performance.now()-this.#b<oa){n.preventDefault(),n.stopPropagation();return}if(this.open&&this.fitted&&n.target===this)this.requestClose()},{...e,capture:!0}),this.addEventListener("wheel",(n)=>{let i=this.getBoundingClientRect();if(n.ctrlKey){n.preventDefault(),this.#S(this.#t*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let o=this.#d();if(!o||o.h*this.#t<=o.vh&&!this.#o)return;let s=this.#n;if(this.#n-=n.deltaY,this.#u(o),this.#n===s)return;n.preventDefault(),this.#f(o)},t);for(let n of["gesturestart","gesturechange","gestureend"])this.addEventListener(n,(i)=>i.preventDefault(),t);this.addEventListener("keydown",(n)=>{if(n.metaKey||n.altKey)return;let i=n.shiftKey?80:40,o=(s,a)=>{let l=this.#d();if(!l||this.fitted)return!1;return this.#e+=s,this.#n+=a,this.#u(l),this.#f(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#t*1.5);break;case"-":case"_":this.zoomTo(this.#t/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!o(i,0))return;break;case"ArrowRight":if(!o(-i,0))return;break;case"ArrowUp":if(!o(0,i))return;break;case"ArrowDown":if(!o(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#d();if(n)this.#u(n),this.#f(n)},e)}}var ti=ir;function sr(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=ti;return ti=class extends ir{},customElements.define(e,r),r}sr();var ca=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,da=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,ua=350,Le=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),or=(e)=>JSON.parse(JSON.stringify(nr(e))),x=(e,t)=>e!=null&&String(e)===String(t),rt=(e)=>!!e&&typeof e==="object",A=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],he=(e)=>Array.isArray(e.comments)?e.comments:[];function fa(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,o]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=o)return`${Math.floor(n/o)}${i} ago`;return`${n}m ago`}var ci=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function ar(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Le();t.add(String(n.id))};return e.filter(rt).map((n)=>{r(n),n.cards=ci(Array.isArray(n.cards)?n.cards.filter(rt):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(rt(o))r(o)}if(Array.isArray(i.comments)){for(let o of i.comments)if(rt(o))r(o)}}return n})}function ri(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>x(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>x(o.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let o of n.cards){let s=A(o),a=s.findIndex((l)=>x(l.id,r));if(a>=0)return void s.splice(a,1)}}}function ha(e,t,r){let{field:n,id:i}=r,o=(s,a,l)=>s.splice(Math.min(l,s.length),0,nr(a));if(n==="name"){let s=e.findIndex((a)=>x(a.id,i));if(s>=0&&!t.some((a)=>x(a.id,i)))o(t,e[s],s);return}for(let s of e){let a=s.cards.findIndex((l)=>x(l.id,i));if(n==="title"&&a>=0){let l=t.find((c)=>x(c.id,s.id));if(l&&!l.cards.some((c)=>x(c.id,i)))o(l.cards,s.cards[a],a);return}if(n==="subtask")for(let l of s.cards){let c=A(l).findIndex((u)=>x(u.id,i));if(c<0)continue;let d=t.flatMap((u)=>u.cards).find((u)=>x(u.id,l.id));if(d&&!A(d).some((u)=>x(u.id,i))){if(!Array.isArray(d.subtasks))d.subtasks=[];o(d.subtasks,A(l)[c],c)}return}}}var di=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function pa(e){return[e.title??"",e.description??"",...A(e).map((t)=>t.title??""),...st(e),...he(e).map((t)=>t.text??"")].join(`
42
+ `).toLowerCase()}var ni=(e,t)=>{let r=String(t.text??"").toLowerCase();return di(e).some((n)=>r.includes(n))};function st(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...A(e).map((n)=>n.title??"")].join(`
43
+ `);for(let[,,n]of r.matchAll(ca))t.add(n.toLowerCase());return[...t]}var ii=String.raw`(<[^<>\n]+>|(?:[^()\n]|\([^()\n]*\))+)`,ba=new RegExp(String.raw`!\[([^\]\n]*)\]\(${ii}\)|\[([^\]\n]+)\]\(${ii}\)|\bhttps?:\/\/[^\s<>]+`,"giu"),ma=new Set(["javascript","data","vbscript","file","blob","about"]),ga=(e)=>{let t=e.trim();return t.startsWith("<")&&t.endsWith(">")?t.slice(1,-1):t.replace(/\s+"[^"\n]*"$/,"")};function xa(e,t=[]){if(/[\u0000-\u001f\u007f\\]/.test(e)||/\s/.test(e.replaceAll(" ",""))||e!==e.trim()||!e)return null;let r=/^([a-z][a-z\d+.-]*):/i.exec(e)?.[1].toLowerCase();if(r==="http"||r==="https"||r==="mailto")return{href:e,file:!1};if(r)return!ma.has(r)&&t.includes(r)?{href:e,file:!1}:null;return e.startsWith("//")?null:{href:e,file:!0}}var si=(e)=>(e??"").toLowerCase().split(/[\s,]+/).map((t)=>t.replace(/:$/,"")).filter(Boolean);function cr(e,t=[]){let r=[],n=0;for(let i of e.matchAll(ba)){let o=i[2]!==void 0,[s]=i,a=o?i[1]:i[3],l=o?i[2]:i[4],c=i.index+s.length;if(!l){let u=s;for(;;){if(u=u.replace(/[.,;:!?'"\]]+$/u,""),!u.endsWith(")")||u.split("(").length>=u.split(")").length)break;u=u.slice(0,-1)}c-=s.length-u.length,s=a=l=u}else l=ga(l);let d=xa(l,t);if(!d||o&&!d.file&&!/^https?:/i.test(d.href))continue;if(i.index>n)r.push(e.slice(n,i.index));r.push({text:a,...d,...o?{image:o}:{}}),n=c}if(n<e.length)r.push(e.slice(n));return r}var oi=(e,t=[])=>cr(e,t).map((r)=>typeof r==="string"?r:r.text).join(""),lr=null;function va(e,t,r=[]){let n=e.ownerDocument;e.replaceChildren(...cr(t,r).map((i)=>{if(typeof i==="string")return n.createTextNode(i);let o=n.createElement("a");if(o.className="b3-board-ref",o.href=i.href,o.dataset.href=i.href,o.draggable=!1,i.image){let s=n.createElement("img");if(s.src=i.href,s.alt=i.text,s.loading="lazy",s.draggable=!1,o.classList.add("b3-board-image"),o.append(s),i.file)o.dataset.file="";else o.target="_blank",o.rel="noopener noreferrer";return o}if(i.file){if(o.dataset.file="",!lr){let s=n.createElement("template");s.innerHTML=Ea,lr=s.content.firstElementChild}o.append(lr.cloneNode(!0))}else if(/^https?:/i.test(i.href))o.target="_blank",o.rel="noopener noreferrer";return o.append(i.text),o}))}var ya="b3-board-style",wa=`
44
44
  :where(b3-board){--b3-board-hit:var(--b3-d-control,var(--b3-touch,2.75rem));--b3-board-chip:var(--b3-d-control-small,2rem);
45
45
  --b3-board-tag:var(--b3-color-accent);--b3-board-mention:var(--b3-color-info);--b3-board-star:var(--b3-color-warning);
46
46
  --b3-board-line:color-mix(in srgb,var(--b3-color-border) 70%,transparent);--b3-board-soft:color-mix(in srgb,var(--b3-color-text) 5%,var(--b3-color-surface));}
@@ -48,9 +48,15 @@ ${r?'Expression: "'+r+`"
48
48
  b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;cursor:default;}
49
49
  .b3-board-ui{flex:1 1 auto;display:flex;flex-direction:column;gap:var(--b3-space-3,.75rem);min-inline-size:0;min-block-size:0;}
50
50
  .b3-board-icon{flex:none;inline-size:1rem;block-size:1rem;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
51
- .b3-board-filters{flex:none;display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--b3-space-3,.75rem);font-size:.8125rem;}
51
+ /* One line: many tags scroll sideways (no bar) instead of wrapping; the search stays pinned at the row's end over them. */
52
+ .b3-board-filters{flex:none;display:flex;flex-wrap:nowrap;align-items:center;column-gap:var(--b3-space-3,.75rem);font-size:.8125rem;
53
+ overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding-block:2px;}
54
+ .b3-board-filters::-webkit-scrollbar{display:none;}
55
+ .b3-board-filters>*{flex:none;}
52
56
  .b3-board-filters[hidden]{display:none;}
53
- .b3-board-search{display:inline-flex;align-items:center;margin-inline-start:auto;}
57
+ .b3-board-search{display:inline-flex;align-items:center;margin-inline-start:auto;position:sticky;inset-inline-end:0;
58
+ padding-inline-start:.5rem;background:var(--b3-board-bg,var(--b3-color-canvas));box-shadow:calc(-1 * var(--b3-space-3,.75rem)) 0 .5rem -.25rem var(--b3-board-bg,var(--b3-color-canvas));}
59
+ .b3-board-search:dir(rtl){box-shadow:var(--b3-space-3,.75rem) 0 .5rem -.25rem var(--b3-board-bg,var(--b3-color-canvas));}
54
60
  .b3-board-search[data-open]{flex:0 1 14rem;min-inline-size:8rem;}
55
61
  .b3-board-search>.b3-board-quiet{margin:0;}
56
62
  .b3-board-search-input{flex:1;inline-size:100%;min-inline-size:0;min-block-size:var(--b3-board-chip);padding:.125rem .5rem;font:inherit;color:var(--b3-color-text);
@@ -149,6 +155,8 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
149
155
  .b3-board-comments{display:grid;gap:.375rem;margin:0;padding:0;list-style:none;}
150
156
  .b3-board-comment{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:0 .25rem;padding:.375rem .5rem;font-size:.8125rem;line-height:1.45;
151
157
  border-radius:var(--b3-radius-small,.375rem);background:var(--b3-board-soft);}
158
+ .b3-board-talk[data-match]{color:var(--b3-color-accent);font-weight:600;}
159
+ .b3-board-comment[data-match]{box-shadow:inset 2px 0 var(--b3-color-accent);}
152
160
  .b3-board-comment-meta{font-size:.6875rem;color:var(--b3-color-muted);}
153
161
  .b3-board-comment-meta>b{font-weight:600;color:var(--b3-color-text);}
154
162
  .b3-board-comment-text{grid-column:1;white-space:pre-wrap;overflow-wrap:break-word;}
@@ -201,9 +209,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
201
209
  :is(.b3-board-cards,.b3-board-subtasks)[data-b3-drop="end"]{box-shadow:inset 0 -3px 0 -1px var(--b3-color-accent);}
202
210
  .b3-board-columns[data-b3-drop="end"]{box-shadow:inset -3px 0 0 -1px var(--b3-color-accent);}
203
211
  @media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-ghost{rotate:none;}}
204
- `,z=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,oi=z('<circle cx="9" cy="5" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="19" r="1"/>'),nt=z('<path d="M5 12h14M12 5v14"/>'),it=z('<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"/>'),va=z('<path d="m9 18 6-6-6-6"/>'),wa=z('<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4M10 9H8M16 13H8M16 17H8"/>'),ai=z('<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>'),_a=z('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),Ea=z('<circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/>'),ka=z('<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>'),Me=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
212
+ `,z=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,ai=z('<circle cx="9" cy="5" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="19" r="1"/>'),nt=z('<path d="M5 12h14M12 5v14"/>'),it=z('<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"/>'),_a=z('<path d="m9 18 6-6-6-6"/>'),Ea=z('<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4M10 9H8M16 13H8M16 17H8"/>'),li=z('<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>'),ka=z('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),Aa=z('<circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/>'),Sa=z('<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>'),Ie=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
205
213
  <textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
206
- b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,Aa=`
214
+ b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,Ca=`
207
215
  <div class="b3-board-filters" b3x-bind:hidden="!tokens().length && !searchable" role="group" aria-label="Filter">
208
216
  <span class="b3-board-caption" aria-hidden="true" b3x-show="tokens().length">Filter</span>
209
217
  <template b3x-for="token in tokens()" b3x-bind:key="token">
@@ -211,7 +219,7 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
211
219
  </template>
212
220
  <button type="button" class="b3-board-link" b3x-show="filter.length" b3x-on:click="setFilter([])">Clear</button>
213
221
  <span class="b3-board-search" b3x-show="searchable" b3x-bind:data-open="searchShown() ? '' : null">
214
- <button type="button" class="b3-board-quiet" b3x-bind:hidden="searchShown()" b3x-on:click="openSearch()" aria-label="Search cards" title="Search cards (/)">${Ea}</button>
222
+ <button type="button" class="b3-board-quiet" b3x-bind:hidden="searchShown()" b3x-on:click="openSearch()" aria-label="Search cards" title="Search cards (/)">${Aa}</button>
215
223
  <input type="search" class="b3-board-search-input" b3x-bind:hidden="!searchShown()" b3x-bind:value="search" placeholder="Search" aria-label="Search cards"
216
224
  spellcheck="false" autocomplete="off" enterkeyhint="search" b3x-on:input="typeSearch($event)" b3x-on:keydown="keySearch($event)" b3x-on:blur="blurSearch()">
217
225
  </span>
@@ -220,7 +228,7 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
220
228
  <template b3x-for="column in columns" b3x-bind:key="column.id">
221
229
  <section class="b3-board-column" b3x-bind:data-column="column.id" b3x-bind:data-kind="column.kind || null" b3x-bind:aria-label="column.name">
222
230
  <header class="b3-board-column-header">
223
- ${Me("name","column.id",!1)}
231
+ ${Ie("name","column.id",!1)}
224
232
  <button type="button" class="b3-board-column-name" b3x-show="!isEditing('name', column.id)"
225
233
  b3x-on:click="edit('name', column.id, column.name)" b3x-on:keydown="keyColumn($event, column)" b3x-text="column.name || 'Untitled'"></button>
226
234
  <span class="b3-board-count" b3x-text="count(column)"></span>
@@ -232,18 +240,18 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
232
240
  <ol class="b3-board-cards">
233
241
  <template b3x-for="card in visible(column)" b3x-bind:key="card.id">
234
242
  <li class="b3-board-card" tabindex="0" b3x-bind:data-card="card.id" b3x-bind:data-starred="card.starred ? '' : null" b3x-on:keydown="keyCard($event, card)">
235
- <span class="b3-board-grip" b3x-show="!readonly">${oi}</span>
243
+ <span class="b3-board-grip" b3x-show="!readonly">${ai}</span>
236
244
  <div class="b3-board-card-head">
237
- ${Me("title","card.id")}
245
+ ${Ie("title","card.id")}
238
246
  <span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('title', card.id)" b3x-on:click="edit('title', card.id, card.title)"
239
247
  b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
240
248
  <span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
241
249
  <button type="button" class="b3-board-quiet b3-board-details" b3x-show="!readonly && !hasDetails(card) && !isOpen(card)" b3x-bind:aria-label="'Add details to ' + plain(card.title)"
242
- b3x-on:click="addDetails(card)">${_a}</button>
250
+ b3x-on:click="addDetails(card)">${ka}</button>
243
251
  <button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(card.title)"
244
252
  b3x-on:click="removeCard(column, card)">${it}</button>
245
253
  <button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
246
- b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${ka}</button>
254
+ b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${Sa}</button>
247
255
  </span>
248
256
  </div>
249
257
  <div class="b3-board-tags" b3x-show="tokensOf(card).length">
@@ -254,9 +262,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
254
262
  <div class="b3-board-foot" b3x-show="(disclosable(card) && (hasDetails(card) || isOpen(card))) || ago(card.updated)">
255
263
  <button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
256
264
  b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
257
- ${va}
265
+ ${_a}
258
266
  <span class="b3-board-progress" b3x-show="subtasksOf(card).length" b3x-bind:data-complete="complete(card) ? '' : null" b3x-text="done(card) + '/' + subtasksOf(card).length"></span>
259
- <span class="b3-board-talk" b3x-show="commentsOf(card).length" b3x-bind:aria-label="commentsOf(card).length + ' comments'">${ai}<span b3x-text="commentsOf(card).length"></span></span>
267
+ <span class="b3-board-talk" b3x-bind:data-match="said(card) ? '' : null" b3x-show="commentsOf(card).length" b3x-bind:aria-label="commentsOf(card).length + ' comments'">${li}<span b3x-text="commentsOf(card).length"></span></span>
260
268
  <span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
261
269
  <span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length && !commentsOf(card).length">Hide details</span>
262
270
  </button>
@@ -264,16 +272,16 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
264
272
  </div>
265
273
  <template b3x-if="isOpen(card)">
266
274
  <div class="b3-board-body">
267
- ${Me("description","card.id")}
275
+ ${Ie("description","card.id")}
268
276
  <div class="b3-board-description" role="button" tabindex="0" b3x-show="card.description && !isEditing('description', card.id)"
269
277
  b3x-on:click="edit('description', card.id, card.description)" b3x-on:keydown="keyText($event, 'description', card.id, card.description)"
270
278
  b3x-effect="rich($el, card.description)"></div>
271
279
  <ul class="b3-board-subtasks" b3x-show="subtasksOf(card).length">
272
280
  <template b3x-for="sub in subtasksOf(card)" b3x-bind:key="sub.id">
273
281
  <li class="b3-board-subtask" b3x-bind:data-subtask="sub.id" b3x-bind:data-done="sub.done ? '' : null">
274
- <span class="b3-board-subtask-grip" b3x-show="!readonly">${oi}</span>
282
+ <span class="b3-board-subtask-grip" b3x-show="!readonly">${ai}</span>
275
283
  <input type="checkbox" b3x-bind:checked="!!sub.done" b3x-bind:disabled="readonly" b3x-on:change="check(card, sub, $event.target.checked)" b3x-bind:aria-label="plain(sub.title)">
276
- ${Me("subtask","sub.id",!1)}
284
+ ${Ie("subtask","sub.id",!1)}
277
285
  <span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('subtask', sub.id)"
278
286
  b3x-on:click="edit('subtask', sub.id, sub.title)" b3x-on:keydown="keySubtask($event, card, sub)" b3x-effect="rich($el, sub.title)"></span>
279
287
  <button type="button" class="b3-board-quiet b3-board-remove" b3x-show="!readonly" b3x-bind:aria-label="'Delete ' + plain(sub.title)" b3x-on:click="removeSubtask(card, sub)">${it}</button>
@@ -282,18 +290,18 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
282
290
  </ul>
283
291
  <ul class="b3-board-comments" b3x-show="commentsOf(card).length" aria-label="Comments">
284
292
  <template b3x-for="comment in commentsOf(card)" b3x-bind:key="comment.id">
285
- <li class="b3-board-comment" b3x-bind:data-comment="comment.id">
293
+ <li class="b3-board-comment" b3x-bind:data-comment="comment.id" b3x-bind:data-match="hits(search, comment) ? '' : null">
286
294
  <span class="b3-board-comment-meta"><b b3x-text="comment.by || 'you'"></b> · <span b3x-bind:title="comment.at || null" b3x-text="ago(comment.at)"></span></span>
287
295
  <div class="b3-board-comment-text" b3x-effect="rich($el, comment.text)"></div>
288
296
  <button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" aria-label="Delete comment" b3x-on:click="removeComment(card, comment)">${it}</button>
289
297
  </li>
290
298
  </template>
291
299
  </ul>
292
- ${Me("comment","card.id")}
300
+ ${Ie("comment","card.id")}
293
301
  <div class="b3-board-actions" b3x-show="!readonly">
294
302
  <button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${nt}<span>Add details</span></button>
295
303
  <button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${nt}<span>Add subtask</span></button>
296
- <button type="button" class="b3-board-link" b3x-show="!isEditing('comment', card.id)" b3x-on:click="edit('comment', card.id, '')">${ai}<span>Comment</span></button>
304
+ <button type="button" class="b3-board-link" b3x-show="!isEditing('comment', card.id)" b3x-on:click="edit('comment', card.id, '')">${li}<span>Comment</span></button>
297
305
  </div>
298
306
  </div>
299
307
  </template>
@@ -304,8 +312,8 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
304
312
  </template>
305
313
  <button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${nt}<span>Add column</span></button>
306
314
  </div>
307
- <span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class ci extends De{static observedAttributes=["readonly","search","link-schemes","searchable"];#t=null;#e=null;#n=null;#o=null;#s=null;#i=!1;#a=null;#b=null;#r=null;#x=!1;#y=null;#E=0;#v=Math.random().toString(36).slice(2,8);#m=!1;#k=[];#l={past:[],future:[],now:null,key:"",at:0};#h=!1;get columns(){let e=sr(this.#e?.columns??this.#n??[]),t=this.#e?.editing;if(t?.fresh)ri(e,t);return e}set columns(e){let t=or(sr(e));if(!this.#e){this.#n=t;return}this.#p();let r=this.#e;if(r.columns=t,r.editing&&!this.#c(r.editing.id))r.editing=null;if(!this.#h)this.#l={past:[],future:[],now:null,key:"",at:0};this.#l.now=this.columns}undo(){return this.#w(-1)}openSearch(){if(!this.#e?.searchable)return!1;return this.#e.openSearch(),!0}redo(){return this.#w(1)}get canUndo(){return!this.readonly&&(this.#l.past.length>0||!!this.#e?.editing)}get canRedo(){return!this.readonly&&this.#l.future.length>0}#w(e){let t=this.#e;if(!t||this.readonly)return!1;t.settle();let r=this.#l,i=(e<0?r.past:r.future).pop();if(!i||!r.now)return!1;(e<0?r.future:r.past).push(r.now),r.key="";let o=new Map(t.columns.flatMap((a)=>a.cards.map((l)=>[String(l.id),l.expanded]))),s=or(sr(i));for(let a of s)for(let l of a.cards){let c=o.get(String(l.id));if(o.has(String(l.id)))if(c)l.expanded=!0;else delete l.expanded}return this.#p(),t.columns=s,r.now=this.columns,this.#u(e<0?"Undone":"Redone"),this.#_({type:e<0?"undo":"redo"}),!0}#_(e){this.#h=!0;try{this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}finally{this.#h=!1}}get filter(){return[...this.#e?.filter??this.#o??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e){if(t.join(" ")!==this.#e.filter.join(" "))this.#e.kept=[];this.#e.filter=t}else this.#o=t}get search(){return this.#e?.search??this.#s??""}set search(e){let t=String(e??"");if(this.#e){if(t!==this.#e.search)this.#e.kept=[];this.#e.search=t}else this.#s=t}get defaultColumn(){return this.getAttribute("default-column")??""}set defaultColumn(e){if(e)this.setAttribute("default-column",String(e));else this.removeAttribute("default-column")}addCard(e){let t=this.#e;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((o)=>w(o.id,r))??t.columns.find((o)=>String(o.name??"").trim().toLowerCase()===n))||(e===void 0?t.columns[0]:void 0);if(!i)return!1;return t.addCard(i),!0}get upload(){return this.#y}set upload(e){this.#y=typeof e==="function"?e:null}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","search","defaultColumn","readonly","upload"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#t&&e.readyState==="loading"){if(!this.#i)this.#i=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#i=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(Ne(e,xa,ya),ei(),!this.#t){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=or(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#t=e.createElement("div"),this.#t.className="b3-board-ui",this.append(this.#t),this.#e=Zn(this.#t,Aa,this.#A(r??[],this.#o??[],this.#s??this.getAttribute("search")??"")),this.#n=this.#o=this.#s=null,this.#l.now=this.columns}else if(this.#t.parentNode!==this)this.append(this.#t);this.#b=new MutationObserver(()=>{if(this.#t&&this.#t.parentNode!==this)this.append(this.#t)}),this.#b.observe(this,{childList:!0}),this.#M(),fr(this,this.#a.signal,{role:"region"})}disconnectedCallback(){this.#p(),this.#a?.abort(),this.#a=null,this.#I(),this.#b?.disconnect(),this.#b=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#e)return;if(e==="link-schemes")return void(this.#e.schemes=ii(r));if(e==="searchable")return void(this.#e.searchable=r!==null);if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#p(),this.#e.editing=null}#c(e){for(let t of this.#e?.columns??[]){if(w(t.id,e))return t;for(let r of t.cards)if(w(r.id,e)||C(r).some((n)=>w(n.id,e)))return r}return null}#g(e){let t="card"in e&&e.card!=null&&e.type!=="toggle"&&e.type!=="remove"?this.#c(e.card):null;if(t){if(t.updated=new Date().toISOString(),e.type==="add")t.created=t.updated}let r=this.#l,n=Date.now();if(e.type!=="toggle"){let i=e.type==="edit"?JSON.stringify([e.card,e.column,e.field,e.subtask]):"";if(r.now&&!(i&&i===r.key&&n-r.at<1000)){if(r.past.push(r.now),r.past.length>100)r.past.shift()}r.future=[],r.key=i,r.at=n}r.now=this.columns,this.#_(e)}#A(e,t,r){let n=this,i=(a)=>this.#g(a),o=(a)=>{for(let l of s.columns){let c=l.cards.findIndex((d)=>w(d.id,a));if(c>=0)return{column:l,index:c,card:l.cards[c]}}return null},s=Gn({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,searchable:n.hasAttribute("searchable"),searching:!1,schemes:ii(n.getAttribute("link-schemes")),viewed:{},tokensOf:st,subtasksOf:C,commentsOf:rt,now:Date.now(),ago(a){return da(a,s.now)},label(a){let l=String(a??"");return l.replace(la,"").trim()||l},pressed(a){return String(s.filter.includes(a))},mention(a){return a.startsWith("@")?"":null},starred(a){return String(!!a.starred)},hasDetails(a){return!!(a.description||C(a).length||rt(a).length)},complete(a){let l=C(a).length;return l>0&&s.done(a)===l},preview(a){let l=String(a.description??"");return l.split(`
308
- `).map((d)=>si(d,s.schemes)).find((d)=>d.trim())?.trim()??(lr(l,s.schemes).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(a){return si(s.label(a),s.schemes)},rich(a,l){ga(a,String(l??""),s.schemes)},keyText(a,l,c,d){if(a.target!==a.currentTarget||a.key!=="Enter"&&a.key!==" ")return;a.preventDefault(),a.stopPropagation(),s.edit(l,c,d)},isOpen(a){let l=s.viewed[String(a.id)];return s.readonly&&l!==void 0?l:!!a.expanded},expanded(a){return String(s.isOpen(a))},isEditing(a,l){return!!s.editing&&s.editing.field===a&&s.editing.id===l},focusEditor(a){queueMicrotask(()=>n.#S(a))},blurEditor(a,l){if(s.isEditing(a,l))s.commit()},tokens(){let a=new Set;for(let l of s.columns)for(let c of l.cards)for(let d of st(c))a.add(d);return[...a].sort()},visible(a){let l=ua(s.search);if(!s.filter.length&&!l.length)return a.cards;let c=s.editing&&n.#c(s.editing.id);return a.cards.filter((d)=>{if(d===c||s.kept.some((b)=>w(d.id,b)))return!0;let u=st(d),p=l.length?fa(d):"";return s.filter.every((b)=>u.includes(b))&&l.every((b)=>p.includes(b))})},count(a){let l=s.visible(a).length;return l===a.cards.length?String(l):`${l}/${a.cards.length}`},done(a){return C(a).filter((l)=>l.done).length},disclosable(a){return!!(s.hasDetails(a)||!s.readonly)},toggleFilter(a){s.kept=[],s.filter=s.filter.includes(a)?s.filter.filter((l)=>l!==a):[...s.filter,a]},setFilter(a){s.kept=[],s.filter=a},searchShown(){return s.searching||!!s.search},openSearch(){s.searching=!0;let a=n.querySelector(".b3-board-search-input");if(!a)return;a.hidden=!1,a.closest(".b3-board-filters").hidden=!1,a.focus(),a.select()},typeSearch(a){n.search=a.target.value},keySearch(a){if(a.isComposing||a.keyCode===229)return;if(a.key!=="Escape"&&a.key!=="Enter")return;a.preventDefault(),a.stopPropagation();let l=a.target;if(a.key==="Escape")l.value="",n.search="";l.blur()},blurSearch(){s.searching=!1},toggleStar(a){let l=o(a.id);if(s.readonly||!l)return;if(a.starred)delete a.starred;else a.starred=!0;l.column.cards=li(l.column.cards);let c=!!a.starred;s.announcement=`${a.title??""} ${c?"starred":"unstarred"}`,i({type:"star",card:a.id,starred:c}),n.#T(a.id)},toggle(a){if(s.readonly){s.viewed={...s.viewed,[String(a.id)]:!s.isOpen(a)};return}a.expanded=!a.expanded,i({type:"toggle",card:a.id,expanded:a.expanded})},edit(a,l,c,d=!1,u=!1,p=!1){if(s.readonly||n.#r?.started)return;if(s.editing&&!s.isEditing(a,l))s.commit();s.editing={field:a,id:l,draft:c??"",fresh:d,opened:u,atEnd:p},n.#C()},addDetails(a,l=!1){if(s.readonly)return;let c=!a.expanded;a.expanded=!0,s.edit("description",a.id,String(a.description??""),!1,c,l)},keyEditor(a,l){if(a.stopPropagation(),a.key==="Escape")a.preventDefault(),s.cancel();else if(a.key==="Enter"&&!(l&&a.shiftKey)&&!a.isComposing)a.preventDefault(),s.commit(!0)},pasteEditor(a,l,c){let d=[...a.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(s.readonly||!n.upload||l!=="title"&&l!=="description"||!d.length)return;if(a.clipboardData?.getData("text/plain").trim())return;a.preventDefault();for(let u of d)n.#d(c,u,l==="description"?a.target:null)},cancel(){let a=s.editing;if(s.editing=null,a?.fresh)s.discard(a);if(a?.opened)s.close(a);n.#O(a)},close(a){let l=n.#c(a.id);if(l&&!s.hasDetails(l))l.expanded=!1},commit(a=!1){let l=s.editing;if(!l)return;if(s.editing=null,s.readonly)return;let c=l.field==="description"||l.field==="comment"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),d=n.#c(l.id);if(!d)return;if(!c&&l.fresh)return s.discard(l);if(!c&&l.opened)s.close(l);let u=null;if(l.field==="comment"){let b=d;if(c){let m={id:Ie(),at:new Date().toISOString(),by:n.getAttribute("author")||"you",text:c};b.comments=[...rt(b),m],u={type:"comment",card:b.id,comment:m.id,op:"add"}}}else if(l.field==="name"){let b=d;if(c&&c!==b.name)b.name=c,u={type:"edit",column:b.id,field:"name"};if(l.fresh)u={type:"add",column:b.id}}else if(l.field==="subtask"){let b=d,m=C(b).find((h)=>w(h.id,l.id));if(!c)return s.removeSubtask(b,m);if(c!==m.title)m.title=c,u={type:"edit",card:b.id,field:"subtask",subtask:m.id};if(l.fresh)u={type:"subtask",card:b.id,subtask:m.id,op:"add"}}else{let b=d,m=l.field;if((c||m==="description")&&c!==(b[m]??""))b[m]=c,u={type:"edit",card:b.id,field:m};if(l.fresh)u={type:"add",card:b.id,column:o(b.id).column.id},s.kept=[...s.kept,b.id]}if(u)i(u);let p=n.#c(l.id)??d;if(l.fresh&&l.field==="subtask"&&a)s.addSubtask(p);else if(l.fresh&&l.field==="title"&&a&&!n.hasAttribute("compact"))s.addDetails(p,!0);else n.#O(l)},discard(a){ri(s.columns,a)},settle(){if(s.editing)s.commit()},addCard(a){if(s.readonly)return;s.settle();let l={id:Ie(),title:""};a.cards.push(l),s.edit("title",l.id,"",!0)},addColumn(){if(s.readonly)return;s.settle();let a={id:Ie(),name:"",cards:[]};s.columns.push(a),s.edit("name",a.id,"",!0)},addSubtask(a){if(s.readonly)return;s.settle();let l={id:Ie(),title:"",done:!1};if(a.expanded=!0,!Array.isArray(a.subtasks))a.subtasks=[];a.subtasks.push(l),s.edit("subtask",l.id,"",!0)},removeCard(a,l){if(s.readonly)return;a.cards=a.cards.filter((c)=>c!==l),i({type:"remove",card:l.id,column:a.id})},removeColumn(a){if(s.readonly)return;s.columns=s.columns.filter((l)=>l!==a),i({type:"remove",column:a.id})},removeSubtask(a,l){if(s.readonly)return;a.subtasks=C(a).filter((c)=>c!==l),i({type:"subtask",card:a.id,subtask:l.id,op:"remove"})},removeComment(a,l){if(s.readonly)return;a.comments=rt(a).filter((c)=>c!==l),i({type:"comment",card:a.id,comment:l.id,op:"remove"})},check(a,l,c){if(s.readonly)return;l.done=c,i({type:"check",card:a.id,subtask:l.id,done:c})},keyCard(a,l){if(a.target!==a.currentTarget)return;if(a.key==="Enter")return a.preventDefault(),s.edit("title",l.id,l.title);if(!a.altKey||s.readonly)return;let c=o(l.id);if(!c)return;let d=getComputedStyle(n).direction==="rtl",u={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[a.key];if(!u)return;if(a.preventDefault(),a.key==="ArrowUp"||a.key==="ArrowDown"){let b=s.visible(c.column),m=b[b.indexOf(c.card)+u];if(m&&!m.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(m));return}let p=s.columns[s.columns.indexOf(c.column)+u];if(p)n.moveCard(l.id,p.id,Math.min(c.index,p.cards.length))},keySubtask(a,l,c){s.keyText(a,"subtask",c.id,c.title);let d=a.key==="ArrowUp"?-1:a.key==="ArrowDown"?1:0;if(!a.altKey||!d||s.readonly)return;a.preventDefault(),a.stopPropagation(),n.#f(l,c.id,C(l).indexOf(c)+d)},keyColumn(a,l){if(!a.altKey||s.readonly)return;let c=getComputedStyle(n).direction==="rtl",d=a.key==="ArrowLeft"?c?1:-1:a.key==="ArrowRight"?c?-1:1:0;if(!d)return;a.preventDefault();let u=s.columns.indexOf(l)+d;if(u>=0&&u<s.columns.length)n.moveColumn(l.id,u)}});return s}async#d(e,t,r){let n=this.#e,i=()=>n.editing?.field==="description"&&w(n.editing.id,e)?n.editing:null,o=`![Uploading image ${this.#v}-${++this.#E}…]()`,s="",a=i();if(a&&r){let{selectionStart:f,selectionEnd:x}=r;s=f&&r.value[f-1]!==`
315
+ <span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class ui extends Ne{static observedAttributes=["readonly","search","link-schemes","searchable"];#t=null;#e=null;#n=null;#o=null;#s=null;#i=!1;#a=null;#b=null;#r=null;#x=!1;#v=null;#E=0;#y=Math.random().toString(36).slice(2,8);#m=!1;#k=[];#l={past:[],future:[],now:null,key:"",at:0};#h=!1;get columns(){let e=or(this.#e?.columns??this.#n??[]),t=this.#e?.editing;if(t?.fresh)ri(e,t);return e}set columns(e){let t=ar(or(e));if(!this.#e){this.#n=t;return}this.#p();let r=this.#e;if(r.editing?.fresh)ha(r.columns,t,r.editing);if(r.columns=t,r.editing&&!this.#c(r.editing.id))r.editing=null;if(!this.#h)this.#l={past:[],future:[],now:null,key:"",at:0};this.#l.now=this.columns}undo(){return this.#w(-1)}openSearch(){if(!this.#e?.searchable)return!1;return this.#e.openSearch(),!0}redo(){return this.#w(1)}get canUndo(){return!this.readonly&&(this.#l.past.length>0||!!this.#e?.editing)}get canRedo(){return!this.readonly&&this.#l.future.length>0}#w(e){let t=this.#e;if(!t||this.readonly)return!1;t.settle();let r=this.#l,i=(e<0?r.past:r.future).pop();if(!i||!r.now)return!1;(e<0?r.future:r.past).push(r.now),r.key="";let o=new Map(t.columns.flatMap((a)=>a.cards.map((l)=>[String(l.id),l.expanded]))),s=ar(or(i));for(let a of s)for(let l of a.cards){let c=o.get(String(l.id));if(o.has(String(l.id)))if(c)l.expanded=!0;else delete l.expanded}return this.#p(),t.columns=s,r.now=this.columns,this.#u(e<0?"Undone":"Redone"),this.#_({type:e<0?"undo":"redo"}),!0}#_(e){this.#h=!0;try{this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}finally{this.#h=!1}}get filter(){return[...this.#e?.filter??this.#o??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e){if(t.join(" ")!==this.#e.filter.join(" "))this.#e.kept=[];this.#e.filter=t}else this.#o=t}get search(){return this.#e?.search??this.#s??""}set search(e){let t=String(e??"");if(this.#e){if(t!==this.#e.search)this.#e.kept=[];this.#e.search=t}else this.#s=t}get defaultColumn(){return this.getAttribute("default-column")??""}set defaultColumn(e){if(e)this.setAttribute("default-column",String(e));else this.removeAttribute("default-column")}addCard(e){let t=this.#e;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((o)=>x(o.id,r))??t.columns.find((o)=>String(o.name??"").trim().toLowerCase()===n))||(e===void 0?t.columns[0]:void 0);if(!i)return!1;return t.addCard(i),!0}get upload(){return this.#v}set upload(e){this.#v=typeof e==="function"?e:null}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","search","defaultColumn","readonly","upload"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#t&&e.readyState==="loading"){if(!this.#i)this.#i=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#i=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(Be(e,ya,wa),ei(),!this.#t){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=ar(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#t=e.createElement("div"),this.#t.className="b3-board-ui",this.append(this.#t),this.#e=Zn(this.#t,Ca,this.#A(r??[],this.#o??[],this.#s??this.getAttribute("search")??"")),this.#n=this.#o=this.#s=null,this.#l.now=this.columns}else if(this.#t.parentNode!==this)this.append(this.#t);this.#b=new MutationObserver(()=>{if(this.#t&&this.#t.parentNode!==this)this.append(this.#t)}),this.#b.observe(this,{childList:!0}),this.#M(),hr(this,this.#a.signal,{role:"region"})}disconnectedCallback(){this.#p(),this.#a?.abort(),this.#a=null,this.#I(),this.#b?.disconnect(),this.#b=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#e)return;if(e==="link-schemes")return void(this.#e.schemes=si(r));if(e==="searchable")return void(this.#e.searchable=r!==null);if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#p(),this.#e.editing=null}#c(e){for(let t of this.#e?.columns??[]){if(x(t.id,e))return t;for(let r of t.cards)if(x(r.id,e)||A(r).some((n)=>x(n.id,e)))return r}return null}#g(e){let t="card"in e&&e.card!=null&&e.type!=="toggle"&&e.type!=="remove"?this.#c(e.card):null;if(t){if(t.updated=new Date().toISOString(),e.type==="add")t.created=t.updated}let r=this.#l,n=Date.now();if(e.type!=="toggle"){let i=e.type==="edit"?JSON.stringify([e.card,e.column,e.field,e.subtask]):"";if(r.now&&!(i&&i===r.key&&n-r.at<1000)){if(r.past.push(r.now),r.past.length>100)r.past.shift()}r.future=[],r.key=i,r.at=n}r.now=this.columns,this.#_(e)}#A(e,t,r){let n=this,i=(a)=>this.#g(a),o=(a)=>{for(let l of s.columns){let c=l.cards.findIndex((d)=>x(d.id,a));if(c>=0)return{column:l,index:c,card:l.cards[c]}}return null},s=Xn({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,searchable:n.hasAttribute("searchable"),searching:!1,schemes:si(n.getAttribute("link-schemes")),viewed:{},tokensOf:st,subtasksOf:A,commentsOf:he,hits:ni,said(a){return he(a).some((l)=>ni(s.search,l))},now:Date.now(),ago(a){return fa(a,s.now)},label(a){let l=String(a??"");return l.replace(da,"").trim()||l},pressed(a){return String(s.filter.includes(a))},mention(a){return a.startsWith("@")?"":null},starred(a){return String(!!a.starred)},hasDetails(a){return!!(a.description||A(a).length||he(a).length)},complete(a){let l=A(a).length;return l>0&&s.done(a)===l},preview(a){let l=String(a.description??"");return l.split(`
316
+ `).map((d)=>oi(d,s.schemes)).find((d)=>d.trim())?.trim()??(cr(l,s.schemes).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(a){return oi(s.label(a),s.schemes)},rich(a,l){va(a,String(l??""),s.schemes)},keyText(a,l,c,d){if(a.target!==a.currentTarget||a.key!=="Enter"&&a.key!==" ")return;a.preventDefault(),a.stopPropagation(),s.edit(l,c,d)},isOpen(a){let l=s.viewed[String(a.id)];return s.readonly&&l!==void 0?l:!!a.expanded},expanded(a){return String(s.isOpen(a))},isEditing(a,l){return!!s.editing&&s.editing.field===a&&s.editing.id===l},focusEditor(a){queueMicrotask(()=>n.#S(a))},blurEditor(a,l){if(s.isEditing(a,l))s.commit()},tokens(){let a=new Set;for(let l of s.columns)for(let c of l.cards)for(let d of st(c))a.add(d);return[...a].sort()},visible(a){let l=di(s.search);if(!s.filter.length&&!l.length)return a.cards;let c=s.editing&&n.#c(s.editing.id);return a.cards.filter((d)=>{if(d===c||s.kept.some((b)=>x(d.id,b)))return!0;let u=st(d),p=l.length?pa(d):"";return s.filter.every((b)=>u.includes(b))&&l.every((b)=>p.includes(b))})},count(a){let l=s.visible(a).length;return l===a.cards.length?String(l):`${l}/${a.cards.length}`},done(a){return A(a).filter((l)=>l.done).length},disclosable(a){return!!(s.hasDetails(a)||!s.readonly)},toggleFilter(a){s.kept=[],s.filter=s.filter.includes(a)?s.filter.filter((l)=>l!==a):[...s.filter,a]},setFilter(a){s.kept=[],s.filter=a},searchShown(){return s.searching||!!s.search},openSearch(){s.searching=!0;let a=n.querySelector(".b3-board-search-input");if(!a)return;a.hidden=!1,a.closest(".b3-board-filters").hidden=!1,a.focus(),a.select()},typeSearch(a){n.search=a.target.value},keySearch(a){if(a.isComposing||a.keyCode===229)return;if(a.key!=="Escape"&&a.key!=="Enter")return;a.preventDefault(),a.stopPropagation();let l=a.target;if(a.key==="Escape")l.value="",n.search="";l.blur()},blurSearch(){s.searching=!1},toggleStar(a){let l=o(a.id);if(s.readonly||!l)return;if(a.starred)delete a.starred;else a.starred=!0;l.column.cards=ci(l.column.cards);let c=!!a.starred;s.announcement=`${a.title??""} ${c?"starred":"unstarred"}`,i({type:"star",card:a.id,starred:c}),n.#T(a.id)},toggle(a){if(s.readonly){s.viewed={...s.viewed,[String(a.id)]:!s.isOpen(a)};return}a.expanded=!a.expanded,i({type:"toggle",card:a.id,expanded:a.expanded})},edit(a,l,c,d=!1,u=!1,p=!1){if(s.readonly||n.#r?.started)return;if(s.editing&&!s.isEditing(a,l))s.commit();s.editing={field:a,id:l,draft:c??"",fresh:d,opened:u,atEnd:p},n.#C()},addDetails(a,l=!1){if(s.readonly)return;let c=!a.expanded;a.expanded=!0,s.edit("description",a.id,String(a.description??""),!1,c,l)},keyEditor(a,l){if(a.stopPropagation(),a.key==="Escape")a.preventDefault(),s.cancel();else if(a.key==="Enter"&&!(l&&a.shiftKey)&&!a.isComposing)a.preventDefault(),s.commit(!0)},pasteEditor(a,l,c){let d=[...a.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(s.readonly||!n.upload||l!=="title"&&l!=="description"||!d.length)return;if(a.clipboardData?.getData("text/plain").trim())return;a.preventDefault();for(let u of d)n.#d(c,u,l==="description"?a.target:null)},cancel(){let a=s.editing;if(s.editing=null,a?.fresh)s.discard(a);if(a?.opened)s.close(a);n.#O(a)},close(a){let l=n.#c(a.id);if(l&&!s.hasDetails(l))l.expanded=!1},commit(a=!1){let l=s.editing;if(!l)return;if(s.editing=null,s.readonly)return;let c=l.field==="description"||l.field==="comment"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),d=n.#c(l.id);if(!d)return;if(!c&&l.fresh)return s.discard(l);if(!c&&l.opened)s.close(l);let u=null;if(l.field==="comment"){let b=d;if(c){let m={id:Le(),at:new Date().toISOString(),by:n.getAttribute("author")||"you",text:c};b.comments=[...he(b),m],u={type:"comment",card:b.id,comment:m.id,op:"add"}}}else if(l.field==="name"){let b=d;if(c&&c!==b.name)b.name=c,u={type:"edit",column:b.id,field:"name"};if(l.fresh)u={type:"add",column:b.id}}else if(l.field==="subtask"){let b=d,m=A(b).find((h)=>x(h.id,l.id));if(!c)return s.removeSubtask(b,m);if(c!==m.title)m.title=c,u={type:"edit",card:b.id,field:"subtask",subtask:m.id};if(l.fresh)u={type:"subtask",card:b.id,subtask:m.id,op:"add"}}else{let b=d,m=l.field;if((c||m==="description")&&c!==(b[m]??""))b[m]=c,u={type:"edit",card:b.id,field:m};if(l.fresh)u={type:"add",card:b.id,column:o(b.id).column.id},s.kept=[...s.kept,b.id]}if(u)i(u);let p=n.#c(l.id)??d;if(l.fresh&&l.field==="subtask"&&a)s.addSubtask(p);else if(l.fresh&&l.field==="title"&&a&&!n.hasAttribute("compact"))s.addDetails(p,!0);else n.#O(l)},discard(a){ri(s.columns,a)},settle(){if(s.editing)s.commit()},addCard(a){if(s.readonly)return;s.settle();let l={id:Le(),title:""};a.cards.push(l),s.edit("title",l.id,"",!0)},addColumn(){if(s.readonly)return;s.settle();let a={id:Le(),name:"",cards:[]};s.columns.push(a),s.edit("name",a.id,"",!0)},addSubtask(a){if(s.readonly)return;s.settle();let l={id:Le(),title:"",done:!1};if(a.expanded=!0,!Array.isArray(a.subtasks))a.subtasks=[];a.subtasks.push(l),s.edit("subtask",l.id,"",!0)},removeCard(a,l){if(s.readonly)return;a.cards=a.cards.filter((c)=>c!==l),i({type:"remove",card:l.id,column:a.id})},removeColumn(a){if(s.readonly)return;s.columns=s.columns.filter((l)=>l!==a),i({type:"remove",column:a.id})},removeSubtask(a,l){if(s.readonly)return;a.subtasks=A(a).filter((c)=>c!==l),i({type:"subtask",card:a.id,subtask:l.id,op:"remove"})},removeComment(a,l){if(s.readonly)return;a.comments=he(a).filter((c)=>c!==l),i({type:"comment",card:a.id,comment:l.id,op:"remove"})},check(a,l,c){if(s.readonly)return;l.done=c,i({type:"check",card:a.id,subtask:l.id,done:c})},keyCard(a,l){if(a.target!==a.currentTarget)return;if(a.key==="Enter")return a.preventDefault(),s.edit("title",l.id,l.title);if(!a.altKey||s.readonly)return;let c=o(l.id);if(!c)return;let d=getComputedStyle(n).direction==="rtl",u={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[a.key];if(!u)return;if(a.preventDefault(),a.key==="ArrowUp"||a.key==="ArrowDown"){let b=s.visible(c.column),m=b[b.indexOf(c.card)+u];if(m&&!m.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(m));return}let p=s.columns[s.columns.indexOf(c.column)+u];if(p)n.moveCard(l.id,p.id,Math.min(c.index,p.cards.length))},keySubtask(a,l,c){s.keyText(a,"subtask",c.id,c.title);let d=a.key==="ArrowUp"?-1:a.key==="ArrowDown"?1:0;if(!a.altKey||!d||s.readonly)return;a.preventDefault(),a.stopPropagation(),n.#f(l,c.id,A(l).indexOf(c)+d)},keyColumn(a,l){if(!a.altKey||s.readonly)return;let c=getComputedStyle(n).direction==="rtl",d=a.key==="ArrowLeft"?c?1:-1:a.key==="ArrowRight"?c?-1:1:0;if(!d)return;a.preventDefault();let u=s.columns.indexOf(l)+d;if(u>=0&&u<s.columns.length)n.moveColumn(l.id,u)}});return s}async#d(e,t,r){let n=this.#e,i=()=>n.editing?.field==="description"&&x(n.editing.id,e)?n.editing:null,o=`![Uploading image ${this.#y}-${++this.#E}…]()`,s="",a=i();if(a&&r){let{selectionStart:f,selectionEnd:v}=r;s=f&&r.value[f-1]!==`
309
317
  `?`
310
- ${o}`:o,a.draft=r.value=r.value.slice(0,f)+s+r.value.slice(x),r.setSelectionRange(f+s.length,f+s.length)}let l=n.columns.find((f)=>f.cards.some((x)=>w(x.id,e))),c=null;try{c=await this.#y?.(t,{card:e,column:l?.id})}catch(f){console.warn("b3-board: image upload failed",f)}let d=c?`![](${String(c).replace(/[\s()]/g,(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!d)this.#u("Image not added");while(this.#m)await new Promise((f)=>this.#k.push(f));let u=(f)=>{if(!s)return null;let x=f.indexOf(s),H=x>=0?x:f.indexOf(o);if(H<0)return null;let ie=x>=0?s:o;return[H,H+ie.length,d?ie.replace(o,d):""]},p=(f)=>{if(!s)return d?f.trim()?`${f.replace(/\s+$/,"")}
311
- ${d}`:d:f;let x=u(f);return x?f.slice(0,x[0])+x[2]+f.slice(x[1]):f},b=i();if(b){let f=this.querySelector("textarea.b3-board-editor"),x=f?.value===b.draft&&u(f.value);if(f&&x){let[H,ie,ot]=x,{selectionStart:di,selectionEnd:ui,selectionDirection:fi}=f,cr=(Le)=>Le>=ie?Le+ot.length-(ie-H):Le>H?H+ot.length:Le;f.setRangeText(ot,H,ie),f.setSelectionRange(cr(di),cr(ui),fi??void 0),b.draft=f.value}else if(p(b.draft)!==b.draft)b.draft=p(b.draft);else if(d)this.#u("Image not added");return}let m=this.#c(e);if(s&&!String(m?.description??"").includes(o))m=n.columns.flatMap((f)=>f.cards).find((f)=>String(f.description??"").includes(o))??m;let h=String(m?.description??""),g=p(h).trim();if(!m||this.readonly||g===h.trim()){if(d)this.#u("Image not added");return}m.description=g,m.expanded=!0,this.#g({type:"edit",card:m.id,field:"description"})}#u(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((p)=>w(p.id,e))),o=n.columns.find((u)=>w(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>w(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(o.cards.length,r)),d=a.starred?Math.min(c,l):Math.max(c,l);if(o.cards.splice(d,0,a),i===o&&s===d)return!1;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${d+1} of ${o.cards.length}`,this.#g({type:"move",card:a.id,from:i.id,to:o.id,index:d}),this.#T(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>w(s.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),o=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(o,0,i),n===o)return!1;return r.announcement=`${i.name??""} moved to position ${o+1} of ${r.columns.length}`,this.#g({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#f(e,t,r){let n=this.#e,i=C(e),o=i.findIndex((l)=>w(l.id,t));if(!n||this.readonly||o<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(o===s)return!1;let[a]=i.splice(o,1);return i.splice(s,0,a),n.announcement=`${a.title??""} moved to position ${s+1} of ${i.length}`,this.#g({type:"subtask",card:e.id,subtask:a.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(a.id))}"] .b3-board-title`)?.focus()),!0}#S(e){if(!e.isConnected)return;if(e.focus({preventScroll:!0}),this.#e?.editing?.atEnd)e.setSelectionRange(e.value.length,e.value.length);else e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,o=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),s=o(),a=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=o(),c=l.scale===s.scale&&l.height<s.height;if(s=l,!c)return;if(r(),t!==e)e.scrollIntoView({block:"nearest",inline:"nearest"})};for(let l of[n,n.visualViewport])l?.addEventListener("resize",a,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#C(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#t?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#t?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#T(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#O(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#M(){this.#a?.abort(),this.#a=new AbortController;let e=this.#a.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#e)this.#e.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(o)=>this.#$(o),{signal:e}),t.addEventListener("pointermove",(o)=>this.#R(o),{signal:e}),t.addEventListener("pointerup",(o)=>this.#z(o),{signal:e}),t.addEventListener("pointercancel",(o)=>{if(o.pointerId===this.#r?.pointerId)this.#p()},{signal:e}),t.addEventListener("keydown",(o)=>{if(o.key==="Escape"&&this.#r?.started)o.preventDefault(),this.#p()},{signal:e}),this.addEventListener("touchmove",(o)=>{if(this.#r?.started)o.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(o)=>{if(this.#r)o.preventDefault()},{signal:e}),this.addEventListener("click",(o)=>{if(!this.#x)return;this.#x=!1,o.preventDefault(),o.stopImmediatePropagation()},{signal:e,capture:!0}),this.addEventListener("keydown",(o)=>{if(o.defaultPrevented||o.altKey||!(o.metaKey||o.ctrlKey))return;if(o.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let s=o.key.toLowerCase(),a=s==="y"||s==="z"&&o.shiftKey;if(s!=="z"&&s!=="y")return;if(o.preventDefault(),a)this.redo();else this.undo()},{signal:e});let n=(o)=>this.#B(o);this.addEventListener("click",n,{signal:e,capture:!0}),this.addEventListener("auxclick",(o)=>{if(o.button===1)n(o)},{signal:e,capture:!0});let i=()=>this.#I();this.addEventListener("compositionstart",()=>{this.#m=!0},{signal:e}),this.addEventListener("compositionend",i,{signal:e}),this.addEventListener("focusout",i,{signal:e})}#I(){this.#m=!1;for(let e of this.#k.splice(0))e()}#B(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#e?.columns.find((c)=>w(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>w(c.id,r("[data-card]")?.dataset.card)),o=i&&C(i).find((c)=>w(c.id,r("[data-subtask]")?.dataset.subtask)),s={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(o)s.subtask=o.id;let a=t.querySelector("img");if(a&&!s.newTab&&e.type==="click"){e.preventDefault(),this.#P(t,a,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#P(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),ir();let i=n.createElement("b3-image-viewer");i.className="b3-board-lightbox",i.setAttribute("alt",t.alt||"Image"),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let o=n.createElement("img");o.src=t.currentSrc||t.src,o.alt=t.alt;let s=n.createElement("button");s.type="button",s.className="b3-board-lightbox-open",s.textContent="Open",i.append(o,s);let a=n.activeElement,l=[...n.body.children].filter((d)=>d instanceof HTMLElement&&!d.inert),c=()=>{i.remove();for(let d of l)d.inert=!1;if(e.isConnected)e.focus({preventScroll:!0});else a?.focus?.({preventScroll:!0})};i.addEventListener("b3-close",c),i.addEventListener("click",(d)=>{if(d.target===i)c()}),s.addEventListener("pointerdown",(d)=>d.stopPropagation()),s.addEventListener("click",(d)=>{if(d.stopPropagation(),c(),e.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:{...r}}))&&!r.file)this.ownerDocument.defaultView?.open(r.href,"_blank","noopener")}),n.body.append(i);for(let d of l)d.inert=!0;i.setAttribute("open",""),i.focus({preventScroll:!0})}#$(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#L(e.clientX,e.clientY)},ca)}#L(e,t){let r=this.#r;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let s of[i,...i.querySelectorAll("[id]")])s.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#t.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#r!==r)return;this.#U(r.px,r.py),this.#H(this.#D(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#R(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#p();return}if(r<5)return;this.#L(e.clientX,e.clientY)}e.preventDefault(),t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#z(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#p();let r=this.#D(e.clientX,e.clientY);if(this.#p(),this.#x=!0,setTimeout(()=>{this.#x=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>w(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((c)=>w(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>w(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>w(l.id,t.id));if(o===i&&a<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#c(t.card);if(!i)return;let o=C(i),s=r.before?o.findIndex((a)=>w(a.id,r.before)):o.length;if(o.findIndex((a)=>w(a.id,t.id))<s)s-=1;this.#f(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>w(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>w(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#D(e,t){let r=this.#r,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#N(e,n);if(!l)return null;let c=l.querySelector(".b3-board-cards"),d=[...c.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=d.find((b)=>{let m=b.getBoundingClientRect();return t<m.top+m.height/2}),p=(b)=>!!(b!=null&&this.#c(b)?.starred);if(p(u?.dataset.card)!==p(r.id)&&(u||p(r.id)))u=d.find((b)=>!p(b.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:c}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let p=u.getBoundingClientRect();return t<p.top+p.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.find((l)=>{let c=l.getBoundingClientRect();return s?e>c.left+c.width/2:e<c.left+c.width/2})?.dataset.column??null,list:i}}#H(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#r.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#N(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#U(e,t){let r=(s,a,l)=>s<a+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#r?.kind==="card"?this.#N(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let o=this.ownerDocument.defaultView;o.scrollBy(0,r(t,0,o.innerHeight))}#p(){let e=this.#r;if(!e)return;this.#r=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}ur("b3-board",ci);export{ci as B3Board};
318
+ ${o}`:o,a.draft=r.value=r.value.slice(0,f)+s+r.value.slice(v),r.setSelectionRange(f+s.length,f+s.length)}let l=n.columns.find((f)=>f.cards.some((v)=>x(v.id,e))),c=null;try{c=await this.#v?.(t,{card:e,column:l?.id})}catch(f){console.warn("b3-board: image upload failed",f)}let d=c?`![](${String(c).replace(/[\s()]/g,(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!d)this.#u("Image not added");while(this.#m)await new Promise((f)=>this.#k.push(f));let u=(f)=>{if(!s)return null;let v=f.indexOf(s),H=v>=0?v:f.indexOf(o);if(H<0)return null;let ie=v>=0?s:o;return[H,H+ie.length,d?ie.replace(o,d):""]},p=(f)=>{if(!s)return d?f.trim()?`${f.replace(/\s+$/,"")}
319
+ ${d}`:d:f;let v=u(f);return v?f.slice(0,v[0])+v[2]+f.slice(v[1]):f},b=i();if(b){let f=this.querySelector("textarea.b3-board-editor"),v=f?.value===b.draft&&u(f.value);if(f&&v){let[H,ie,ot]=v,{selectionStart:fi,selectionEnd:hi,selectionDirection:pi}=f,dr=(De)=>De>=ie?De+ot.length-(ie-H):De>H?H+ot.length:De;f.setRangeText(ot,H,ie),f.setSelectionRange(dr(fi),dr(hi),pi??void 0),b.draft=f.value}else if(p(b.draft)!==b.draft)b.draft=p(b.draft);else if(d)this.#u("Image not added");return}let m=this.#c(e);if(s&&!String(m?.description??"").includes(o))m=n.columns.flatMap((f)=>f.cards).find((f)=>String(f.description??"").includes(o))??m;let h=String(m?.description??""),g=p(h).trim();if(!m||this.readonly||g===h.trim()){if(d)this.#u("Image not added");return}m.description=g,m.expanded=!0,this.#g({type:"edit",card:m.id,field:"description"})}#u(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((p)=>x(p.id,e))),o=n.columns.find((u)=>x(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>x(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(o.cards.length,r)),d=a.starred?Math.min(c,l):Math.max(c,l);if(o.cards.splice(d,0,a),i===o&&s===d)return!1;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${d+1} of ${o.cards.length}`,this.#g({type:"move",card:a.id,from:i.id,to:o.id,index:d}),this.#T(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>x(s.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),o=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(o,0,i),n===o)return!1;return r.announcement=`${i.name??""} moved to position ${o+1} of ${r.columns.length}`,this.#g({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#f(e,t,r){let n=this.#e,i=A(e),o=i.findIndex((l)=>x(l.id,t));if(!n||this.readonly||o<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(o===s)return!1;let[a]=i.splice(o,1);return i.splice(s,0,a),n.announcement=`${a.title??""} moved to position ${s+1} of ${i.length}`,this.#g({type:"subtask",card:e.id,subtask:a.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(a.id))}"] .b3-board-title`)?.focus()),!0}#S(e){if(!e.isConnected)return;if(e.focus({preventScroll:!0}),this.#e?.editing?.atEnd)e.setSelectionRange(e.value.length,e.value.length);else e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,o=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),s=o(),a=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=o(),c=l.scale===s.scale&&l.height<s.height;if(s=l,!c)return;if(r(),t!==e)e.scrollIntoView({block:"nearest",inline:"nearest"})};for(let l of[n,n.visualViewport])l?.addEventListener("resize",a,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#C(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#t?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#t?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#T(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#O(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#M(){this.#a?.abort(),this.#a=new AbortController;let e=this.#a.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#e)this.#e.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(o)=>this.#$(o),{signal:e}),t.addEventListener("pointermove",(o)=>this.#R(o),{signal:e}),t.addEventListener("pointerup",(o)=>this.#z(o),{signal:e}),t.addEventListener("pointercancel",(o)=>{if(o.pointerId===this.#r?.pointerId)this.#p()},{signal:e}),t.addEventListener("keydown",(o)=>{if(o.key==="Escape"&&this.#r?.started)o.preventDefault(),this.#p()},{signal:e}),this.addEventListener("touchmove",(o)=>{if(this.#r?.started)o.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(o)=>{if(this.#r)o.preventDefault()},{signal:e}),this.addEventListener("click",(o)=>{if(!this.#x)return;this.#x=!1,o.preventDefault(),o.stopImmediatePropagation()},{signal:e,capture:!0}),this.addEventListener("keydown",(o)=>{if(o.defaultPrevented||o.altKey||!(o.metaKey||o.ctrlKey))return;if(o.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let s=o.key.toLowerCase(),a=s==="y"||s==="z"&&o.shiftKey;if(s!=="z"&&s!=="y")return;if(o.preventDefault(),a)this.redo();else this.undo()},{signal:e});let n=(o)=>this.#B(o);this.addEventListener("click",n,{signal:e,capture:!0}),this.addEventListener("auxclick",(o)=>{if(o.button===1)n(o)},{signal:e,capture:!0});let i=()=>this.#I();this.addEventListener("compositionstart",()=>{this.#m=!0},{signal:e}),this.addEventListener("compositionend",i,{signal:e}),this.addEventListener("focusout",i,{signal:e})}#I(){this.#m=!1;for(let e of this.#k.splice(0))e()}#B(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#e?.columns.find((c)=>x(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>x(c.id,r("[data-card]")?.dataset.card)),o=i&&A(i).find((c)=>x(c.id,r("[data-subtask]")?.dataset.subtask)),s={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(o)s.subtask=o.id;let a=t.querySelector("img");if(a&&!s.newTab&&e.type==="click"){e.preventDefault(),this.#P(t,a,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#P(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),sr();let i=n.createElement("b3-image-viewer");i.className="b3-board-lightbox",i.setAttribute("alt",t.alt||"Image"),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let o=n.createElement("img");o.src=t.currentSrc||t.src,o.alt=t.alt;let s=n.createElement("button");s.type="button",s.className="b3-board-lightbox-open",s.textContent="Open",i.append(o,s);let a=n.activeElement,l=[...n.body.children].filter((d)=>d instanceof HTMLElement&&!d.inert),c=()=>{i.remove();for(let d of l)d.inert=!1;if(e.isConnected)e.focus({preventScroll:!0});else a?.focus?.({preventScroll:!0})};i.addEventListener("b3-close",c),i.addEventListener("click",(d)=>{if(d.target===i)c()}),s.addEventListener("pointerdown",(d)=>d.stopPropagation()),s.addEventListener("click",(d)=>{if(d.stopPropagation(),c(),e.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:{...r}}))&&!r.file)this.ownerDocument.defaultView?.open(r.href,"_blank","noopener")}),n.body.append(i);for(let d of l)d.inert=!0;i.setAttribute("open",""),i.focus({preventScroll:!0})}#$(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#L(e.clientX,e.clientY)},ua)}#L(e,t){let r=this.#r;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let s of[i,...i.querySelectorAll("[id]")])s.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#t.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#r!==r)return;this.#U(r.px,r.py),this.#H(this.#D(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#R(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#p();return}if(r<5)return;this.#L(e.clientX,e.clientY)}e.preventDefault(),t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#z(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#p();let r=this.#D(e.clientX,e.clientY);if(this.#p(),this.#x=!0,setTimeout(()=>{this.#x=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>x(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((c)=>x(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>x(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>x(l.id,t.id));if(o===i&&a<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#c(t.card);if(!i)return;let o=A(i),s=r.before?o.findIndex((a)=>x(a.id,r.before)):o.length;if(o.findIndex((a)=>x(a.id,t.id))<s)s-=1;this.#f(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>x(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>x(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#D(e,t){let r=this.#r,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#N(e,n);if(!l)return null;let c=l.querySelector(".b3-board-cards"),d=[...c.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=d.find((b)=>{let m=b.getBoundingClientRect();return t<m.top+m.height/2}),p=(b)=>!!(b!=null&&this.#c(b)?.starred);if(p(u?.dataset.card)!==p(r.id)&&(u||p(r.id)))u=d.find((b)=>!p(b.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:c}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let p=u.getBoundingClientRect();return t<p.top+p.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.find((l)=>{let c=l.getBoundingClientRect();return s?e>c.left+c.width/2:e<c.left+c.width/2})?.dataset.column??null,list:i}}#H(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#r.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#N(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#U(e,t){let r=(s,a,l)=>s<a+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#r?.kind==="card"?this.#N(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let o=this.ownerDocument.defaultView;o.scrollBy(0,r(t,0,o.innerHeight))}#p(){let e=this.#r;if(!e)return;this.#r=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}fr("b3-board",ui);export{ui as B3Board};
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0-alpha.88",
2
+ "version": "0.1.0-alpha.90",
3
3
  "cssSha256": "3b9a615b1efe3f2b63524bac154c1da07a0f14ca67073f906a7085a9a2196e9a",
4
4
  "classes": [
5
5
  "b3-accordion",
@@ -85,7 +85,8 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
85
85
  neighbour across the starred boundary stops the move). The card being
86
86
  edited stays shown, so Add card works with chips chosen.
87
87
  - **Search**: `board.search` (or the `search` attribute) shows only cards whose title, description,
88
- subtasks or tags hold every word of it — case-insensitive, any order (`#web` matches the tag). It
88
+ subtasks, tags or comments hold every word of it — case-insensitive, any order (`#web` matches the tag); a comment
89
+ holding a searched word, and the card's comment count, get `data-match` (accent-marked) so a comment-only hit reads why. It
89
90
  combines with the chosen labels, and counts show shown/total. With the `searchable` attribute the board has its own
90
91
  search box at the end of the Filter row (shown for it even without labels): a magnifier that opens into the field on
91
92
  click or `board.openSearch()` (wire the host's `/` or ⌘F to it), filters as typed, and folds back to the magnifier when
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/bare-v3",
3
- "version": "0.1.0-alpha.88",
3
+ "version": "0.1.0-alpha.90",
4
4
  "type": "module",
5
5
  "thirdPartyNotices": "./dist/third-party.json",
6
6
  "files": [