@livx.cc/bare-v3 0.1.0-alpha.75 → 0.1.0-alpha.77
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.
- package/dist/components/board.d.ts +12 -0
- package/dist/components/board.js +46 -26
- package/dist/manifest.json +1 -1
- package/dist/references/board.md +20 -3
- package/package.json +1 -1
|
@@ -94,6 +94,15 @@ export type BoardLinkDetail = {
|
|
|
94
94
|
column?: BoardId;
|
|
95
95
|
subtask?: BoardId;
|
|
96
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* `board.upload`: stores an image pasted into a card's title or description editor and returns the target to
|
|
99
|
+
* reference it by (a URL, or a path the page resolves); nothing (or a throw) drops it. The board writes it into the
|
|
100
|
+
* description as `` and reports an `edit` of `description`.
|
|
101
|
+
*/
|
|
102
|
+
export type BoardUpload = (file: File, detail: {
|
|
103
|
+
card: BoardId;
|
|
104
|
+
column?: BoardId;
|
|
105
|
+
}) => Promise<string | null | undefined> | string | null | undefined;
|
|
97
106
|
/** `b3-change` detail: the full board as plain JSON, and the edit that produced it. */
|
|
98
107
|
export type BoardChangeDetail = {
|
|
99
108
|
columns: BoardColumn[];
|
|
@@ -120,6 +129,9 @@ export declare class B3Board extends Base {
|
|
|
120
129
|
/** Active filter tokens (e.g. `#bug`, `@dana`); a card shows when it carries all of them. */
|
|
121
130
|
get filter(): string[];
|
|
122
131
|
set filter(value: string[]);
|
|
132
|
+
/** Pasting images into a card needs this hook: the host stores the file (see `BoardUpload`). */
|
|
133
|
+
get upload(): BoardUpload | null;
|
|
134
|
+
set upload(value: BoardUpload | null);
|
|
123
135
|
get readonly(): boolean;
|
|
124
136
|
set readonly(value: boolean);
|
|
125
137
|
connectedCallback(): void;
|
package/dist/components/board.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var{defineProperty:
|
|
1
|
+
var{defineProperty:et,getOwnPropertyNames:oi,getOwnPropertyDescriptor:ai}=Object,li=Object.prototype.hasOwnProperty;function di(e){return this[e]}var ci=(e)=>{var t=(rr??=new WeakMap).get(e),r;if(t)return t;if(t=et({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of oi(e))if(!li.call(t,n))et(t,n,{get:di.bind(e,n),enumerable:!(r=ai(e,n))||r.enumerable})}return rr.set(e,t),t},rr;var ui=(e)=>e;function fi(e,t){this[e]=ui.bind(null,t)}var pi=(e,t)=>{for(var r in t)et(e,r,{get:t[r],enumerable:!0,configurable:!0,set:fi.bind(t,r)})};var hi=(e,t)=>()=>(e&&(t=e(e=0)),t);var jn={};pi(jn,{Alpine:()=>Hn,default:()=>Wo});function mi(e){vi(e)}function gi(){Ot=!0}function xi(){Ot=!1,yr()}function vi(e){if(!R.includes(e)){if(R.push(e),e._x_schedulerPriority!==void 0)Ne=!0}yr()}function Mt(e){let t=R.indexOf(e);if(t!==-1&&t>ut)R.splice(t,1)}function yr(){if(!ct&&!dt){if(Ot)return;dt=!0,queueMicrotask(yi)}}function yi(){dt=!1,ct=!0;for(let e=0;e<R.length;e++){if(Ne)_i(e);R[e](),ut=e}R.length=0,ut=-1,Ne=!1,ct=!1}function _i(e){let t=new Map,r=R.slice(e).sort((n,i)=>wi(n,i,t));for(let n=0;n<r.length;n++)R[e+n]=r[n];Ne=!1}function wi(e,t,r){if(!tt(e))return tt(t)?1:0;if(!tt(t))return-1;return ar(e._x_schedulerPriority.el,r)-ar(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function tt(e){return e._x_schedulerPriority!==void 0}function ar(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 ki(e){ft=!1,e(),ft=!0}function Ai(e){le=e.reactive,de=e.release,te=(t)=>e.effect(t,{scheduler:(r)=>{if(ft)mi(r);else r()}}),_r=e.raw}function lr(e){te=e}function Si(e){let t=()=>{};return[(n,i)=>{let o=i?.priority==="structural"?Ei++:void 0,s=te(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),de(s)},s},()=>{t()}]}function wr(e,t){let r=!0,n,i,o=te(()=>{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()=>{Mt(o),de(o)}}async function Ti(e){gi();try{await e(),await Promise.resolve()}finally{xi()}}function Ci(e){Ar.push(e)}function It(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,kr.push(t)}function Sr(e){Er.push(e)}function Tr(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 Cr(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 Oi(e){e._x_effects?.forEach(Mt);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Dt(){je.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),Lt=!0}function Or(){Mi(),je.disconnect(),Lt=!1}function Mi(){let e=je.takeRecords();q.push(()=>e.length>0&&ze(e));let t=q.length;queueMicrotask(()=>{if(q.length===t)while(q.length>0)q.shift()()})}function Ii(){while(q.length>0)q.shift()();let e=je.takeRecords();if(e.length>0)ze(e)}function w(e){if(!Lt)return e();Or();try{return e()}finally{Dt()}}function Li(){Nt=!0}function Di(){Nt=!1,ze(Pe),Pe=[]}function ze(e){if(Nt){Pe=Pe.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,d=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:a,value:s.getAttribute(a)})},c=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(a)};if(s.hasAttribute(a)&&l===null)d();else if(s.hasAttribute(a))c(),d();else c()}}i.forEach((o,s)=>{Cr(s,o)}),n.forEach((o,s)=>{Er.forEach((a)=>a(s,o))});for(let o of r){if(t.some((s)=>s.contains(o)))continue;kr.forEach((s)=>s(o))}for(let o of t){if(!o.isConnected)continue;Ar.forEach((s)=>s(o))}t=null,r=null,n=null,i=null}function Mr(e){return Y(ae(e))}function Ae(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 Y(e){return new Proxy({objects:e},Ni)}function Ir(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return Ir(Object.getPrototypeOf(e),t)}function Pi(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function Pt(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 d=o===""?s:`${o}.${s}`;if(typeof a==="object"&&a!==null&&a._x_interceptor)i[s]=a.initialize(e,d,s,t);else if(r(a)&&a!==i&&!(a instanceof Element))n(a,d)})};return n(e)}function Lr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o,s){return e(this.initialValue,()=>Ri(n,i),(a)=>pt(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 d=n.initialize(o,s,a,l);return r.initialValue=d,i(o,s,a,l)}}else r.initialValue=n;return r}}function Ri(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function pt(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 pt(e[t[0]],t.slice(1),r);else return e[t[0]]={},pt(e[t[0]],t.slice(1),r)}function M(e,t){Dr[e]=t}function Re(e,t){let r=$i(t);return Object.entries(Dr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function $i(e){let[t,r]=Hr(e),n={interceptor:Lr,...t};return It(e,r),n}function Bi(e,t,r,...n){try{return r(...n)}catch(i){qe(i,e,t)}}function qe(...e){return Nr(...e)}function Ui(e){Nr=e}function Hi(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 Tr(e){let t=K;K=!1;let r=e();return K=t,r}function V(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return Mr(...e)}function Li(e){Mr=e}function Ni(e){Ir=e}function Di(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!K){dt(r,t,J([n,...e]),i);return}let s=t.apply(J([n,...e]),i);dt(r,s)}}function dt(e,t,r,n,i){if(K&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>dt(e,s,r,n)).catch((s)=>je(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Pi(...e){return Ir(...e)}function le(e=""){return Lt+e}function Ri(e){Lt=e}function w(e,t){return De[e]=t,{before(r){if(!De[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=F.indexOf(r);F.splice(n>=0?n:F.indexOf("DEFAULT"),0,e)}}}function Bi(e){return Object.keys(De).includes(e)}function He(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=Lr(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(Br((o,s)=>n[o]=s)).filter(Ur).map(ji(n,r)).sort(Hi).map((o)=>Ui(e,o))}function Lr(e){return Array.from(e).map(Br()).filter((t)=>!Ur(t))}function $i(e){ut=!0;let t=Symbol();Nr=t,fe.set(t,[]);let r=()=>{while(fe.get(t).length)fe.get(t).shift()();fe.delete(t)},n=()=>{ut=!1,r()};e(r),n()}function Dr(e){let t=[],r=(a)=>t.push(a),[n,i]=gi(e);return t.push(i),[{Alpine:ce,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:V.bind(V,e)},()=>t.forEach((a)=>a())]}function Ui(e,t){let r=()=>{},n=De[t.type]||r,[i,o]=Dr(e);_r(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),ut?fe.get(Nr).push(n):n()};return s.runCleanups=o,s}function Br(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=$r.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Nt(e){$r.push(e)}function Ur({name:e}){return jr().test(e)}function ji(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(jr()),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 Hi(e,t){let r=F.indexOf(e.type)===-1?ft:e.type,n=F.indexOf(t.type)===-1?ft:t.type;return F.indexOf(r)-F.indexOf(n)}function Y(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>Y(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)Y(n,t,!1),n=n.nextElementSibling}function B(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function zi(e){return(...t)=>j&&e(...t)}function ke(e){Hr.push(e)}function qi(e,t){Hr.forEach((r)=>r(e,t)),j=!0,zr(()=>{N(t,(r,n)=>{n(r,()=>{})})}),j=!1}function Fi(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,pt=!0,zr(()=>{Ki(t)}),j=!1,pt=!1}function Ki(e){let t=!1;N(e,(n,i)=>{Y(n,(o,s)=>{if(t&&Xi(o))return s();t=!0,i(o,s)})})}function zr(e){let t=ee;rr((r,n)=>{let i=t(r);return ae(i),()=>{}}),e(),rr(t)}function Vi(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;ze++}r.pending++,Promise.resolve(t).catch((n)=>{try{je(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>Wi(e,r))}function Wi(e,t){if(t.pending--,t.pending>0)return;if(wi(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(ze--,!e.isConnected)return;Yi(t),N(e)}function Ji(e,t){if(ze===0)return!1;let r=C(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 Yi(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=C(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;He(r,i).forEach((o)=>o())})}function pe(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 Gi(){if(nr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(nr=!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?");pe(document,"alpine:init"),pe(document,"alpine:initializing"),Tt(),vi((t)=>N(t,Y)),Ot((t)=>te(t)),yr((t,r)=>{if(Ji(t,r))return;He(t,r).forEach((n)=>n())});let e=(t)=>!qe(t.parentElement,!0);Array.from(document.querySelectorAll(Vr().join(","))).filter(e).forEach((t)=>{N(t)}),pe(document,"alpine:initialized"),setTimeout(()=>{es()})}function Kr(){return Dt.map((e)=>e())}function Vr(){return Dt.concat(Fr).map((e)=>e())}function Wr(e){Dt.push(e)}function Jr(e){Fr.push(e)}function qe(e,t=!1){return C(e,(r)=>{if((t?Vr():Kr()).some((i)=>r.matches(i)))return!0})}function C(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return C(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return C(e.parentNode.host,t);if(!e.parentElement)return;return C(e.parentElement,t)}function Xi(e){return Kr().some((t)=>e.matches(t))}function Zi(e){Yr.push(e)}function N(e,t=Y,r=()=>{}){if(C(e,(n)=>n._x_ignore))return;$i(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),Yr.forEach((o)=>o(n,i)),He(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=Qi++;n._x_ignore&&i()})})}function te(e,t=Y){t(e,(r)=>{yi(r),wr(r),delete r._x_marker})}function es(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Bi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Rt(e=()=>{}){return queueMicrotask(()=>{Pt||setTimeout(()=>{bt()})}),new Promise((t)=>{ht.push(()=>{e(),t()})})}function bt(){Pt=!1;while(ht.length)ht.shift()()}function ts(){Pt=!0}function Bt(e,t){if(Array.isArray(t))return ir(e,t.join(" "));else if(typeof t==="object"&&t!==null)return rs(e,t);else if(typeof t==="function")return Bt(e,t());return ir(e,t)}function mt(e){return e.split(/\s/).filter(Boolean)}function ir(e,t){let r=(i)=>mt(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 rs(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?mt(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?mt(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 Fe(e,t){if(typeof t==="object"&&t!==null)return ns(e,t);return is(e,t)}function ns(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=ss(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Fe(e,r)}}function is(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function ss(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function gt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function os(e,t,r){Gr(e,Bt,""),{enter:(i)=>{e._x_transition.enter.during=i},"enter-start":(i)=>{e._x_transition.enter.start=i},"enter-end":(i)=>{e._x_transition.enter.end=i},leave:(i)=>{e._x_transition.leave.during=i},"leave-start":(i)=>{e._x_transition.leave.start=i},"leave-end":(i)=>{e._x_transition.leave.end=i}}[r](t)}function as(e,t,r){Gr(e,Fe);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((b,k)=>k<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((b,k)=>k>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?de(t,"scale",95)/100:1,u=de(t,"delay",0)/1000,f=de(t,"origin","center"),g="opacity, transform",m=de(t,"duration",150)/1000,p=de(t,"duration",75)/1000,h="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${m}s`,transitionTimingFunction:h},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:g,transitionDuration:`${p}s`,transitionTimingFunction:h},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function Gr(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=()=>{}){xt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){xt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function Xr(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:Xr(t)}function xt(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;ls(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 ls(e,t){let r,n,i,o=gt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),bt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:gt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),ts(),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()}),bt(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function de(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 Zr(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=oe({});switch(e._x_bindings[t]=r,t=n.includes("camel")?ms(t):t,t){case"value":cs(e,r);break;case"style":us(e,r);break;case"class":ds(e,r);break;case"selected":case"checked":fs(e,t,r);break;default:$t(e,t,r);break}}function cs(e,t){if(Ut(e)){if(e.attributes.value===void 0)e.value=t}else if(Pe(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)=>gs(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")bs(e,t);else if(e.tagName==="OPTION")$t(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function ds(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Bt(e,t)}function us(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Fe(e,t)}function fs(e,t,r){$t(e,t,r),hs(e,t,r)}function $t(e,t,r){if([null,void 0,!1].includes(r)&&vs(t))e.removeAttribute(t);else{if(Qr(t))r=t;if(ys(r))r=JSON.stringify(r);ps(e,t,r)}}function ps(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function hs(e,t,r){if(e[t]!==r)e[t]=r}function bs(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function ms(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function gs(e,t){return e==t}function Me(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 Qr(e){return xs.has(e)}function vs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function ys(e){return typeof e==="object"&&e!==null}function _s(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return en(e,t,r)}function ws(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,Tr(()=>V(e,i.expression))}return en(e,t,r)}function en(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(Qr(t))return!![t,"true"].includes(n);return n}function Pe(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Ut(e){return e.type==="radio"||e.localName==="ui-radio"}function tn(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 rn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function nn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=ee(()=>{let l=e(),c=r();if(i)n(Ze(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==o)n(Ze(l));else if(d!==u)t(Ze(c))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{St(a),ae(a)}}function Ze(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Es(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ce))}function ks(e,t){if(!sr)P=oe(P),sr=!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 It(P[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")P[e].init()}function As(){return P}function Ss(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return on(e,r());else sn[e]=r;return()=>{}}function Os(e){return Object.entries(sn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function on(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Lr(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}),He(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Cs(e,t){an[e]=t}function Ts(e,t){return Object.entries(an).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function cn(e){try{let r=new Ls(e).tokenize(),i=new Ns(r).parse(),o=new Ds;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 Ps(e,t,r={}){let n=dn(e),i=J([r.scope??{},...n]),o=r.params??[],a=cn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&K)return a.apply(i,o);return a}function Rs(e,t){let r=dn(e);if(typeof t==="function")return Di(r,t);let n=Bs(e,t,r);return Ti.bind(null,e,t,n)}function dn(e){let t={};return Ne(t,e),[t,...se(e)]}function Bs(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=J([i,...r]),l=cn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(K&&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 un(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function G(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function Fs(e,t=!1){if(e.flags|=8,t){e.next=me,me=e;return}e.next=be,be=e}function Ht(){bn++}function zt(){if(--bn>0)return;if(me){let t=me;me=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(be){let t=be;be=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 mn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function gn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;qt(n),Vs(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function yt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ks(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function Ks(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Re)return;if(e.globalVersion=Re,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!yt(e)))return;e.flags|=2;let t=e.dep,r=x,n=T;x=e,T=!0;try{mn(e);let i=e.fn(e._value);if(t.version===0||q(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{x=r,T=n,gn(e),e.flags&=-3}}function qt(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)qt(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function Vs(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 Ws(e,t){if(e.effect instanceof ar)e=e.effect.fn;let r=new ar(e);if(t)xe(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function Js(e){e.effect.stop()}function Ys(){xn.push(T),T=!1}function Gs(){let e=xn.pop();T=e===void 0?!0:e}function lr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=x;x=void 0;try{t()}finally{x=r}}}function vn(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)vn(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(T&&x){let n=_t.get(e);if(!n)_t.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new Zs),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function U(e,t,r,n,i,o){let s=_t.get(e);if(!s){Re++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Ht(),t==="clear")s.forEach(a);else{let l=ve(e),c=l&&jt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,f)=>{if(f==="length"||f===_e||!Ae(f)&&f>=d)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(c)a(s.get(_e));switch(t){case"add":if(!l){if(a(s.get(W)),he(e))a(s.get(wt))}else if(c)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(W)),he(e))a(s.get(wt))}break;case"set":if(he(e))a(s.get(W));break}}}zt()}function ne(e){let t=v(e);if(t===e)return t;return S(t,"iterate",_e),Z(e)?t:t.map(Q)}function Ft(e){return S(e=v(e),"iterate",_e),e}function I(e,t){if(X(e))return Sn(e)?we(Q(t)):we(t);return Q(t)}function tt(e,t,r){let n=Ft(e),i=n[t]();if(n!==e&&!Z(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function D(e,t,r,n,i,o){let s=Ft(e),a=s!==e&&!Z(e),l=s[t];if(l!==eo[t]){let u=l.apply(e,o);return a?Q(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 cr(e,t,r,n){let i=Ft(e),o=i!==e&&!Z(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 rt(e,t,r){let n=v(e);S(n,"iterate",_e);let i=n[t](...r);if((i===-1||i===!1)&&bo(r[0]))return r[0]=v(r[0]),n[t](...r);return i}function ue(e,t,r=[]){Ys(),Ht();let n=v(e)[t].apply(e,r);return zt(),Gs(),n}function ro(e){if(!Ae(e))e=String(e);let t=v(this);return S(t,"has",e),t.hasOwnProperty(e)}function ao(e,t,r){return function(...n){let i=this.__v_raw,o=v(i),s=he(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?Et:t?we:Q;return!t&&S(o,"iterate",l?wt:W),xe(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 Ce(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";G(`${hn(e)} operation ${r}failed: target is readonly.`,v(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function lo(e,t){let r={get(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(q(i,a))S(s,"get",i);S(s,"get",a)}let{has:l}=Oe(s),c=t?Et:e?we:Q;if(l.call(s,i))return c(o.get(i));else if(l.call(s,a))return c(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&S(v(i),"iterate",W),i.size},has(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(q(i,a))S(s,"has",i);S(s,"has",a)}return i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){let s=this,a=s.__v_raw,l=v(a),c=t?Et:e?we:Q;return!e&&S(l,"iterate",W),a.forEach((d,u)=>i.call(o,c(d),c(u),s))}};return xe(r,e?{add:Ce("add"),set:Ce("set"),delete:Ce("delete"),clear:Ce("clear")}:{add(i){let o=v(this),s=Oe(o),a=v(i),l=!t&&!Z(i)&&!X(i)?a:i;if(!(s.has.call(o,l)||q(i,l)&&s.has.call(o,i)||q(a,l)&&s.has.call(o,a)))o.add(l),U(o,"add",l,l);return this},set(i,o){if(!t&&!Z(o)&&!X(o))o=v(o);let s=v(this),{has:a,get:l}=Oe(s),c=a.call(s,i);if(!c)i=v(i),c=a.call(s,i);else dr(s,a,i);let d=l.call(s,i);if(s.set(i,o),!c)U(s,"add",i,o);else if(q(o,d))U(s,"set",i,o,d);return this},delete(i){let o=v(this),{has:s,get:a}=Oe(o),l=s.call(o,i);if(!l)i=v(i),l=s.call(o,i);else dr(o,s,i);let c=a?a.call(o,i):void 0,d=o.delete(i);if(l)U(o,"delete",i,void 0,c);return d},clear(){let i=v(this),o=i.size!==0,s=he(i)?new Map(i):new Set(i),a=i.clear();if(o)U(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=ao(i,e,t)}),r}function wn(e,t){let r=lo(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(vt(r,i)&&i in n?r:n,i,o)}}function dr(e,t,r){let n=v(r);if(n!==r&&t.call(e,n)){let i=pn(e);G(`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 ho(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Kt(e){if(X(e))return e;return An(e,!1,so,co,En)}function kt(e){return An(e,!0,oo,uo,kn)}function An(e,t,r,n,i){if(!ye(e))return G(`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=ho(pn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Sn(e){if(X(e))return Sn(e.__v_raw);return!!(e&&e.__v_isReactive)}function X(e){return!!(e&&e.__v_isReadonly)}function Z(e){return!!(e&&e.__v_isShallow)}function bo(e){return e?!!e.__v_raw:!1}function v(e){let t=e&&e.__v_raw;return t?v(t):e}function ge(e){return e?e.__v_isRef===!0:!1}function mo(e){let t=[];return C(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function On(e){if(!nt[e])nt[e]=0;return++nt[e]}function go(e,t){return C(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function xo(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=On(t)}function vo(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 Cn(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 ur(e){let t=B(()=>document.querySelector(e),()=>yo)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function ie(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=_o(t);if(r.includes("camel"))t=wo(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=Mn(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(ko(t)||In(t))o=a(o,(l,c)=>{if(So(c,r))return;l(c)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Mn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Be(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=tn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Be(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=rn(t,n)}return t}function _o(e){return e.replace(/-/g,".")}function wo(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Be(e){return!Array.isArray(e)&&!isNaN(e)}function Eo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function ko(e){return["keydown","keyup"].includes(e)}function In(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function So(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!Ao.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Be((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Be((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&fr(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(In(e.type))return!1;if(fr(e.key).includes(r[0]))return!1}}return!0}function fr(e){if(!e)return[];e=Eo(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 Te(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(Pe(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=it(r.target.value);else if(t.includes("boolean"))i=Me(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!Oo(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 it(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return Me(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Ut(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return it(i);else if(t.includes("boolean"))return Me(i);else if(t.includes("trim"))return i.trim();else return i}})}function it(e){let t=e?parseFloat(e):null;return Co(t)?t:e}function Oo(e,t){return e==t}function Co(e){return!Array.isArray(e)&&!isNaN(e)}function pr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function To(e,t){e._x_keyExpression=t}function Mo(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 Io(e){if(!j)return!1;if(pt)return!0;return e.hasAttribute("data-has-alpine-state")}function Lo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function No(e,t,r,n){r((i)=>{if(Ro(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=Bo(i),l=Object.entries(i).map(([c,d])=>{if(!a)c=parseInt(c);let u=Po(t,d,c,i),f;return n((g)=>{if(typeof g==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(g))s.set(g,o.get(g)),o.delete(g);f=g},{scope:{index:c,...u}}),[f,u]});_(()=>{o.forEach((u)=>{te(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 g=document.importNode(e.content,!0).firstElementChild,m=oe(f);Ee(g,m,e),g._x_refreshXForScope=Lo(m),s.set(u,g),c.add(g),d.after(g),d=g}),c.forEach((u)=>N(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function Do(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 Po(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 Ro(e){return typeof e!=="object"&&!isNaN(e)}function Bo(e){return typeof e==="object"&&!Array.isArray(e)}function Nn(){}function Ve(e,t,r){w(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var st=!1,ot=!1,R,at=-1,Ie=!1,At=!1,oe,ee,ae,br,hi=0,lt=!0,gr,xr,vr,$e,Ct=!1,z,Mt=!1,Le,Ai,Or,Cr,K=!0,Mr=()=>{},Ir,Lt="x-",De,ut=!1,fe,Nr,Pr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Rr=(e)=>e,$r,jr=()=>new RegExp(`^${Lt}([^:^.]+)\\b`),ft="DEFAULT",F,j=!1,Hr,pt=!1,ze=0,nr=!1,Dt,Fr,Yr,Qi=1,ht,Pt=!1,xs,P,sr=!1,sn,an,Ms,ce,or,ln,E=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Is,Ls=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 E("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
|
-
`)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
|
|
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 E("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 E("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new E("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new E("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new E("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new E("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new E("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new E("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new E(i,t,e,this.position))}}},Ns=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 Is.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}}},Ds=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 h=t[e.name];if(this.checkForDangerousValues(h),typeof h==="function")return h.bind(t);return h}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((h)=>this.evaluate({node:h,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let h=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),b;if(e.callee.computed)b=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else b=e.callee.property.name;this.checkForDangerousKeywords(b);let k=h[b];if(typeof k!=="function")throw Error("Value is not a function");l=k.apply(h,a)}else if(e.callee.type==="Identifier"){let h=e.callee.name,b;if(h in t)b=t[h];else throw Error(`Undefined variable: ${h}`);if(typeof b!=="function")throw Error("Value is not a function");let k=r!==null?r:t;l=b.apply(k,a)}else{let h=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof h!=="function")throw Error("Value is not a function");l=h.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 h=e.argument.name;if(!(h in t))throw Error(`Undefined variable: ${h}`);let b=t[h];if(e.operator==="++")t[h]=b+1;else if(e.operator==="--")t[h]=b-1;return e.prefix?t[h]:b}else if(e.argument.type==="MemberExpression"){let h=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),b=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(h))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(b);let k=h[b];if(e.operator==="++")h[b]=k+1;else if(e.operator==="--")h[b]=k-1;return e.prefix?h[b]:k}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 m=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=m,m;else if(e.left.type==="MemberExpression"){let h=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),b=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(h))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(b),h[b]=m,m}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((h)=>this.evaluate({node:h,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let h of e.properties){let b=h.computed?this.evaluate({node:h.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):h.key.type==="Identifier"?h.key.name:this.evaluate({node:h.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),k=this.evaluate({node:h.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[b]=k}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(or.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(ln.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return or.set(e,!0),!0}},ra,na,xe,$s,vt=(e,t)=>$s.call(e,t),ve,he=(e)=>fn(e)==="[object Map]",Us=(e)=>typeof e==="string",Ae=(e)=>typeof e==="symbol",ye=(e)=>e!==null&&typeof e==="object",js,fn=(e)=>js.call(e),pn=(e)=>fn(e).slice(8,-1),jt=(e)=>Us(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ke=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},Hs,ia,zs,sa,hn,oa,q=(e,t)=>!Object.is(e,t),qs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",aa,Qe,x,et,ar=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,Qe)if(Qe.active)Qe.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,et.has(this))et.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Fs(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,lr(this),mn(this);let e=x,t=T;x=this,T=!0;try{return this.fn()}finally{if(x!==this)G("Active effect was not restored correctly - this is likely a Vue internal bug.");gn(this),x=e,T=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)qt(e);this.deps=this.depsTail=void 0,lr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)et.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(yt(this))this.run()}get dirty(){return yt(this)}},bn=0,be,me,T=!0,xn,Re=0,Xs=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}},Zs=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||!T||x===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==x){if(t=this.activeLink=new Xs(x,this),!x.deps)x.deps=x.depsTail=t;else t.prevDep=x.depsTail,x.depsTail.nextDep=t,x.depsTail=t;vn(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(xe({effect:x},e));return t}trigger(e){this.version++,Re++,this.notify(e)}notify(e){Ht();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(xe({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{zt()}}},_t,W,wt,_e,Qs,eo,to,yn,_n=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?po:kn:i?fo:En).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=ve(e);if(!n){let a;if(o&&(a=Qs[t]))return a;if(t==="hasOwnProperty")return ro}let s=Reflect.get(e,t,ge(e)?e:r);if(Ae(t)?yn.has(t):to(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ge(s)){let a=o&&jt(t)?s:s.value;return n&&ye(a)?kt(a):a}if(ye(s))return n?kt(s):Kt(s);return s}},no,io,so,oo,Et=(e)=>e,Oe=(e)=>Reflect.getPrototypeOf(e),co,uo,En,fo,kn,po,Q=(e)=>ye(e)?Kt(e):e,we=(e)=>ye(e)?kt(e):e,nt,yo,Tn=()=>{},Ao,Ln=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Os(l),A(e,n)((d)=>{on(e,d,i)},{scope:l});return}if(t==="key")return To(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="";_(()=>Zr(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},H,Dn,$o;var Rn=si(()=>{R=[];gr=[],xr=[],vr=[];$e=new MutationObserver(Ue);z=[];Le=[];Ai={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 Si;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=Ar(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)}};Or={};Cr=Ii;De={};fe=new Map,Nr=Symbol();$r=[];F=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",ft,"teleport"];Hr=[];ke((e,t)=>{if(ze===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(C(e,(r)=>r._x_deferInit))t._x_ignore=!0});Dt=[],Fr=[];Yr=[];ht=[];w("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")as(e,r,t);else os(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=Xr(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})})})};xs=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={};sn={};an={};Ms={get reactive(){return oe},get release(){return ae},get effect(){return ee},get raw(){return br},get transaction(){return xi},version:"3.17.4",flushAndStopDeferringMutations:ki,dontAutoEvaluateFunctions:Tr,disableEffectScheduling:bi,startObservingMutations:Tt,stopObservingMutations:Er,setReactivityEngine:mi,onAttributeRemoved:_r,onAttributesAdded:yr,closestDataStack:se,skipDuringClone:B,onlyDuringClone:zi,addRootSelector:Wr,addInitSelector:Jr,setErrorHandler:Mi,interceptClone:ke,addScopeToNode:Ee,deferMutations:Ei,mapAttributes:Nt,evaluateLater:A,interceptInit:Zi,initInterceptors:It,injectMagics:Ne,setEvaluator:Li,setRawEvaluator:Ni,mergeProxies:J,extractProp:ws,findClosest:C,onElRemoved:Ot,closestRoot:qe,destroyTree:te,interceptor:Sr,transition:xt,setStyles:Fe,mutateDom:_,deferInit:Vi,directive:w,entangle:nn,throttle:rn,debounce:tn,evaluate:V,evaluateRaw:Pi,initTree:N,nextTick:Rt,prefixed:le,prefix:Ri,plugin:Es,magic:M,store:ks,start:Gi,clone:Fi,cloneNode:qi,bound:_s,$data:kr,watch:mr,walk:Y,data:Cs,bind:Ss},ce=Ms,or=new WeakMap,ln=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}ln.add(t)});Is=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];ra=Object.freeze({}),na=Object.freeze([]),xe=Object.assign,$s=Object.prototype.hasOwnProperty,ve=Array.isArray,js=Object.prototype.toString,Hs=/-\w/g,ia=Ke((e)=>e.replace(Hs,(t)=>t.slice(1).toUpperCase())),zs=/\B([A-Z])/g,sa=Ke((e)=>e.replace(zs,"-$1").toLowerCase()),hn=Ke((e)=>e.charAt(0).toUpperCase()+e.slice(1)),oa=Ke((e)=>e?`on${hn(e)}`:""),aa=un(qs+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");et=new WeakSet;xn=[];_t=new WeakMap,W=Symbol("Object iterate"),wt=Symbol("Map keys iterate"),_e=Symbol("Array iterate");Qs={__proto__:null,[Symbol.iterator](){return tt(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return ne(this).concat(...e.map((t)=>ve(t)?ne(t):t))},entries(){return tt(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return D(this,"every",e,t,void 0,arguments)},filter(e,t){return D(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return D(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return D(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return D(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return D(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return D(this,"forEach",e,t,void 0,arguments)},includes(...e){return rt(this,"includes",e)},indexOf(...e){return rt(this,"indexOf",e)},join(e){return ne(this).join(e)},lastIndexOf(...e){return rt(this,"lastIndexOf",e)},map(e,t){return D(this,"map",e,t,void 0,arguments)},pop(){return ue(this,"pop")},push(...e){return ue(this,"push",e)},reduce(e,...t){return cr(this,"reduce",e,t)},reduceRight(e,...t){return cr(this,"reduceRight",e,t)},shift(){return ue(this,"shift")},some(e,t){return D(this,"some",e,t,void 0,arguments)},splice(...e){return ue(this,"splice",e)},toReversed(){return ne(this).toReversed()},toSorted(e){return ne(this).toSorted(e)},toSpliced(...e){return ne(this).toSpliced(...e)},unshift(...e){return ue(this,"unshift",e)},values(){return tt(this,"values",(e)=>I(this,e))}};eo=Array.prototype;to=un("__proto__,__v_isRef,__isVue"),yn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Ae));no=class extends _n{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=ve(e)&&jt(t);if(!this._isShallow){let l=X(i);if(!Z(r)&&!X(r))i=v(i),r=v(r);if(!o&&ge(i)&&!ge(r))if(l)return G(`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:vt(e,t),a=Reflect.set(e,t,r,ge(e)?e:n);if(e===v(n)&&a){if(!s)U(e,"add",t,r);else if(q(r,i))U(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=vt(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)U(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Ae(t)||!yn.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",ve(e)?"length":W),Reflect.ownKeys(e)}},io=class extends _n{constructor(e=!1){super(!0,e)}set(e,t){return G(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return G(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},so=new no,oo=new io;co={get:wn(!1,!1)},uo={get:wn(!0,!1)};En=new WeakMap,fo=new WeakMap,kn=new WeakMap,po=new WeakMap;M("nextTick",()=>Rt);M("dispatch",(e)=>pe.bind(pe,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=mr(()=>{let l;return o((c)=>l=c),l},i);r(a)});M("store",As);M("data",(e)=>kr(e));M("root",(e)=>qe(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=J(mo(e)),e._x_refs_proxy});nt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return vo(e,i,t,()=>{let o=go(e,r),s=o?o._x_ids[r]:On(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});ke((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Cn("Focus","focus","focus");Cn("Persist","persist","persist");w("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=nn({get(){return d()},set(g){u(g)}},{get(){return s()},set(g){l(g)}});i(f)})});w("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=ur(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))})});Ee(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)};_(()=>{B(()=>{s(o,i,t),N(o)})()}),e._x_teleportPutBack=()=>{let a=ur(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),te(o)}))});yo=document.createElement("div");Tn.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};w("ignore",Tn);w("effect",B((e,{expression:t},{effect:r})=>{r(A(e,t))}));Ao=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];w("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=C(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((h)=>p=h),pr(p)?p.get():p},c=(p)=>{let h;if(s((b)=>h=b),pr(h))h.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"),g=d||u||f,m;if(j)m=()=>{};else if(g){let p=[],h=(b)=>c(Te(e,t,b,l()));if(d)p.push(ie(e,"change",t,h));if(u){if(p.push(ie(e,"blur",t,h)),e.form){let b=e.form,k=()=>h({target:e});if(!b._x_pendingModelUpdates)b._x_pendingModelUpdates=[];b._x_pendingModelUpdates.push(k),i(()=>{if(b._x_pendingModelUpdates)b._x_pendingModelUpdates.splice(b._x_pendingModelUpdates.indexOf(k),1)})}}if(f)p.push(ie(e,"keydown",t,(b)=>{if(b.key==="Enter")h(b)}));m=()=>p.forEach((b)=>b())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=ie(e,p,t,(h)=>{c(Te(e,t,h,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Pe(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c(Te(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=m,i(()=>e._x_removeModelListeners.default()),e.form){let p=ie(e.form,"reset",[],(h)=>{Rt(()=>e._x_model&&e._x_model.set(Te(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){c(p)},setWithModifiers:Mn(t,c)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";_(()=>{if(Pe(e))if(Array.isArray(p))e.checked=p.some((h)=>h==e.value);else e.checked=!!p;else if(Ut(e))if(typeof p==="boolean")e.checked=Me(e.value)===p;else e.checked=e.value==p;else Zr(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)})});w("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(le("cloak")))));Jr(()=>`[${le("init")}]`);w("init",B((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));w("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{e.textContent=o})})})});w("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>te(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,N(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Nt(Pr(":",Rr(le("bind:"))));Ln.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}};w("bind",Ln);Wr(()=>`[${le("data")}]`);H=Symbol();w("data",(e,{expression:t},{cleanup:r})=>{if(Io(e))return;let n=e[H];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Ne(i,e);let o={};Ts(o,i);let s=V(e,t,{scope:o});if(s===void 0||s===!0)s={};Ne(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Mo(a,s);let c={expression:t};e[H]=c,queueMicrotask(()=>{if(e[H]===c)delete e[H]})}else a=oe(s);It(a,r);let l=Ee(e,a);B(()=>{a.init&&V(e,a.init)})(),r(()=>{a.destroy&&V(e,a.destroy),l();let c={reactiveData:a};e[H]=c,queueMicrotask(()=>{if(e[H]===c)delete e[H]})})});ke((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});w("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=gt((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}))});w("for",B((e,{expression:t},{effect:r,cleanup:n})=>{let i=Do(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>No(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{te(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Nn.inline=(e,{expression:t},{cleanup:r})=>{let n=qe(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};w("ref",Nn);w("if",B((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 Ee(a,{},e),_(()=>{e.after(a),N(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{te(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())}));w("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>xo(e,i))});ke((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Nt(Pr("@",Rr(le("on:"))));w("on",B((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=ie(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));Ve("Collapse","collapse","collapse");Ve("Intersect","intersect","intersect");Ve("Focus","trap","focus");Ve("Mask","mask","mask");w("html",(e,{expression:t})=>{je(Error("Using the x-html directive is prohibited in the CSP build"),e)});ce.setEvaluator(Rs);ce.setRawEvaluator(Ps);ce.setReactivityEngine({reactive:Kt,effect:(e,t={})=>{let r;return r=Ws(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:Js,raw:v});Dn=ce,$o=Dn;/*! Bundled license information:
|
|
5
|
+
`:""}`,t),setTimeout(()=>{throw e},0)}function Pr(e){let t=V;V=!1;let r=e();return V=t,r}function W(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return Rr(...e)}function ji(e){Rr=e}function zi(e){$r=e}function qi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!V){ht(r,t,Y([n,...e]),i);return}let s=t.apply(Y([n,...e]),i);ht(r,s)}}function ht(e,t,r,n,i){if(V&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>ht(e,s,r,n)).catch((s)=>qe(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Fi(...e){return $r(...e)}function ce(e=""){return Rt+e}function Ki(e){Rt=e}function E(e,t){return $e[e]=t,{before(r){if(!$e[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=K.indexOf(r);K.splice(n>=0?n:K.indexOf("DEFAULT"),0,e)}}}function Vi(e){return Object.keys($e).includes(e)}function Fe(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=Br(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(qr((o,s)=>n[o]=s)).filter(Kr).map(Yi(n,r)).sort(Gi).map((o)=>Ji(e,o))}function Br(e){return Array.from(e).map(qr()).filter((t)=>!Kr(t))}function Wi(e){bt=!0;let t=Symbol();Ur=t,he.set(t,[]);let r=()=>{while(he.get(t).length)he.get(t).shift()();he.delete(t)},n=()=>{bt=!1,r()};e(r),n()}function Hr(e){let t=[],r=(a)=>t.push(a),[n,i]=Si(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:W.bind(W,e)},()=>t.forEach((a)=>a())]}function Ji(e,t){let r=()=>{},n=$e[t.type]||r,[i,o]=Hr(e);Tr(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),bt?he.get(Ur).push(n):n()};return s.runCleanups=o,s}function qr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Fr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function $t(e){Fr.push(e)}function Kr({name:e}){return Vr().test(e)}function Yi(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Vr()),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 Gi(e,t){let r=K.indexOf(e.type)===-1?mt:e.type,n=K.indexOf(t.type)===-1?mt:t.type;return K.indexOf(r)-K.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 B(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function Xi(e){return(...t)=>j&&e(...t)}function Se(e){Wr.push(e)}function Zi(e,t){Wr.forEach((r)=>r(e,t)),j=!0,Jr(()=>{D(t,(r,n)=>{n(r,()=>{})})}),j=!1}function Qi(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,gt=!0,Jr(()=>{es(t)}),j=!1,gt=!1}function es(e){let t=!1;D(e,(n,i)=>{G(n,(o,s)=>{if(t&&os(o))return s();t=!0,i(o,s)})})}function Jr(e){let t=te;lr((r,n)=>{let i=t(r);return de(i),()=>{}}),e(),lr(t)}function ts(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;Ke++}r.pending++,Promise.resolve(t).catch((n)=>{try{qe(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>rs(e,r))}function rs(e,t){if(t.pending--,t.pending>0)return;if(Ii(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Ke--,!e.isConnected)return;is(t),D(e)}function ns(e,t){if(Ke===0)return!1;let r=C(e,(n)=>n._x_deferInit);if(!r)return!1;return Yr(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function Yr(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 is(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=C(r,(o)=>o._x_deferInit);if(n){Yr(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;Fe(r,i).forEach((o)=>o())})}function be(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 ss(){if(dr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(dr=!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?");be(document,"alpine:init"),be(document,"alpine:initializing"),Dt(),Ci((t)=>D(t,G)),It((t)=>re(t)),Sr((t,r)=>{if(ns(t,r))return;Fe(t,r).forEach((n)=>n())});let e=(t)=>!Ve(t.parentElement,!0);Array.from(document.querySelectorAll(Zr().join(","))).filter(e).forEach((t)=>{D(t)}),be(document,"alpine:initialized"),setTimeout(()=>{ds()})}function Xr(){return Bt.map((e)=>e())}function Zr(){return Bt.concat(Gr).map((e)=>e())}function Qr(e){Bt.push(e)}function en(e){Gr.push(e)}function Ve(e,t=!1){return C(e,(r)=>{if((t?Zr():Xr()).some((i)=>r.matches(i)))return!0})}function C(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return C(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return C(e.parentNode.host,t);if(!e.parentElement)return;return C(e.parentElement,t)}function os(e){return Xr().some((t)=>e.matches(t))}function as(e){tn.push(e)}function D(e,t=G,r=()=>{}){if(C(e,(n)=>n._x_ignore))return;Wi(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),tn.forEach((o)=>o(n,i)),Fe(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=ls++;n._x_ignore&&i()})})}function re(e,t=G){t(e,(r)=>{Oi(r),Cr(r),delete r._x_marker})}function ds(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Vi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Ht(e=()=>{}){return queueMicrotask(()=>{Ut||setTimeout(()=>{vt()})}),new Promise((t)=>{xt.push(()=>{e(),t()})})}function vt(){Ut=!1;while(xt.length)xt.shift()()}function cs(){Ut=!0}function jt(e,t){if(Array.isArray(t))return cr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return us(e,t);else if(typeof t==="function")return jt(e,t());return cr(e,t)}function yt(e){return e.split(/\s/).filter(Boolean)}function cr(e,t){let r=(i)=>yt(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 us(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?yt(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?yt(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 We(e,t){if(typeof t==="object"&&t!==null)return fs(e,t);return ps(e,t)}function fs(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=hs(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{We(e,r)}}function ps(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function hs(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function _t(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function bs(e,t,r){rn(e,jt,""),{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 ms(e,t,r){rn(e,We);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((f,x)=>x<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((f,x)=>x>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),d=a?0:1,c=l?fe(t,"scale",95)/100:1,u=fe(t,"delay",0)/1000,p=fe(t,"origin","center"),g="opacity, transform",m=fe(t,"duration",150)/1000,h=fe(t,"duration",75)/1000,b="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${m}s`,transitionTimingFunction:b},e._x_transition.enter.start={opacity:d,transform:`scale(${c})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:p,transitionDelay:`${u}s`,transitionProperty:g,transitionDuration:`${h}s`,transitionTimingFunction:b},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:d,transform:`scale(${c})`}}function rn(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=()=>{}){wt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){wt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function nn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:nn(t)}function wt(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,d;gs(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),d=t(e,i)},after:s,cleanup(){l(),d()}})}function gs(e,t){let r,n,i,o=_t(()=>{w(()=>{if(r=!0,!n)t.before();if(!i)t.end(),vt();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:_t(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},w(()=>{t.start(),t.during()}),cs(),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;w(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;w(()=>{t.end()}),vt(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function fe(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 sn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?As(t):t,t){case"value":xs(e,r);break;case"style":ys(e,r);break;case"class":vs(e,r);break;case"selected":case"checked":_s(e,t,r);break;default:zt(e,t,r);break}}function xs(e,t){if(qt(e)){if(e.attributes.value===void 0)e.value=t}else if(Be(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)=>Ss(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")ks(e,t);else if(e.tagName==="OPTION")zt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function vs(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=jt(e,t)}function ys(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=We(e,t)}function _s(e,t,r){zt(e,t,r),Es(e,t,r)}function zt(e,t,r){if([null,void 0,!1].includes(r)&&Cs(t))e.removeAttribute(t);else{if(on(t))r=t;if(Os(r))r=JSON.stringify(r);ws(e,t,r)}}function ws(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Es(e,t,r){if(e[t]!==r)e[t]=r}function ks(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function As(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ss(e,t){return e==t}function De(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 on(e){return Ts.has(e)}function Cs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Os(e){return typeof e==="object"&&e!==null}function Ms(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return an(e,t,r)}function Is(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,Pr(()=>W(e,i.expression))}return an(e,t,r)}function an(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(on(t))return!![t,"true"].includes(n);return n}function Be(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function qt(e){return e.type==="radio"||e.localName==="ui-radio"}function ln(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 dn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function cn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=te(()=>{let l=e(),d=r();if(i)n(rt(l)),i=!1;else{let c=JSON.stringify(l),u=JSON.stringify(d);if(c!==o)n(rt(l));else if(c!==u)t(rt(d))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{Mt(a),de(a)}}function rt(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Ls(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function Ds(e,t){if(!ur)P=le(P),ur=!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 Pt(P[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")P[e].init()}function Ns(){return P}function Ps(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return fn(e,r());else un[e]=r;return()=>{}}function Rs(e){return Object.entries(un).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function fn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Br(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}),Fe(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function $s(e,t){pn[e]=t}function Bs(e,t){return Object.entries(pn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function bn(e){try{let r=new js(e).tokenize(),i=new zs(r).parse(),o=new qs;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:d=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:d})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Fs(e,t,r={}){let n=mn(e),i=Y([r.scope??{},...n]),o=r.params??[],a=bn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&V)return a.apply(i,o);return a}function Ks(e,t){let r=mn(e);if(typeof t==="function")return qi(r,t);let n=Vs(e,t,r);return Bi.bind(null,e,t,n)}function mn(e){let t={};return Re(t,e),[t,...ae(e)]}function Vs(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=Y([i,...r]),l=bn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(V&&typeof l==="function"){let d=l.apply(l,o);if(d instanceof Promise)d.then((c)=>n(c));else n(d)}else if(typeof l==="object"&&l instanceof Promise)l.then((d)=>n(d));else n(l)}}function gn(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 Qs(e,t=!1){if(e.flags|=8,t){e.next=xe,xe=e;return}e.next=ge,ge=e}function Kt(){_n++}function Vt(){if(--_n>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(ge){let t=ge;ge=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 wn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function En(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;Wt(n),to(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function kt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function eo(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Ue)return;if(e.globalVersion=Ue,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!kt(e)))return;e.flags|=2;let t=e.dep,r=v,n=O;v=e,O=!0;try{wn(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{v=r,O=n,En(e),e.flags&=-3}}function Wt(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)Wt(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function to(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 ro(e,t){if(e.effect instanceof pr)e=e.effect.fn;let r=new pr(e);if(t)ye(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function no(e){e.effect.stop()}function io(){kn.push(O),O=!1}function so(){let e=kn.pop();O=e===void 0?!0:e}function hr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=v;v=void 0;try{t()}finally{v=r}}}function An(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)An(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&&v){let n=At.get(e);if(!n)At.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new ao),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function H(e,t,r,n,i,o){let s=At.get(e);if(!s){Ue++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Kt(),t==="clear")s.forEach(a);else{let l=_e(e),d=l&&Ft(r);if(l&&r==="length"){let c=Number(n);s.forEach((u,p)=>{if(p==="length"||p===Ee||!Te(p)&&p>=c)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(d)a(s.get(Ee));switch(t){case"add":if(!l){if(a(s.get(J)),me(e))a(s.get(St))}else if(d)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(J)),me(e))a(s.get(St))}break;case"set":if(me(e))a(s.get(J));break}}}Vt()}function se(e){let t=y(e);if(t===e)return t;return S(t,"iterate",Ee),Q(e)?t:t.map(ee)}function Jt(e){return S(e=y(e),"iterate",Ee),e}function I(e,t){if(Z(e))return Ln(e)?ke(ee(t)):ke(t);return ee(t)}function st(e,t,r){let n=Jt(e),i=n[t]();if(n!==e&&!Q(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=Jt(e),a=s!==e&&!Q(e),l=s[t];if(l!==co[t]){let u=l.apply(e,o);return a?ee(u):u}let d=r;if(s!==e){if(a)d=function(u,p){return r.call(this,I(e,u),p,e)};else if(r.length>2)d=function(u,p){return r.call(this,u,p,e)}}let c=l.call(s,d,n);return a&&i?i(c):c}function br(e,t,r,n){let i=Jt(e),o=i!==e&&!Q(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(d,c,u){if(a)a=!1,d=I(e,d);return r.call(this,d,I(e,c),u,e)};else if(r.length>3)s=function(d,c,u){return r.call(this,d,c,u,e)}}let l=i[t](s,...n);return a?I(e,l):l}function ot(e,t,r){let n=y(e);S(n,"iterate",Ee);let i=n[t](...r);if((i===-1||i===!1)&&ko(r[0]))return r[0]=y(r[0]),n[t](...r);return i}function pe(e,t,r=[]){io(),Kt();let n=y(e)[t].apply(e,r);return Vt(),so(),n}function fo(e){if(!Te(e))e=String(e);let t=y(this);return S(t,"has",e),t.hasOwnProperty(e)}function go(e,t,r){return function(...n){let i=this.__v_raw,o=y(i),s=me(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,d=i[e](...n),c=r?Tt:t?ke:ee;return!t&&S(o,"iterate",l?St:J),ye(Object.create(d),{next(){let{value:u,done:p}=d.next();return p?{value:u,done:p}:{value:a?[c(u[0]),c(u[1])]:c(u),done:p}}})}}function Ie(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";X(`${yn(e)} operation ${r}failed: target is readonly.`,y(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function xo(e,t){let r={get(i){let o=this.__v_raw,s=y(o),a=y(i);if(!e){if(F(i,a))S(s,"get",i);S(s,"get",a)}let{has:l}=Me(s),d=t?Tt:e?ke:ee;if(l.call(s,i))return d(o.get(i));else if(l.call(s,a))return d(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(F(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),d=t?Tt:e?ke:ee;return!e&&S(l,"iterate",J),a.forEach((c,u)=>i.call(o,d(c),d(u),s))}};return ye(r,e?{add:Ie("add"),set:Ie("set"),delete:Ie("delete"),clear:Ie("clear")}:{add(i){let o=y(this),s=Me(o),a=y(i),l=!t&&!Q(i)&&!Z(i)?a:i;if(!(s.has.call(o,l)||F(i,l)&&s.has.call(o,i)||F(a,l)&&s.has.call(o,a)))o.add(l),H(o,"add",l,l);return this},set(i,o){if(!t&&!Q(o)&&!Z(o))o=y(o);let s=y(this),{has:a,get:l}=Me(s),d=a.call(s,i);if(!d)i=y(i),d=a.call(s,i);else mr(s,a,i);let c=l.call(s,i);if(s.set(i,o),!d)H(s,"add",i,o);else if(F(o,c))H(s,"set",i,o,c);return this},delete(i){let o=y(this),{has:s,get:a}=Me(o),l=s.call(o,i);if(!l)i=y(i),l=s.call(o,i);else mr(o,s,i);let d=a?a.call(o,i):void 0,c=o.delete(i);if(l)H(o,"delete",i,void 0,d);return c},clear(){let i=y(this),o=i.size!==0,s=me(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]=go(i,e,t)}),r}function Cn(e,t){let r=xo(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(Et(r,i)&&i in n?r:n,i,o)}}function mr(e,t,r){let n=y(r);if(n!==r&&t.call(e,n)){let i=vn(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 Eo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yt(e){if(Z(e))return e;return In(e,!1,bo,vo,On)}function Ct(e){return In(e,!0,mo,yo,Mn)}function In(e,t,r,n,i){if(!we(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 o=i.get(e);if(o)return o;let s=Eo(vn(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Ln(e){if(Z(e))return Ln(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 ko(e){return e?!!e.__v_raw:!1}function y(e){let t=e&&e.__v_raw;return t?y(t):e}function ve(e){return e?e.__v_isRef===!0:!1}function Ao(e){let t=[];return C(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function Dn(e){if(!at[e])at[e]=0;return++at[e]}function So(e,t){return C(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function To(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=Dn(t)}function Co(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 Nn(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 gr(e){let t=B(()=>document.querySelector(e),()=>Oo)();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,d)=>(c)=>d(l,c);if(r.includes("dot"))t=Mo(t);if(r.includes("camel"))t=Io(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=Rn(r,o),r.includes("prevent"))o=a(o,(l,d)=>{d.preventDefault(),l(d)});if(r.includes("stop"))o=a(o,(l,d)=>{d.stopPropagation(),l(d)});if(r.includes("once"))o=a(o,(l,d)=>{l(d),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,d)=>{if(e.contains(d.target))return;if(d.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(d)});if(r.includes("self"))o=a(o,(l,d)=>{d.target===e&&l(d)});if(t==="submit")o=a(o,(l,d)=>{if(d.target._x_pendingModelUpdates)d.target._x_pendingModelUpdates.forEach((c)=>c());l(d)});if(Do(t)||$n(t))o=a(o,(l,d)=>{if(Po(d,r))return;l(d)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Rn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=He(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=ln(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=He(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=dn(t,n)}return t}function Mo(e){return e.replace(/-/g,".")}function Io(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function He(e){return!Array.isArray(e)&&!isNaN(e)}function Lo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Do(e){return["keydown","keyup"].includes(e)}function $n(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Po(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!No.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,He((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,He((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&xr(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($n(e.type))return!1;if(xr(e.key).includes(r[0]))return!1}}return!0}function xr(e){if(!e)return[];e=Lo(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 Le(e,t,r,n){return w(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(Be(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=lt(r.target.value);else if(t.includes("boolean"))i=De(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!Ro(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 lt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return De(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(qt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return lt(i);else if(t.includes("boolean"))return De(i);else if(t.includes("trim"))return i.trim();else return i}})}function lt(e){let t=e?parseFloat(e):null;return $o(t)?t:e}function Ro(e,t){return e==t}function $o(e){return!Array.isArray(e)&&!isNaN(e)}function vr(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Bo(e,t){e._x_keyExpression=t}function Uo(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 Ho(e){if(!j)return!1;if(gt)return!0;return e.hasAttribute("data-has-alpine-state")}function jo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function zo(e,t,r,n){r((i)=>{if(Ko(i))i=Array.from({length:i},(d,c)=>c+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=Vo(i),l=Object.entries(i).map(([d,c])=>{if(!a)d=parseInt(d);let u=Fo(t,c,d,i),p;return n((g)=>{if(typeof g==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(g))s.set(g,o.get(g)),o.delete(g);p=g},{scope:{index:d,...u}}),[p,u]});w(()=>{o.forEach((u)=>{re(u),u.remove()});let d=new Set,c=e;if(l.forEach(([u,p])=>{if(s.has(u)){let h=s.get(u);if(h._x_refreshXForScope(p),c.nextElementSibling!==h){if(c.nextElementSibling)h.replaceWith(c.nextElementSibling);c.after(h)}if(c=h,h._x_currentIfEl){if(h.nextElementSibling!==h._x_currentIfEl)c.after(h._x_currentIfEl);c=h._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let g=document.importNode(e.content,!0).firstElementChild,m=le(p);Ae(g,m,e),g._x_refreshXForScope=jo(m),s.set(u,g),d.add(g),c.after(g),c=g}),d.forEach((u)=>D(u)),c!==e)e._x_lastRenderedEl=c;else delete e._x_lastRenderedEl})})}function qo(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 Fo(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 Ko(e){return typeof e!=="object"&&!isNaN(e)}function Vo(e){return typeof e==="object"&&!Array.isArray(e)}function Un(){}function Ye(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 dt=!1,ct=!1,R,ut=-1,Ne=!1,Ot=!1,le,te,de,_r,Ei=0,ft=!0,Er,kr,Ar,je,Lt=!1,q,Nt=!1,Pe,Ni,Dr,Nr,V=!0,Rr=()=>{},$r,Rt="x-",$e,bt=!1,he,Ur,jr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},zr=(e)=>e,Fr,Vr=()=>new RegExp(`^${Rt}([^:^.]+)\\b`),mt="DEFAULT",K,j=!1,Wr,gt=!1,Ke=0,dr=!1,Bt,Gr,tn,ls=1,xt,Ut=!1,Ts,P,ur=!1,un,pn,Us,ue,fr,hn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Hs,js=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
|
+
`)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){let e=this.position,t=!1;while(this.position<this.input.length){let n=this.input[this.position];if(this.isDigit(n))this.position++;else if(n==="."&&!t)t=!0,this.position++;else break}let r=this.input.slice(e,this.position);this.tokens.push(new k("NUMBER",parseFloat(r),e,this.position))}readIdentifierOrKeyword(){let e=this.position;while(this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]))this.position++;let t=this.input.slice(e,this.position);if(["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(t))if(t==="true"||t==="false")this.tokens.push(new k("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new k("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new k("UNDEFINED",void 0,e,this.position));else this.tokens.push(new k("KEYWORD",t,e,this.position));else this.tokens.push(new k("IDENTIFIER",t,e,this.position))}readString(){let e=this.position,t=this.input[this.position];this.position++;let r="",n=!1;while(this.position<this.input.length){let i=this.input[this.position];if(n){switch(i){case"n":r+=`
|
|
7
|
+
`;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let o=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(o))r+=String.fromCharCode(parseInt(o,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new k("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},zs=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 Hs.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}}},qs=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}),f;if(e.callee.computed)f=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else f=e.callee.property.name;this.checkForDangerousKeywords(f);let x=b[f];if(typeof x!=="function")throw Error("Value is not a function");l=x.apply(b,a)}else if(e.callee.type==="Identifier"){let b=e.callee.name,f;if(b in t)f=t[b];else throw Error(`Undefined variable: ${b}`);if(typeof f!=="function")throw Error("Value is not a function");let x=r!==null?r:t;l=f.apply(x,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 d=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!d;case"-":return-d;case"+":return+d;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 f=t[b];if(e.operator==="++")t[b]=f+1;else if(e.operator==="--")t[b]=f-1;return e.prefix?t[b]:f}else if(e.argument.type==="MemberExpression"){let b=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(f);let x=b[f];if(e.operator==="++")b[f]=x+1;else if(e.operator==="--")b[f]=x-1;return e.prefix?b[f]:x}throw Error("Invalid update expression target");case"BinaryExpression":let c=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 c&&u();if(e.operator==="||")return c||u();let p=u();switch(e.operator){case"+":return c+p;case"-":return c-p;case"*":return c*p;case"/":return c/p;case"%":return c%p;case"==":return c==p;case"!=":return c!=p;case"===":return c===p;case"!==":return c!==p;case"<":return c<p;case">":return c>p;case"<=":return c<=p;case">=":return c>=p;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let m=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=m,m;else if(e.left.type==="MemberExpression"){let b=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),f=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(f),b[f]=m,m}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 h={};for(let b of e.properties){let f=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}),x=this.evaluate({node:b.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});h[f]=x}return h;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(fr.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(hn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return fr.set(e,!0),!0}},ua,fa,ye,Ws,Et=(e,t)=>Ws.call(e,t),_e,me=(e)=>xn(e)==="[object Map]",Js=(e)=>typeof e==="string",Te=(e)=>typeof e==="symbol",we=(e)=>e!==null&&typeof e==="object",Ys,xn=(e)=>Ys.call(e),vn=(e)=>xn(e).slice(8,-1),Ft=(e)=>Js(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Je=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},Gs,pa,Xs,ha,yn,ba,F=(e,t)=>!Object.is(e,t),Zs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ma,nt,v,it,pr=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,nt)if(nt.active)nt.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,it.has(this))it.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))Qs(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,hr(this),wn(this);let e=v,t=O;v=this,O=!0;try{return this.fn()}finally{if(v!==this)X("Active effect was not restored correctly - this is likely a Vue internal bug.");En(this),v=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Wt(e);this.deps=this.depsTail=void 0,hr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)it.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(kt(this))this.run()}get dirty(){return kt(this)}},_n=0,ge,xe,O=!0,kn,Ue=0,oo=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}},ao=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(!v||!O||v===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==v){if(t=this.activeLink=new oo(v,this),!v.deps)v.deps=v.depsTail=t;else t.prevDep=v.depsTail,v.depsTail.nextDep=t,v.depsTail=t;An(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=v.depsTail,t.nextDep=void 0,v.depsTail.nextDep=t,v.depsTail=t,v.deps===t)v.deps=r}}if(v.onTrack)v.onTrack(ye({effect:v},e));return t}trigger(e){this.version++,Ue++,this.notify(e)}notify(e){Kt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(ye({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Vt()}}},At,J,St,Ee,lo,co,uo,Sn,Tn=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?wo:Mn:i?_o:On).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=_e(e);if(!n){let a;if(o&&(a=lo[t]))return a;if(t==="hasOwnProperty")return fo}let s=Reflect.get(e,t,ve(e)?e:r);if(Te(t)?Sn.has(t):uo(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ve(s)){let a=o&&Ft(t)?s:s.value;return n&&we(a)?Ct(a):a}if(we(s))return n?Ct(s):Yt(s);return s}},po,ho,bo,mo,Tt=(e)=>e,Me=(e)=>Reflect.getPrototypeOf(e),vo,yo,On,_o,Mn,wo,ee=(e)=>we(e)?Yt(e):e,ke=(e)=>we(e)?Ct(e):e,at,Oo,Pn=()=>{},No,Bn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};Rs(l),A(e,n)((c)=>{fn(e,c,i)},{scope:l});return}if(t==="key")return Bo(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="";w(()=>sn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},z,Hn,Wo;var zn=hi(()=>{R=[];Er=[],kr=[],Ar=[];je=new MutationObserver(ze);q=[];Pe=[];Ni={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 Pi;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=Ir(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)}};Dr={};Nr=Hi;$e={};he=new Map,Ur=Symbol();Fr=[];K=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",mt,"teleport"];Wr=[];Se((e,t)=>{if(Ke===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(C(e,(r)=>r._x_deferInit))t._x_ignore=!0});Bt=[],Gr=[];tn=[];xt=[];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")ms(e,r,t);else bs(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=nn(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let d=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([c])=>c?.());return delete l._x_hidePromise,delete l._x_hideChildren,d};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Ts=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={};un={};pn={};Us={get reactive(){return le},get release(){return de},get effect(){return te},get raw(){return _r},get transaction(){return Ti},version:"3.17.4",flushAndStopDeferringMutations:Di,dontAutoEvaluateFunctions:Pr,disableEffectScheduling:ki,startObservingMutations:Dt,stopObservingMutations:Or,setReactivityEngine:Ai,onAttributeRemoved:Tr,onAttributesAdded:Sr,closestDataStack:ae,skipDuringClone:B,onlyDuringClone:Xi,addRootSelector:Qr,addInitSelector:en,setErrorHandler:Ui,interceptClone:Se,addScopeToNode:Ae,deferMutations:Li,mapAttributes:$t,evaluateLater:A,interceptInit:as,initInterceptors:Pt,injectMagics:Re,setEvaluator:ji,setRawEvaluator:zi,mergeProxies:Y,extractProp:Is,findClosest:C,onElRemoved:It,closestRoot:Ve,destroyTree:re,interceptor:Lr,transition:wt,setStyles:We,mutateDom:w,deferInit:ts,directive:E,entangle:cn,throttle:dn,debounce:ln,evaluate:W,evaluateRaw:Fi,initTree:D,nextTick:Ht,prefixed:ce,prefix:Ki,plugin:Ls,magic:M,store:Ds,start:ss,clone:Qi,cloneNode:Zi,bound:Ms,$data:Mr,watch:wr,walk:G,data:$s,bind:Ps},ue=Us,fr=new WeakMap,hn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}hn.add(t)});Hs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];ua=Object.freeze({}),fa=Object.freeze([]),ye=Object.assign,Ws=Object.prototype.hasOwnProperty,_e=Array.isArray,Ys=Object.prototype.toString,Gs=/-\w/g,pa=Je((e)=>e.replace(Gs,(t)=>t.slice(1).toUpperCase())),Xs=/\B([A-Z])/g,ha=Je((e)=>e.replace(Xs,"-$1").toLowerCase()),yn=Je((e)=>e.charAt(0).toUpperCase()+e.slice(1)),ba=Je((e)=>e?`on${yn(e)}`:""),ma=gn(Zs+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");it=new WeakSet;kn=[];At=new WeakMap,J=Symbol("Object iterate"),St=Symbol("Map keys iterate"),Ee=Symbol("Array iterate");lo={__proto__:null,[Symbol.iterator](){return st(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>_e(t)?se(t):t))},entries(){return st(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 ot(this,"includes",e)},indexOf(...e){return ot(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return ot(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 br(this,"reduce",e,t)},reduceRight(e,...t){return br(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 st(this,"values",(e)=>I(this,e))}};co=Array.prototype;uo=gn("__proto__,__v_isRef,__isVue"),Sn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Te));po=class extends Tn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=_e(e)&&Ft(t);if(!this._isShallow){let l=Z(i);if(!Q(r)&&!Z(r))i=y(i),r=y(r);if(!o&&ve(i)&&!ve(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=o?Number(t)<e.length:Et(e,t),a=Reflect.set(e,t,r,ve(e)?e:n);if(e===y(n)&&a){if(!s)H(e,"add",t,r);else if(F(r,i))H(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=Et(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)||!Sn.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",_e(e)?"length":J),Reflect.ownKeys(e)}},ho=class extends Tn{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}},bo=new po,mo=new ho;vo={get:Cn(!1,!1)},yo={get:Cn(!0,!1)};On=new WeakMap,_o=new WeakMap,Mn=new WeakMap,wo=new WeakMap;M("nextTick",()=>Ht);M("dispatch",(e)=>be.bind(be,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=wr(()=>{let l;return o((d)=>l=d),l},i);r(a)});M("store",Ns);M("data",(e)=>Mr(e));M("root",(e)=>Ve(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=Y(Ao(e)),e._x_refs_proxy});at={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return Co(e,i,t,()=>{let o=So(e,r),s=o?o._x_ids[r]:Dn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Se((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Nn("Focus","focus","focus");Nn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let c;return o((u)=>c=u),c},a=n(`${t} = __placeholder`),l=(c)=>a(()=>{},{scope:{__placeholder:c}}),d=s();l(d),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let c=e._x_model.get,u=e._x_model.setWithModifiers,p=cn({get(){return c()},set(g){u(g)}},{get(){return s()},set(g){l(g)}});i(p)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=gr(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))})});Ae(o,{},e);let s=(a,l,d)=>{if(d.includes("prepend"))l.parentNode.insertBefore(a,l);else if(d.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};w(()=>{B(()=>{s(o,i,t),D(o)})()}),e._x_teleportPutBack=()=>{let a=gr(r);w(()=>{s(e._x_teleport,a,t)})},n(()=>w(()=>{o.remove(),re(o)}))});Oo=document.createElement("div");Pn.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",Pn);E("effect",B((e,{expression:t},{effect:r})=>{r(A(e,t))}));No=["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=C(e,(h)=>h!==e);let s=A(o,r),a;if(typeof r==="string")a=A(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=A(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let h;return s((b)=>h=b),vr(h)?h.get():h},d=(h)=>{let b;if(s((f)=>b=f),vr(b))b.set(h);else a(()=>{},{scope:{__placeholder:h}})};if(typeof r==="string"&&e.type==="radio")w(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let c=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),p=t.includes("enter"),g=c||u||p,m;if(j)m=()=>{};else if(g){let h=[],b=(f)=>d(Le(e,t,f,l()));if(c)h.push(oe(e,"change",t,b));if(u){if(h.push(oe(e,"blur",t,b)),e.form){let f=e.form,x=()=>b({target:e});if(!f._x_pendingModelUpdates)f._x_pendingModelUpdates=[];f._x_pendingModelUpdates.push(x),i(()=>{if(f._x_pendingModelUpdates)f._x_pendingModelUpdates.splice(f._x_pendingModelUpdates.indexOf(x),1)})}}if(p)h.push(oe(e,"keydown",t,(f)=>{if(f.key==="Enter")b(f)}));m=()=>h.forEach((f)=>f())}else{let h=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";m=oe(e,h,t,(b)=>{d(Le(e,t,b,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||Be(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)d(Le(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=m,i(()=>e._x_removeModelListeners.default()),e.form){let h=oe(e.form,"reset",[],(b)=>{Ht(()=>e._x_model&&e._x_model.set(Le(e,t,{target:e},l())))});i(()=>h())}if(e._x_model={get(){return l()},set(h){d(h)},setWithModifiers:Rn(t,d)},e._x_forceModelUpdate=(h)=>{if(h===void 0&&typeof r==="string"&&r.match(/\./))h="";w(()=>{if(Be(e))if(Array.isArray(h))e.checked=h.some((b)=>b==e.value);else e.checked=!!h;else if(qt(e))if(typeof h==="boolean")e.checked=De(e.value)===h;else e.checked=e.value==h;else sn(e,"value",h)})},e.tagName==="SELECT"){let h=new MutationObserver(()=>{e._x_forceModelUpdate(l())});h.observe(e,{childList:!0}),i(()=>h.disconnect())}n(()=>{let h=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(h)})});E("cloak",(e)=>queueMicrotask(()=>w(()=>e.removeAttribute(ce("cloak")))));en(()=>`[${ce("init")}]`);E("init",B((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)=>{w(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{w(()=>{Array.from(e.children).forEach((s)=>re(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});$t(jr(":",zr(ce("bind:"))));Bn.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",Bn);Qr(()=>`[${ce("data")}]`);z=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Ho(e))return;let n=e[z];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Re(i,e);let o={};Bs(o,i);let s=W(e,t,{scope:o});if(s===void 0||s===!0)s={};Re(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Uo(a,s);let d={expression:t};e[z]=d,queueMicrotask(()=>{if(e[z]===d)delete e[z]})}else a=le(s);Pt(a,r);let l=Ae(e,a);B(()=>{a.init&&W(e,a.init)})(),r(()=>{a.destroy&&W(e,a.destroy),l();let d={reactiveData:a};e[z]=d,queueMicrotask(()=>{if(e[z]===d)delete e[z]})})});Se((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=()=>{w(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{w(()=>{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=_t((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),d,c=!0;n(()=>i((u)=>{if(!c&&u===d)return;if(t.includes("immediate"))u?a():o();l(u),d=u,c=!1}))});E("for",B((e,{expression:t},{effect:r,cleanup:n})=>{let i=qo(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>zo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>w(()=>{re(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Un.inline=(e,{expression:t},{cleanup:r})=>{let n=Ve(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Un);E("if",B((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 Ae(a,{},e),w(()=>{e.after(a),D(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{w(()=>{re(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)=>To(e,i))});Se((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});$t(jr("@",zr(ce("on:"))));E("on",B((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())}));Ye("Collapse","collapse","collapse");Ye("Intersect","intersect","intersect");Ye("Focus","trap","focus");Ye("Mask","mask","mask");E("html",(e,{expression:t})=>{qe(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(Ks);ue.setRawEvaluator(Fs);ue.setReactivityEngine({reactive:Yt,effect:(e,t={})=>{let r;return r=ro(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:no,raw:y});Hn=ue,Wo=Hn;/*! Bundled license information:
|
|
8
8
|
|
|
9
9
|
@vue/shared/dist/shared.esm-bundler.js:
|
|
10
10
|
(**
|
|
@@ -19,8 +19,8 @@ ${r?'Expression: "'+r+`"
|
|
|
19
19
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
20
20
|
* @license MIT
|
|
21
21
|
**)
|
|
22
|
-
*/});var
|
|
23
|
-
`);for(let[,,n]of r.matchAll(
|
|
22
|
+
*/});var nr=typeof HTMLElement==="function"?HTMLElement:class{};function ir(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 sr(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 bi=Symbol.for("bare-v3.styles");function or(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[bi]??=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 Ce=null;function qn(){if(Ce)return Ce;let e=(zn(),ci(jn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Ce=e}var Fn=(e)=>qn().reactive(e),Kn=(e)=>Ce?Ce.raw(e):e;function Vn(e,t,r){let n=qn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function Jo(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},o=null,s=null,a=0,l=null,d=0,c=null,u=new n.MutationObserver((m)=>{if(!o.isConnected||m.some(({target:h})=>s.contains(h)&&!c.contains(h)))p()});function p(){if(!o)return;n.clearTimeout(d),u.disconnect();let m=o.dataset.b3Confirm;if(l&&m&&o.textContent===m)o.replaceChildren(...l);o.removeAttribute("data-b3-armed"),o=s=l=null,c.textContent=""}function g(m){if(!c?.isConnected)c=r.createElement("span"),c.className="b3-visually-hidden",c.setAttribute("role","status"),r.body.append(c);let h=c;o=m,a=n.performance.now(),s=m.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||m.parentElement;let b=m.dataset.b3Confirm;if(b)l=[...m.childNodes],m.replaceChildren(b);m.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),d=n.setTimeout(p,4000),n.requestAnimationFrame(()=>{if(o===m)h.textContent=b||"Press again to confirm"})}e.addEventListener("click",(m)=>{let h=m.target.closest?.("[data-b3-confirm]");if(o&&h!==o)p();if(!h||h.disabled||!e.contains(h))return;if(h===o&&n.performance.now()-a>=350)return p();if(m.preventDefault(),m.stopImmediatePropagation(),h!==o)g(h)},{...i,capture:!0}),e.addEventListener("focusout",({target:m})=>{if(m===o)n.queueMicrotask(()=>m===o&&p())},i),e.addEventListener("keydown",(m)=>{let h=m;if(h.key==="Escape")p();else if(h.repeat&&(h.key==="Enter"||h.key===" ")&&h.target.closest?.("[data-b3-confirm]"))h.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{p(),c?.remove()},{once:!0})}var Wn=Symbol.for("bare-v3.confirm");function Jn(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Wn])return;e[Wn]=!0,Jo(document)}var Yo=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,Go=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,Xo=350,Ze=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),Yn=(e)=>JSON.parse(JSON.stringify(Kn(e))),_=(e,t)=>e!=null&&String(e)===String(t),Gt=(e)=>!!e&&typeof e==="object",T=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],ti=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function Gn(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=Ze();t.add(String(n.id))};return e.filter(Gt).map((n)=>{r(n),n.cards=ti(Array.isArray(n.cards)?n.cards.filter(Gt):[]);for(let i of n.cards)if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(Gt(o))r(o)}return n})}function Xn(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>_(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>_(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=T(o),a=s.findIndex((l)=>_(l.id,r));if(a>=0)return void s.splice(a,1)}}}function Xt(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...T(e).map((n)=>n.title??"")].join(`
|
|
23
|
+
`);for(let[,,n]of r.matchAll(Yo))t.add(n.toLowerCase());return[...t]}var Zn=String.raw`((?:[^()\s]|\([^()\s]*\))+)`,Zo=new RegExp(String.raw`!\[([^\]\n]*)\]\(${Zn}\)|\[([^\]\n]+)\]\(${Zn}\)|\bhttps?:\/\/[^\s<>]+`,"giu");function Qo(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 er(e){let t=[],r=0;for(let n of e.matchAll(Zo)){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 c=o;for(;;){if(c=c.replace(/[.,;:!?'"\]]+$/u,""),!c.endsWith(")")||c.split("(").length>=c.split(")").length)break;c=c.slice(0,-1)}l-=o.length-c.length,o=s=a=c}let d=Qo(a);if(!d||i&&!d.file&&!/^https?:/i.test(d.href))continue;if(n.index>r)t.push(e.slice(r,n.index));t.push({text:s,...d,...i?{image:i}:{}}),r=l}if(r<e.length)t.push(e.slice(r));return t}var Qn=(e)=>er(e).map((t)=>typeof t==="string"?t:t.text).join(""),Zt=null;function ea(e,t){let r=e.ownerDocument;e.replaceChildren(...er(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="",!Zt){let o=r.createElement("template");o.innerHTML=ia,Zt=o.content.firstElementChild}i.append(Zt.cloneNode(!0))}else if(!/^mailto:/i.test(n.href))i.target="_blank",i.rel="noopener noreferrer";return i.append(n.text),i}))}var ta="b3-board-style",ra=`
|
|
24
24
|
:where(b3-board){--b3-board-hit:var(--b3-d-control,var(--b3-touch,2.75rem));--b3-board-chip:var(--b3-d-control-small,2rem);
|
|
25
25
|
--b3-board-tag:var(--b3-color-accent);--b3-board-mention:var(--b3-color-info);--b3-board-star:var(--b3-color-warning);
|
|
26
26
|
--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));}
|
|
@@ -43,6 +43,8 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
|
|
|
43
43
|
/* Quiet text actions: Clear, Add details/subtask/column. */
|
|
44
44
|
.b3-board-ref{color:var(--b3-color-accent);text-decoration:none;text-underline-offset:.15em;overflow-wrap:anywhere;}
|
|
45
45
|
.b3-board-ref:hover{text-decoration:underline;}
|
|
46
|
+
.b3-board-image{display:inline-block;max-inline-size:100%;margin-block:.125rem;vertical-align:top;line-height:0;}
|
|
47
|
+
.b3-board-image>img{max-inline-size:100%;max-block-size:10rem;border-radius:var(--b3-radius-small,.375rem);background:var(--b3-board-soft);}
|
|
46
48
|
.b3-board-ref>.b3-board-icon{display:inline;inline-size:.875em;block-size:.875em;margin-inline-end:.2em;vertical-align:-.125em;}
|
|
47
49
|
.b3-board-link{display:inline-flex;align-items:center;gap:.375rem;min-block-size:var(--b3-board-chip);padding:0 .375rem;border:0;
|
|
48
50
|
border-radius:var(--b3-radius-small,.375rem);background:none;color:var(--b3-color-muted);font:inherit;font-size:.8125rem;white-space:nowrap;}
|
|
@@ -113,6 +115,8 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
|
|
|
113
115
|
.b3-board-editor{-webkit-user-select:text;user-select:text;inline-size:100%;min-inline-size:0;min-block-size:2.25rem;field-sizing:content;resize:none;font:inherit;line-height:1.45;
|
|
114
116
|
padding:.25rem .375rem;border:1px solid var(--b3-color-focus);border-radius:var(--b3-radius-small,.375rem);background:var(--b3-color-canvas);color:inherit;}
|
|
115
117
|
.b3-board-card-head>.b3-board-editor{font-weight:600;}
|
|
118
|
+
/* iOS zooms the page into a field whose text is under 16px. */
|
|
119
|
+
@media (pointer:coarse){.b3-board-editor{font-size:max(1em,16px);}}
|
|
116
120
|
@media (hover:hover){
|
|
117
121
|
.b3-board-card{padding-inline-start:1.25rem;}
|
|
118
122
|
/* The tools overlay the title's end instead of reserving room for buttons that are not shown; a starred
|
|
@@ -129,6 +133,19 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
|
|
|
129
133
|
}
|
|
130
134
|
@media (hover:none){.b3-board-grip{display:none;}}
|
|
131
135
|
b3-board[compact] :is(.b3-board-body,.b3-board-toggle,.b3-board-details){display:none;}
|
|
136
|
+
/* Holds a touch keyboard open between a tap and the editor it renders (16px: iOS zooms into smaller text). */
|
|
137
|
+
.b3-board-holder{position:fixed;inset-block-start:0;inset-inline-start:0;inline-size:1px;block-size:1px;padding:0;border:0;opacity:0;font-size:16px;pointer-events:none;}
|
|
138
|
+
/* Compact is a scan view: narrower columns (two side by side on a phone) with smaller card tools. */
|
|
139
|
+
b3-board[compact] .b3-board-column{flex-basis:min(15rem,calc(50% - var(--b3-space-3,.75rem) / 2));--b3-board-hit:var(--b3-board-chip);}
|
|
140
|
+
b3-board[compact] .b3-board-card{padding-inline-end:.25rem;}
|
|
141
|
+
b3-board[compact] .b3-board-column-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
|
142
|
+
/* On touch (no hover to reveal them), compact keeps its narrow columns for names and titles: the delete buttons and an
|
|
143
|
+
unstarred star give way — they are in the full view, one toggle away. */
|
|
144
|
+
@media (hover:none){
|
|
145
|
+
b3-board[compact] :is(.b3-board-remove:not([data-b3-armed]),.b3-board-star:not([aria-pressed="true"])){display:none;}
|
|
146
|
+
b3-board[compact] .b3-board-column-header{gap:.25rem;padding-inline:.375rem .25rem;}
|
|
147
|
+
b3-board[compact] .b3-board-column-name{padding-inline:.125rem;}
|
|
148
|
+
}
|
|
132
149
|
.b3-board-card[data-b3-dragging],.b3-board-column[data-b3-dragging],.b3-board-subtask[data-b3-dragging]{opacity:.4;}
|
|
133
150
|
.b3-board-ghost{position:fixed;z-index:1000;margin:0;pointer-events:none;box-shadow:var(--b3-shadow-raised,0 8px 24px #0003);
|
|
134
151
|
transform-origin:top left;rotate:1.5deg;list-style:none;}
|
|
@@ -138,9 +155,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
138
155
|
:is(.b3-board-cards,.b3-board-subtasks)[data-b3-drop="end"]{box-shadow:inset 0 -3px 0 -1px var(--b3-color-accent);}
|
|
139
156
|
.b3-board-columns[data-b3-drop="end"]{box-shadow:inset -3px 0 0 -1px var(--b3-color-accent);}
|
|
140
157
|
@media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-ghost{rotate:none;}}
|
|
141
|
-
`,
|
|
158
|
+
`,ne=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,ei=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"/>'),Ge=ne('<path d="M5 12h14M12 5v14"/>'),Qt=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"/>'),na=ne('<path d="m9 18 6-6-6-6"/>'),ia=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"/>'),sa=ne('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),oa=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"/>'),Xe=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
|
|
142
159
|
<textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
|
|
143
|
-
b3x-on:keydown="keyEditor($event, ${r})" b3x-on:blur="
|
|
160
|
+
b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,aa=`
|
|
144
161
|
<div class="b3-board-filters" b3x-bind:hidden="!tokens().length" role="group" aria-label="Filter">
|
|
145
162
|
<span class="b3-board-caption" aria-hidden="true">Filter</span>
|
|
146
163
|
<template b3x-for="token in tokens()" b3x-bind:key="token">
|
|
@@ -152,30 +169,30 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
152
169
|
<template b3x-for="column in columns" b3x-bind:key="column.id">
|
|
153
170
|
<section class="b3-board-column" b3x-bind:data-column="column.id" b3x-bind:data-kind="column.kind || null" b3x-bind:aria-label="column.name">
|
|
154
171
|
<header class="b3-board-column-header">
|
|
155
|
-
${
|
|
172
|
+
${Xe("name","column.id",!1)}
|
|
156
173
|
<button type="button" class="b3-board-column-name" b3x-show="!isEditing('name', column.id)"
|
|
157
174
|
b3x-on:click="edit('name', column.id, column.name)" b3x-on:keydown="keyColumn($event, column)" b3x-text="column.name || 'Untitled'"></button>
|
|
158
175
|
<span class="b3-board-count" b3x-text="count(column)"></span>
|
|
159
176
|
<button type="button" class="b3-board-quiet b3-board-add-card" b3x-show="!readonly" b3x-bind:aria-label="'Add card to ' + (column.name || 'Untitled')"
|
|
160
|
-
b3x-on:click="addCard(column)">${
|
|
177
|
+
b3x-on:click="addCard(column)">${Ge}</button>
|
|
161
178
|
<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')"
|
|
162
|
-
b3x-on:click="removeColumn(column)">${
|
|
179
|
+
b3x-on:click="removeColumn(column)">${Qt}</button>
|
|
163
180
|
</header>
|
|
164
181
|
<ol class="b3-board-cards">
|
|
165
182
|
<template b3x-for="card in visible(column)" b3x-bind:key="card.id">
|
|
166
183
|
<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)">
|
|
167
|
-
<span class="b3-board-grip" b3x-show="!readonly">${
|
|
184
|
+
<span class="b3-board-grip" b3x-show="!readonly">${ei}</span>
|
|
168
185
|
<div class="b3-board-card-head">
|
|
169
|
-
${
|
|
186
|
+
${Xe("title","card.id")}
|
|
170
187
|
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('title', card.id)" b3x-on:click="edit('title', card.id, card.title)"
|
|
171
188
|
b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
|
|
172
189
|
<span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
|
|
173
190
|
<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)"
|
|
174
|
-
b3x-on:click="
|
|
191
|
+
b3x-on:click="addDetails(card)">${sa}</button>
|
|
175
192
|
<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)"
|
|
176
|
-
b3x-on:click="removeCard(column, card)">${
|
|
193
|
+
b3x-on:click="removeCard(column, card)">${Qt}</button>
|
|
177
194
|
<button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
|
|
178
|
-
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${
|
|
195
|
+
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${oa}</button>
|
|
179
196
|
</span>
|
|
180
197
|
</div>
|
|
181
198
|
<div class="b3-board-tags" b3x-show="tokensOf(card).length">
|
|
@@ -185,32 +202,32 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
185
202
|
</div>
|
|
186
203
|
<button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
|
|
187
204
|
b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
|
|
188
|
-
${
|
|
205
|
+
${na}
|
|
189
206
|
<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>
|
|
190
207
|
<span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
|
|
191
208
|
<span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length">Hide details</span>
|
|
192
209
|
</button>
|
|
193
210
|
<template b3x-if="isOpen(card)">
|
|
194
211
|
<div class="b3-board-body">
|
|
195
|
-
${
|
|
212
|
+
${Xe("description","card.id")}
|
|
196
213
|
<div class="b3-board-description" role="button" tabindex="0" b3x-show="card.description && !isEditing('description', card.id)"
|
|
197
214
|
b3x-on:click="edit('description', card.id, card.description)" b3x-on:keydown="keyText($event, 'description', card.id, card.description)"
|
|
198
215
|
b3x-effect="rich($el, card.description)"></div>
|
|
199
216
|
<ul class="b3-board-subtasks" b3x-show="subtasksOf(card).length">
|
|
200
217
|
<template b3x-for="sub in subtasksOf(card)" b3x-bind:key="sub.id">
|
|
201
218
|
<li class="b3-board-subtask" b3x-bind:data-subtask="sub.id" b3x-bind:data-done="sub.done ? '' : null">
|
|
202
|
-
<span class="b3-board-subtask-grip" b3x-show="!readonly">${
|
|
219
|
+
<span class="b3-board-subtask-grip" b3x-show="!readonly">${ei}</span>
|
|
203
220
|
<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)">
|
|
204
|
-
${
|
|
221
|
+
${Xe("subtask","sub.id",!1)}
|
|
205
222
|
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('subtask', sub.id)"
|
|
206
223
|
b3x-on:click="edit('subtask', sub.id, sub.title)" b3x-on:keydown="keySubtask($event, card, sub)" b3x-effect="rich($el, sub.title)"></span>
|
|
207
|
-
<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)">${
|
|
224
|
+
<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)">${Qt}</button>
|
|
208
225
|
</li>
|
|
209
226
|
</template>
|
|
210
227
|
</ul>
|
|
211
228
|
<div class="b3-board-actions" b3x-show="!readonly">
|
|
212
|
-
<button type="button" class="b3-board-link" b3x-show="!card.description" b3x-on:click="edit('description', card.id, '')">${
|
|
213
|
-
<button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${
|
|
229
|
+
<button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${Ge}<span>Add details</span></button>
|
|
230
|
+
<button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${Ge}<span>Add subtask</span></button>
|
|
214
231
|
</div>
|
|
215
232
|
</div>
|
|
216
233
|
</template>
|
|
@@ -219,7 +236,10 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
219
236
|
</ol>
|
|
220
237
|
</section>
|
|
221
238
|
</template>
|
|
222
|
-
<button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${
|
|
239
|
+
<button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${Ge}<span>Add column</span></button>
|
|
223
240
|
</div>
|
|
224
|
-
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class
|
|
225
|
-
`).find((a)=>a.trim())?.trim()??"")},plain(s){return Vn(o.label(s))},rich(s,a){Ko(s,String(a??""))},keyText(s,a,l,c){if(s.target!==s.currentTarget||s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),o.edit(a,l,c)},isOpen(s){let a=o.viewed[String(s.id)];return o.readonly&&a!==void 0?a:!!s.expanded},expanded(s){return String(o.isOpen(s))},isEditing(s,a){return!!o.editing&&o.editing.field===s&&o.editing.id===a},focusEditor(s){queueMicrotask(()=>{s.focus(),s.select()})},tokens(){let s=new Set;for(let a of o.columns)for(let l of a.cards)for(let c of Wt(l))s.add(c);return[...s].sort()},visible(s){if(!o.filter.length)return s.cards;let a=o.editing&&r.#s(o.editing.id);return s.cards.filter((l)=>{if(l===a)return!0;let c=Wt(l);return o.filter.every((d)=>c.includes(d))})},count(s){let a=o.visible(s).length;return a===s.cards.length?String(a):`${a}/${s.cards.length}`},done(s){return O(s).filter((a)=>a.done).length},disclosable(s){return!!(s.description||O(s).length||!o.readonly)},toggleFilter(s){o.filter=o.filter.includes(s)?o.filter.filter((a)=>a!==s):[...o.filter,s]},setFilter(s){o.filter=s},toggleStar(s){let a=i(s.id);if(o.readonly||!a)return;if(s.starred)delete s.starred;else s.starred=!0;a.column.cards=Jn(a.column.cards);let l=!!s.starred;o.announcement=`${s.title??""} ${l?"starred":"unstarred"}`,n({type:"star",card:s.id,starred:l}),r.#p(s.id)},toggle(s){if(o.readonly){o.viewed={...o.viewed,[String(s.id)]:!o.isOpen(s)};return}s.expanded=!s.expanded,n({type:"toggle",card:s.id,expanded:s.expanded})},edit(s,a,l,c=!1){if(o.readonly||r.#t?.started)return;o.editing={field:s,id:a,draft:l??"",fresh:c}},keyEditor(s,a){if(s.stopPropagation(),s.key==="Escape")s.preventDefault(),o.cancel();else if(s.key==="Enter"&&!(a&&s.shiftKey)&&!s.isComposing)s.preventDefault(),o.commit(!0)},cancel(){let s=o.editing;if(o.editing=null,s?.fresh)o.discard(s);r.#h(s)},commit(s=!1){let a=o.editing;if(!a)return;if(o.editing=null,o.readonly)return;let l=a.field==="description"?a.draft.trim():a.draft.replace(/\s+/g," ").trim(),c=r.#s(a.id);if(!c)return;if(!l&&a.fresh)return o.discard(a);let d=null;if(a.field==="name"){let u=c;if(l&&l!==u.name)u.name=l,d={type:"edit",column:u.id,field:"name"};if(a.fresh)d={type:"add",column:u.id}}else if(a.field==="subtask"){let u=c,f=O(u).find((g)=>y(g.id,a.id));if(!l)return o.removeSubtask(u,f);if(l!==f.title)f.title=l,d={type:"edit",card:u.id,field:"subtask",subtask:f.id};if(a.fresh)d={type:"subtask",card:u.id,subtask:f.id,op:"add"}}else{let u=c,f=a.field;if((l||f==="description")&&l!==(u[f]??""))u[f]=l,d={type:"edit",card:u.id,field:f};if(a.fresh)d={type:"add",card:u.id,column:i(u.id).column.id}}if(d)n(d);if(a.fresh&&a.field==="subtask"&&s)o.addSubtask(c);else r.#h(a)},discard(s){Kn(o.columns,s)},addCard(s){if(o.readonly)return;let a={id:Ye(),title:""};s.cards.push(a),o.edit("title",a.id,"",!0)},addColumn(){if(o.readonly)return;let s={id:Ye(),name:"",cards:[]};o.columns.push(s),o.edit("name",s.id,"",!0)},addSubtask(s){if(o.readonly)return;let a={id:Ye(),title:"",done:!1};if(s.expanded=!0,!Array.isArray(s.subtasks))s.subtasks=[];s.subtasks.push(a),o.edit("subtask",a.id,"",!0)},removeCard(s,a){if(o.readonly)return;s.cards=s.cards.filter((l)=>l!==a),n({type:"remove",card:a.id,column:s.id})},removeColumn(s){if(o.readonly)return;o.columns=o.columns.filter((a)=>a!==s),n({type:"remove",column:s.id})},removeSubtask(s,a){if(o.readonly)return;s.subtasks=O(s).filter((l)=>l!==a),n({type:"subtask",card:s.id,subtask:a.id,op:"remove"})},check(s,a,l){if(o.readonly)return;a.done=l,n({type:"check",card:s.id,subtask:a.id,done:l})},keyCard(s,a){if(s.target!==s.currentTarget)return;if(s.key==="Enter")return s.preventDefault(),o.edit("title",a.id,a.title);if(!s.altKey||o.readonly)return;let l=i(a.id);if(!l)return;let c=getComputedStyle(r).direction==="rtl",d={ArrowUp:-1,ArrowDown:1,ArrowLeft:c?1:-1,ArrowRight:c?-1:1}[s.key];if(!d)return;if(s.preventDefault(),s.key==="ArrowUp"||s.key==="ArrowDown"){let f=o.visible(l.column),g=f[f.indexOf(l.card)+d];if(g&&!g.starred===!a.starred)r.moveCard(a.id,l.column.id,l.column.cards.indexOf(g));return}let u=o.columns[o.columns.indexOf(l.column)+d];if(u)r.moveCard(a.id,u.id,Math.min(l.index,u.cards.length))},keySubtask(s,a,l){o.keyText(s,"subtask",l.id,l.title);let c=s.key==="ArrowUp"?-1:s.key==="ArrowDown"?1:0;if(!s.altKey||!c||o.readonly)return;s.preventDefault(),s.stopPropagation(),r.#f(a,l.id,O(a).indexOf(l)+c)},keyColumn(s,a){if(!s.altKey||o.readonly)return;let l=getComputedStyle(r).direction==="rtl",c=s.key==="ArrowLeft"?l?1:-1:s.key==="ArrowRight"?l?-1:1:0;if(!c)return;s.preventDefault();let d=o.columns.indexOf(a)+c;if(d>=0&&d<o.columns.length)r.moveColumn(a.id,d)}});return o}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>y(f.id,e))),o=n.columns.find((u)=>y(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>y(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.#d({type:"move",card:a.id,from:i.id,to:o.id,index:d}),this.#p(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>y(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.#d({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#f(e,t,r){let n=this.#e,i=O(e),o=i.findIndex((l)=>y(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.#d({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}#p(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#h(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})})}#v(){this.#i?.abort(),this.#i=new AbortController;let e=this.#i.signal,t=this.ownerDocument.defaultView;this.addEventListener("pointerdown",(n)=>this.#_(n),{signal:e}),t.addEventListener("pointermove",(n)=>this.#w(n),{signal:e}),t.addEventListener("pointerup",(n)=>this.#E(n),{signal:e}),t.addEventListener("pointercancel",(n)=>{if(n.pointerId===this.#t?.pointerId)this.#n()},{signal:e}),t.addEventListener("keydown",(n)=>{if(n.key==="Escape"&&this.#t?.started)n.preventDefault(),this.#n()},{signal:e}),this.addEventListener("touchmove",(n)=>{if(this.#t?.started)n.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(n)=>{if(this.#t)n.preventDefault()},{signal:e}),this.addEventListener("click",(n)=>{if(!this.#c)return;this.#c=!1,n.preventDefault(),n.stopImmediatePropagation()},{signal:e,capture:!0});let r=(n)=>this.#y(n);this.addEventListener("click",r,{signal:e,capture:!0}),this.addEventListener("auxclick",(n)=>{if(n.button===1)r(n)},{signal:e,capture:!0})}#y(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(l)=>t.closest(l),n=this.#e?.columns.find((l)=>y(l.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((l)=>y(l.id,r("[data-card]")?.dataset.card)),o=i&&O(i).find((l)=>y(l.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;if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#_(e){if(this.readonly||this.#t||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#t=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#t===n)this.#b(e.clientX,e.clientY)},zo)}#b(e,t){let r=this.#t;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.#r.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#t!==r)return;this.#A(r.px,r.py),this.#k(this.#m(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#w(e){let t=this.#t;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.#n();return}if(r<5)return;this.#b(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}#E(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#n();let r=this.#m(e.clientX,e.clientY);if(this.#n(),this.#c=!0,setTimeout(()=>{this.#c=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>y(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((c)=>y(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>y(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>y(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.#s(t.card);if(!i)return;let o=O(i),s=r.before?o.findIndex((a)=>y(a.id,r.before)):o.length;if(o.findIndex((a)=>y(a.id,t.id))<s)s-=1;this.#f(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>y(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>y(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#m(e,t){let r=this.#t,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#g(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((g)=>{let m=g.getBoundingClientRect();return t<m.top+m.height/2}),f=(g)=>!!(g!=null&&this.#s(g)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((g)=>!f(g.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}}#k(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#t.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#g(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})}#A(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.#t?.kind==="card"?this.#g(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))}#n(){let e=this.#t;if(!e)return;this.#t=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")}}Zt("b3-board",Gn);export{Gn as B3Board};
|
|
241
|
+
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class ri extends nr{static observedAttributes=["readonly"];#r=null;#e=null;#a=null;#l=null;#u=!1;#s=null;#d=null;#t=null;#c=!1;#f=null;#E=0;#k=Math.random().toString(36).slice(2,8);#p=!1;#b=[];get columns(){let e=Yn(this.#e?.columns??this.#a??[]),t=this.#e?.editing;if(t?.fresh)Xn(e,t);return e}set columns(e){let t=Gn(Yn(e));if(!this.#e){this.#a=t;return}this.#n();let r=this.#e;if(r.columns=t,r.editing&&!this.#i(r.editing.id))r.editing=null}get filter(){return[...this.#e?.filter??this.#l??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e)this.#e.filter=t;else this.#l=t}get upload(){return this.#f}set upload(e){this.#f=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","readonly","upload"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#r&&e.readyState==="loading"){if(!this.#u)this.#u=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#u=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(or(e,ta,ra),Jn(),!this.#r){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#a;if(!r&&t)try{r=Gn(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#r=e.createElement("div"),this.#r.className="b3-board-ui",this.append(this.#r),this.#e=Vn(this.#r,aa,this.#A(r??[],this.#l??[])),this.#a=this.#l=null}else if(this.#r.parentNode!==this)this.append(this.#r);this.#d=new MutationObserver(()=>{if(this.#r&&this.#r.parentNode!==this)this.append(this.#r)}),this.#d.observe(this,{childList:!0}),this.#O(),sr(this,this.#s.signal,{role:"region"})}disconnectedCallback(){this.#n(),this.#s?.abort(),this.#s=null,this.#v(),this.#d?.disconnect(),this.#d=null}attributeChangedCallback(){if(!this.#e)return;if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#n(),this.#e.editing=null}#i(e){for(let t of this.#e?.columns??[]){if(_(t.id,e))return t;for(let r of t.cards)if(_(r.id,e)||T(r).some((n)=>_(n.id,e)))return r}return null}#o(e){this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}#A(e,t){let r=this,n=(s)=>this.#o(s),i=(s)=>{for(let a of o.columns){let l=a.cards.findIndex((d)=>_(d.id,s));if(l>=0)return{column:a,index:l,card:a.cards[l]}}return null},o=Fn({columns:e,filter:t,editing:null,announcement:"",readonly:r.readonly,viewed:{},tokensOf:Xt,subtasksOf:T,label(s){let a=String(s??"");return a.replace(Go,"").trim()||a},pressed(s){return String(o.filter.includes(s))},mention(s){return s.startsWith("@")?"":null},starred(s){return String(!!s.starred)},hasDetails(s){return!!(s.description||T(s).length)},complete(s){let a=T(s).length;return a>0&&o.done(s)===a},preview(s){let a=String(s.description??"");return a.split(`
|
|
242
|
+
`).map(Qn).find((d)=>d.trim())?.trim()??(er(a).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(s){return Qn(o.label(s))},rich(s,a){ea(s,String(a??""))},keyText(s,a,l,d){if(s.target!==s.currentTarget||s.key!=="Enter"&&s.key!==" ")return;s.preventDefault(),s.stopPropagation(),o.edit(a,l,d)},isOpen(s){let a=o.viewed[String(s.id)];return o.readonly&&a!==void 0?a:!!s.expanded},expanded(s){return String(o.isOpen(s))},isEditing(s,a){return!!o.editing&&o.editing.field===s&&o.editing.id===a},focusEditor(s){queueMicrotask(()=>r.#T(s))},blurEditor(s,a){if(o.isEditing(s,a))o.commit()},tokens(){let s=new Set;for(let a of o.columns)for(let l of a.cards)for(let d of Xt(l))s.add(d);return[...s].sort()},visible(s){if(!o.filter.length)return s.cards;let a=o.editing&&r.#i(o.editing.id);return s.cards.filter((l)=>{if(l===a)return!0;let d=Xt(l);return o.filter.every((c)=>d.includes(c))})},count(s){let a=o.visible(s).length;return a===s.cards.length?String(a):`${a}/${s.cards.length}`},done(s){return T(s).filter((a)=>a.done).length},disclosable(s){return!!(s.description||T(s).length||!o.readonly)},toggleFilter(s){o.filter=o.filter.includes(s)?o.filter.filter((a)=>a!==s):[...o.filter,s]},setFilter(s){o.filter=s},toggleStar(s){let a=i(s.id);if(o.readonly||!a)return;if(s.starred)delete s.starred;else s.starred=!0;a.column.cards=ti(a.column.cards);let l=!!s.starred;o.announcement=`${s.title??""} ${l?"starred":"unstarred"}`,n({type:"star",card:s.id,starred:l}),r.#g(s.id)},toggle(s){if(o.readonly){o.viewed={...o.viewed,[String(s.id)]:!o.isOpen(s)};return}s.expanded=!s.expanded,n({type:"toggle",card:s.id,expanded:s.expanded})},edit(s,a,l,d=!1,c=!1){if(o.readonly||r.#t?.started)return;if(o.editing&&!o.isEditing(s,a))o.commit();o.editing={field:s,id:a,draft:l??"",fresh:d,opened:c},r.#C()},addDetails(s){if(o.readonly)return;let a=!s.expanded;s.expanded=!0,o.edit("description",s.id,String(s.description??""),!1,a)},keyEditor(s,a){if(s.stopPropagation(),s.key==="Escape")s.preventDefault(),o.cancel();else if(s.key==="Enter"&&!(a&&s.shiftKey)&&!s.isComposing)s.preventDefault(),o.commit(!0)},pasteEditor(s,a,l){let d=[...s.clipboardData?.files??[]].filter((c)=>c.type.startsWith("image/"));if(o.readonly||!r.upload||a!=="title"&&a!=="description"||!d.length)return;if(s.clipboardData?.getData("text/plain").trim())return;s.preventDefault();for(let c of d)r.#S(l,c,a==="description"?s.target:null)},cancel(){let s=o.editing;if(o.editing=null,s?.fresh)o.discard(s);if(s?.opened)o.close(s);r.#x(s)},close(s){let a=r.#i(s.id);if(a&&!o.hasDetails(a))a.expanded=!1},commit(s=!1){let a=o.editing;if(!a)return;if(o.editing=null,o.readonly)return;let l=a.field==="description"?a.draft.trim():a.draft.replace(/\s+/g," ").trim(),d=r.#i(a.id);if(!d)return;if(!l&&a.fresh)return o.discard(a);if(!l&&a.opened)o.close(a);let c=null;if(a.field==="name"){let u=d;if(l&&l!==u.name)u.name=l,c={type:"edit",column:u.id,field:"name"};if(a.fresh)c={type:"add",column:u.id}}else if(a.field==="subtask"){let u=d,p=T(u).find((g)=>_(g.id,a.id));if(!l)return o.removeSubtask(u,p);if(l!==p.title)p.title=l,c={type:"edit",card:u.id,field:"subtask",subtask:p.id};if(a.fresh)c={type:"subtask",card:u.id,subtask:p.id,op:"add"}}else{let u=d,p=a.field;if((l||p==="description")&&l!==(u[p]??""))u[p]=l,c={type:"edit",card:u.id,field:p};if(a.fresh)c={type:"add",card:u.id,column:i(u.id).column.id}}if(c)n(c);if(a.fresh&&a.field==="subtask"&&s)o.addSubtask(d);else if(a.fresh&&a.field==="title"&&s&&!r.hasAttribute("compact"))o.addDetails(d);else r.#x(a)},discard(s){Xn(o.columns,s)},settle(){if(o.editing)o.commit()},addCard(s){if(o.readonly)return;o.settle();let a={id:Ze(),title:""};s.cards.push(a),o.edit("title",a.id,"",!0)},addColumn(){if(o.readonly)return;o.settle();let s={id:Ze(),name:"",cards:[]};o.columns.push(s),o.edit("name",s.id,"",!0)},addSubtask(s){if(o.readonly)return;o.settle();let a={id:Ze(),title:"",done:!1};if(s.expanded=!0,!Array.isArray(s.subtasks))s.subtasks=[];s.subtasks.push(a),o.edit("subtask",a.id,"",!0)},removeCard(s,a){if(o.readonly)return;s.cards=s.cards.filter((l)=>l!==a),n({type:"remove",card:a.id,column:s.id})},removeColumn(s){if(o.readonly)return;o.columns=o.columns.filter((a)=>a!==s),n({type:"remove",column:s.id})},removeSubtask(s,a){if(o.readonly)return;s.subtasks=T(s).filter((l)=>l!==a),n({type:"subtask",card:s.id,subtask:a.id,op:"remove"})},check(s,a,l){if(o.readonly)return;a.done=l,n({type:"check",card:s.id,subtask:a.id,done:l})},keyCard(s,a){if(s.target!==s.currentTarget)return;if(s.key==="Enter")return s.preventDefault(),o.edit("title",a.id,a.title);if(!s.altKey||o.readonly)return;let l=i(a.id);if(!l)return;let d=getComputedStyle(r).direction==="rtl",c={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[s.key];if(!c)return;if(s.preventDefault(),s.key==="ArrowUp"||s.key==="ArrowDown"){let p=o.visible(l.column),g=p[p.indexOf(l.card)+c];if(g&&!g.starred===!a.starred)r.moveCard(a.id,l.column.id,l.column.cards.indexOf(g));return}let u=o.columns[o.columns.indexOf(l.column)+c];if(u)r.moveCard(a.id,u.id,Math.min(l.index,u.cards.length))},keySubtask(s,a,l){o.keyText(s,"subtask",l.id,l.title);let d=s.key==="ArrowUp"?-1:s.key==="ArrowDown"?1:0;if(!s.altKey||!d||o.readonly)return;s.preventDefault(),s.stopPropagation(),r.#m(a,l.id,T(a).indexOf(l)+d)},keyColumn(s,a){if(!s.altKey||o.readonly)return;let l=getComputedStyle(r).direction==="rtl",d=s.key==="ArrowLeft"?l?1:-1:s.key==="ArrowRight"?l?-1:1:0;if(!d)return;s.preventDefault();let c=o.columns.indexOf(a)+d;if(c>=0&&c<o.columns.length)r.moveColumn(a.id,c)}});return o}async#S(e,t,r){let n=this.#e,i=()=>n.editing?.field==="description"&&_(n.editing.id,e)?n.editing:null,o=`![Uploading image ${this.#k}-${++this.#E}…]()`,s="",a=i();if(a&&r){let{selectionStart:f,selectionEnd:x}=r;s=f&&r.value[f-1]!==`
|
|
243
|
+
`?`
|
|
244
|
+
${o}`:o,a.draft=r.value=r.value.slice(0,f)+s+r.value.slice(x),r.setSelectionRange(f+s.length,f+s.length)}let l=n.columns.find((f)=>f.cards.some((x)=>_(x.id,e))),d=null;try{d=await this.#f?.(t,{card:e,column:l?.id})}catch(f){console.warn("b3-board: image upload failed",f)}let c=d?`.replace(/[\s()]/g,(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!c)this.#h("Image not added");while(this.#p)await new Promise((f)=>this.#b.push(f));let u=(f)=>{if(!s)return null;let x=f.indexOf(s),U=x>=0?x:f.indexOf(o);if(U<0)return null;let ie=x>=0?s:o;return[U,U+ie.length,c?ie.replace(o,c):""]},p=(f)=>{if(!s)return c?f.trim()?`${f.replace(/\s+$/,"")}
|
|
245
|
+
${c}`:c:f;let x=u(f);return x?f.slice(0,x[0])+x[2]+f.slice(x[1]):f},g=i();if(g){let f=this.querySelector("textarea.b3-board-editor"),x=f?.value===g.draft&&u(f.value);if(f&&x){let[U,ie,Qe]=x,{selectionStart:ni,selectionEnd:ii,selectionDirection:si}=f,tr=(Oe)=>Oe>=ie?Oe+Qe.length-(ie-U):Oe>U?U+Qe.length:Oe;f.setRangeText(Qe,U,ie),f.setSelectionRange(tr(ni),tr(ii),si??void 0),g.draft=f.value}else if(p(g.draft)!==g.draft)g.draft=p(g.draft);else if(c)this.#h("Image not added");return}let m=this.#i(e);if(s&&!String(m?.description??"").includes(o))m=n.columns.flatMap((f)=>f.cards).find((f)=>String(f.description??"").includes(o))??m;let h=String(m?.description??""),b=p(h).trim();if(!m||this.readonly||b===h.trim()){if(c)this.#h("Image not added");return}m.description=b,m.expanded=!0,this.#o({type:"edit",card:m.id,field:"description"})}#h(e){let t=this.#e;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#e;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((p)=>_(p.id,e))),o=n.columns.find((u)=>_(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>_(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,d=Math.max(0,Math.min(o.cards.length,r)),c=a.starred?Math.min(d,l):Math.max(d,l);if(o.cards.splice(c,0,a),i===o&&s===c)return!1;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${c+1} of ${o.cards.length}`,this.#o({type:"move",card:a.id,from:i.id,to:o.id,index:c}),this.#g(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>_(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.#o({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#m(e,t,r){let n=this.#e,i=T(e),o=i.findIndex((l)=>_(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.#o({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}#T(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?.visualViewport;if(!n)return;let i=new AbortController;n.addEventListener("resize",()=>{if(i.abort(),this.ownerDocument.activeElement===e)r()},{signal:i.signal}),setTimeout(()=>i.abort(),1000)}#C(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#r?.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.#r?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#g(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#x(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})})}#O(){this.#s?.abort(),this.#s=new AbortController;let e=this.#s.signal,t=this.ownerDocument.defaultView;this.addEventListener("pointerdown",(i)=>this.#I(i),{signal:e}),t.addEventListener("pointermove",(i)=>this.#L(i),{signal:e}),t.addEventListener("pointerup",(i)=>this.#D(i),{signal:e}),t.addEventListener("pointercancel",(i)=>{if(i.pointerId===this.#t?.pointerId)this.#n()},{signal:e}),t.addEventListener("keydown",(i)=>{if(i.key==="Escape"&&this.#t?.started)i.preventDefault(),this.#n()},{signal:e}),this.addEventListener("touchmove",(i)=>{if(this.#t?.started)i.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(i)=>{if(this.#t)i.preventDefault()},{signal:e}),this.addEventListener("click",(i)=>{if(!this.#c)return;this.#c=!1,i.preventDefault(),i.stopImmediatePropagation()},{signal:e,capture:!0});let r=(i)=>this.#M(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.#v();this.addEventListener("compositionstart",()=>{this.#p=!0},{signal:e}),this.addEventListener("compositionend",n,{signal:e}),this.addEventListener("focusout",n,{signal:e})}#v(){this.#p=!1;for(let e of this.#b.splice(0))e()}#M(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(l)=>t.closest(l),n=this.#e?.columns.find((l)=>_(l.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((l)=>_(l.id,r("[data-card]")?.dataset.card)),o=i&&T(i).find((l)=>_(l.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;if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#I(e){if(this.readonly||this.#t||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#t=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#t===n)this.#y(e.clientX,e.clientY)},Xo)}#y(e,t){let r=this.#t;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.#r.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#t!==r)return;this.#P(r.px,r.py),this.#N(this.#_(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#L(e){let t=this.#t;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.#n();return}if(r<5)return;this.#y(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}#D(e){let t=this.#t;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#n();let r=this.#_(e.clientX,e.clientY);if(this.#n(),this.#c=!0,setTimeout(()=>{this.#c=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>_(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((d)=>_(d.id,t.id))),s=r.before?i.cards.findIndex((l)=>_(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>_(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.#i(t.card);if(!i)return;let o=T(i),s=r.before?o.findIndex((a)=>_(a.id,r.before)):o.length;if(o.findIndex((a)=>_(a.id,t.id))<s)s-=1;this.#m(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>_(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>_(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#_(e,t){let r=this.#t,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#w(e,n);if(!l)return null;let d=l.querySelector(".b3-board-cards"),c=[...d.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=c.find((g)=>{let m=g.getBoundingClientRect();return t<m.top+m.height/2}),p=(g)=>!!(g!=null&&this.#i(g)?.starred);if(p(u?.dataset.card)!==p(r.id)&&(u||p(r.id)))u=c.find((g)=>!p(g.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:d}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let p=u.getBoundingClientRect();return t<p.top+p.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.find((l)=>{let d=l.getBoundingClientRect();return s?e>d.left+d.width/2:e<d.left+d.width/2})?.dataset.column??null,list:i}}#N(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#t.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#w(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})}#P(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.#t?.kind==="card"?this.#w(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))}#n(){let e=this.#t;if(!e)return;this.#t=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")}}ir("b3-board",ri);export{ri as B3Board};
|
package/dist/manifest.json
CHANGED
package/dist/references/board.md
CHANGED
|
@@ -62,7 +62,11 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
62
62
|
grip, within its card. Moves are announced.
|
|
63
63
|
- **Edit**: activating a title, column name, description or subtask edits it in place. Enter
|
|
64
64
|
commits (Shift+Enter is a new line in a description), Escape cancels, leaving the field commits.
|
|
65
|
-
An empty title is refused; an empty subtask is removed.
|
|
65
|
+
An empty title is refused; an empty subtask is removed. Enter on a new card's title goes on to its
|
|
66
|
+
description (not under `compact`); Enter on a new subtask opens the next one. Starting an edit commits
|
|
67
|
+
any other open one. A new editor is focused and scrolled into view (its whole card, in the column's
|
|
68
|
+
scroller and the columns row); on touch the keyboard opens within the tap, and editors use 16px text
|
|
69
|
+
so iOS does not zoom.
|
|
66
70
|
- **Filter**: `#tag` and `@mention` words in a card's text (plus its `tags`) become filter labels —
|
|
67
71
|
plain coloured words, not pills (mentions in their own colour). Choosing labels shows only cards
|
|
68
72
|
carrying all of them; counts show shown/total. `board.filter` reads and sets the active labels. A
|
|
@@ -80,16 +84,29 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
80
84
|
for a Cmd/Ctrl/Shift or middle click). Not prevented, a URL opens as a normal link (a new tab for
|
|
81
85
|
http/https) and a path does nothing: resolving and opening a file is the host's job. Editing the
|
|
82
86
|
text shows its raw source.
|
|
87
|
+
- **Images**: `` renders the image (at most 10rem tall), with the same target rules as a
|
|
88
|
+
link (http/https or a path; a path resolves like any relative URL on the page, so a host can serve a
|
|
89
|
+
file's images beside it). An image is a link to itself: clicking it fires `b3-link` with its `href`.
|
|
90
|
+
A closed card whose description is only images previews as "Image".
|
|
91
|
+
- **Paste an image**: set `board.upload = async (file, { card, column }) => target` and an image pasted
|
|
92
|
+
into a card's description editor is stored by the host and written at the caret as ``, starting a new
|
|
93
|
+
line when the caret follows text (an "Uploading image…" placeholder holds the spot and the caret stays where the
|
|
94
|
+
user puts it; committed first, it is replaced in the saved description, even if `columns` was set meanwhile);
|
|
95
|
+
pasted into its title, it is appended to the description and the card opens. Whitespace and
|
|
96
|
+
parentheses in `target` are percent-encoded. Each lands as an `edit` of `description`. Returning
|
|
97
|
+
nothing (or throwing) drops the image and its placeholder, and the board announces "Image not added".
|
|
98
|
+
A clipboard that also holds text (a spreadsheet copy) pastes the text. Without `upload`, pasting is left to the browser.
|
|
83
99
|
- **Details**: the chevron row under the title opens and closes a card's description and subtasks; it
|
|
84
100
|
shows subtask progress and, closed, the description's first line (open with no subtasks, it reads
|
|
85
101
|
"Hide details"). A card with neither gets an
|
|
86
|
-
"add details" button on hover instead
|
|
102
|
+
"add details" button on hover instead, which opens the card straight into its description editor
|
|
103
|
+
(left empty, the card closes again). Deleting a card or column asks for a second press. Under `readonly`,
|
|
87
104
|
opening a card is view state only: no `b3-change`, and the data's `expanded` stays as given.
|
|
88
105
|
|
|
89
106
|
## Attributes and styling
|
|
90
107
|
|
|
91
108
|
- `readonly`: no editing, adding, deleting, checking or dragging — enforced by the component, not
|
|
92
|
-
only hidden; a starred card still shows its star. `compact`: hides card details and the chevron. `aria-label` names the board region.
|
|
109
|
+
only hidden; a starred card still shows its star. `compact`: hides card details and the chevron, narrows columns (two side by side on a phone) and shrinks card tools to the chip size; on touch it also hides the delete buttons and unstarred stars so column names and titles keep the width (they are back out of compact). `aria-label` names the board region.
|
|
93
110
|
- **Height**: unbounded, the board grows with its cards. Give it a height (e.g. `flex: 1;
|
|
94
111
|
min-height: 0` in a full-height column, or `height: 70vh`) and each column scrolls its own
|
|
95
112
|
cards; dragging near a column's edge scrolls it.
|