@livx.cc/bare-v3 0.1.0-alpha.79 → 0.1.0-alpha.80

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.
@@ -26,6 +26,19 @@ export type BoardCard = {
26
26
  expanded?: boolean;
27
27
  /** Pinned to the top of its column (above every card that is not starred). */
28
28
  starred?: boolean;
29
+ /** Anything `Date` reads (ISO string, ms). The board stamps `updated` (and `created` on a new card) on every edit of
30
+ * the card, and shows `updated` as "3h ago"; a card without one shows no age. */
31
+ created?: string | number;
32
+ updated?: string | number;
33
+ /** Oldest first. Counted on the card; listed in its details, where people add their own (`by` = the `author` attribute, else "you"). */
34
+ comments?: BoardComment[];
35
+ [key: string]: unknown;
36
+ };
37
+ export type BoardComment = {
38
+ id?: BoardId;
39
+ at?: string | number;
40
+ by?: string;
41
+ text: string;
29
42
  [key: string]: unknown;
30
43
  };
31
44
  /** `kind` is an optional, app-chosen styling hook rendered as `data-kind` on the column (e.g. "done"). */
@@ -69,6 +82,11 @@ export type BoardAction = {
69
82
  type: 'star';
70
83
  card: BoardId;
71
84
  starred: boolean;
85
+ } | {
86
+ type: 'comment';
87
+ card: BoardId;
88
+ comment: BoardId;
89
+ op: 'add' | 'remove';
72
90
  } | {
73
91
  type: 'subtask';
74
92
  card: BoardId;
@@ -1,10 +1,10 @@
1
- var{defineProperty:it,getOwnPropertyNames:di,getOwnPropertyDescriptor:ui}=Object,fi=Object.prototype.hasOwnProperty;function hi(e){return this[e]}var pi=(e)=>{var t=(ar??=new WeakMap).get(e),r;if(t)return t;if(t=it({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of di(e))if(!fi.call(t,n))it(t,n,{get:hi.bind(e,n),enumerable:!(r=ui(e,n))||r.enumerable})}return ar.set(e,t),t},ar;var bi=(e)=>e;function mi(e,t){this[e]=bi.bind(null,t)}var gi=(e,t)=>{for(var r in t)it(e,r,{get:t[r],enumerable:!0,configurable:!0,set:mi.bind(t,r)})};var vi=(e,t)=>()=>(e&&(t=e(e=0)),t);var Fn={};gi(Fn,{Alpine:()=>qn,default:()=>Xo});function yi(e){Ei(e)}function wi(){Dt=!0}function _i(){Dt=!1,Er()}function Ei(e){if(!B.includes(e)){if(B.push(e),e._x_schedulerPriority!==void 0)Re=!0}Er()}function Nt(e){let t=B.indexOf(e);if(t!==-1&&t>bt)B.splice(t,1)}function Er(){if(!pt&&!ht){if(Dt)return;ht=!0,queueMicrotask(ki)}}function ki(){ht=!1,pt=!0;for(let e=0;e<B.length;e++){if(Re)Ai(e);B[e](),bt=e}B.length=0,bt=-1,Re=!1,pt=!1}function Ai(e){let t=new Map,r=B.slice(e).sort((n,i)=>Si(n,i,t));for(let n=0;n<r.length;n++)B[e+n]=r[n];Re=!1}function Si(e,t,r){if(!st(e))return st(t)?1:0;if(!st(t))return-1;return dr(e._x_schedulerPriority.el,r)-dr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function st(e){return e._x_schedulerPriority!==void 0}function dr(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 Ti(e){mt=!1,e(),mt=!0}function Oi(e){le=e.reactive,ce=e.release,te=(t)=>e.effect(t,{scheduler:(r)=>{if(mt)yi(r);else r()}}),kr=e.raw}function ur(e){te=e}function Mi(e){let t=()=>{};return[(n,i)=>{let a=i?.priority==="structural"?Ci++:void 0,s=te(n);if(a!==void 0&&s!==void 0)s._x_schedulerPriority={el:e,order:a};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((o)=>o())};return e._x_effects.add(s),t=()=>{if(s===void 0)return;e._x_effects.delete(s),ce(s)},s},()=>{t()}]}function Ar(e,t){let r=!0,n,i,a=te(()=>{let s=e(),o=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=o,r=!1});return()=>{Nt(a),ce(a)}}async function Ii(e){wi();try{await e(),await Promise.resolve()}finally{_i()}}function Li(e){Tr.push(e)}function Pt(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,Cr.push(t)}function Or(e){Sr.push(e)}function Mr(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 Ir(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 Di(e){e._x_effects?.forEach(Nt);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Rt(){Fe.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Bt=!0}function Lr(){Ni(),Fe.disconnect(),Bt=!1}function Ni(){let e=Fe.takeRecords();q.push(()=>e.length>0&&Ve(e));let t=q.length;queueMicrotask(()=>{if(q.length===t)while(q.length>0)q.shift()()})}function Pi(){while(q.length>0)q.shift()();let e=Fe.takeRecords();if(e.length>0)Ve(e)}function _(e){if(!Bt)return e();Lr();try{return e()}finally{Rt()}}function Bi(){$t=!0}function Ri(){$t=!1,Ve($e),$e=[]}function Ve(e){if($t){$e=$e.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let a=0;a<e.length;a++){if(e[a].target._x_ignoreMutationObserver)continue;if(e[a].type==="childList")e[a].removedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(!s._x_marker)return;r.add(s)}),e[a].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[a].type==="attributes"){let s=e[a].target,o=e[a].attributeName,l=e[a].oldValue,c=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:o,value:s.getAttribute(o)})},d=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(o)};if(s.hasAttribute(o)&&l===null)c();else if(s.hasAttribute(o))d(),c();else d()}}i.forEach((a,s)=>{Ir(s,a)}),n.forEach((a,s)=>{Sr.forEach((o)=>o(s,a))});for(let a of r){if(t.some((s)=>s.contains(a)))continue;Cr.forEach((s)=>s(a))}for(let a of t){if(!a.isConnected)continue;Tr.forEach((s)=>s(a))}t=null,r=null,n=null,i=null}function Dr(e){return J(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 J(e){return new Proxy({objects:e},$i)}function Nr(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Nr(Object.getPrototypeOf(e),t)}function zi(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function zt(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,a="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:o,enumerable:l}])=>{if(l===!1||o===void 0)return;if(typeof o==="object"&&o!==null&&o.__v_skip)return;let c=a===""?s:`${a}.${s}`;if(typeof o==="object"&&o!==null&&o._x_interceptor)i[s]=o.initialize(e,c,s,t);else if(r(o)&&o!==i&&!(o instanceof Element))n(o,c)})};return n(e)}function Pr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,a,s){return e(this.initialValue,()=>Hi(n,i),(o)=>gt(n,i,o),i,a,s)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(a,s,o,l)=>{let c=n.initialize(a,s,o,l);return r.initialValue=c,i(a,s,o,l)}}else r.initialValue=n;return r}}function Hi(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function gt(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 gt(e[t[0]],t.slice(1),r);else return e[t[0]]={},gt(e[t[0]],t.slice(1),r)}function M(e,t){Br[e]=t}function ze(e,t){let r=Ui(t);return Object.entries(Br).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Ui(e){let[t,r]=qr(e),n={interceptor:Pr,...t};return Pt(e,r),n}function ji(e,t,r,...n){try{return r(...n)}catch(i){Ke(i,e,t)}}function Ke(...e){return Rr(...e)}function qi(e){Rr=e}function Fi(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:fi,getOwnPropertyDescriptor:hi}=Object,pi=Object.prototype.hasOwnProperty;function bi(e){return this[e]}var mi=(e)=>{var t=(lr??=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 fi(e))if(!pi.call(t,n))at(t,n,{get:bi.bind(e,n),enumerable:!(r=hi(e,n))||r.enumerable})}return lr.set(e,t),t},lr;var gi=(e)=>e;function vi(e,t){this[e]=gi.bind(null,t)}var xi=(e,t)=>{for(var r in t)at(e,r,{get:t[r],enumerable:!0,configurable:!0,set:vi.bind(t,r)})};var yi=(e,t)=>()=>(e&&(t=e(e=0)),t);var Kn={};xi(Kn,{Alpine:()=>Fn,default:()=>Qo});function _i(e){Ai(e)}function Ei(){Pt=!0}function ki(){Pt=!1,kr()}function Ai(e){if(!P.includes(e)){if(P.push(e),e._x_schedulerPriority!==void 0)ze=!0}kr()}function $t(e){let t=P.indexOf(e);if(t!==-1&&t>vt)P.splice(t,1)}function kr(){if(!gt&&!mt){if(Pt)return;mt=!0,queueMicrotask(Si)}}function Si(){mt=!1,gt=!0;for(let e=0;e<P.length;e++){if(ze)Ci(e);P[e](),vt=e}P.length=0,vt=-1,ze=!1,gt=!1}function Ci(e){let t=new Map,r=P.slice(e).sort((n,i)=>Ti(n,i,t));for(let n=0;n<r.length;n++)P[e+n]=r[n];ze=!1}function Ti(e,t,r){if(!lt(e))return lt(t)?1:0;if(!lt(t))return-1;return ur(e._x_schedulerPriority.el,r)-ur(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function lt(e){return e._x_schedulerPriority!==void 0}function ur(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 Mi(e){xt=!1,e(),xt=!0}function Ii(e){le=e.reactive,ce=e.release,re=(t)=>e.effect(t,{scheduler:(r)=>{if(xt)_i(r);else r()}}),Ar=e.raw}function fr(e){re=e}function Li(e){let t=()=>{};return[(n,i)=>{let o=i?.priority==="structural"?Oi++: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 Sr(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 Di(e){Ei();try{await e(),await Promise.resolve()}finally{ki()}}function Ni(e){Or.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,Tr.push(t)}function Mr(e){Cr.push(e)}function Ir(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 Lr(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 Bi(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 Dr(){Pi(),Ve.disconnect(),zt=!1}function Pi(){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 $i(){while(F.length>0)F.shift()();let e=Ve.takeRecords();if(e.length>0)We(e)}function _(e){if(!zt)return e();Dr();try{return e()}finally{Ht()}}function Ri(){Ut=!0}function zi(){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)=>{Lr(s,o)}),n.forEach((o,s)=>{Cr.forEach((a)=>a(s,o))});for(let o of r){if(t.some((s)=>s.contains(o)))continue;Tr.forEach((s)=>s(o))}for(let o of t){if(!o.isConnected)continue;Or.forEach((s)=>s(o))}t=null,r=null,n=null,i=null}function Nr(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},Hi)}function Br(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Br(Object.getPrototypeOf(e),t)}function Ui(){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 Pr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o,s){return e(this.initialValue,()=>ji(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 ji(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){$r[e]=t}function Ue(e,t){let r=qi(t);return Object.entries($r).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function qi(e){let[t,r]=Fr(e),n={interceptor:Pr,...t};return Rt(e,r),n}function Fi(e,t,r,...n){try{return r(...n)}catch(i){Ye(i,e,t)}}function Ye(...e){return Rr(...e)}function Ki(e){Rr=e}function Vi(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 $r(e){let t=K;K=!1;let r=e();return K=t,r}function W(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return zr(...e)}function Vi(e){zr=e}function Ki(e){Hr=e}function Wi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:a}={})=>{if(!K){vt(r,t,J([n,...e]),i);return}let s=t.apply(J([n,...e]),i);vt(r,s)}}function vt(e,t,r,n,i){if(K&&typeof t==="function"){let a=t.apply(r,n);if(a instanceof Promise)a.then((s)=>vt(e,s,r,n)).catch((s)=>Ke(s,i,t));else e(a)}else if(typeof t==="object"&&t instanceof Promise)t.then((a)=>e(a));else e(t)}function Yi(...e){return Hr(...e)}function de(e=""){return Ht+e}function Ji(e){Ht=e}function E(e,t){return He[e]=t,{before(r){if(!He[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 Gi(e){return Object.keys(He).includes(e)}function We(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let a=Object.entries(e._x_virtualDirectives).map(([o,l])=>({name:o,value:l})),s=Ur(a);a=a.map((o)=>{if(s.find((l)=>l.name===o.name))return{name:`x-bind:${o.name}`,value:`"${o.value}"`};return o}),t=t.concat(a)}let n={};return t.map(Kr((a,s)=>n[a]=s)).filter(Yr).map(Qi(n,r)).sort(es).map((a)=>Zi(e,a))}function Ur(e){return Array.from(e).map(Kr()).filter((t)=>!Yr(t))}function Xi(e){xt=!0;let t=Symbol();jr=t,be.set(t,[]);let r=()=>{while(be.get(t).length)be.get(t).shift()();be.delete(t)},n=()=>{xt=!1,r()};e(r),n()}function qr(e){let t=[],r=(o)=>t.push(o),[n,i]=Mi(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:W.bind(W,e)},()=>t.forEach((o)=>o())]}function Zi(e,t){let r=()=>{},n=He[t.type]||r,[i,a]=qr(e);Mr(e,t.original,a);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),xt?be.get(jr).push(n):n()};return s.runCleanups=a,s}function Kr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Wr.reduce((a,s)=>s(a),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Ut(e){Wr.push(e)}function Yr({name:e}){return Jr().test(e)}function Qi(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Jr()),a=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],o=t||e[r]||r;return{type:i?i[1]:null,value:a?a[1]:null,modifiers:s.map((l)=>l.replace(".","")),expression:n,original:o}}}function es(e,t){let r=V.indexOf(e.type)===-1?yt:e.type,n=V.indexOf(t.type)===-1?yt:t.type;return V.indexOf(r)-V.indexOf(n)}function G(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>G(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)G(n,t,!1),n=n.nextElementSibling}function R(e,t=()=>{}){return(...r)=>U?t(...r):e(...r)}function ts(e){return(...t)=>U&&e(...t)}function Ce(e){Gr.push(e)}function rs(e,t){Gr.forEach((r)=>r(e,t)),U=!0,Xr(()=>{D(t,(r,n)=>{n(r,()=>{})})}),U=!1}function ns(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;U=!0,wt=!0,Xr(()=>{is(t)}),U=!1,wt=!1}function is(e){let t=!1;D(e,(n,i)=>{G(n,(a,s)=>{if(t&&ds(a))return s();t=!0,i(a,s)})})}function Xr(e){let t=te;ur((r,n)=>{let i=t(r);return ce(i),()=>{}}),e(),ur(t)}function ss(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;Ye++}r.pending++,Promise.resolve(t).catch((n)=>{try{Ke(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>os(e,r))}function os(e,t){if(t.pending--,t.pending>0)return;if(Pi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Ye--,!e.isConnected)return;ls(t),D(e)}function as(e,t){if(Ye===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return Zr(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function Zr(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 ls(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,(a)=>a._x_deferInit);if(n){Zr(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((a)=>r.hasAttribute(a)).map((a)=>({name:a,value:r.getAttribute(a)}));if(i.length===0)return;We(r,i).forEach((a)=>a())})}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 cs(){if(fr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(fr=!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"),Rt(),Li((t)=>D(t,G)),Pt((t)=>re(t)),Or((t,r)=>{if(as(t,r))return;We(t,r).forEach((n)=>n())});let e=(t)=>!Je(t.parentElement,!0);Array.from(document.querySelectorAll(tn().join(","))).filter(e).forEach((t)=>{D(t)}),me(document,"alpine:initialized"),setTimeout(()=>{hs()})}function en(){return jt.map((e)=>e())}function tn(){return jt.concat(Qr).map((e)=>e())}function rn(e){jt.push(e)}function nn(e){Qr.push(e)}function Je(e,t=!1){return T(e,(r)=>{if((t?tn():en()).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 ds(e){return en().some((t)=>e.matches(t))}function us(e){sn.push(e)}function D(e,t=G,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;Xi(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),sn.forEach((a)=>a(n,i)),We(n,n.attributes).forEach((a)=>a()),!n._x_ignore)n._x_marker=fs++;n._x_ignore&&i()})})}function re(e,t=G){t(e,(r)=>{Di(r),Ir(r),delete r._x_marker})}function hs(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Gi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Ft(e=()=>{}){return queueMicrotask(()=>{qt||setTimeout(()=>{Et()})}),new Promise((t)=>{_t.push(()=>{e(),t()})})}function Et(){qt=!1;while(_t.length)_t.shift()()}function ps(){qt=!0}function Vt(e,t){if(Array.isArray(t))return hr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return bs(e,t);else if(typeof t==="function")return Vt(e,t());return hr(e,t)}function kt(e){return e.split(/\s/).filter(Boolean)}function hr(e,t){let r=(i)=>kt(i).filter((a)=>!e.classList.contains(a)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function bs(e,t){let r=Object.entries(t).flatMap(([s,o])=>o?kt(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,o])=>!o?kt(s):!1).filter(Boolean),i=[],a=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),a.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{a.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function Ge(e,t){if(typeof t==="object"&&t!==null)return ms(e,t);return gs(e,t)}function ms(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=vs(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Ge(e,r)}}function gs(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function vs(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function At(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function xs(e,t,r){on(e,Vt,""),{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 ys(e,t,r){on(e,Ge);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),a=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((h,v)=>v<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((h,v)=>v>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),o=s||t.includes("opacity"),l=s||t.includes("scale"),c=o?0:1,d=l?he(t,"scale",95)/100:1,u=he(t,"delay",0)/1000,f=he(t,"origin","center"),m="opacity, transform",g=he(t,"duration",150)/1000,p=he(t,"duration",75)/1000,b="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${g}s`,transitionTimingFunction:b},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(a)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${p}s`,transitionTimingFunction:b},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function on(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=()=>{}){St(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){St(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function an(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:an(t)}function St(e,t,{during:r,start:n,end:i}={},a=()=>{},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){a(),s();return}let o,l,c;ws(e,{start(){o=t(e,n)},during(){l=t(e,r)},before:a,end(){o(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function ws(e,t){let r,n,i,a=At(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),Et();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:At(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();a()}),finish:a},_(()=>{t.start(),t.during()}),ps(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,o=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()}),Et(),setTimeout(e._x_transitioning.finish,s+o),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 ln(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Os(t):t,t){case"value":_s(e,r);break;case"style":ks(e,r);break;case"class":Es(e,r);break;case"selected":case"checked":As(e,t,r);break;default:Kt(e,t,r);break}}function _s(e,t){if(Wt(e)){if(e.attributes.value===void 0)e.value=t}else if(Ue(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)=>Ms(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Ts(e,t);else if(e.tagName==="OPTION")Kt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Es(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Vt(e,t)}function ks(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Ge(e,t)}function As(e,t,r){Kt(e,t,r),Cs(e,t,r)}function Kt(e,t,r){if([null,void 0,!1].includes(r)&&Ls(t))e.removeAttribute(t);else{if(cn(t))r=t;if(Ds(r))r=JSON.stringify(r);Ss(e,t,r)}}function Ss(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Cs(e,t,r){if(e[t]!==r)e[t]=r}function Ts(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Os(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ms(e,t){return e==t}function Be(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 cn(e){return Is.has(e)}function Ls(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Ds(e){return typeof e==="object"&&e!==null}function Ns(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return dn(e,t,r)}function Ps(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,$r(()=>W(e,i.expression))}return dn(e,t,r)}function dn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(cn(t))return!![t,"true"].includes(n);return n}function Ue(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Wt(e){return e.type==="radio"||e.localName==="ui-radio"}function un(e,t){let r;return function(){let n=this,i=arguments,a=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(a,t)}}function fn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function hn({get:e,set:t},{get:r,set:n}){let i=!0,a,s,o=te(()=>{let l=e(),c=r();if(i)n(ot(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==a)n(ot(l));else if(d!==u)t(ot(c))}a=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{Nt(o),ce(o)}}function ot(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Bs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function Rs(e,t){if(!pr)P=le(P),pr=!0;if(t===void 0)return P[e];if(P[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)P[e]=t.initialize(P,e,e,()=>{});else zt(P[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")P[e].init()}function $s(){return P}function zs(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return bn(e,r());else pn[e]=r;return()=>{}}function Hs(e){return Object.entries(pn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function bn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,o])=>({name:s,value:o})),a=Ur(i);return i=i.map((s)=>{if(a.find((o)=>o.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),We(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Us(e,t){mn[e]=t}function js(e,t){return Object.entries(mn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function vn(e){try{let r=new Vs(e).tokenize(),i=new Ks(r).parse(),a=new Ws;return function(s={}){let{scope:o={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=s;return a.evaluate({node:i,scope:o,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Ys(e,t,r={}){let n=xn(e),i=J([r.scope??{},...n]),a=r.params??[],o=vn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof o==="function"&&K)return o.apply(i,a);return o}function Js(e,t){let r=xn(e);if(typeof t==="function")return Wi(r,t);let n=Gs(e,t,r);return ji.bind(null,e,t,n)}function xn(e){let t={};return ze(t,e),[t,...ae(e)]}function Gs(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:a=[]}={})=>{let s=J([i,...r]),l=vn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(K&&typeof l==="function"){let c=l.apply(l,a);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 yn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function X(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function no(e,t=!1){if(e.flags|=8,t){e.next=xe,xe=e;return}e.next=ve,ve=e}function Jt(){kn++}function Gt(){if(--kn>0)return;if(xe){let t=xe;xe=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 An(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Sn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;Xt(n),so(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function Tt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(io(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function io(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===je)return;if(e.globalVersion=je,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Tt(e)))return;e.flags|=2;let t=e.dep,r=x,n=O;x=e,O=!0;try{An(e);let i=e.fn(e._value);if(t.version===0||F(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{x=r,O=n,Sn(e),e.flags&=-3}}function Xt(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 a=r.computed.deps;a;a=a.nextDep)Xt(a,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function so(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 oo(e,t){if(e.effect instanceof mr)e=e.effect.fn;let r=new mr(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 ao(e){e.effect.stop()}function lo(){Cn.push(O),O=!1}function co(){let e=Cn.pop();O=e===void 0?!0:e}function gr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=x;x=void 0;try{t()}finally{x=r}}}function Tn(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)Tn(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&&x){let n=Ot.get(e);if(!n)Ot.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new fo),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function H(e,t,r,n,i,a){let s=Ot.get(e);if(!s){je++;return}let o=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:a})};if(Jt(),t==="clear")s.forEach(o);else{let l=_e(e),c=l&&Yt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,f)=>{if(f==="length"||f===ke||!Te(f)&&f>=d)o(u)})}else{if(r!==void 0||s.has(void 0))o(s.get(r));if(c)o(s.get(ke));switch(t){case"add":if(!l){if(o(s.get(Y)),ge(e))o(s.get(Mt))}else if(c)o(s.get("length"));break;case"delete":if(!l){if(o(s.get(Y)),ge(e))o(s.get(Mt))}break;case"set":if(ge(e))o(s.get(Y));break}}}Gt()}function se(e){let t=y(e);if(t===e)return t;return C(t,"iterate",ke),Q(e)?t:t.map(ee)}function Zt(e){return C(e=y(e),"iterate",ke),e}function I(e,t){if(Z(e))return Pn(e)?Ae(ee(t)):Ae(t);return ee(t)}function ct(e,t,r){let n=Zt(e),i=n[t]();if(n!==e&&!Q(e))i._next=i.next,i.next=()=>{let a=i._next();if(!a.done)a.value=r(a.value);return a};return i}function N(e,t,r,n,i,a){let s=Zt(e),o=s!==e&&!Q(e),l=s[t];if(l!==po[t]){let u=l.apply(e,a);return o?ee(u):u}let c=r;if(s!==e){if(o)c=function(u,f){return r.call(this,I(e,u),f,e)};else if(r.length>2)c=function(u,f){return r.call(this,u,f,e)}}let d=l.call(s,c,n);return o&&i?i(d):d}function vr(e,t,r,n){let i=Zt(e),a=i!==e&&!Q(e),s=r,o=!1;if(i!==e){if(a)o=n.length===0,s=function(c,d,u){if(o)o=!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 o?I(e,l):l}function dt(e,t,r){let n=y(e);C(n,"iterate",ke);let i=n[t](...r);if((i===-1||i===!1)&&To(r[0]))return r[0]=y(r[0]),n[t](...r);return i}function pe(e,t,r=[]){lo(),Jt();let n=y(e)[t].apply(e,r);return Gt(),co(),n}function mo(e){if(!Te(e))e=String(e);let t=y(this);return C(t,"has",e),t.hasOwnProperty(e)}function wo(e,t,r){return function(...n){let i=this.__v_raw,a=y(i),s=ge(a),o=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?It:t?Ae:ee;return!t&&C(a,"iterate",l?Mt:Y),we(Object.create(c),{next(){let{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:o?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function Ne(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";X(`${En(e)} operation ${r}failed: target is readonly.`,y(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function _o(e,t){let r={get(i){let a=this.__v_raw,s=y(a),o=y(i);if(!e){if(F(i,o))C(s,"get",i);C(s,"get",o)}let{has:l}=De(s),c=t?It:e?Ae:ee;if(l.call(s,i))return c(a.get(i));else if(l.call(s,o))return c(a.get(o));else if(a!==s)a.get(i)},get size(){let i=this.__v_raw;return!e&&C(y(i),"iterate",Y),i.size},has(i){let a=this.__v_raw,s=y(a),o=y(i);if(!e){if(F(i,o))C(s,"has",i);C(s,"has",o)}return i===o?a.has(i):a.has(i)||a.has(o)},forEach(i,a){let s=this,o=s.__v_raw,l=y(o),c=t?It:e?Ae:ee;return!e&&C(l,"iterate",Y),o.forEach((d,u)=>i.call(a,c(d),c(u),s))}};return we(r,e?{add:Ne("add"),set:Ne("set"),delete:Ne("delete"),clear:Ne("clear")}:{add(i){let a=y(this),s=De(a),o=y(i),l=!t&&!Q(i)&&!Z(i)?o:i;if(!(s.has.call(a,l)||F(i,l)&&s.has.call(a,i)||F(o,l)&&s.has.call(a,o)))a.add(l),H(a,"add",l,l);return this},set(i,a){if(!t&&!Q(a)&&!Z(a))a=y(a);let s=y(this),{has:o,get:l}=De(s),c=o.call(s,i);if(!c)i=y(i),c=o.call(s,i);else xr(s,o,i);let d=l.call(s,i);if(s.set(i,a),!c)H(s,"add",i,a);else if(F(a,d))H(s,"set",i,a,d);return this},delete(i){let a=y(this),{has:s,get:o}=De(a),l=s.call(a,i);if(!l)i=y(i),l=s.call(a,i);else xr(a,s,i);let c=o?o.call(a,i):void 0,d=a.delete(i);if(l)H(a,"delete",i,void 0,c);return d},clear(){let i=y(this),a=i.size!==0,s=ge(i)?new Map(i):new Set(i),o=i.clear();if(a)H(i,"clear",void 0,void 0,s);return o}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=wo(i,e,t)}),r}function In(e,t){let r=_o(e,t);return(n,i,a)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(Ct(r,i)&&i in n?r:n,i,a)}}function xr(e,t,r){let n=y(r);if(n!==r&&t.call(e,n)){let i=_n(e);X(`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 Co(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Qt(e){if(Z(e))return e;return Nn(e,!1,xo,Eo,Ln)}function Lt(e){return Nn(e,!0,yo,ko,Dn)}function Nn(e,t,r,n,i){if(!Ee(e))return X(`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 a=i.get(e);if(a)return a;let s=Co(_n(e));if(s===0)return e;let o=new Proxy(e,s===2?n:r);return i.set(e,o),o}function Pn(e){if(Z(e))return Pn(e.__v_raw);return!!(e&&e.__v_isReactive)}function Z(e){return!!(e&&e.__v_isReadonly)}function Q(e){return!!(e&&e.__v_isShallow)}function To(e){return e?!!e.__v_raw:!1}function y(e){let t=e&&e.__v_raw;return t?y(t):e}function ye(e){return e?e.__v_isRef===!0:!1}function Oo(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Bn(e){if(!ut[e])ut[e]=0;return++ut[e]}function Mo(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Io(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Bn(t)}function Lo(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 Rn(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 yr(e){let t=R(()=>document.querySelector(e),()=>Do)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,a=(l)=>n(l),s={},o=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=No(t);if(r.includes("camel"))t=Po(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(a=zn(r,a),r.includes("prevent"))a=o(a,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))a=o(a,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))a=o(a,(l,c)=>{l(c),i.removeEventListener(t,a,s)});if(r.includes("away")||r.includes("outside"))i=document,a=o(a,(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"))a=o(a,(l,c)=>{c.target===e&&l(c)});if(t==="submit")a=o(a,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(Ro(t)||Hn(t))a=o(a,(l,c)=>{if(zo(c,r))return;l(c)});return i.addEventListener(t,a,s),()=>{i.removeEventListener(t,a,s)}}function zn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=qe(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=un(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=qe(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=fn(t,n)}return t}function No(e){return e.replace(/-/g,".")}function Po(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function qe(e){return!Array.isArray(e)&&!isNaN(e)}function Bo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Ro(e){return["keydown","keyup"].includes(e)}function Hn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function zo(e,t){let r=t.filter((a,s)=>{if(a==="false"&&t[s-1]==="passive")return!1;return!$o.includes(a)});if(r.includes("debounce")){let a=r.indexOf("debounce");r.splice(a,qe((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let a=r.indexOf("throttle");r.splice(a,qe((r[a+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&wr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((a)=>r.includes(a));if(r=r.filter((a)=>!i.includes(a)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(Hn(e.type))return!1;if(wr(e.key).includes(r[0]))return!1}}return!0}function wr(e){if(!e)return[];e=Bo(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 Pe(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(Ue(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=ft(r.target.value);else if(t.includes("boolean"))i=Be(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((a)=>!Ho(a,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 a=i.value||i.text;return ft(a)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let a=i.value||i.text;return Be(a)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Wt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return ft(i);else if(t.includes("boolean"))return Be(i);else if(t.includes("trim"))return i.trim();else return i}})}function ft(e){let t=e?parseFloat(e):null;return Uo(t)?t:e}function Ho(e,t){return e==t}function Uo(e){return!Array.isArray(e)&&!isNaN(e)}function _r(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function jo(e,t){e._x_keyExpression=t}function qo(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 Fo(e){if(!U)return!1;if(wt)return!0;return e.hasAttribute("data-has-alpine-state")}function Vo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function Ko(e,t,r,n){r((i)=>{if(Jo(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 a=e._x_lookup,s=new Map;e._x_lookup=s;let o=Go(i),l=Object.entries(i).map(([c,d])=>{if(!o)c=parseInt(c);let u=Yo(t,d,c,i),f;return n((m)=>{if(typeof m==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(a.has(m))s.set(m,a.get(m)),a.delete(m);f=m},{scope:{index:c,...u}}),[f,u]});_(()=>{a.forEach((u)=>{re(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,f])=>{if(s.has(u)){let p=s.get(u);if(p._x_refreshXForScope(f),d.nextElementSibling!==p){if(d.nextElementSibling)p.replaceWith(d.nextElementSibling);d.after(p)}if(d=p,p._x_currentIfEl){if(p.nextElementSibling!==p._x_currentIfEl)d.after(p._x_currentIfEl);d=p._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 m=document.importNode(e.content,!0).firstElementChild,g=le(f);Se(m,g,e),m._x_refreshXForScope=Vo(g),s.set(u,m),c.add(m),d.after(m),d=m}),c.forEach((u)=>D(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function Wo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\s\S]*)/,i=e.match(n);if(!i)return;let a={};a.items=i[2].trim();let s=i[1].replace(r,"").trim(),o=s.match(t);if(o){if(a.item=s.replace(t,"").trim(),a.index=o[1].trim(),o[2])a.collection=o[2].trim()}else a.item=s;return a}function Yo(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,o)=>{i[s]=t[o]});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 Jo(e){return typeof e!=="object"&&!isNaN(e)}function Go(e){return typeof e==="object"&&!Array.isArray(e)}function jn(){}function Ze(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 ht=!1,pt=!1,B,bt=-1,Re=!1,Dt=!1,le,te,ce,kr,Ci=0,mt=!0,Sr,Cr,Tr,Fe,Bt=!1,q,$t=!1,$e,$i,Br,Rr,K=!0,zr=()=>{},Hr,Ht="x-",He,xt=!1,be,jr,Fr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Vr=(e)=>e,Wr,Jr=()=>new RegExp(`^${Ht}([^:^.]+)\\b`),yt="DEFAULT",V,U=!1,Gr,wt=!1,Ye=0,fr=!1,jt,Qr,sn,fs=1,_t,qt=!1,Is,P,pr=!1,pn,mn,qs,ue,br,gn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Fs,Vs=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 zr(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 Hr(...e)}function Wi(e){Hr=e}function Yi(e){Ur=e}function Ji(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 Gi(...e){return Ur(...e)}function de(e=""){return qt+e}function Xi(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 Zi(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=jr(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(Wr((o,s)=>n[o]=s)).filter(Jr).map(ts(n,r)).sort(rs).map((o)=>es(e,o))}function jr(e){return Array.from(e).map(Wr()).filter((t)=>!Jr(t))}function Qi(e){_t=!0;let t=Symbol();qr=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 Fr(e){let t=[],r=(a)=>t.push(a),[n,i]=Li(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 es(e,t){let r=()=>{},n=je[t.type]||r,[i,o]=Fr(e);Ir(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(qr).push(n):n()};return s.runCleanups=o,s}function Wr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Yr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Ft(e){Yr.push(e)}function Jr({name:e}){return Gr().test(e)}function ts(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Gr()),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 rs(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)=>U?t(...r):e(...r)}function ns(e){return(...t)=>U&&e(...t)}function Ce(e){Xr.push(e)}function is(e,t){Xr.forEach((r)=>r(e,t)),U=!0,Zr(()=>{D(t,(r,n)=>{n(r,()=>{})})}),U=!1}function ss(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;U=!0,kt=!0,Zr(()=>{os(t)}),U=!1,kt=!1}function os(e){let t=!1;D(e,(n,i)=>{X(n,(o,s)=>{if(t&&fs(o))return s();t=!0,i(o,s)})})}function Zr(e){let t=re;fr((r,n)=>{let i=t(r);return ce(i),()=>{}}),e(),fr(t)}function as(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(()=>ls(e,r))}function ls(e,t){if(t.pending--,t.pending>0)return;if($i(),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;ds(t),D(e)}function cs(e,t){if(Ge===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return Qr(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function Qr(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 ds(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){Qr(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 us(){if(hr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(hr=!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(),Ni((t)=>D(t,X)),Rt((t)=>ne(t)),Mr((t,r)=>{if(cs(t,r))return;Je(t,r).forEach((n)=>n())});let e=(t)=>!Xe(t.parentElement,!0);Array.from(document.querySelectorAll(rn().join(","))).filter(e).forEach((t)=>{D(t)}),me(document,"alpine:initialized"),setTimeout(()=>{bs()})}function tn(){return Kt.map((e)=>e())}function rn(){return Kt.concat(en).map((e)=>e())}function nn(e){Kt.push(e)}function sn(e){en.push(e)}function Xe(e,t=!1){return T(e,(r)=>{if((t?rn():tn()).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 fs(e){return tn().some((t)=>e.matches(t))}function hs(e){on.push(e)}function D(e,t=X,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;Qi(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),on.forEach((o)=>o(n,i)),Je(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=ps++;n._x_ignore&&i()})})}function ne(e,t=X){t(e,(r)=>{Bi(r),Lr(r),delete r._x_marker})}function bs(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Zi(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 ms(){Vt=!0}function Yt(e,t){if(Array.isArray(t))return pr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return gs(e,t);else if(typeof t==="function")return Yt(e,t());return pr(e,t)}function Ct(e){return e.split(/\s/).filter(Boolean)}function pr(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 gs(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 vs(e,t);return xs(e,t)}function vs(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=ys(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Ze(e,r)}}function xs(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function ys(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 ws(e,t,r){an(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 _s(e,t,r){an(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((h,v)=>v<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((h,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?he(t,"scale",95)/100:1,u=he(t,"delay",0)/1000,f=he(t,"origin","center"),m="opacity, transform",g=he(t,"duration",150)/1000,p=he(t,"duration",75)/1000,b="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${g}s`,transitionTimingFunction:b},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:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${p}s`,transitionTimingFunction:b},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function an(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 ln(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:ln(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;Es(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 Es(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()}),ms(),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 cn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Is(t):t,t){case"value":ks(e,r);break;case"style":Ss(e,r);break;case"class":As(e,r);break;case"selected":case"checked":Cs(e,t,r);break;default:Jt(e,t,r);break}}function ks(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)=>Ls(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Ms(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 As(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Yt(e,t)}function Ss(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Ze(e,t)}function Cs(e,t,r){Jt(e,t,r),Os(e,t,r)}function Jt(e,t,r){if([null,void 0,!1].includes(r)&&Ns(t))e.removeAttribute(t);else{if(dn(t))r=t;if(Bs(r))r=JSON.stringify(r);Ts(e,t,r)}}function Ts(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Os(e,t,r){if(e[t]!==r)e[t]=r}function Ms(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Is(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ls(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 dn(e){return Ds.has(e)}function Ns(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Bs(e){return typeof e==="object"&&e!==null}function Ps(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return un(e,t,r)}function $s(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,zr(()=>Y(e,i.expression))}return un(e,t,r)}function un(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(dn(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 fn(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 hn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function pn({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 Rs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function zs(e,t){if(!br)B=le(B),br=!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 Hs(){return B}function Us(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return mn(e,r());else bn[e]=r;return()=>{}}function js(e){return Object.entries(bn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function mn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=jr(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 qs(e,t){gn[e]=t}function Fs(e,t){return Object.entries(gn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function xn(e){try{let r=new Ws(e).tokenize(),i=new Ys(r).parse(),o=new Js;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 Gs(e,t,r={}){let n=yn(e),i=G([r.scope??{},...n]),o=r.params??[],a=xn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&W)return a.apply(i,o);return a}function Xs(e,t){let r=yn(e);if(typeof t==="function")return Ji(r,t);let n=Zs(e,t,r);return Fi.bind(null,e,t,n)}function yn(e){let t={};return Ue(t,e),[t,...ae(e)]}function Zs(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=xn(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 wn(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 so(e,t=!1){if(e.flags|=8,t){e.next=xe,xe=e;return}e.next=ve,ve=e}function Zt(){An++}function Qt(){if(--An>0)return;if(xe){let t=xe;xe=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 Sn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Cn(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),ao(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&&(oo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function oo(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=x,n=O;x=e,O=!0;try{Sn(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{x=r,O=n,Cn(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 ao(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 lo(e,t){if(e.effect instanceof gr)e=e.effect.fn;let r=new gr(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 co(e){e.effect.stop()}function uo(){Tn.push(O),O=!1}function fo(){let e=Tn.pop();O=e===void 0?!0:e}function vr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=x;x=void 0;try{t()}finally{x=r}}}function On(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)On(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&&x){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 po),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function H(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,f)=>{if(f==="length"||f===ke||!Te(f)&&f>=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=y(e);if(t===e)return t;return S(t,"iterate",ke),ee(e)?t:t.map(te)}function tr(e){return S(e=y(e),"iterate",ke),e}function I(e,t){if(Q(e))return Pn(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!==mo[t]){let u=l.apply(e,o);return a?te(u):u}let c=r;if(s!==e){if(a)c=function(u,f){return r.call(this,I(e,u),f,e)};else if(r.length>2)c=function(u,f){return r.call(this,u,f,e)}}let d=l.call(s,c,n);return a&&i?i(d):d}function xr(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=y(e);S(n,"iterate",ke);let i=n[t](...r);if((i===-1||i===!1)&&Mo(r[0]))return r[0]=y(r[0]),n[t](...r);return i}function pe(e,t,r=[]){uo(),Zt();let n=y(e)[t].apply(e,r);return Qt(),fo(),n}function vo(e){if(!Te(e))e=String(e);let t=y(this);return S(t,"has",e),t.hasOwnProperty(e)}function Eo(e,t,r){return function(...n){let i=this.__v_raw,o=y(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:f}=c.next();return f?{value:u,done:f}:{value:a?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function Pe(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";Z(`${kn(e)} operation ${r}failed: target is readonly.`,y(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function ko(e,t){let r={get(i){let o=this.__v_raw,s=y(o),a=y(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(y(i),"iterate",J),i.size},has(i){let o=this.__v_raw,s=y(o),a=y(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=y(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=y(this),s=Be(o),a=y(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),H(o,"add",l,l);return this},set(i,o){if(!t&&!ee(o)&&!Q(o))o=y(o);let s=y(this),{has:a,get:l}=Be(s),c=a.call(s,i);if(!c)i=y(i),c=a.call(s,i);else yr(s,a,i);let d=l.call(s,i);if(s.set(i,o),!c)H(s,"add",i,o);else if(K(o,d))H(s,"set",i,o,d);return this},delete(i){let o=y(this),{has:s,get:a}=Be(o),l=s.call(o,i);if(!l)i=y(i),l=s.call(o,i);else yr(o,s,i);let c=a?a.call(o,i):void 0,d=o.delete(i);if(l)H(o,"delete",i,void 0,c);return d},clear(){let i=y(this),o=i.size!==0,s=ge(i)?new Map(i):new Set(i),a=i.clear();if(o)H(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=Eo(i,e,t)}),r}function Ln(e,t){let r=ko(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 yr(e,t,r){let n=y(r);if(n!==r&&t.call(e,n)){let i=En(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 Oo(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 Bn(e,!1,wo,Ao,Dn)}function Bt(e){return Bn(e,!0,_o,So,Nn)}function Bn(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=Oo(En(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Pn(e){if(Q(e))return Pn(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 Mo(e){return e?!!e.__v_raw:!1}function y(e){let t=e&&e.__v_raw;return t?y(t):e}function ye(e){return e?e.__v_isRef===!0:!1}function Io(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function $n(e){if(!pt[e])pt[e]=0;return++pt[e]}function Lo(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Do(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=$n(t)}function No(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 Rn(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 wr(e){let t=R(()=>document.querySelector(e),()=>Bo)();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=Po(t);if(r.includes("camel"))t=$o(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=Hn(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(zo(t)||Un(t))o=a(o,(l,c)=>{if(Uo(c,r))return;l(c)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Hn(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=fn(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=hn(t,n)}return t}function Po(e){return e.replace(/-/g,".")}function $o(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ke(e){return!Array.isArray(e)&&!isNaN(e)}function Ro(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function zo(e){return["keydown","keyup"].includes(e)}function Un(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Uo(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!Ho.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&&_r(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(Un(e.type))return!1;if(_r(e.key).includes(r[0]))return!1}}return!0}function _r(e){if(!e)return[];e=Ro(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)=>!jo(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 qo(t)?t:e}function jo(e,t){return e==t}function qo(e){return!Array.isArray(e)&&!isNaN(e)}function Er(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Fo(e,t){e._x_keyExpression=t}function Ko(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 Vo(e){if(!U)return!1;if(kt)return!0;return e.hasAttribute("data-has-alpine-state")}function Wo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function Yo(e,t,r,n){r((i)=>{if(Xo(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=Zo(i),l=Object.entries(i).map(([c,d])=>{if(!a)c=parseInt(c);let u=Go(t,d,c,i),f;return n((m)=>{if(typeof m==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(m))s.set(m,o.get(m)),o.delete(m);f=m},{scope:{index:c,...u}}),[f,u]});_(()=>{o.forEach((u)=>{ne(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,f])=>{if(s.has(u)){let p=s.get(u);if(p._x_refreshXForScope(f),d.nextElementSibling!==p){if(d.nextElementSibling)p.replaceWith(d.nextElementSibling);d.after(p)}if(d=p,p._x_currentIfEl){if(p.nextElementSibling!==p._x_currentIfEl)d.after(p._x_currentIfEl);d=p._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 m=document.importNode(e.content,!0).firstElementChild,g=le(f);Se(m,g,e),m._x_refreshXForScope=Wo(g),s.set(u,m),c.add(m),d.after(m),d=m}),c.forEach((u)=>D(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function Jo(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 Go(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 Xo(e){return typeof e!=="object"&&!isNaN(e)}function Zo(e){return typeof e==="object"&&!Array.isArray(e)}function qn(){}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,vt=-1,ze=!1,Pt=!1,le,re,ce,Ar,Oi=0,xt=!0,Cr,Tr,Or,Ve,zt=!1,F,Ut=!1,He,Hi,$r,Rr,W=!0,Hr=()=>{},Ur,qt="x-",je,_t=!1,be,qr,Kr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Vr=(e)=>e,Yr,Gr=()=>new RegExp(`^${qt}([^:^.]+)\\b`),Et="DEFAULT",V,U=!1,Xr,kt=!1,Ge=0,hr=!1,Kt,en,on,ps=1,At,Vt=!1,Ds,B,br=!1,bn,gn,Ks,ue,mr,vn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Vs,Ws=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 a=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(a))r+=String.fromCharCode(parseInt(a,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))}}},Ks=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 Fs.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}}},Ws=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 b=t[e.name];if(this.checkForDangerousValues(b),typeof b==="function")return b.bind(t);return b}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 a;if(e.computed)a=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else a=e.property.name;this.checkForDangerousKeywords(a);let s=i[a];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let o=e.arguments.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let b=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h;if(e.callee.computed)h=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else h=e.callee.property.name;this.checkForDangerousKeywords(h);let v=b[h];if(typeof v!=="function")throw Error("Value is not a function");l=v.apply(b,o)}else if(e.callee.type==="Identifier"){let b=e.callee.name,h;if(b in t)h=t[b];else throw Error(`Undefined variable: ${b}`);if(typeof h!=="function")throw Error("Value is not a function");let v=r!==null?r:t;l=h.apply(v,o)}else{let b=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof b!=="function")throw Error("Value is not a function");l=b.apply(r,o)}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 b=e.argument.name;if(!(b in t))throw Error(`Undefined variable: ${b}`);let h=t[b];if(e.operator==="++")t[b]=h+1;else if(e.operator==="--")t[b]=h-1;return e.prefix?t[b]:h}else if(e.argument.type==="MemberExpression"){let b=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(h);let v=b[h];if(e.operator==="++")b[h]=v+1;else if(e.operator==="--")b[h]=v-1;return e.prefix?b[h]: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 f=u();switch(e.operator){case"+":return d+f;case"-":return d-f;case"*":return d*f;case"/":return d/f;case"%":return d%f;case"==":return d==f;case"!=":return d!=f;case"===":return d===f;case"!==":return d!==f;case"<":return d<f;case">":return d>f;case"<=":return d<=f;case">=":return d>=f;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 g=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=g,g;else if(e.left.type==="MemberExpression"){let b=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(h),b[h]=g,g}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let b of e.properties){let h=b.computed?this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):b.key.type==="Identifier"?b.key.name:this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),v=this.evaluate({node:b.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[h]=v}return p;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(br.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(gn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return br.set(e,!0),!0}},_a,Ea,we,Xs,Ct=(e,t)=>Xs.call(e,t),_e,ge=(e)=>wn(e)==="[object Map]",Zs=(e)=>typeof e==="string",Te=(e)=>typeof e==="symbol",Ee=(e)=>e!==null&&typeof e==="object",Qs,wn=(e)=>Qs.call(e),_n=(e)=>wn(e).slice(8,-1),Yt=(e)=>Zs(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Xe=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},eo,ka,to,Aa,En,Sa,F=(e,t)=>!Object.is(e,t),ro="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ca,at,x,lt,mr=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,at)if(at.active)at.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,lt.has(this))lt.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))no(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,gr(this),An(this);let e=x,t=O;x=this,O=!0;try{return this.fn()}finally{if(x!==this)X("Active effect was not restored correctly - this is likely a Vue internal bug.");Sn(this),x=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Xt(e);this.deps=this.depsTail=void 0,gr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)lt.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(Tt(this))this.run()}get dirty(){return Tt(this)}},kn=0,ve,xe,O=!0,Cn,je=0,uo=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}},fo=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(!x||!O||x===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==x){if(t=this.activeLink=new uo(x,this),!x.deps)x.deps=x.depsTail=t;else t.prevDep=x.depsTail,x.depsTail.nextDep=t,x.depsTail=t;Tn(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=x.depsTail,t.nextDep=void 0,x.depsTail.nextDep=t,x.depsTail=t,x.deps===t)x.deps=r}}if(x.onTrack)x.onTrack(we({effect:x},e));return t}trigger(e){this.version++,je++,this.notify(e)}notify(e){Jt();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{Gt()}}},Ot,Y,Mt,ke,ho,po,bo,On,Mn=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?So:Dn:i?Ao:Ln).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let a=_e(e);if(!n){let o;if(a&&(o=ho[t]))return o;if(t==="hasOwnProperty")return mo}let s=Reflect.get(e,t,ye(e)?e:r);if(Te(t)?On.has(t):bo(t))return s;if(!n)C(e,"get",t);if(i)return s;if(ye(s)){let o=a&&Yt(t)?s:s.value;return n&&Ee(o)?Lt(o):o}if(Ee(s))return n?Lt(s):Qt(s);return s}},go,vo,xo,yo,It=(e)=>e,De=(e)=>Reflect.getPrototypeOf(e),Eo,ko,Ln,Ao,Dn,So,ee=(e)=>Ee(e)?Qt(e):e,Ae=(e)=>Ee(e)?Lt(e):e,ut,Do,$n=()=>{},$o,Un=(e,{value:t,modifiers:r,expression:n,original:i},{effect:a,cleanup:s})=>{if(!t){let l={};Hs(l),A(e,n)((d)=>{bn(e,d,i)},{scope:l});return}if(t==="key")return jo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let o=A(e,n);a(()=>o((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>ln(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},j,qn,Xo;var Vn=vi(()=>{B=[];Sr=[],Cr=[],Tr=[];Fe=new MutationObserver(Ve);q=[];$e=[];$i={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 zi;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=Nr(s,t),i)break;if(!i)i=e[e.length-1];let a=Object.getOwnPropertyDescriptor(i,t);if(a?.set&&a?.get)return a.set.call(n,r)||!0;return Reflect.set(i,t,r)}};Br={};Rr=Fi;He={};be=new Map,jr=Symbol();Wr=[];V=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",yt,"teleport"];Gr=[];Ce((e,t)=>{if(Ye===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(T(e,(r)=>r._x_deferInit))t._x_ignore=!0});jt=[],Qr=[];sn=[];_t=[];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")ys(e,r,t);else xs(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,a=()=>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):a();else e._x_transition?e._x_transition.in(r):a();return}e._x_hidePromise=e._x_transition?new Promise((s,o)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>o({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=an(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let o=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(o)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};o(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Is=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"]);P={};pn={};mn={};qs={get reactive(){return le},get release(){return ce},get effect(){return te},get raw(){return kr},get transaction(){return Ii},version:"3.17.4",flushAndStopDeferringMutations:Ri,dontAutoEvaluateFunctions:$r,disableEffectScheduling:Ti,startObservingMutations:Rt,stopObservingMutations:Lr,setReactivityEngine:Oi,onAttributeRemoved:Mr,onAttributesAdded:Or,closestDataStack:ae,skipDuringClone:R,onlyDuringClone:ts,addRootSelector:rn,addInitSelector:nn,setErrorHandler:qi,interceptClone:Ce,addScopeToNode:Se,deferMutations:Bi,mapAttributes:Ut,evaluateLater:A,interceptInit:us,initInterceptors:zt,injectMagics:ze,setEvaluator:Vi,setRawEvaluator:Ki,mergeProxies:J,extractProp:Ps,findClosest:T,onElRemoved:Pt,closestRoot:Je,destroyTree:re,interceptor:Pr,transition:St,setStyles:Ge,mutateDom:_,deferInit:ss,directive:E,entangle:hn,throttle:fn,debounce:un,evaluate:W,evaluateRaw:Yi,initTree:D,nextTick:Ft,prefixed:de,prefix:Ji,plugin:Bs,magic:M,store:Rs,start:cs,clone:ns,cloneNode:rs,bound:Ns,$data:Dr,watch:Ar,walk:G,data:Us,bind:zs},ue=qs,br=new WeakMap,gn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}gn.add(t)});Fs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];_a=Object.freeze({}),Ea=Object.freeze([]),we=Object.assign,Xs=Object.prototype.hasOwnProperty,_e=Array.isArray,Qs=Object.prototype.toString,eo=/-\w/g,ka=Xe((e)=>e.replace(eo,(t)=>t.slice(1).toUpperCase())),to=/\B([A-Z])/g,Aa=Xe((e)=>e.replace(to,"-$1").toLowerCase()),En=Xe((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Sa=Xe((e)=>e?`on${En(e)}`:""),Ca=yn(ro+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");lt=new WeakSet;Cn=[];Ot=new WeakMap,Y=Symbol("Object iterate"),Mt=Symbol("Map keys iterate"),ke=Symbol("Array iterate");ho={__proto__:null,[Symbol.iterator](){return ct(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>_e(t)?se(t):t))},entries(){return ct(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 dt(this,"includes",e)},indexOf(...e){return dt(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return dt(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 vr(this,"reduce",e,t)},reduceRight(e,...t){return vr(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 ct(this,"values",(e)=>I(this,e))}};po=Array.prototype;bo=yn("__proto__,__v_isRef,__isVue"),On=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Te));go=class extends Mn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],a=_e(e)&&Yt(t);if(!this._isShallow){let l=Z(i);if(!Q(r)&&!Z(r))i=y(i),r=y(r);if(!a&&ye(i)&&!ye(r))if(l)return X(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=a?Number(t)<e.length:Ct(e,t),o=Reflect.set(e,t,r,ye(e)?e:n);if(e===y(n)&&o){if(!s)H(e,"add",t,r);else if(F(r,i))H(e,"set",t,r,i)}return o}deleteProperty(e,t){let r=Ct(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)H(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Te(t)||!On.has(t))C(e,"has",t);return r}ownKeys(e){return C(e,"iterate",_e(e)?"length":Y),Reflect.ownKeys(e)}},vo=class extends Mn{constructor(e=!1){super(!0,e)}set(e,t){return X(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return X(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},xo=new go,yo=new vo;Eo={get:In(!1,!1)},ko={get:In(!0,!1)};Ln=new WeakMap,Ao=new WeakMap,Dn=new WeakMap,So=new WeakMap;M("nextTick",()=>Ft);M("dispatch",(e)=>me.bind(me,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let a=t(n),o=Ar(()=>{let l;return a((c)=>l=c),l},i);r(o)});M("store",$s);M("data",(e)=>Dr(e));M("root",(e)=>Je(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=J(Oo(e)),e._x_refs_proxy});ut={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return Lo(e,i,t,()=>{let a=Mo(e,r),s=a?a._x_ids[r]:Bn(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);Rn("Focus","focus","focus");Rn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let a=n(t),s=()=>{let d;return a((u)=>d=u),d},o=n(`${t} = __placeholder`),l=(d)=>o(()=>{},{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,f=hn({get(){return d()},set(m){u(m)}},{get(){return s()},set(m){l(m)}});i(f)})});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=yr(r),a=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=a,a._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),a.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((o)=>{a.addEventListener(o,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Se(a,{},e);let s=(o,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(o,l);else if(c.includes("append"))l.parentNode.insertBefore(o,l.nextSibling);else l.appendChild(o)};_(()=>{R(()=>{s(a,i,t),D(a)})()}),e._x_teleportPutBack=()=>{let o=yr(r);_(()=>{s(e._x_teleport,o,t)})},n(()=>_(()=>{a.remove(),re(a)}))});Do=document.createElement("div");$n.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};E("ignore",$n);E("effect",R((e,{expression:t},{effect:r})=>{r(A(e,t))}));$o=["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 a=e;if(t.includes("parent"))a=T(e,(p)=>p!==e);let s=A(a,r),o;if(typeof r==="string")o=A(a,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")o=A(a,`${r()} = __placeholder`);else o=()=>{};let l=()=>{let p;return s((b)=>p=b),_r(p)?p.get():p},c=(p)=>{let b;if(s((h)=>b=h),_r(b))b.set(p);else o(()=>{},{scope:{__placeholder:p}})};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"),f=t.includes("enter"),m=d||u||f,g;if(U)g=()=>{};else if(m){let p=[],b=(h)=>c(Pe(e,t,h,l()));if(d)p.push(oe(e,"change",t,b));if(u){if(p.push(oe(e,"blur",t,b)),e.form){let h=e.form,v=()=>b({target:e});if(!h._x_pendingModelUpdates)h._x_pendingModelUpdates=[];h._x_pendingModelUpdates.push(v),i(()=>{if(h._x_pendingModelUpdates)h._x_pendingModelUpdates.splice(h._x_pendingModelUpdates.indexOf(v),1)})}}if(f)p.push(oe(e,"keydown",t,(h)=>{if(h.key==="Enter")b(h)}));g=()=>p.forEach((h)=>h())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";g=oe(e,p,t,(b)=>{c(Pe(e,t,b,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Ue(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(Pe(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=g,i(()=>e._x_removeModelListeners.default()),e.form){let p=oe(e.form,"reset",[],(b)=>{Ft(()=>e._x_model&&e._x_model.set(Pe(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){c(p)},setWithModifiers:zn(t,c)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";_(()=>{if(Ue(e))if(Array.isArray(p))e.checked=p.some((b)=>b==e.value);else e.checked=!!p;else if(Wt(e))if(typeof p==="boolean")e.checked=Be(e.value)===p;else e.checked=e.value==p;else ln(e,"value",p)})},e.tagName==="SELECT"){let p=new MutationObserver(()=>{e._x_forceModelUpdate(l())});p.observe(e,{childList:!0}),i(()=>p.disconnect())}n(()=>{let p=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(p)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(de("cloak")))));nn(()=>`[${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((a)=>{_(()=>{e.textContent=a})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((a)=>{_(()=>{Array.from(e.children).forEach((s)=>re(s)),e.innerHTML=a??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Ut(Fr(":",Vr(de("bind:"))));Un.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",Un);rn(()=>`[${de("data")}]`);j=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Fo(e))return;let n=e[j];if(n?.expression===t)return;t=t===""?"{}":t;let i={};ze(i,e);let a={};js(a,i);let s=W(e,t,{scope:a});if(s===void 0||s===!0)s={};ze(s,e);let o;if(n?.reactiveData){o=n.reactiveData,qo(o,s);let c={expression:t};e[j]=c,queueMicrotask(()=>{if(e[j]===c)delete e[j]})}else o=le(s);zt(o,r);let l=Se(e,o);R(()=>{o.init&&W(e,o.init)})(),r(()=>{o.destroy&&W(e,o.destroy),l();let c={reactiveData:o};e[j]=c,queueMicrotask(()=>{if(e[j]===c)delete e[j]})})});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 a=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},o=()=>setTimeout(s),l=At((u)=>u?s():a(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,a);else u?o():a()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?o():a();l(u),c=u,d=!1}))});E("for",R((e,{expression:t},{effect:r,cleanup:n})=>{let i=Wo(t),a=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>Ko(e,i,a,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((o)=>_(()=>{re(o),o.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));jn.inline=(e,{expression:t},{cleanup:r})=>{let n=Je(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",jn);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),a=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let o=e.content.cloneNode(!0).firstElementChild;return Se(o,{},e),_(()=>{e.after(o),D(o)}),e._x_currentIfEl=o,e._x_lastRenderedEl=o,e._x_undoIf=()=>{_(()=>{re(o),o.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},o},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((o)=>{o?a():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>Io(e,i))});Ce((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Ut(Fr("@",Vr(de("on:"))));E("on",R((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let a=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,(o)=>{a(()=>{},{scope:{$event:o},params:[o]})});i(()=>s())}));Ze("Collapse","collapse","collapse");Ze("Intersect","intersect","intersect");Ze("Focus","trap","focus");Ze("Mask","mask","mask");E("html",(e,{expression:t})=>{Ke(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(Js);ue.setRawEvaluator(Ys);ue.setReactivityEngine({reactive:Qt,effect:(e,t={})=>{let r;return r=oo(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:ao,raw:y});qn=ue,Xo=qn;/*! 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))}}},Ys=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 Vs.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}}},Js=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 b=t[e.name];if(this.checkForDangerousValues(b),typeof b==="function")return b.bind(t);return b}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((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let b=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h;if(e.callee.computed)h=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else h=e.callee.property.name;this.checkForDangerousKeywords(h);let v=b[h];if(typeof v!=="function")throw Error("Value is not a function");l=v.apply(b,a)}else if(e.callee.type==="Identifier"){let b=e.callee.name,h;if(b in t)h=t[b];else throw Error(`Undefined variable: ${b}`);if(typeof h!=="function")throw Error("Value is not a function");let v=r!==null?r:t;l=h.apply(v,a)}else{let b=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof b!=="function")throw Error("Value is not a function");l=b.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 b=e.argument.name;if(!(b in t))throw Error(`Undefined variable: ${b}`);let h=t[b];if(e.operator==="++")t[b]=h+1;else if(e.operator==="--")t[b]=h-1;return e.prefix?t[b]:h}else if(e.argument.type==="MemberExpression"){let b=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(h);let v=b[h];if(e.operator==="++")b[h]=v+1;else if(e.operator==="--")b[h]=v-1;return e.prefix?b[h]: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 f=u();switch(e.operator){case"+":return d+f;case"-":return d-f;case"*":return d*f;case"/":return d/f;case"%":return d%f;case"==":return d==f;case"!=":return d!=f;case"===":return d===f;case"!==":return d!==f;case"<":return d<f;case">":return d>f;case"<=":return d<=f;case">=":return d>=f;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 g=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=g,g;else if(e.left.type==="MemberExpression"){let b=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(h),b[h]=g,g}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let b of e.properties){let h=b.computed?this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):b.key.type==="Identifier"?b.key.name:this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),v=this.evaluate({node:b.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[h]=v}return p;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(mr.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 mr.set(e,!0),!0}},Aa,Sa,we,Qs,Mt=(e,t)=>Qs.call(e,t),_e,ge=(e)=>_n(e)==="[object Map]",eo=(e)=>typeof e==="string",Te=(e)=>typeof e==="symbol",Ee=(e)=>e!==null&&typeof e==="object",to,_n=(e)=>to.call(e),En=(e)=>_n(e).slice(8,-1),Xt=(e)=>eo(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qe=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},ro,Ca,no,Ta,kn,Oa,K=(e,t)=>!Object.is(e,t),io="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ma,dt,x,ut,gr=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))so(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,vr(this),Sn(this);let e=x,t=O;x=this,O=!0;try{return this.fn()}finally{if(x!==this)Z("Active effect was not restored correctly - this is likely a Vue internal bug.");Cn(this),x=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)}},An=0,ve,xe,O=!0,Tn,Fe=0,ho=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}},po=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(!x||!O||x===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==x){if(t=this.activeLink=new ho(x,this),!x.deps)x.deps=x.depsTail=t;else t.prevDep=x.depsTail,x.depsTail.nextDep=t,x.depsTail=t;On(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=x.depsTail,t.nextDep=void 0,x.depsTail.nextDep=t,x.depsTail=t,x.deps===t)x.deps=r}}if(x.onTrack)x.onTrack(we({effect:x},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,bo,mo,go,Mn,In=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?To:Nn:i?Co:Dn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=_e(e);if(!n){let a;if(o&&(a=bo[t]))return a;if(t==="hasOwnProperty")return vo}let s=Reflect.get(e,t,ye(e)?e:r);if(Te(t)?Mn.has(t):go(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ye(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}},xo,yo,wo,_o,Nt=(e)=>e,Be=(e)=>Reflect.getPrototypeOf(e),Ao,So,Dn,Co,Nn,To,te=(e)=>Ee(e)?rr(e):e,Ae=(e)=>Ee(e)?Bt(e):e,pt,Bo,zn=()=>{},Ho,jn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};js(l),A(e,n)((d)=>{mn(e,d,i)},{scope:l});return}if(t==="key")return Fo(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="";_(()=>cn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},q,Fn,Qo;var Vn=yi(()=>{P=[];Cr=[],Tr=[],Or=[];Ve=new MutationObserver(We);F=[];He=[];Hi={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 Ui;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=Br(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)}};$r={};Rr=Vi;je={};be=new Map,qr=Symbol();Yr=[];V=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",Et,"teleport"];Xr=[];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=[],en=[];on=[];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")_s(e,r,t);else ws(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=ln(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})})})};Ds=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={};bn={};gn={};Ks={get reactive(){return le},get release(){return ce},get effect(){return re},get raw(){return Ar},get transaction(){return Di},version:"3.17.4",flushAndStopDeferringMutations:zi,dontAutoEvaluateFunctions:zr,disableEffectScheduling:Mi,startObservingMutations:Ht,stopObservingMutations:Dr,setReactivityEngine:Ii,onAttributeRemoved:Ir,onAttributesAdded:Mr,closestDataStack:ae,skipDuringClone:R,onlyDuringClone:ns,addRootSelector:nn,addInitSelector:sn,setErrorHandler:Ki,interceptClone:Ce,addScopeToNode:Se,deferMutations:Ri,mapAttributes:Ft,evaluateLater:A,interceptInit:hs,initInterceptors:jt,injectMagics:Ue,setEvaluator:Wi,setRawEvaluator:Yi,mergeProxies:G,extractProp:$s,findClosest:T,onElRemoved:Rt,closestRoot:Xe,destroyTree:ne,interceptor:Pr,transition:Ot,setStyles:Ze,mutateDom:_,deferInit:as,directive:E,entangle:pn,throttle:hn,debounce:fn,evaluate:Y,evaluateRaw:Gi,initTree:D,nextTick:Wt,prefixed:de,prefix:Xi,plugin:Rs,magic:M,store:zs,start:us,clone:ss,cloneNode:is,bound:Ps,$data:Nr,watch:Sr,walk:X,data:qs,bind:Us},ue=Ks,mr=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)});Vs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];Aa=Object.freeze({}),Sa=Object.freeze([]),we=Object.assign,Qs=Object.prototype.hasOwnProperty,_e=Array.isArray,to=Object.prototype.toString,ro=/-\w/g,Ca=Qe((e)=>e.replace(ro,(t)=>t.slice(1).toUpperCase())),no=/\B([A-Z])/g,Ta=Qe((e)=>e.replace(no,"-$1").toLowerCase()),kn=Qe((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Oa=Qe((e)=>e?`on${kn(e)}`:""),Ma=wn(io+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ut=new WeakSet;Tn=[];Lt=new WeakMap,J=Symbol("Object iterate"),Dt=Symbol("Map keys iterate"),ke=Symbol("Array iterate");bo={__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 xr(this,"reduce",e,t)},reduceRight(e,...t){return xr(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))}};mo=Array.prototype;go=wn("__proto__,__v_isRef,__isVue"),Mn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Te));xo=class extends In{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=y(i),r=y(r);if(!o&&ye(i)&&!ye(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,ye(e)?e:n);if(e===y(n)&&a){if(!s)H(e,"add",t,r);else if(K(r,i))H(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)H(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Te(t)||!Mn.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",_e(e)?"length":J),Reflect.ownKeys(e)}},yo=class extends In{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}},wo=new xo,_o=new yo;Ao={get:Ln(!1,!1)},So={get:Ln(!0,!1)};Dn=new WeakMap,Co=new WeakMap,Nn=new WeakMap,To=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=Sr(()=>{let l;return o((c)=>l=c),l},i);r(a)});M("store",Hs);M("data",(e)=>Nr(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(Io(e)),e._x_refs_proxy});pt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return No(e,i,t,()=>{let o=Lo(e,r),s=o?o._x_ids[r]:$n(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);Rn("Focus","focus","focus");Rn("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,f=pn({get(){return d()},set(m){u(m)}},{get(){return s()},set(m){l(m)}});i(f)})});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=wr(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=wr(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),ne(o)}))});Bo=document.createElement("div");zn.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",zn);E("effect",R((e,{expression:t},{effect:r})=>{r(A(e,t))}));Ho=["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,(p)=>p!==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 p;return s((b)=>p=b),Er(p)?p.get():p},c=(p)=>{let b;if(s((h)=>b=h),Er(b))b.set(p);else a(()=>{},{scope:{__placeholder:p}})};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"),f=t.includes("enter"),m=d||u||f,g;if(U)g=()=>{};else if(m){let p=[],b=(h)=>c($e(e,t,h,l()));if(d)p.push(oe(e,"change",t,b));if(u){if(p.push(oe(e,"blur",t,b)),e.form){let h=e.form,v=()=>b({target:e});if(!h._x_pendingModelUpdates)h._x_pendingModelUpdates=[];h._x_pendingModelUpdates.push(v),i(()=>{if(h._x_pendingModelUpdates)h._x_pendingModelUpdates.splice(h._x_pendingModelUpdates.indexOf(v),1)})}}if(f)p.push(oe(e,"keydown",t,(h)=>{if(h.key==="Enter")b(h)}));g=()=>p.forEach((h)=>h())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";g=oe(e,p,t,(b)=>{c($e(e,t,b,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=g,i(()=>e._x_removeModelListeners.default()),e.form){let p=oe(e.form,"reset",[],(b)=>{Wt(()=>e._x_model&&e._x_model.set($e(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){c(p)},setWithModifiers:Hn(t,c)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";_(()=>{if(qe(e))if(Array.isArray(p))e.checked=p.some((b)=>b==e.value);else e.checked=!!p;else if(Gt(e))if(typeof p==="boolean")e.checked=Re(e.value)===p;else e.checked=e.value==p;else cn(e,"value",p)})},e.tagName==="SELECT"){let p=new MutationObserver(()=>{e._x_forceModelUpdate(l())});p.observe(e,{childList:!0}),i(()=>p.disconnect())}n(()=>{let p=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(p)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(de("cloak")))));sn(()=>`[${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(Kr(":",Vr(de("bind:"))));jn.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",jn);nn(()=>`[${de("data")}]`);q=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Vo(e))return;let n=e[q];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Ue(i,e);let o={};Fs(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,Ko(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=Jo(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>Yo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{ne(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));qn.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",qn);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)=>Do(e,i))});Ce((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Ft(Kr("@",Vr(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(Xs);ue.setRawEvaluator(Gs);ue.setReactivityEngine({reactive:rr,effect:(e,t={})=>{let r;return r=lo(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:co,raw:y});Fn=ue,Qo=Fn;/*! 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 Ie=typeof HTMLElement==="function"?HTMLElement:class{};function lr(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 cr(e,t,r={},n=[]){let i=()=>{for(let s of n)if(!e.classList.contains(s))e.classList.add(s);for(let[s,o]of Object.entries(r))if(!e.hasAttribute(s))e.setAttribute(s,o)};i();let a=new MutationObserver(i);a.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>a.disconnect(),{once:!0})}var xi=Symbol.for("bare-v3.styles");function Le(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[xi]??=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 a=e.createElement("style");a.id=t,a.textContent=r,e.head.append(a)}var Oe=null;function Kn(){if(Oe)return Oe;let e=(Vn(),pi(Fn)).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 Wn=(e)=>Kn().reactive(e),Yn=(e)=>Oe?Oe.raw(e):e;function Jn(e,t,r){let n=Kn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function Zo(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},a=null,s=null,o=0,l=null,c=0,d=null,u=new n.MutationObserver((g)=>{if(!a.isConnected||g.some(({target:p})=>s.contains(p)&&!d.contains(p)))f()});function f(){if(!a)return;n.clearTimeout(c),u.disconnect();let g=a.dataset.b3Confirm;if(l&&g&&a.textContent===g)a.replaceChildren(...l);a.removeAttribute("data-b3-armed"),a=s=l=null,d.textContent=""}function m(g){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let p=d;a=g,o=n.performance.now(),s=g.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||g.parentElement;let b=g.dataset.b3Confirm;if(b)l=[...g.childNodes],g.replaceChildren(b);g.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(f,4000),n.requestAnimationFrame(()=>{if(a===g)p.textContent=b||"Press again to confirm"})}e.addEventListener("click",(g)=>{let p=g.target.closest?.("[data-b3-confirm]");if(a&&p!==a)f();if(!p||p.disabled||!e.contains(p))return;if(p===a&&n.performance.now()-o>=350)return f();if(g.preventDefault(),g.stopImmediatePropagation(),p!==a)m(p)},{...i,capture:!0}),e.addEventListener("focusout",({target:g})=>{if(g===a)n.queueMicrotask(()=>g===a&&f())},i),e.addEventListener("keydown",(g)=>{let p=g;if(p.key==="Escape")f();else if(p.repeat&&(p.key==="Enter"||p.key===" ")&&p.target.closest?.("[data-b3-confirm]"))p.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{f(),d?.remove()},{once:!0})}var Gn=Symbol.for("bare-v3.confirm");function Xn(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Gn])return;e[Gn]=!0,Zo(document)}var fe=1.001,Qo=320,ea=30,ta=350,ra="b3-image-viewer-style",na=`
22
+ */});var De=typeof HTMLElement==="function"?HTMLElement:class{};function cr(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 dr(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 wi=Symbol.for("bare-v3.styles");function Ne(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[wi]??=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 Wn(){if(Oe)return Oe;let e=(Vn(),mi(Kn)).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 Yn=(e)=>Wn().reactive(e),Jn=(e)=>Oe?Oe.raw(e):e;function Gn(e,t,r){let n=Wn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function ea(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((g)=>{if(!o.isConnected||g.some(({target:p})=>s.contains(p)&&!d.contains(p)))f()});function f(){if(!o)return;n.clearTimeout(c),u.disconnect();let g=o.dataset.b3Confirm;if(l&&g&&o.textContent===g)o.replaceChildren(...l);o.removeAttribute("data-b3-armed"),o=s=l=null,d.textContent=""}function m(g){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let p=d;o=g,a=n.performance.now(),s=g.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||g.parentElement;let b=g.dataset.b3Confirm;if(b)l=[...g.childNodes],g.replaceChildren(b);g.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(f,4000),n.requestAnimationFrame(()=>{if(o===g)p.textContent=b||"Press again to confirm"})}e.addEventListener("click",(g)=>{let p=g.target.closest?.("[data-b3-confirm]");if(o&&p!==o)f();if(!p||p.disabled||!e.contains(p))return;if(p===o&&n.performance.now()-a>=350)return f();if(g.preventDefault(),g.stopImmediatePropagation(),p!==o)m(p)},{...i,capture:!0}),e.addEventListener("focusout",({target:g})=>{if(g===o)n.queueMicrotask(()=>g===o&&f())},i),e.addEventListener("keydown",(g)=>{let p=g;if(p.key==="Escape")f();else if(p.repeat&&(p.key==="Enter"||p.key===" ")&&p.target.closest?.("[data-b3-confirm]"))p.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{f(),d?.remove()},{once:!0})}var Xn=Symbol.for("bare-v3.confirm");function Zn(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Xn])return;e[Xn]=!0,ea(document)}var fe=1.001,ta=320,ra=30,na=350,ia="b3-image-viewer-style",sa=`
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 er extends Ie{static observedAttributes=["src","alt","max-scale","open"];#e=1;#t=0;#n=0;#o=!1;#s=null;#i=new Map;#a=!1;#h=0;#r=0;#m=0;#g=0;#y=!1;#v=null;#p=null;#w=new WeakSet;#l=null;get scale(){return this.#e}get fitted(){return this.#e<=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.#_()}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.#y)return;if(this.#y=!0,Le(this.ownerDocument,ra,na),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#E(),this.#_(),this.#M(),this.#p=new MutationObserver(()=>{this.#S(),this.#u()}),this.#p.observe(this,{childList:!0}),this.#S(),this.#u()}disconnectedCallback(){this.#v?.abort(),this.#v=null,this.#p?.disconnect(),this.#p=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.#y=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#_(),this.reset();if(e==="alt"){let n=this.#c();if(n)n.alt=this.alt;this.#E()}if(e==="open"){if(this.#S(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#e>this.maxScale)this.zoomTo(this.maxScale)}#c(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#_(){let e=this.#c(),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(),e.tagName==="IMG")this.#k(e)}#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")}#k(e){if(this.#w.has(e))return;if(this.#w.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#A(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#A(e)},0)}#A(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}}))}#S(){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.#c();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}}#f(e){if(this.#e<=fe&&!this.#o){this.#t=0,this.#n=0;return}let t=e.w*this.#e,r=e.h*this.#e;this.#t=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#t)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#u(e){let t=e?.element??this.#c();if(!t)return;let r=this.#e<=fe,n=!r||this.#o;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#t&&!this.#n?"":`translate(${this.#t}px, ${this.#n}px) scale(${this.#e})`,t.style.setProperty("--b3-zoom",String(this.#e)),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}#C(e,t,r,n=this.#d()){if(!n)return;let i=this.#e;e=Math.max(1,Math.min(this.maxScale,e));let a=(t-this.#t)/this.#e,s=(r-this.#n)/this.#e;if(this.#t=t-a*e,this.#n=r-s*e,this.#e=e,this.#f(n),this.#u(n),i!==this.#e)this.#x()}#x(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#e,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#e!==1;this.#e=1,this.#t=0,this.#n=0;let t=this.#d();if(t)this.#f(t);if(this.#u(t),e)this.#x()}zoomTo(e){let t=this.#d();if(t)this.#C(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.#c())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#s=this.#d(),this.#i.size>1||this.#e>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.#e<=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 a=this.#T(),s=i?this.#O():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let o=this.#T(),l=i?this.#O():0,c=this.getBoundingClientRect(),d=this.#e,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#e*(l/s))):this.#e,f=(a.x-c.left-this.#t)/this.#e,m=(a.y-c.top-this.#n)/this.#e;if(this.#t=o.x-c.left-f*u,this.#n=o.y-c.top-m*u,this.#e=u,this.#f(this.#s),this.#u(this.#s),this.#a=!0,d!==this.#e)this.#x()},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.#h=performance.now(),this.#a=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),a=Math.hypot(n.clientX-this.#m,n.clientY-this.#g)<ea;if(i-this.#r<Qo&&a){this.#r=0;let s=this.getBoundingClientRect();this.#C(this.#e>fe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#h=i}else this.#r=i,this.#m=n.clientX,this.#g=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.#h<ta){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.#C(this.#e*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let a=this.#d();if(!a||a.h*this.#e<=a.vh&&!this.#o)return;let s=this.#n;if(this.#n-=n.deltaY,this.#f(a),this.#n===s)return;n.preventDefault(),this.#u(a)},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,a=(s,o)=>{let l=this.#d();if(!l||this.fitted)return!1;return this.#t+=s,this.#n+=o,this.#f(l),this.#u(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#e*1.5);break;case"-":case"_":this.zoomTo(this.#e/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(!a(i,0))return;break;case"ArrowRight":if(!a(-i,0))return;break;case"ArrowUp":if(!a(0,i))return;break;case"ArrowDown":if(!a(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#d();if(n)this.#f(n),this.#u(n)},e)}}var Zn=er;function tr(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=Zn;return Zn=class extends er{},customElements.define(e,r),r}tr();var ia=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,sa=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,oa=350,tt=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),Qn=(e)=>JSON.parse(JSON.stringify(Yn(e))),w=(e,t)=>e!=null&&String(e)===String(t),rr=(e)=>!!e&&typeof e==="object",S=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],si=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function ei(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=tt();t.add(String(n.id))};return e.filter(rr).map((n)=>{r(n),n.cards=si(Array.isArray(n.cards)?n.cards.filter(rr):[]);for(let i of n.cards)if(r(i),Array.isArray(i.subtasks)){for(let a of i.subtasks)if(rr(a))r(a)}return n})}function ti(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((a)=>w(a.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let a of n.cards){let s=S(a),o=s.findIndex((l)=>w(l.id,r));if(o>=0)return void s.splice(o,1)}}}var aa=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function la(e){return[e.title??"",e.description??"",...S(e).map((t)=>t.title??""),...rt(e)].join(`
42
- `).toLowerCase()}function rt(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...S(e).map((n)=>n.title??"")].join(`
43
- `);for(let[,,n]of r.matchAll(ia))t.add(n.toLowerCase());return[...t]}var ri=String.raw`((?:[^()\s]|\([^()\s]*\))+)`,ca=new RegExp(String.raw`!\[([^\]\n]*)\]\(${ri}\)|\[([^\]\n]+)\]\(${ri}\)|\bhttps?:\/\/[^\s<>]+`,"giu");function da(e){if(/[\u0000- \u007f\\]/.test(e))return null;if(/^(https?:|mailto:)/i.test(e))return{href:e,file:!1};if(/^[a-z][a-z\d+.-]*:/i.test(e)||e.startsWith("//"))return null;return{href:e,file:!0}}function sr(e){let t=[],r=0;for(let n of e.matchAll(ca)){let i=n[2]!==void 0,[a]=n,s=i?n[1]:n[3],o=i?n[2]:n[4],l=n.index+a.length;if(!o){let d=a;for(;;){if(d=d.replace(/[.,;:!?'"\]]+$/u,""),!d.endsWith(")")||d.split("(").length>=d.split(")").length)break;d=d.slice(0,-1)}l-=a.length-d.length,a=s=o=d}let c=da(o);if(!c||i&&!c.file&&!/^https?:/i.test(c.href))continue;if(n.index>r)t.push(e.slice(r,n.index));t.push({text:s,...c,...i?{image:i}:{}}),r=l}if(r<e.length)t.push(e.slice(r));return t}var ni=(e)=>sr(e).map((t)=>typeof t==="string"?t:t.text).join(""),nr=null;function ua(e,t){let r=e.ownerDocument;e.replaceChildren(...sr(t).map((n)=>{if(typeof n==="string")return r.createTextNode(n);let i=r.createElement("a");if(i.className="b3-board-ref",i.href=n.href,i.dataset.href=n.href,i.draggable=!1,n.image){let a=r.createElement("img");if(a.src=n.href,a.alt=n.text,a.loading="lazy",a.draggable=!1,i.classList.add("b3-board-image"),i.append(a),n.file)i.dataset.file="";else i.target="_blank",i.rel="noopener noreferrer";return i}if(n.file){if(i.dataset.file="",!nr){let a=r.createElement("template");a.innerHTML=ba,nr=a.content.firstElementChild}i.append(nr.cloneNode(!0))}else if(!/^mailto:/i.test(n.href))i.target="_blank",i.rel="noopener noreferrer";return i.append(n.text),i}))}var fa="b3-board-style",ha=`
41
+ `;class nr extends De{static observedAttributes=["src","alt","max-scale","open"];#e=1;#t=0;#n=0;#a=!1;#s=null;#i=new Map;#l=!1;#h=0;#r=0;#m=0;#g=0;#y=!1;#v=null;#p=null;#w=new WeakSet;#o=null;get scale(){return this.#e}get fitted(){return this.#e<=fe}get src(){return this.#o??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#o=e.src??e.default??String(e);else if(this.#o=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#_()}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.#y)return;if(this.#y=!0,Ne(this.ownerDocument,ia,sa),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#E(),this.#_(),this.#M(),this.#p=new MutationObserver(()=>{this.#S(),this.#u()}),this.#p.observe(this,{childList:!0}),this.#S(),this.#u()}disconnectedCallback(){this.#v?.abort(),this.#v=null,this.#p?.disconnect(),this.#p=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#s=null,this.#l=!1,this.#y=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#_(),this.reset();if(e==="alt"){let n=this.#c();if(n)n.alt=this.alt;this.#E()}if(e==="open"){if(this.#S(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#e>this.maxScale)this.zoomTo(this.maxScale)}#c(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#_(){let e=this.#c(),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(),e.tagName==="IMG")this.#k(e)}#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")}#k(e){if(this.#w.has(e))return;if(this.#w.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#A(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#A(e)},0)}#A(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}}))}#S(){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.#c();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.#a=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}}#f(e){if(this.#e<=fe&&!this.#a){this.#t=0,this.#n=0;return}let t=e.w*this.#e,r=e.h*this.#e;this.#t=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#t)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#u(e){let t=e?.element??this.#c();if(!t)return;let r=this.#e<=fe,n=!r||this.#a;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#t&&!this.#n?"":`translate(${this.#t}px, ${this.#n}px) scale(${this.#e})`,t.style.setProperty("--b3-zoom",String(this.#e)),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}#C(e,t,r,n=this.#d()){if(!n)return;let i=this.#e;e=Math.max(1,Math.min(this.maxScale,e));let o=(t-this.#t)/this.#e,s=(r-this.#n)/this.#e;if(this.#t=t-o*e,this.#n=r-s*e,this.#e=e,this.#f(n),this.#u(n),i!==this.#e)this.#x()}#x(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#e,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#e!==1;this.#e=1,this.#t=0,this.#n=0;let t=this.#d();if(t)this.#f(t);if(this.#u(t),e)this.#x()}zoomTo(e){let t=this.#d();if(t)this.#C(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.#c())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#s=this.#d(),this.#i.size>1||this.#e>fe||this.#a)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.#e<=fe&&!this.#a){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.#e,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#e*(l/s))):this.#e,f=(o.x-c.left-this.#t)/this.#e,m=(o.y-c.top-this.#n)/this.#e;if(this.#t=a.x-c.left-f*u,this.#n=a.y-c.top-m*u,this.#e=u,this.#f(this.#s),this.#u(this.#s),this.#l=!0,d!==this.#e)this.#x()},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.#l){this.#h=performance.now(),this.#l=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),o=Math.hypot(n.clientX-this.#m,n.clientY-this.#g)<ra;if(i-this.#r<ta&&o){this.#r=0;let s=this.getBoundingClientRect();this.#C(this.#e>fe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#h=i}else this.#r=i,this.#m=n.clientX,this.#g=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.#h<na){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.#C(this.#e*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let o=this.#d();if(!o||o.h*this.#e<=o.vh&&!this.#a)return;let s=this.#n;if(this.#n-=n.deltaY,this.#f(o),this.#n===s)return;n.preventDefault(),this.#u(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.#t+=s,this.#n+=a,this.#f(l),this.#u(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#e*1.5);break;case"-":case"_":this.zoomTo(this.#e/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.#f(n),this.#u(n)},e)}}var Qn=nr;function ir(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=Qn;return Qn=class extends nr{},customElements.define(e,r),r}ir();var oa=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,aa=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,la=350,Ie=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),ei=(e)=>JSON.parse(JSON.stringify(Jn(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 ca(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 ai=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function ti(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=ai(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 da=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function ua(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(oa))t.add(n.toLowerCase());return[...t]}var ni=String.raw`((?:[^()\s]|\([^()\s]*\))+)`,fa=new RegExp(String.raw`!\[([^\]\n]*)\]\(${ni}\)|\[([^\]\n]+)\]\(${ni}\)|\bhttps?:\/\/[^\s<>]+`,"giu");function ha(e){if(/[\u0000- \u007f\\]/.test(e))return null;if(/^(https?:|mailto:)/i.test(e))return{href:e,file:!1};if(/^[a-z][a-z\d+.-]*:/i.test(e)||e.startsWith("//"))return null;return{href:e,file:!0}}function or(e){let t=[],r=0;for(let n of e.matchAll(fa)){let i=n[2]!==void 0,[o]=n,s=i?n[1]:n[3],a=i?n[2]:n[4],l=n.index+o.length;if(!a){let d=o;for(;;){if(d=d.replace(/[.,;:!?'"\]]+$/u,""),!d.endsWith(")")||d.split("(").length>=d.split(")").length)break;d=d.slice(0,-1)}l-=o.length-d.length,o=s=a=d}let c=ha(a);if(!c||i&&!c.file&&!/^https?:/i.test(c.href))continue;if(n.index>r)t.push(e.slice(r,n.index));t.push({text:s,...c,...i?{image:i}:{}}),r=l}if(r<e.length)t.push(e.slice(r));return t}var ii=(e)=>or(e).map((t)=>typeof t==="string"?t:t.text).join(""),sr=null;function pa(e,t){let r=e.ownerDocument;e.replaceChildren(...or(t).map((n)=>{if(typeof n==="string")return r.createTextNode(n);let i=r.createElement("a");if(i.className="b3-board-ref",i.href=n.href,i.dataset.href=n.href,i.draggable=!1,n.image){let o=r.createElement("img");if(o.src=n.href,o.alt=n.text,o.loading="lazy",o.draggable=!1,i.classList.add("b3-board-image"),i.append(o),n.file)i.dataset.file="";else i.target="_blank",i.rel="noopener noreferrer";return i}if(n.file){if(i.dataset.file="",!sr){let o=r.createElement("template");o.innerHTML=va,sr=o.content.firstElementChild}i.append(sr.cloneNode(!0))}else if(!/^mailto:/i.test(n.href))i.target="_blank",i.rel="noopener noreferrer";return i.append(n.text),i}))}var ba="b3-board-style",ma=`
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));}
@@ -133,6 +133,19 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
133
133
  .b3-board-subtask>.b3-board-quiet{margin-block:calc((1.4em + .5rem - var(--b3-board-hit)) / 2);}
134
134
  .b3-board-subtask>.b3-board-quiet>.b3-board-icon{inline-size:.8125rem;block-size:.8125rem;}
135
135
  .b3-board-subtask[data-done] .b3-board-title{text-decoration:line-through;color:var(--b3-color-muted);}
136
+ .b3-board-foot{display:flex;align-items:center;gap:.5rem;min-inline-size:0;}
137
+ .b3-board-foot>.b3-board-toggle{min-inline-size:0;}
138
+ .b3-board-ago{flex:none;margin-inline-start:auto;font-size:.6875rem;color:var(--b3-color-muted);opacity:.8;font-variant-numeric:tabular-nums;white-space:nowrap;}
139
+ .b3-board-talk{flex:none;display:inline-flex;align-items:center;gap:.1875rem;font-variant-numeric:tabular-nums;}
140
+ .b3-board-talk>.b3-board-icon{inline-size:.75rem;block-size:.75rem;}
141
+ .b3-board-comments{display:grid;gap:.375rem;margin:0;padding:0;list-style:none;}
142
+ .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;
143
+ border-radius:var(--b3-radius-small,.375rem);background:var(--b3-board-soft);}
144
+ .b3-board-comment-meta{font-size:.6875rem;color:var(--b3-color-muted);}
145
+ .b3-board-comment-meta>b{font-weight:600;color:var(--b3-color-text);}
146
+ .b3-board-comment-text{grid-column:1;white-space:pre-wrap;overflow-wrap:break-word;}
147
+ .b3-board-comment>.b3-board-quiet{grid-column:2;grid-row:1 / span 2;margin:-.25rem -.25rem 0 0;}
148
+ .b3-board-comment>.b3-board-quiet>.b3-board-icon{inline-size:.8125rem;block-size:.8125rem;}
136
149
  .b3-board-actions{display:flex;flex-wrap:wrap;gap:0 .5rem;margin-inline-start:-.375rem;}
137
150
  .b3-board-columns>.b3-board-add{flex:none;min-block-size:var(--b3-board-hit);}
138
151
  .b3-board-quiet[data-b3-armed]{inline-size:auto;padding-inline:.5rem;color:var(--b3-color-danger);font-size:.8125rem;}
@@ -179,9 +192,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
179
192
  :is(.b3-board-cards,.b3-board-subtasks)[data-b3-drop="end"]{box-shadow:inset 0 -3px 0 -1px var(--b3-color-accent);}
180
193
  .b3-board-columns[data-b3-drop="end"]{box-shadow:inset -3px 0 0 -1px var(--b3-color-accent);}
181
194
  @media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-ghost{rotate:none;}}
182
- `,ne=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,ii=ne('<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"/>'),Qe=ne('<path d="M5 12h14M12 5v14"/>'),ir=ne('<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"/>'),pa=ne('<path d="m9 18 6-6-6-6"/>'),ba=ne('<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"/>'),ma=ne('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),ga=ne('<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"/>'),et=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
195
+ `,j=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,si=j('<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=j('<path d="M5 12h14M12 5v14"/>'),it=j('<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"/>'),ga=j('<path d="m9 18 6-6-6-6"/>'),va=j('<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"/>'),oi=j('<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>'),xa=j('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),ya=j('<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})">
183
196
  <textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
184
- b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,va=`
197
+ b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,wa=`
185
198
  <div class="b3-board-filters" b3x-bind:hidden="!tokens().length" role="group" aria-label="Filter">
186
199
  <span class="b3-board-caption" aria-hidden="true">Filter</span>
187
200
  <template b3x-for="token in tokens()" b3x-bind:key="token">
@@ -193,30 +206,30 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
193
206
  <template b3x-for="column in columns" b3x-bind:key="column.id">
194
207
  <section class="b3-board-column" b3x-bind:data-column="column.id" b3x-bind:data-kind="column.kind || null" b3x-bind:aria-label="column.name">
195
208
  <header class="b3-board-column-header">
196
- ${et("name","column.id",!1)}
209
+ ${Me("name","column.id",!1)}
197
210
  <button type="button" class="b3-board-column-name" b3x-show="!isEditing('name', column.id)"
198
211
  b3x-on:click="edit('name', column.id, column.name)" b3x-on:keydown="keyColumn($event, column)" b3x-text="column.name || 'Untitled'"></button>
199
212
  <span class="b3-board-count" b3x-text="count(column)"></span>
200
213
  <button type="button" class="b3-board-quiet b3-board-add-card" b3x-show="!readonly" b3x-bind:aria-label="'Add card to ' + (column.name || 'Untitled')"
201
- b3x-on:click="addCard(column)">${Qe}</button>
214
+ b3x-on:click="addCard(column)">${nt}</button>
202
215
  <button type="button" class="b3-board-quiet b3-board-remove" data-b3-confirm="Delete?" b3x-show="!readonly" b3x-bind:aria-label="'Delete column ' + (column.name || 'Untitled')"
203
- b3x-on:click="removeColumn(column)">${ir}</button>
216
+ b3x-on:click="removeColumn(column)">${it}</button>
204
217
  </header>
205
218
  <ol class="b3-board-cards">
206
219
  <template b3x-for="card in visible(column)" b3x-bind:key="card.id">
207
220
  <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)">
208
- <span class="b3-board-grip" b3x-show="!readonly">${ii}</span>
221
+ <span class="b3-board-grip" b3x-show="!readonly">${si}</span>
209
222
  <div class="b3-board-card-head">
210
- ${et("title","card.id")}
223
+ ${Me("title","card.id")}
211
224
  <span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('title', card.id)" b3x-on:click="edit('title', card.id, card.title)"
212
225
  b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
213
226
  <span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
214
227
  <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)"
215
- b3x-on:click="addDetails(card)">${ma}</button>
228
+ b3x-on:click="addDetails(card)">${xa}</button>
216
229
  <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)"
217
- b3x-on:click="removeCard(column, card)">${ir}</button>
230
+ b3x-on:click="removeCard(column, card)">${it}</button>
218
231
  <button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
219
- b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${ga}</button>
232
+ b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${ya}</button>
220
233
  </span>
221
234
  </div>
222
235
  <div class="b3-board-tags" b3x-show="tokensOf(card).length">
@@ -224,34 +237,49 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
224
237
  <button type="button" class="b3-board-chip" b3x-bind:data-mention="mention(token)" b3x-bind:aria-pressed="pressed(token)" b3x-on:click="toggleFilter(token)" b3x-text="token"></button>
225
238
  </template>
226
239
  </div>
240
+ <div class="b3-board-foot" b3x-show="(disclosable(card) && (hasDetails(card) || isOpen(card))) || ago(card.updated)">
227
241
  <button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
228
242
  b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
229
- ${pa}
243
+ ${ga}
230
244
  <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>
245
+ <span class="b3-board-talk" b3x-show="commentsOf(card).length" b3x-bind:aria-label="commentsOf(card).length + ' comments'">${oi}<span b3x-text="commentsOf(card).length"></span></span>
231
246
  <span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
232
- <span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length">Hide details</span>
247
+ <span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length && !commentsOf(card).length">Hide details</span>
233
248
  </button>
249
+ <span class="b3-board-ago" b3x-show="ago(card.updated)" b3x-bind:title="card.updated ? 'Updated ' + card.updated : null" b3x-text="ago(card.updated)"></span>
250
+ </div>
234
251
  <template b3x-if="isOpen(card)">
235
252
  <div class="b3-board-body">
236
- ${et("description","card.id")}
253
+ ${Me("description","card.id")}
237
254
  <div class="b3-board-description" role="button" tabindex="0" b3x-show="card.description && !isEditing('description', card.id)"
238
255
  b3x-on:click="edit('description', card.id, card.description)" b3x-on:keydown="keyText($event, 'description', card.id, card.description)"
239
256
  b3x-effect="rich($el, card.description)"></div>
240
257
  <ul class="b3-board-subtasks" b3x-show="subtasksOf(card).length">
241
258
  <template b3x-for="sub in subtasksOf(card)" b3x-bind:key="sub.id">
242
259
  <li class="b3-board-subtask" b3x-bind:data-subtask="sub.id" b3x-bind:data-done="sub.done ? '' : null">
243
- <span class="b3-board-subtask-grip" b3x-show="!readonly">${ii}</span>
260
+ <span class="b3-board-subtask-grip" b3x-show="!readonly">${si}</span>
244
261
  <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)">
245
- ${et("subtask","sub.id",!1)}
262
+ ${Me("subtask","sub.id",!1)}
246
263
  <span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('subtask', sub.id)"
247
264
  b3x-on:click="edit('subtask', sub.id, sub.title)" b3x-on:keydown="keySubtask($event, card, sub)" b3x-effect="rich($el, sub.title)"></span>
248
- <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)">${ir}</button>
265
+ <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>
266
+ </li>
267
+ </template>
268
+ </ul>
269
+ <ul class="b3-board-comments" b3x-show="commentsOf(card).length" aria-label="Comments">
270
+ <template b3x-for="comment in commentsOf(card)" b3x-bind:key="comment.id">
271
+ <li class="b3-board-comment" b3x-bind:data-comment="comment.id">
272
+ <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>
273
+ <div class="b3-board-comment-text" b3x-effect="rich($el, comment.text)"></div>
274
+ <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>
249
275
  </li>
250
276
  </template>
251
277
  </ul>
278
+ ${Me("comment","card.id")}
252
279
  <div class="b3-board-actions" b3x-show="!readonly">
253
- <button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${Qe}<span>Add details</span></button>
254
- <button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${Qe}<span>Add subtask</span></button>
280
+ <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>
281
+ <button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${nt}<span>Add subtask</span></button>
282
+ <button type="button" class="b3-board-link" b3x-show="!isEditing('comment', card.id)" b3x-on:click="edit('comment', card.id, '')">${oi}<span>Comment</span></button>
255
283
  </div>
256
284
  </div>
257
285
  </template>
@@ -260,10 +288,10 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
260
288
  </ol>
261
289
  </section>
262
290
  </template>
263
- <button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${Qe}<span>Add column</span></button>
291
+ <button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${nt}<span>Add column</span></button>
264
292
  </div>
265
- <span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class oi extends Ie{static observedAttributes=["readonly","search"];#e=null;#t=null;#n=null;#o=null;#s=null;#i=!1;#a=null;#h=null;#r=null;#m=!1;#g=null;#y=0;#v=Math.random().toString(36).slice(2,8);#p=!1;#w=[];get columns(){let e=Qn(this.#t?.columns??this.#n??[]),t=this.#t?.editing;if(t?.fresh)ti(e,t);return e}set columns(e){let t=ei(Qn(e));if(!this.#t){this.#n=t;return}this.#b();let r=this.#t;if(r.columns=t,r.editing&&!this.#l(r.editing.id))r.editing=null}get filter(){return[...this.#t?.filter??this.#o??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#t){if(t.join(" ")!==this.#t.filter.join(" "))this.#t.kept=[];this.#t.filter=t}else this.#o=t}get search(){return this.#t?.search??this.#s??""}set search(e){let t=String(e??"");if(this.#t){if(t!==this.#t.search)this.#t.kept=[];this.#t.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.#t;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((a)=>w(a.id,r))??t.columns.find((a)=>String(a.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.#g}set upload(e){this.#g=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.#e&&e.readyState==="loading"){if(!this.#i)this.#i=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#i=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(Le(e,fa,ha),Xn(),!this.#e){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=ei(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#e=e.createElement("div"),this.#e.className="b3-board-ui",this.append(this.#e),this.#t=Jn(this.#e,va,this.#_(r??[],this.#o??[],this.#s??this.getAttribute("search")??"")),this.#n=this.#o=this.#s=null}else if(this.#e.parentNode!==this)this.append(this.#e);this.#h=new MutationObserver(()=>{if(this.#e&&this.#e.parentNode!==this)this.append(this.#e)}),this.#h.observe(this,{childList:!0}),this.#C(),cr(this,this.#a.signal,{role:"region"})}disconnectedCallback(){this.#b(),this.#a?.abort(),this.#a=null,this.#x(),this.#h?.disconnect(),this.#h=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#t)return;if(this.#t.readonly=this.readonly,this.#t.viewed={},this.readonly)this.#b(),this.#t.editing=null}#l(e){for(let t of this.#t?.columns??[]){if(w(t.id,e))return t;for(let r of t.cards)if(w(r.id,e)||S(r).some((n)=>w(n.id,e)))return r}return null}#c(e){this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}#_(e,t,r){let n=this,i=(o)=>this.#c(o),a=(o)=>{for(let l of s.columns){let c=l.cards.findIndex((d)=>w(d.id,o));if(c>=0)return{column:l,index:c,card:l.cards[c]}}return null},s=Wn({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,viewed:{},tokensOf:rt,subtasksOf:S,label(o){let l=String(o??"");return l.replace(sa,"").trim()||l},pressed(o){return String(s.filter.includes(o))},mention(o){return o.startsWith("@")?"":null},starred(o){return String(!!o.starred)},hasDetails(o){return!!(o.description||S(o).length)},complete(o){let l=S(o).length;return l>0&&s.done(o)===l},preview(o){let l=String(o.description??"");return l.split(`
266
- `).map(ni).find((d)=>d.trim())?.trim()??(sr(l).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(o){return ni(s.label(o))},rich(o,l){ua(o,String(l??""))},keyText(o,l,c,d){if(o.target!==o.currentTarget||o.key!=="Enter"&&o.key!==" ")return;o.preventDefault(),o.stopPropagation(),s.edit(l,c,d)},isOpen(o){let l=s.viewed[String(o.id)];return s.readonly&&l!==void 0?l:!!o.expanded},expanded(o){return String(s.isOpen(o))},isEditing(o,l){return!!s.editing&&s.editing.field===o&&s.editing.id===l},focusEditor(o){queueMicrotask(()=>n.#S(o))},blurEditor(o,l){if(s.isEditing(o,l))s.commit()},tokens(){let o=new Set;for(let l of s.columns)for(let c of l.cards)for(let d of rt(c))o.add(d);return[...o].sort()},visible(o){let l=aa(s.search);if(!s.filter.length&&!l.length)return o.cards;let c=s.editing&&n.#l(s.editing.id);return o.cards.filter((d)=>{if(d===c||s.kept.some((m)=>w(d.id,m)))return!0;let u=rt(d),f=l.length?la(d):"";return s.filter.every((m)=>u.includes(m))&&l.every((m)=>f.includes(m))})},count(o){let l=s.visible(o).length;return l===o.cards.length?String(l):`${l}/${o.cards.length}`},done(o){return S(o).filter((l)=>l.done).length},disclosable(o){return!!(o.description||S(o).length||!s.readonly)},toggleFilter(o){s.kept=[],s.filter=s.filter.includes(o)?s.filter.filter((l)=>l!==o):[...s.filter,o]},setFilter(o){s.kept=[],s.filter=o},toggleStar(o){let l=a(o.id);if(s.readonly||!l)return;if(o.starred)delete o.starred;else o.starred=!0;l.column.cards=si(l.column.cards);let c=!!o.starred;s.announcement=`${o.title??""} ${c?"starred":"unstarred"}`,i({type:"star",card:o.id,starred:c}),n.#f(o.id)},toggle(o){if(s.readonly){s.viewed={...s.viewed,[String(o.id)]:!s.isOpen(o)};return}o.expanded=!o.expanded,i({type:"toggle",card:o.id,expanded:o.expanded})},edit(o,l,c,d=!1,u=!1){if(s.readonly||n.#r?.started)return;if(s.editing&&!s.isEditing(o,l))s.commit();s.editing={field:o,id:l,draft:c??"",fresh:d,opened:u},n.#d()},addDetails(o){if(s.readonly)return;let l=!o.expanded;o.expanded=!0,s.edit("description",o.id,String(o.description??""),!1,l)},keyEditor(o,l){if(o.stopPropagation(),o.key==="Escape")o.preventDefault(),s.cancel();else if(o.key==="Enter"&&!(l&&o.shiftKey)&&!o.isComposing)o.preventDefault(),s.commit(!0)},pasteEditor(o,l,c){let d=[...o.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(s.readonly||!n.upload||l!=="title"&&l!=="description"||!d.length)return;if(o.clipboardData?.getData("text/plain").trim())return;o.preventDefault();for(let u of d)n.#E(c,u,l==="description"?o.target:null)},cancel(){let o=s.editing;if(s.editing=null,o?.fresh)s.discard(o);if(o?.opened)s.close(o);n.#u(o)},close(o){let l=n.#l(o.id);if(l&&!s.hasDetails(l))l.expanded=!1},commit(o=!1){let l=s.editing;if(!l)return;if(s.editing=null,s.readonly)return;let c=l.field==="description"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),d=n.#l(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==="name"){let f=d;if(c&&c!==f.name)f.name=c,u={type:"edit",column:f.id,field:"name"};if(l.fresh)u={type:"add",column:f.id}}else if(l.field==="subtask"){let f=d,m=S(f).find((g)=>w(g.id,l.id));if(!c)return s.removeSubtask(f,m);if(c!==m.title)m.title=c,u={type:"edit",card:f.id,field:"subtask",subtask:m.id};if(l.fresh)u={type:"subtask",card:f.id,subtask:m.id,op:"add"}}else{let f=d,m=l.field;if((c||m==="description")&&c!==(f[m]??""))f[m]=c,u={type:"edit",card:f.id,field:m};if(l.fresh)u={type:"add",card:f.id,column:a(f.id).column.id},s.kept=[...s.kept,f.id]}if(u)i(u);if(l.fresh&&l.field==="subtask"&&o)s.addSubtask(d);else if(l.fresh&&l.field==="title"&&o&&!n.hasAttribute("compact"))s.addDetails(d);else n.#u(l)},discard(o){ti(s.columns,o)},settle(){if(s.editing)s.commit()},addCard(o){if(s.readonly)return;s.settle();let l={id:tt(),title:""};o.cards.push(l),s.edit("title",l.id,"",!0)},addColumn(){if(s.readonly)return;s.settle();let o={id:tt(),name:"",cards:[]};s.columns.push(o),s.edit("name",o.id,"",!0)},addSubtask(o){if(s.readonly)return;s.settle();let l={id:tt(),title:"",done:!1};if(o.expanded=!0,!Array.isArray(o.subtasks))o.subtasks=[];o.subtasks.push(l),s.edit("subtask",l.id,"",!0)},removeCard(o,l){if(s.readonly)return;o.cards=o.cards.filter((c)=>c!==l),i({type:"remove",card:l.id,column:o.id})},removeColumn(o){if(s.readonly)return;s.columns=s.columns.filter((l)=>l!==o),i({type:"remove",column:o.id})},removeSubtask(o,l){if(s.readonly)return;o.subtasks=S(o).filter((c)=>c!==l),i({type:"subtask",card:o.id,subtask:l.id,op:"remove"})},check(o,l,c){if(s.readonly)return;l.done=c,i({type:"check",card:o.id,subtask:l.id,done:c})},keyCard(o,l){if(o.target!==o.currentTarget)return;if(o.key==="Enter")return o.preventDefault(),s.edit("title",l.id,l.title);if(!o.altKey||s.readonly)return;let c=a(l.id);if(!c)return;let d=getComputedStyle(n).direction==="rtl",u={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[o.key];if(!u)return;if(o.preventDefault(),o.key==="ArrowUp"||o.key==="ArrowDown"){let m=s.visible(c.column),g=m[m.indexOf(c.card)+u];if(g&&!g.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(g));return}let f=s.columns[s.columns.indexOf(c.column)+u];if(f)n.moveCard(l.id,f.id,Math.min(c.index,f.cards.length))},keySubtask(o,l,c){s.keyText(o,"subtask",c.id,c.title);let d=o.key==="ArrowUp"?-1:o.key==="ArrowDown"?1:0;if(!o.altKey||!d||s.readonly)return;o.preventDefault(),o.stopPropagation(),n.#A(l,c.id,S(l).indexOf(c)+d)},keyColumn(o,l){if(!o.altKey||s.readonly)return;let c=getComputedStyle(n).direction==="rtl",d=o.key==="ArrowLeft"?c?1:-1:o.key==="ArrowRight"?c?-1:1:0;if(!d)return;o.preventDefault();let u=s.columns.indexOf(l)+d;if(u>=0&&u<s.columns.length)n.moveColumn(l.id,u)}});return s}async#E(e,t,r){let n=this.#t,i=()=>n.editing?.field==="description"&&w(n.editing.id,e)?n.editing:null,a=`![Uploading image ${this.#v}-${++this.#y}…]()`,s="",o=i();if(o&&r){let{selectionStart:h,selectionEnd:v}=r;s=h&&r.value[h-1]!==`
293
+ <span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class li extends De{static observedAttributes=["readonly","search"];#e=null;#t=null;#n=null;#a=null;#s=null;#i=!1;#l=null;#h=null;#r=null;#m=!1;#g=null;#y=0;#v=Math.random().toString(36).slice(2,8);#p=!1;#w=[];get columns(){let e=ei(this.#t?.columns??this.#n??[]),t=this.#t?.editing;if(t?.fresh)ri(e,t);return e}set columns(e){let t=ti(ei(e));if(!this.#t){this.#n=t;return}this.#b();let r=this.#t;if(r.columns=t,r.editing&&!this.#o(r.editing.id))r.editing=null}get filter(){return[...this.#t?.filter??this.#a??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#t){if(t.join(" ")!==this.#t.filter.join(" "))this.#t.kept=[];this.#t.filter=t}else this.#a=t}get search(){return this.#t?.search??this.#s??""}set search(e){let t=String(e??"");if(this.#t){if(t!==this.#t.search)this.#t.kept=[];this.#t.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.#t;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.#g}set upload(e){this.#g=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.#e&&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,ba,ma),Zn(),!this.#e){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=ti(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#e=e.createElement("div"),this.#e.className="b3-board-ui",this.append(this.#e),this.#t=Gn(this.#e,wa,this.#_(r??[],this.#a??[],this.#s??this.getAttribute("search")??"")),this.#n=this.#a=this.#s=null}else if(this.#e.parentNode!==this)this.append(this.#e);this.#h=new MutationObserver(()=>{if(this.#e&&this.#e.parentNode!==this)this.append(this.#e)}),this.#h.observe(this,{childList:!0}),this.#C(),dr(this,this.#l.signal,{role:"region"})}disconnectedCallback(){this.#b(),this.#l?.abort(),this.#l=null,this.#x(),this.#h?.disconnect(),this.#h=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#t)return;if(this.#t.readonly=this.readonly,this.#t.viewed={},this.readonly)this.#b(),this.#t.editing=null}#o(e){for(let t of this.#t?.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}#c(e){let t="card"in e&&e.card!=null&&e.type!=="toggle"&&e.type!=="remove"?this.#o(e.card):null;if(t){if(t.updated=new Date().toISOString(),e.type==="add")t.created=t.updated}this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}#_(e,t,r){let n=this,i=(a)=>this.#c(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=Yn({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,viewed:{},tokensOf:st,subtasksOf:C,commentsOf:rt,now:Date.now(),ago(a){return ca(a,s.now)},label(a){let l=String(a??"");return l.replace(aa,"").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(`
294
+ `).map(ii).find((d)=>d.trim())?.trim()??(or(l).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(a){return ii(s.label(a))},rich(a,l){pa(a,String(l??""))},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=da(s.search);if(!s.filter.length&&!l.length)return a.cards;let c=s.editing&&n.#o(s.editing.id);return a.cards.filter((d)=>{if(d===c||s.kept.some((m)=>w(d.id,m)))return!0;let u=st(d),f=l.length?ua(d):"";return s.filter.every((m)=>u.includes(m))&&l.every((m)=>f.includes(m))})},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},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=ai(l.column.cards);let c=!!a.starred;s.announcement=`${a.title??""} ${c?"starred":"unstarred"}`,i({type:"star",card:a.id,starred:c}),n.#f(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){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},n.#d()},addDetails(a){if(s.readonly)return;let l=!a.expanded;a.expanded=!0,s.edit("description",a.id,String(a.description??""),!1,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.#E(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.#u(a)},close(a){let l=n.#o(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.#o(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 f=d;if(c){let m={id:Ie(),at:new Date().toISOString(),by:n.getAttribute("author")||"you",text:c};f.comments=[...rt(f),m],u={type:"comment",card:f.id,comment:m.id,op:"add"}}}else if(l.field==="name"){let f=d;if(c&&c!==f.name)f.name=c,u={type:"edit",column:f.id,field:"name"};if(l.fresh)u={type:"add",column:f.id}}else if(l.field==="subtask"){let f=d,m=C(f).find((g)=>w(g.id,l.id));if(!c)return s.removeSubtask(f,m);if(c!==m.title)m.title=c,u={type:"edit",card:f.id,field:"subtask",subtask:m.id};if(l.fresh)u={type:"subtask",card:f.id,subtask:m.id,op:"add"}}else{let f=d,m=l.field;if((c||m==="description")&&c!==(f[m]??""))f[m]=c,u={type:"edit",card:f.id,field:m};if(l.fresh)u={type:"add",card:f.id,column:o(f.id).column.id},s.kept=[...s.kept,f.id]}if(u)i(u);if(l.fresh&&l.field==="subtask"&&a)s.addSubtask(d);else if(l.fresh&&l.field==="title"&&a&&!n.hasAttribute("compact"))s.addDetails(d);else n.#u(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 m=s.visible(c.column),g=m[m.indexOf(c.card)+u];if(g&&!g.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(g));return}let f=s.columns[s.columns.indexOf(c.column)+u];if(f)n.moveCard(l.id,f.id,Math.min(c.index,f.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.#A(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#E(e,t,r){let n=this.#t,i=()=>n.editing?.field==="description"&&w(n.editing.id,e)?n.editing:null,o=`![Uploading image ${this.#v}-${++this.#y}…]()`,s="",a=i();if(a&&r){let{selectionStart:h,selectionEnd:v}=r;s=h&&r.value[h-1]!==`
267
295
  `?`
268
- ${a}`:a,o.draft=r.value=r.value.slice(0,h)+s+r.value.slice(v),r.setSelectionRange(h+s.length,h+s.length)}let l=n.columns.find((h)=>h.cards.some((v)=>w(v.id,e))),c=null;try{c=await this.#g?.(t,{card:e,column:l?.id})}catch(h){console.warn("b3-board: image upload failed",h)}let d=c?`![](${String(c).replace(/[\s()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!d)this.#k("Image not added");while(this.#p)await new Promise((h)=>this.#w.push(h));let u=(h)=>{if(!s)return null;let v=h.indexOf(s),z=v>=0?v:h.indexOf(a);if(z<0)return null;let ie=v>=0?s:a;return[z,z+ie.length,d?ie.replace(a,d):""]},f=(h)=>{if(!s)return d?h.trim()?`${h.replace(/\s+$/,"")}
269
- ${d}`:d:h;let v=u(h);return v?h.slice(0,v[0])+v[2]+h.slice(v[1]):h},m=i();if(m){let h=this.querySelector("textarea.b3-board-editor"),v=h?.value===m.draft&&u(h.value);if(h&&v){let[z,ie,nt]=v,{selectionStart:ai,selectionEnd:li,selectionDirection:ci}=h,or=(Me)=>Me>=ie?Me+nt.length-(ie-z):Me>z?z+nt.length:Me;h.setRangeText(nt,z,ie),h.setSelectionRange(or(ai),or(li),ci??void 0),m.draft=h.value}else if(f(m.draft)!==m.draft)m.draft=f(m.draft);else if(d)this.#k("Image not added");return}let g=this.#l(e);if(s&&!String(g?.description??"").includes(a))g=n.columns.flatMap((h)=>h.cards).find((h)=>String(h.description??"").includes(a))??g;let p=String(g?.description??""),b=f(p).trim();if(!g||this.readonly||b===p.trim()){if(d)this.#k("Image not added");return}g.description=b,g.expanded=!0,this.#c({type:"edit",card:g.id,field:"description"})}#k(e){let t=this.#t;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#t;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>w(f.id,e))),a=n.columns.find((u)=>w(u.id,t));if(!i||!a)return!1;let s=i.cards.findIndex((u)=>w(u.id,e)),[o]=i.cards.splice(s,1),l=a.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(a.cards.length,r)),d=o.starred?Math.min(c,l):Math.max(c,l);if(a.cards.splice(d,0,o),i===a&&s===d)return!1;return n.announcement=`${o.title??""} moved to ${a.name??""}, position ${d+1} of ${a.cards.length}`,this.#c({type:"move",card:o.id,from:i.id,to:a.id,index:d}),this.#f(o.id),!0}moveColumn(e,t){let r=this.#t;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),a=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(a,0,i),n===a)return!1;return r.announcement=`${i.name??""} moved to position ${a+1} of ${r.columns.length}`,this.#c({type:"reorder",column:i.id,index:a}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#A(e,t,r){let n=this.#t,i=S(e),a=i.findIndex((l)=>w(l.id,t));if(!n||this.readonly||a<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(a===s)return!1;let[o]=i.splice(a,1);return i.splice(s,0,o),n.announcement=`${o.title??""} moved to position ${s+1} of ${i.length}`,this.#c({type:"subtask",card:e.id,subtask:o.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(o.id))}"] .b3-board-title`)?.focus()),!0}#S(e){if(!e.isConnected)return;e.focus({preventScroll:!0}),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,a=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),s=a(),o=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=a(),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",o,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#d(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#e?.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.#e?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#f(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#u(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})})}#C(){this.#a?.abort(),this.#a=new AbortController;let e=this.#a.signal,t=this.ownerDocument.defaultView;this.addEventListener("pointerdown",(i)=>this.#M(i),{signal:e}),t.addEventListener("pointermove",(i)=>this.#N(i),{signal:e}),t.addEventListener("pointerup",(i)=>this.#P(i),{signal:e}),t.addEventListener("pointercancel",(i)=>{if(i.pointerId===this.#r?.pointerId)this.#b()},{signal:e}),t.addEventListener("keydown",(i)=>{if(i.key==="Escape"&&this.#r?.started)i.preventDefault(),this.#b()},{signal:e}),this.addEventListener("touchmove",(i)=>{if(this.#r?.started)i.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(i)=>{if(this.#r)i.preventDefault()},{signal:e}),this.addEventListener("click",(i)=>{if(!this.#m)return;this.#m=!1,i.preventDefault(),i.stopImmediatePropagation()},{signal:e,capture:!0});let r=(i)=>this.#T(i);this.addEventListener("click",r,{signal:e,capture:!0}),this.addEventListener("auxclick",(i)=>{if(i.button===1)r(i)},{signal:e,capture:!0});let n=()=>this.#x();this.addEventListener("compositionstart",()=>{this.#p=!0},{signal:e}),this.addEventListener("compositionend",n,{signal:e}),this.addEventListener("focusout",n,{signal:e})}#x(){this.#p=!1;for(let e of this.#w.splice(0))e()}#T(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.#t?.columns.find((c)=>w(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>w(c.id,r("[data-card]")?.dataset.card)),a=i&&S(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(a)s.subtask=a.id;let o=t.querySelector("img");if(o&&!s.newTab&&e.type==="click"){e.preventDefault(),this.#O(t,o,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#O(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),tr();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 a=n.createElement("img");a.src=t.currentSrc||t.src,a.alt=t.alt;let s=n.createElement("button");s.type="button",s.className="b3-board-lightbox-open",s.textContent="Open",i.append(a,s);let o=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 o?.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})}#M(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#t?.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"),a=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??a;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:a.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.#I(e.clientX,e.clientY)},oa)}#I(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.#e.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let a=()=>{if(this.#r!==r)return;this.#R(r.px,r.py),this.#B(this.#L(r.px,r.py)),r.frame=requestAnimationFrame(a)};r.frame=requestAnimationFrame(a)}#N(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.#b();return}if(r<5)return;this.#I(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}#P(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#b();let r=this.#L(e.clientX,e.clientY);if(this.#b(),this.#m=!0,setTimeout(()=>{this.#m=!1},0),!r)return;let n=this.#t;if(t.kind==="card"){let i=n.columns.find((l)=>w(l.id,r.column)),a=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,o=a.cards.findIndex((l)=>w(l.id,t.id));if(a===i&&o<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#l(t.card);if(!i)return;let a=S(i),s=r.before?a.findIndex((o)=>w(o.id,r.before)):a.length;if(a.findIndex((o)=>w(o.id,t.id))<s)s-=1;this.#A(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)}}#L(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.#D(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((m)=>{let g=m.getBoundingClientRect();return t<g.top+g.height/2}),f=(m)=>!!(m!=null&&this.#l(m)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((m)=>!f(m.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 f=u.getBoundingClientRect();return t<f.top+f.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),a=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:a.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}}#B(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")}#D(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})}#R(e,t){let r=(s,o,l)=>s<o+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.#D(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 a=this.ownerDocument.defaultView;a.scrollBy(0,r(t,0,a.innerHeight))}#b(){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")}}lr("b3-board",oi);export{oi as B3Board};
296
+ ${o}`:o,a.draft=r.value=r.value.slice(0,h)+s+r.value.slice(v),r.setSelectionRange(h+s.length,h+s.length)}let l=n.columns.find((h)=>h.cards.some((v)=>w(v.id,e))),c=null;try{c=await this.#g?.(t,{card:e,column:l?.id})}catch(h){console.warn("b3-board: image upload failed",h)}let d=c?`![](${String(c).replace(/[\s()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!d)this.#k("Image not added");while(this.#p)await new Promise((h)=>this.#w.push(h));let u=(h)=>{if(!s)return null;let v=h.indexOf(s),z=v>=0?v:h.indexOf(o);if(z<0)return null;let ie=v>=0?s:o;return[z,z+ie.length,d?ie.replace(o,d):""]},f=(h)=>{if(!s)return d?h.trim()?`${h.replace(/\s+$/,"")}
297
+ ${d}`:d:h;let v=u(h);return v?h.slice(0,v[0])+v[2]+h.slice(v[1]):h},m=i();if(m){let h=this.querySelector("textarea.b3-board-editor"),v=h?.value===m.draft&&u(h.value);if(h&&v){let[z,ie,ot]=v,{selectionStart:ci,selectionEnd:di,selectionDirection:ui}=h,ar=(Le)=>Le>=ie?Le+ot.length-(ie-z):Le>z?z+ot.length:Le;h.setRangeText(ot,z,ie),h.setSelectionRange(ar(ci),ar(di),ui??void 0),m.draft=h.value}else if(f(m.draft)!==m.draft)m.draft=f(m.draft);else if(d)this.#k("Image not added");return}let g=this.#o(e);if(s&&!String(g?.description??"").includes(o))g=n.columns.flatMap((h)=>h.cards).find((h)=>String(h.description??"").includes(o))??g;let p=String(g?.description??""),b=f(p).trim();if(!g||this.readonly||b===p.trim()){if(d)this.#k("Image not added");return}g.description=b,g.expanded=!0,this.#c({type:"edit",card:g.id,field:"description"})}#k(e){let t=this.#t;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#t;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>w(f.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.#c({type:"move",card:a.id,from:i.id,to:o.id,index:d}),this.#f(a.id),!0}moveColumn(e,t){let r=this.#t;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.#c({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#A(e,t,r){let n=this.#t,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.#c({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;e.focus({preventScroll:!0}),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})}#d(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#e?.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.#e?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#f(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#u(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})})}#C(){this.#l?.abort(),this.#l=new AbortController;let e=this.#l.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#t)this.#t.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(o)=>this.#M(o),{signal:e}),t.addEventListener("pointermove",(o)=>this.#N(o),{signal:e}),t.addEventListener("pointerup",(o)=>this.#B(o),{signal:e}),t.addEventListener("pointercancel",(o)=>{if(o.pointerId===this.#r?.pointerId)this.#b()},{signal:e}),t.addEventListener("keydown",(o)=>{if(o.key==="Escape"&&this.#r?.started)o.preventDefault(),this.#b()},{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.#m)return;this.#m=!1,o.preventDefault(),o.stopImmediatePropagation()},{signal:e,capture:!0});let n=(o)=>this.#T(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.#x();this.addEventListener("compositionstart",()=>{this.#p=!0},{signal:e}),this.addEventListener("compositionend",i,{signal:e}),this.addEventListener("focusout",i,{signal:e})}#x(){this.#p=!1;for(let e of this.#w.splice(0))e()}#T(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.#t?.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.#O(t,a,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#O(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})}#M(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#t?.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.#I(e.clientX,e.clientY)},la)}#I(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.#e.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.#$(r.px,r.py),this.#P(this.#L(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#N(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.#b();return}if(r<5)return;this.#I(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}#B(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#b();let r=this.#L(e.clientX,e.clientY);if(this.#b(),this.#m=!0,setTimeout(()=>{this.#m=!1},0),!r)return;let n=this.#t;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.#o(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.#A(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)}}#L(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.#D(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((m)=>{let g=m.getBoundingClientRect();return t<g.top+g.height/2}),f=(m)=>!!(m!=null&&this.#o(m)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((m)=>!f(m.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 f=u.getBoundingClientRect();return t<f.top+f.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}}#P(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")}#D(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})}#$(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.#D(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))}#b(){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")}}cr("b3-board",li);export{li as B3Board};
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0-alpha.79",
2
+ "version": "0.1.0-alpha.80",
3
3
  "cssSha256": "b4ef2075f9d6f79f0acd5bb9a529670ef18c036bc9e9c9e901dc27a6a65e91c7",
4
4
  "classes": [
5
5
  "b3-accordion",
@@ -31,7 +31,8 @@ board.addEventListener('b3-change', ({ detail }) => {
31
31
  ## Data
32
32
 
33
33
  `columns` is an array of `{ id, name, cards, kind? }`; a card is `{ id, title, description?,
34
- subtasks?, tags?, expanded?, starred? }` and a subtask `{ id, title, done }`. An id is a non-empty string
34
+ subtasks?, tags?, expanded?, starred?, created?, updated?, comments? }`, a subtask `{ id, title, done }` and a comment
35
+ `{ id, at?, by?, text }` (times: anything `Date` reads). An id is a non-empty string
35
36
  or a number, unique across the board (`1` and `"1"` are the same id); a missing, unusable or
36
37
  repeated one is replaced with a generated string. Starred cards are moved above the others in
37
38
  their column (each group keeps its order), so `columns` always lists a column's cards in the order
@@ -43,12 +44,19 @@ be set before the element is connected or the module has loaded.
43
44
 
44
45
  `action.type` is `move`, `reorder` (a column), `add`, `remove`, `edit` (`field`: title,
45
46
  description, name or subtask), `toggle` (a card opened or closed), `star` (`starred`: true or
46
- false), `check` (a subtask) or `subtask` (`op`: add, remove, or move with its new `index`). A new card, column or subtask is reported once it has a name;
47
+ false), `check` (a subtask), `subtask` (`op`: add, remove, or move with its new `index`) or `comment` (`op`: add or
48
+ remove, with the `comment` id). Every card action but `toggle` and `remove` stamps the card's `updated` (ISO, now) before
49
+ it is reported, and `add` also its `created` — the event's `columns` carry them. A new card, column or subtask is reported once it has a name;
47
50
  one abandoned blank never reaches the app (nor `board.columns` while it is being named). TypeScript: `document.querySelector('b3-board')` is
48
51
  typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3-link`: `CustomEvent<BoardLinkDetail>`).
49
52
 
50
53
  ## Behavior
51
54
 
55
+ - **Age and comments**: a card with `updated` shows how long ago that was ("3h ago", refreshed each minute) at the
56
+ end of its disclosure row; one without shows none. A card's comments are counted on that row and listed in its
57
+ details (author · age · text, rich like a description), with a Comment button that adds one by the `author`
58
+ attribute (else "you"); each has a delete that asks twice.
59
+
52
60
  - **Drag**: a mouse drags a card (or a column by its header) after a short move; touch drags after
53
61
  a short press and hold, so a swipe still scrolls. Escape cancels. A drop with a filter active
54
62
  keeps the hidden cards in place.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/bare-v3",
3
- "version": "0.1.0-alpha.79",
3
+ "version": "0.1.0-alpha.80",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",