@livx.cc/bare-v3 0.1.0-alpha.83 → 0.1.0-alpha.85
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 +17 -0
- package/dist/components/board.js +34 -21
- package/dist/components.js +1 -1
- package/dist/manifest.json +2 -2
- package/dist/references/board.md +23 -9
- package/dist/references/tabs.md +1 -1
- package/package.json +1 -1
|
@@ -98,6 +98,10 @@ export type BoardAction = {
|
|
|
98
98
|
subtask: BoardId;
|
|
99
99
|
op: 'move';
|
|
100
100
|
index: number;
|
|
101
|
+
}
|
|
102
|
+
/** `undo()` / `redo()` (⌘Z / ⌘⇧Z in the board): the event's `columns` are the board as it was before / after that step. */
|
|
103
|
+
| {
|
|
104
|
+
type: 'undo' | 'redo';
|
|
101
105
|
};
|
|
102
106
|
/**
|
|
103
107
|
* `b3-link` detail (cancelable, fired on the link): `href` exactly as written; `file` when it is a path
|
|
@@ -145,6 +149,19 @@ export declare class B3Board extends Base {
|
|
|
145
149
|
*/
|
|
146
150
|
get columns(): BoardColumn[];
|
|
147
151
|
set columns(value: BoardColumn[]);
|
|
152
|
+
/**
|
|
153
|
+
* Undo the last edit (an open editor is committed first, so it is what is undone); reported as a `b3-change` of type
|
|
154
|
+
* `undo`. Opening/closing a card is not a step, and undo keeps cards open or closed as they are. History starts over
|
|
155
|
+
* when `columns` is set (outside a `b3-change` handler) and holds up to 100 steps; edits of the same text within a
|
|
156
|
+
* second are one step. False when there is nothing to undo or the board is readonly.
|
|
157
|
+
*/
|
|
158
|
+
undo(): boolean;
|
|
159
|
+
/** With `searchable`: open the board's search field and focus it (wire the host's `/` or ⌘F to it). False without. */
|
|
160
|
+
openSearch(): boolean;
|
|
161
|
+
/** Redo the last undone step (any new edit clears them); reported as `redo`. */
|
|
162
|
+
redo(): boolean;
|
|
163
|
+
get canUndo(): boolean;
|
|
164
|
+
get canRedo(): boolean;
|
|
148
165
|
/** Active filter tokens (e.g. `#bug`, `@dana`); a card shows when it carries all of them. */
|
|
149
166
|
get filter(): string[];
|
|
150
167
|
set filter(value: string[]);
|
package/dist/components/board.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var{defineProperty:at,getOwnPropertyNames:
|
|
1
|
+
var{defineProperty:at,getOwnPropertyNames:hi,getOwnPropertyDescriptor:pi}=Object,bi=Object.prototype.hasOwnProperty;function mi(e){return this[e]}var gi=(e)=>{var t=(dr??=new WeakMap).get(e),r;if(t)return t;if(t=at({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var n of hi(e))if(!bi.call(t,n))at(t,n,{get:mi.bind(e,n),enumerable:!(r=pi(e,n))||r.enumerable})}return dr.set(e,t),t},dr;var xi=(e)=>e;function yi(e,t){this[e]=xi.bind(null,t)}var vi=(e,t)=>{for(var r in t)at(e,r,{get:t[r],enumerable:!0,configurable:!0,set:yi.bind(t,r)})};var wi=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wn={};vi(Wn,{Alpine:()=>Vn,default:()=>ea});function Ei(e){Si(e)}function ki(){Pt=!0}function Ai(){Pt=!1,Sr()}function Si(e){if(!P.includes(e)){if(P.push(e),e._x_schedulerPriority!==void 0)ze=!0}Sr()}function $t(e){let t=P.indexOf(e);if(t!==-1&&t>xt)P.splice(t,1)}function Sr(){if(!gt&&!mt){if(Pt)return;mt=!0,queueMicrotask(Ci)}}function Ci(){mt=!1,gt=!0;for(let e=0;e<P.length;e++){if(ze)Ti(e);P[e](),xt=e}P.length=0,xt=-1,ze=!1,gt=!1}function Ti(e){let t=new Map,r=P.slice(e).sort((n,i)=>Oi(n,i,t));for(let n=0;n<r.length;n++)P[e+n]=r[n];ze=!1}function Oi(e,t,r){if(!lt(e))return lt(t)?1:0;if(!lt(t))return-1;return hr(e._x_schedulerPriority.el,r)-hr(t._x_schedulerPriority.el,r)||e._x_schedulerPriority.order-t._x_schedulerPriority.order}function lt(e){return e._x_schedulerPriority!==void 0}function hr(e,t){if(t.has(e))return t.get(e);let r=0,n=e;while(e)if(r++,e._x_teleportBack)e=e._x_teleportBack;else if(typeof ShadowRoot==="function"&&e.parentNode instanceof ShadowRoot)e=e.parentNode.host;else e=e.parentElement;return t.set(n,r),r}function Ii(e){yt=!1,e(),yt=!0}function Li(e){le=e.reactive,ce=e.release,re=(t)=>e.effect(t,{scheduler:(r)=>{if(yt)Ei(r);else r()}}),Cr=e.raw}function pr(e){re=e}function Di(e){let t=()=>{};return[(n,i)=>{let o=i?.priority==="structural"?Mi++:void 0,s=re(n);if(o!==void 0&&s!==void 0)s._x_schedulerPriority={el:e,order:o};if(!e._x_effects)e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach((a)=>a())};return e._x_effects.add(s),t=()=>{if(s===void 0)return;e._x_effects.delete(s),ce(s)},s},()=>{t()}]}function Tr(e,t){let r=!0,n,i,o=re(()=>{let s=e(),a=JSON.stringify(s);if(!r){if(typeof s==="object"||s!==n){let l=typeof n==="object"?JSON.parse(i):n;queueMicrotask(()=>{t(s,l)})}}n=s,i=a,r=!1});return()=>{$t(o),ce(o)}}async function Ni(e){ki();try{await e(),await Promise.resolve()}finally{Ai()}}function Bi(e){Ir.push(e)}function Rt(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else t=e,Mr.push(t)}function Lr(e){Or.push(e)}function Dr(e,t,r){if(!e._x_attributeCleanups)e._x_attributeCleanups={};if(!e._x_attributeCleanups[t])e._x_attributeCleanups[t]=[];e._x_attributeCleanups[t].push(r)}function Nr(e,t){if(!e._x_attributeCleanups)return;Object.entries(e._x_attributeCleanups).forEach(([r,n])=>{if(t===void 0||t.includes(r))n.forEach((i)=>i()),delete e._x_attributeCleanups[r]})}function Pi(e){e._x_effects?.forEach($t);while(e._x_cleanups?.length)e._x_cleanups.pop()()}function Ht(){Ve.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),zt=!0}function Br(){$i(),Ve.disconnect(),zt=!1}function $i(){let e=Ve.takeRecords();F.push(()=>e.length>0&&We(e));let t=F.length;queueMicrotask(()=>{if(F.length===t)while(F.length>0)F.shift()()})}function Ri(){while(F.length>0)F.shift()();let e=Ve.takeRecords();if(e.length>0)We(e)}function _(e){if(!zt)return e();Br();try{return e()}finally{Ht()}}function zi(){Ut=!0}function Hi(){Ut=!1,We(He),He=[]}function We(e){if(Ut){He=He.concat(e);return}let t=[],r=new Set,n=new Map,i=new Map;for(let o=0;o<e.length;o++){if(e[o].target._x_ignoreMutationObserver)continue;if(e[o].type==="childList")e[o].removedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(!s._x_marker)return;r.add(s)}),e[o].addedNodes.forEach((s)=>{if(s.nodeType!==1)return;if(r.has(s)){r.delete(s);return}if(s._x_marker)return;t.push(s)});if(e[o].type==="attributes"){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,c=()=>{if(!n.has(s))n.set(s,[]);n.get(s).push({name:a,value:s.getAttribute(a)})},d=()=>{if(!i.has(s))i.set(s,[]);i.get(s).push(a)};if(s.hasAttribute(a)&&l===null)c();else if(s.hasAttribute(a))d(),c();else d()}}i.forEach((o,s)=>{Nr(s,o)}),n.forEach((o,s)=>{Or.forEach((a)=>a(s,o))});for(let o of r){if(t.some((s)=>s.contains(o)))continue;Mr.forEach((s)=>s(o))}for(let o of t){if(!o.isConnected)continue;Ir.forEach((s)=>s(o))}t=null,r=null,n=null,i=null}function Pr(e){return G(ae(e))}function Se(e,t,r){return e._x_dataStack=[t,...ae(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter((n)=>n!==t)}}function ae(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot)return ae(e.host);if(!e.parentNode)return[];return ae(e.parentNode)}function G(e){return new Proxy({objects:e},Ui)}function $r(e,t){if(e===null||e===Object.prototype)return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;return $r(Object.getPrototypeOf(e),t)}function ji(){return Reflect.ownKeys(this).reduce((t,r)=>(t[r]=Reflect.get(this,r),t),{})}function jt(e,t=()=>{}){let r=(i)=>typeof i==="object"&&!Array.isArray(i)&&i!==null,n=(i,o="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([s,{value:a,enumerable:l}])=>{if(l===!1||a===void 0)return;if(typeof a==="object"&&a!==null&&a.__v_skip)return;let c=o===""?s:`${o}.${s}`;if(typeof a==="object"&&a!==null&&a._x_interceptor)i[s]=a.initialize(e,c,s,t);else if(r(a)&&a!==i&&!(a instanceof Element))n(a,c)})};return n(e)}function Rr(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o,s){return e(this.initialValue,()=>qi(n,i),(a)=>vt(n,i,a),i,o,s)}};return t(r),(n)=>{if(typeof n==="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a,l)=>{let c=n.initialize(o,s,a,l);return r.initialValue=c,i(o,s,a,l)}}else r.initialValue=n;return r}}function qi(e,t){return t.split(".").reduce((r,n)=>r[n],e)}function vt(e,t,r){if(typeof t==="string")t=t.split(".");if(t.length===1)e[t[0]]=r;else if(t.length===0)throw error;else if(e[t[0]])return vt(e[t[0]],t.slice(1),r);else return e[t[0]]={},vt(e[t[0]],t.slice(1),r)}function M(e,t){zr[e]=t}function Ue(e,t){let r=Fi(t);return Object.entries(zr).forEach(([n,i])=>{Object.defineProperty(e,`$${n}`,{get(){return i(t,r)},enumerable:!1})}),e}function Fi(e){let[t,r]=Vr(e),n={interceptor:Rr,...t};return Rt(e,r),n}function Ki(e,t,r,...n){try{return r(...n)}catch(i){Ye(i,e,t)}}function Ye(...e){return Hr(...e)}function Vi(e){Hr=e}function Wi(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
|
|
2
2
|
|
|
3
3
|
${r?'Expression: "'+r+`"
|
|
4
4
|
|
|
5
|
-
`:""}`,t),setTimeout(()=>{throw e},0)}function zr(e){let t=W;W=!1;let r=e();return W=t,r}function Y(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return Hr(...e)}function Wi(e){Hr=e}function Yi(e){Ur=e}function Ji(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!W){wt(r,t,G([n,...e]),i);return}let s=t.apply(G([n,...e]),i);wt(r,s)}}function wt(e,t,r,n,i){if(W&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>wt(e,s,r,n)).catch((s)=>Ye(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Gi(...e){return Ur(...e)}function de(e=""){return qt+e}function Xi(e){qt=e}function E(e,t){return je[e]=t,{before(r){if(!je[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=V.indexOf(r);V.splice(n>=0?n:V.indexOf("DEFAULT"),0,e)}}}function Zi(e){return Object.keys(je).includes(e)}function Je(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),s=jr(o);o=o.map((a)=>{if(s.find((l)=>l.name===a.name))return{name:`x-bind:${a.name}`,value:`"${a.value}"`};return a}),t=t.concat(o)}let n={};return t.map(Wr((o,s)=>n[o]=s)).filter(Jr).map(ts(n,r)).sort(rs).map((o)=>es(e,o))}function jr(e){return Array.from(e).map(Wr()).filter((t)=>!Jr(t))}function Qi(e){_t=!0;let t=Symbol();qr=t,be.set(t,[]);let r=()=>{while(be.get(t).length)be.get(t).shift()();be.delete(t)},n=()=>{_t=!1,r()};e(r),n()}function Fr(e){let t=[],r=(a)=>t.push(a),[n,i]=Li(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:Y.bind(Y,e)},()=>t.forEach((a)=>a())]}function es(e,t){let r=()=>{},n=je[t.type]||r,[i,o]=Fr(e);Ir(e,t.original,o);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),_t?be.get(qr).push(n):n()};return s.runCleanups=o,s}function Wr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Yr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Ft(e){Yr.push(e)}function Jr({name:e}){return Gr().test(e)}function ts(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Gr()),o=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map((l)=>l.replace(".","")),expression:n,original:a}}}function rs(e,t){let r=V.indexOf(e.type)===-1?Et:e.type,n=V.indexOf(t.type)===-1?Et:t.type;return V.indexOf(r)-V.indexOf(n)}function X(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>X(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)X(n,t,!1),n=n.nextElementSibling}function R(e,t=()=>{}){return(...r)=>U?t(...r):e(...r)}function ns(e){return(...t)=>U&&e(...t)}function Ce(e){Xr.push(e)}function is(e,t){Xr.forEach((r)=>r(e,t)),U=!0,Zr(()=>{D(t,(r,n)=>{n(r,()=>{})})}),U=!1}function ss(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;U=!0,kt=!0,Zr(()=>{os(t)}),U=!1,kt=!1}function os(e){let t=!1;D(e,(n,i)=>{X(n,(o,s)=>{if(t&&fs(o))return s();t=!0,i(o,s)})})}function Zr(e){let t=re;fr((r,n)=>{let i=t(r);return ce(i),()=>{}}),e(),fr(t)}function as(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Ge++}r.pending++,Promise.resolve(t).catch((n)=>{try{Ye(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>ls(e,r))}function ls(e,t){if(t.pending--,t.pending>0)return;if($i(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Ge--,!e.isConnected)return;ds(t),D(e)}function cs(e,t){if(Ge===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return Qr(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function Qr(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function ds(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=T(r,(o)=>o._x_deferInit);if(n){Qr(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((o)=>r.hasAttribute(o)).map((o)=>({name:o,value:r.getAttribute(o)}));if(i.length===0)return;Je(r,i).forEach((o)=>o())})}function me(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function us(){if(hr)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(hr=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");me(document,"alpine:init"),me(document,"alpine:initializing"),Ht(),Ni((t)=>D(t,X)),Rt((t)=>ne(t)),Mr((t,r)=>{if(cs(t,r))return;Je(t,r).forEach((n)=>n())});let e=(t)=>!Xe(t.parentElement,!0);Array.from(document.querySelectorAll(rn().join(","))).filter(e).forEach((t)=>{D(t)}),me(document,"alpine:initialized"),setTimeout(()=>{bs()})}function tn(){return Kt.map((e)=>e())}function rn(){return Kt.concat(en).map((e)=>e())}function nn(e){Kt.push(e)}function sn(e){en.push(e)}function Xe(e,t=!1){return T(e,(r)=>{if((t?rn():tn()).some((i)=>r.matches(i)))return!0})}function T(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return T(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return T(e.parentNode.host,t);if(!e.parentElement)return;return T(e.parentElement,t)}function fs(e){return tn().some((t)=>e.matches(t))}function hs(e){on.push(e)}function D(e,t=X,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;Qi(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),on.forEach((o)=>o(n,i)),Je(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=ps++;n._x_ignore&&i()})})}function ne(e,t=X){t(e,(r)=>{Bi(r),Lr(r),delete r._x_marker})}function bs(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Zi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Wt(e=()=>{}){return queueMicrotask(()=>{Vt||setTimeout(()=>{St()})}),new Promise((t)=>{At.push(()=>{e(),t()})})}function St(){Vt=!1;while(At.length)At.shift()()}function ms(){Vt=!0}function Yt(e,t){if(Array.isArray(t))return pr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return gs(e,t);else if(typeof t==="function")return Yt(e,t());return pr(e,t)}function Ct(e){return e.split(/\s/).filter(Boolean)}function pr(e,t){let r=(i)=>Ct(i).filter((o)=>!e.classList.contains(o)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function gs(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?Ct(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?Ct(s):!1).filter(Boolean),i=[],o=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),o.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{o.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function Ze(e,t){if(typeof t==="object"&&t!==null)return vs(e,t);return xs(e,t)}function vs(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=ys(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Ze(e,r)}}function xs(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function ys(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Tt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function ws(e,t,r){an(e,Yt,""),{enter:(i)=>{e._x_transition.enter.during=i},"enter-start":(i)=>{e._x_transition.enter.start=i},"enter-end":(i)=>{e._x_transition.enter.end=i},leave:(i)=>{e._x_transition.leave.during=i},"leave-start":(i)=>{e._x_transition.leave.start=i},"leave-end":(i)=>{e._x_transition.leave.end=i}}[r](t)}function _s(e,t,r){an(e,Ze);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((h,v)=>v<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((h,v)=>v>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),c=a?0:1,d=l?he(t,"scale",95)/100:1,u=he(t,"delay",0)/1000,f=he(t,"origin","center"),m="opacity, transform",g=he(t,"duration",150)/1000,p=he(t,"duration",75)/1000,b="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${g}s`,transitionTimingFunction:b},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${p}s`,transitionTimingFunction:b},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function an(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Ot(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Ot(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function ln(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:ln(t)}function Ot(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,c;Es(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function Es(e,t){let r,n,i,o=Tt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),St();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Tt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),ms(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;_(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;_(()=>{t.end()}),St(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function he(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function cn(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Is(t):t,t){case"value":ks(e,r);break;case"style":Ss(e,r);break;case"class":As(e,r);break;case"selected":case"checked":Cs(e,t,r);break;default:Jt(e,t,r);break}}function ks(e,t){if(Gt(e)){if(e.attributes.value===void 0)e.value=t}else if(qe(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>Ls(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Ms(e,t);else if(e.tagName==="OPTION")Jt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function As(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Yt(e,t)}function Ss(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Ze(e,t)}function Cs(e,t,r){Jt(e,t,r),Os(e,t,r)}function Jt(e,t,r){if([null,void 0,!1].includes(r)&&Ns(t))e.removeAttribute(t);else{if(dn(t))r=t;if(Bs(r))r=JSON.stringify(r);Ts(e,t,r)}}function Ts(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Os(e,t,r){if(e[t]!==r)e[t]=r}function Ms(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Is(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ls(e,t){return e==t}function Re(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function dn(e){return Ds.has(e)}function Ns(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Bs(e){return typeof e==="object"&&e!==null}function Ps(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return un(e,t,r)}function $s(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,zr(()=>Y(e,i.expression))}return un(e,t,r)}function un(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(dn(t))return!![t,"true"].includes(n);return n}function qe(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Gt(e){return e.type==="radio"||e.localName==="ui-radio"}function fn(e,t){let r;return function(){let n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function hn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function pn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=re(()=>{let l=e(),c=r();if(i)n(ct(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==o)n(ct(l));else if(d!==u)t(ct(c))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{$t(a),ce(a)}}function ct(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function Rs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function zs(e,t){if(!br)B=le(B),br=!0;if(t===void 0)return B[e];if(B[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)B[e]=t.initialize(B,e,e,()=>{});else jt(B[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")B[e].init()}function Hs(){return B}function Us(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return mn(e,r());else bn[e]=r;return()=>{}}function js(e){return Object.entries(bn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function mn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=jr(i);return i=i.map((s)=>{if(o.find((a)=>a.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),Je(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function qs(e,t){gn[e]=t}function Fs(e,t){return Object.entries(gn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function xn(e){try{let r=new Ws(e).tokenize(),i=new Ys(r).parse(),o=new Js;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Gs(e,t,r={}){let n=yn(e),i=G([r.scope??{},...n]),o=r.params??[],a=xn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&W)return a.apply(i,o);return a}function Xs(e,t){let r=yn(e);if(typeof t==="function")return Ji(r,t);let n=Zs(e,t,r);return Fi.bind(null,e,t,n)}function yn(e){let t={};return Ue(t,e),[t,...ae(e)]}function Zs(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:o=[]}={})=>{let s=G([i,...r]),l=xn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(W&&typeof l==="function"){let c=l.apply(l,o);if(c instanceof Promise)c.then((d)=>n(d));else n(c)}else if(typeof l==="object"&&l instanceof Promise)l.then((c)=>n(c));else n(l)}}function wn(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function Z(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function so(e,t=!1){if(e.flags|=8,t){e.next=xe,xe=e;return}e.next=ve,ve=e}function Zt(){An++}function Qt(){if(--An>0)return;if(xe){let t=xe;xe=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(ve){let t=ve;ve=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function Sn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Cn(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;er(n),ao(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function It(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(oo(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function oo(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Fe)return;if(e.globalVersion=Fe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!It(e)))return;e.flags|=2;let t=e.dep,r=x,n=O;x=e,O=!0;try{Sn(e);let i=e.fn(e._value);if(t.version===0||K(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{x=r,O=n,Cn(e),e.flags&=-3}}function er(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let o=r.computed.deps;o;o=o.nextDep)er(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function ao(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function lo(e,t){if(e.effect instanceof gr)e=e.effect.fn;let r=new gr(e);if(t)we(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function co(e){e.effect.stop()}function uo(){Tn.push(O),O=!1}function fo(){let e=Tn.pop();O=e===void 0?!0:e}function vr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=x;x=void 0;try{t()}finally{x=r}}}function On(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)On(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function S(e,t,r){if(O&&x){let n=Lt.get(e);if(!n)Lt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new po),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function H(e,t,r,n,i,o){let s=Lt.get(e);if(!s){Fe++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Zt(),t==="clear")s.forEach(a);else{let l=_e(e),c=l&&Xt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,f)=>{if(f==="length"||f===ke||!Te(f)&&f>=d)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(c)a(s.get(ke));switch(t){case"add":if(!l){if(a(s.get(J)),ge(e))a(s.get(Dt))}else if(c)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(J)),ge(e))a(s.get(Dt))}break;case"set":if(ge(e))a(s.get(J));break}}}Qt()}function se(e){let t=y(e);if(t===e)return t;return S(t,"iterate",ke),ee(e)?t:t.map(te)}function tr(e){return S(e=y(e),"iterate",ke),e}function I(e,t){if(Q(e))return Pn(e)?Ae(te(t)):Ae(t);return te(t)}function ft(e,t,r){let n=tr(e),i=n[t]();if(n!==e&&!ee(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function N(e,t,r,n,i,o){let s=tr(e),a=s!==e&&!ee(e),l=s[t];if(l!==mo[t]){let u=l.apply(e,o);return a?te(u):u}let c=r;if(s!==e){if(a)c=function(u,f){return r.call(this,I(e,u),f,e)};else if(r.length>2)c=function(u,f){return r.call(this,u,f,e)}}let d=l.call(s,c,n);return a&&i?i(d):d}function xr(e,t,r,n){let i=tr(e),o=i!==e&&!ee(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(c,d,u){if(a)a=!1,c=I(e,c);return r.call(this,c,I(e,d),u,e)};else if(r.length>3)s=function(c,d,u){return r.call(this,c,d,u,e)}}let l=i[t](s,...n);return a?I(e,l):l}function ht(e,t,r){let n=y(e);S(n,"iterate",ke);let i=n[t](...r);if((i===-1||i===!1)&&Mo(r[0]))return r[0]=y(r[0]),n[t](...r);return i}function pe(e,t,r=[]){uo(),Zt();let n=y(e)[t].apply(e,r);return Qt(),fo(),n}function vo(e){if(!Te(e))e=String(e);let t=y(this);return S(t,"has",e),t.hasOwnProperty(e)}function Eo(e,t,r){return function(...n){let i=this.__v_raw,o=y(i),s=ge(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?Nt:t?Ae:te;return!t&&S(o,"iterate",l?Dt:J),we(Object.create(c),{next(){let{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:a?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function Pe(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";Z(`${kn(e)} operation ${r}failed: target is readonly.`,y(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function ko(e,t){let r={get(i){let o=this.__v_raw,s=y(o),a=y(i);if(!e){if(K(i,a))S(s,"get",i);S(s,"get",a)}let{has:l}=Be(s),c=t?Nt:e?Ae:te;if(l.call(s,i))return c(o.get(i));else if(l.call(s,a))return c(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&S(y(i),"iterate",J),i.size},has(i){let o=this.__v_raw,s=y(o),a=y(i);if(!e){if(K(i,a))S(s,"has",i);S(s,"has",a)}return i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){let s=this,a=s.__v_raw,l=y(a),c=t?Nt:e?Ae:te;return!e&&S(l,"iterate",J),a.forEach((d,u)=>i.call(o,c(d),c(u),s))}};return we(r,e?{add:Pe("add"),set:Pe("set"),delete:Pe("delete"),clear:Pe("clear")}:{add(i){let o=y(this),s=Be(o),a=y(i),l=!t&&!ee(i)&&!Q(i)?a:i;if(!(s.has.call(o,l)||K(i,l)&&s.has.call(o,i)||K(a,l)&&s.has.call(o,a)))o.add(l),H(o,"add",l,l);return this},set(i,o){if(!t&&!ee(o)&&!Q(o))o=y(o);let s=y(this),{has:a,get:l}=Be(s),c=a.call(s,i);if(!c)i=y(i),c=a.call(s,i);else yr(s,a,i);let d=l.call(s,i);if(s.set(i,o),!c)H(s,"add",i,o);else if(K(o,d))H(s,"set",i,o,d);return this},delete(i){let o=y(this),{has:s,get:a}=Be(o),l=s.call(o,i);if(!l)i=y(i),l=s.call(o,i);else yr(o,s,i);let c=a?a.call(o,i):void 0,d=o.delete(i);if(l)H(o,"delete",i,void 0,c);return d},clear(){let i=y(this),o=i.size!==0,s=ge(i)?new Map(i):new Set(i),a=i.clear();if(o)H(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=Eo(i,e,t)}),r}function Ln(e,t){let r=ko(e,t);return(n,i,o)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(Mt(r,i)&&i in n?r:n,i,o)}}function yr(e,t,r){let n=y(r);if(n!==r&&t.call(e,n)){let i=En(e);Z(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}function Oo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rr(e){if(Q(e))return e;return Bn(e,!1,wo,Ao,Dn)}function Bt(e){return Bn(e,!0,_o,So,Nn)}function Bn(e,t,r,n,i){if(!Ee(e))return Z(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let o=i.get(e);if(o)return o;let s=Oo(En(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Pn(e){if(Q(e))return Pn(e.__v_raw);return!!(e&&e.__v_isReactive)}function Q(e){return!!(e&&e.__v_isReadonly)}function ee(e){return!!(e&&e.__v_isShallow)}function Mo(e){return e?!!e.__v_raw:!1}function y(e){let t=e&&e.__v_raw;return t?y(t):e}function ye(e){return e?e.__v_isRef===!0:!1}function Io(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function $n(e){if(!pt[e])pt[e]=0;return++pt[e]}function Lo(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function Do(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=$n(t)}function No(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function Rn(e,t,r){M(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function wr(e){let t=R(()=>document.querySelector(e),()=>Bo)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=Po(t);if(r.includes("camel"))t=$o(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(o=Hn(r,o),r.includes("prevent"))o=a(o,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))o=a(o,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))o=a(o,(l,c)=>{l(c),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,c)=>{if(e.contains(c.target))return;if(c.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(c)});if(r.includes("self"))o=a(o,(l,c)=>{c.target===e&&l(c)});if(t==="submit")o=a(o,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(zo(t)||Un(t))o=a(o,(l,c)=>{if(Uo(c,r))return;l(c)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function Hn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Ke(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=fn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Ke(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=hn(t,n)}return t}function Po(e){return e.replace(/-/g,".")}function $o(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ke(e){return!Array.isArray(e)&&!isNaN(e)}function Ro(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function zo(e){return["keydown","keyup"].includes(e)}function Un(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function Uo(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!Ho.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Ke((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Ke((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&_r(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((o)=>r.includes(o));if(r=r.filter((o)=>!i.includes(o)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(Un(e.type))return!1;if(_r(e.key).includes(r[0]))return!1}}return!0}function _r(e){if(!e)return[];e=Ro(e);let t={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function $e(e,t,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(qe(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=bt(r.target.value);else if(t.includes("boolean"))i=Re(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!jo(o,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return bt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return Re(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Gt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return bt(i);else if(t.includes("boolean"))return Re(i);else if(t.includes("trim"))return i.trim();else return i}})}function bt(e){let t=e?parseFloat(e):null;return qo(t)?t:e}function jo(e,t){return e==t}function qo(e){return!Array.isArray(e)&&!isNaN(e)}function Er(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Fo(e,t){e._x_keyExpression=t}function Ko(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function Vo(e){if(!U)return!1;if(kt)return!0;return e.hasAttribute("data-has-alpine-state")}function Wo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function Yo(e,t,r,n){r((i)=>{if(Xo(i))i=Array.from({length:i},(c,d)=>d+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let o=e._x_lookup,s=new Map;e._x_lookup=s;let a=Zo(i),l=Object.entries(i).map(([c,d])=>{if(!a)c=parseInt(c);let u=Go(t,d,c,i),f;return n((m)=>{if(typeof m==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(m))s.set(m,o.get(m)),o.delete(m);f=m},{scope:{index:c,...u}}),[f,u]});_(()=>{o.forEach((u)=>{ne(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,f])=>{if(s.has(u)){let p=s.get(u);if(p._x_refreshXForScope(f),d.nextElementSibling!==p){if(d.nextElementSibling)p.replaceWith(d.nextElementSibling);d.after(p)}if(d=p,p._x_currentIfEl){if(p.nextElementSibling!==p._x_currentIfEl)d.after(p._x_currentIfEl);d=p._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let m=document.importNode(e.content,!0).firstElementChild,g=le(f);Se(m,g,e),m._x_refreshXForScope=Wo(g),s.set(u,m),c.add(m),d.after(m),d=m}),c.forEach((u)=>D(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function Jo(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(r,"").trim(),a=s.match(t);if(a){if(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2])o.collection=a[2].trim()}else o.item=s;return o}function Go(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,a)=>{i[s]=t[a]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function Xo(e){return typeof e!=="object"&&!isNaN(e)}function Zo(e){return typeof e==="object"&&!Array.isArray(e)}function qn(){}function et(e,t,r){E(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var mt=!1,gt=!1,P,vt=-1,ze=!1,Pt=!1,le,re,ce,Ar,Oi=0,xt=!0,Cr,Tr,Or,Ve,zt=!1,F,Ut=!1,He,Hi,$r,Rr,W=!0,Hr=()=>{},Ur,qt="x-",je,_t=!1,be,qr,Kr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Vr=(e)=>e,Yr,Gr=()=>new RegExp(`^${qt}([^:^.]+)\\b`),Et="DEFAULT",V,U=!1,Xr,kt=!1,Ge=0,hr=!1,Kt,en,on,ps=1,At,Vt=!1,Ds,B,br=!1,bn,gn,Ks,ue,mr,vn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Vs,Ws=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new k("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
|
|
5
|
+
`:""}`,t),setTimeout(()=>{throw e},0)}function Ur(e){let t=W;W=!1;let r=e();return W=t,r}function Y(e,t,r={}){let n;return A(e,t)((i)=>n=i,r),n}function A(...e){return jr(...e)}function Yi(e){jr=e}function Ji(e){qr=e}function Gi(e,t){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!W){wt(r,t,G([n,...e]),i);return}let s=t.apply(G([n,...e]),i);wt(r,s)}}function wt(e,t,r,n,i){if(W&&typeof t==="function"){let o=t.apply(r,n);if(o instanceof Promise)o.then((s)=>wt(e,s,r,n)).catch((s)=>Ye(s,i,t));else e(o)}else if(typeof t==="object"&&t instanceof Promise)t.then((o)=>e(o));else e(t)}function Xi(...e){return qr(...e)}function de(e=""){return qt+e}function Zi(e){qt=e}function E(e,t){return je[e]=t,{before(r){if(!je[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${e}\` will use the default order of execution`);return}let n=V.indexOf(r);V.splice(n>=0?n:V.indexOf("DEFAULT"),0,e)}}}function Qi(e){return Object.keys(je).includes(e)}function Je(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let o=Object.entries(e._x_virtualDirectives).map(([a,l])=>({name:a,value:l})),s=Fr(o);o=o.map((a)=>{if(s.find((l)=>l.name===a.name))return{name:`x-bind:${a.name}`,value:`"${a.value}"`};return a}),t=t.concat(o)}let n={};return t.map(Jr((o,s)=>n[o]=s)).filter(Xr).map(rs(n,r)).sort(ns).map((o)=>ts(e,o))}function Fr(e){return Array.from(e).map(Jr()).filter((t)=>!Xr(t))}function es(e){_t=!0;let t=Symbol();Kr=t,be.set(t,[]);let r=()=>{while(be.get(t).length)be.get(t).shift()();be.delete(t)},n=()=>{_t=!1,r()};e(r),n()}function Vr(e){let t=[],r=(a)=>t.push(a),[n,i]=Di(e);return t.push(i),[{Alpine:ue,effect:n,cleanup:r,evaluateLater:A.bind(A,e),evaluate:Y.bind(Y,e)},()=>t.forEach((a)=>a())]}function ts(e,t){let r=()=>{},n=je[t.type]||r,[i,o]=Vr(e);Dr(e,t.original,o);let s=()=>{if(e._x_ignore||e._x_ignoreSelf)return;n.inline&&n.inline(e,t,i),n=n.bind(n,e,t,i),_t?be.get(Kr).push(n):n()};return s.runCleanups=o,s}function Jr(e=()=>{}){return({name:t,value:r})=>{let{name:n,value:i}=Gr.reduce((o,s)=>s(o),{name:t,value:r});if(n!==t)e(n,t);return{name:n,value:i}}}function Ft(e){Gr.push(e)}function Xr({name:e}){return Zr().test(e)}function rs(e,t){return({name:r,value:n})=>{if(r===n)n="";let i=r.match(Zr()),o=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map((l)=>l.replace(".","")),expression:n,original:a}}}function ns(e,t){let r=V.indexOf(e.type)===-1?Et:e.type,n=V.indexOf(t.type)===-1?Et:t.type;return V.indexOf(r)-V.indexOf(n)}function X(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach((i)=>X(i,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let n=e.firstElementChild;while(n)X(n,t,!1),n=n.nextElementSibling}function R(e,t=()=>{}){return(...r)=>j?t(...r):e(...r)}function is(e){return(...t)=>j&&e(...t)}function Ce(e){Qr.push(e)}function ss(e,t){Qr.forEach((r)=>r(e,t)),j=!0,en(()=>{D(t,(r,n)=>{n(r,()=>{})})}),j=!1}function os(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;j=!0,kt=!0,en(()=>{as(t)}),j=!1,kt=!1}function as(e){let t=!1;D(e,(n,i)=>{X(n,(o,s)=>{if(t&&hs(o))return s();t=!0,i(o,s)})})}function en(e){let t=re;pr((r,n)=>{let i=t(r);return ce(i),()=>{}}),e(),pr(t)}function ls(e,t){let r=e._x_deferInit;if(!r){if(r=e._x_deferInit={pending:0,ownsIgnore:!e._x_ignore,queuedAttributes:new Map},r.ownsIgnore)e._x_ignore=!0;Ge++}r.pending++,Promise.resolve(t).catch((n)=>{try{Ye(n,e)}catch(i){setTimeout(()=>{throw i},0)}}).then(()=>cs(e,r))}function cs(e,t){if(t.pending--,t.pending>0)return;if(Ri(),t.pending>0)return;if(e._x_deferInit!==t)return;if(delete e._x_deferInit,t.ownsIgnore)delete e._x_ignore;if(Ge--,!e.isConnected)return;us(t),D(e)}function ds(e,t){if(Ge===0)return!1;let r=T(e,(n)=>n._x_deferInit);if(!r)return!1;return tn(r._x_deferInit,e,t.map(({name:n})=>n)),!0}function tn(e,t,r){let n=e.queuedAttributes.get(t);if(!n||n.marker!==t._x_marker)n={marker:t._x_marker,names:new Set},e.queuedAttributes.set(t,n);r.forEach((i)=>n.names.add(i))}function us(e){e.queuedAttributes.forEach((t,r)=>{if(!r.isConnected)return;if(!r._x_marker)return;if(r._x_marker!==t.marker)return;let n=T(r,(o)=>o._x_deferInit);if(n){tn(n._x_deferInit,r,Array.from(t.names));return}let i=Array.from(t.names).filter((o)=>r.hasAttribute(o)).map((o)=>({name:o,value:r.getAttribute(o)}));if(i.length===0)return;Je(r,i).forEach((o)=>o())})}function me(e,t,r={},n={}){return e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function fs(){if(br)L("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");if(br=!0,!document.body)L("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");me(document,"alpine:init"),me(document,"alpine:initializing"),Ht(),Bi((t)=>D(t,X)),Rt((t)=>ne(t)),Lr((t,r)=>{if(ds(t,r))return;Je(t,r).forEach((n)=>n())});let e=(t)=>!Xe(t.parentElement,!0);Array.from(document.querySelectorAll(sn().join(","))).filter(e).forEach((t)=>{D(t)}),me(document,"alpine:initialized"),setTimeout(()=>{ms()})}function nn(){return Kt.map((e)=>e())}function sn(){return Kt.concat(rn).map((e)=>e())}function on(e){Kt.push(e)}function an(e){rn.push(e)}function Xe(e,t=!1){return T(e,(r)=>{if((t?sn():nn()).some((i)=>r.matches(i)))return!0})}function T(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)return T(e._x_teleportBack,t);if(e.parentNode instanceof ShadowRoot)return T(e.parentNode.host,t);if(!e.parentElement)return;return T(e.parentElement,t)}function hs(e){return nn().some((t)=>e.matches(t))}function ps(e){ln.push(e)}function D(e,t=X,r=()=>{}){if(T(e,(n)=>n._x_ignore))return;es(()=>{t(e,(n,i)=>{if(n._x_marker)return;if(r(n,i),ln.forEach((o)=>o(n,i)),Je(n,n.attributes).forEach((o)=>o()),!n._x_ignore)n._x_marker=bs++;n._x_ignore&&i()})})}function ne(e,t=X){t(e,(r)=>{Pi(r),Nr(r),delete r._x_marker})}function ms(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([t,r,n])=>{if(Qi(r))return;n.some((i)=>{if(document.querySelector(i))return L(`found "${i}", but missing ${t} plugin`),!0})})}function Wt(e=()=>{}){return queueMicrotask(()=>{Vt||setTimeout(()=>{St()})}),new Promise((t)=>{At.push(()=>{e(),t()})})}function St(){Vt=!1;while(At.length)At.shift()()}function gs(){Vt=!0}function Yt(e,t){if(Array.isArray(t))return mr(e,t.join(" "));else if(typeof t==="object"&&t!==null)return xs(e,t);else if(typeof t==="function")return Yt(e,t());return mr(e,t)}function Ct(e){return e.split(/\s/).filter(Boolean)}function mr(e,t){let r=(i)=>Ct(i).filter((o)=>!e.classList.contains(o)).filter(Boolean),n=(i)=>(e.classList.add(...i),()=>{e.classList.remove(...i)});return t=t===!0?t="":t||"",n(r(t))}function xs(e,t){let r=Object.entries(t).flatMap(([s,a])=>a?Ct(s):!1).filter(Boolean),n=Object.entries(t).flatMap(([s,a])=>!a?Ct(s):!1).filter(Boolean),i=[],o=[];return n.forEach((s)=>{if(e.classList.contains(s))e.classList.remove(s),o.push(s)}),r.forEach((s)=>{if(!e.classList.contains(s))e.classList.add(s),i.push(s)}),()=>{o.forEach((s)=>e.classList.add(s)),i.forEach((s)=>e.classList.remove(s))}}function Ze(e,t){if(typeof t==="object"&&t!==null)return ys(e,t);return vs(e,t)}function ys(e,t){let r={};return Object.entries(t).forEach(([n,i])=>{if(r[n]=e.style[n],!n.startsWith("--"))n=ws(n);e.style.setProperty(n,i)}),setTimeout(()=>{if(e.style.length===0)e.removeAttribute("style")}),()=>{Ze(e,r)}}function vs(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function ws(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Tt(e,t=()=>{}){let r=!1;return function(){if(!r)r=!0,e.apply(this,arguments);else t.apply(this,arguments)}}function _s(e,t,r){cn(e,Yt,""),{enter:(i)=>{e._x_transition.enter.during=i},"enter-start":(i)=>{e._x_transition.enter.start=i},"enter-end":(i)=>{e._x_transition.enter.end=i},leave:(i)=>{e._x_transition.leave.during=i},"leave-start":(i)=>{e._x_transition.leave.start=i},"leave-end":(i)=>{e._x_transition.leave.end=i}}[r](t)}function Es(e,t,r){cn(e,Ze);let n=!t.includes("in")&&!t.includes("out")&&!r,i=n||t.includes("in")||["enter"].includes(r),o=n||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!n)t=t.filter((h,x)=>x<t.indexOf("out"));if(t.includes("out")&&!n)t=t.filter((h,x)=>x>t.indexOf("out"));let s=!t.includes("opacity")&&!t.includes("scale"),a=s||t.includes("opacity"),l=s||t.includes("scale"),c=a?0:1,d=l?he(t,"scale",95)/100:1,u=he(t,"delay",0)/1000,f=he(t,"origin","center"),m="opacity, transform",g=he(t,"duration",150)/1000,p=he(t,"duration",75)/1000,b="cubic-bezier(0.4, 0.0, 0.2, 1)";if(i)e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${g}s`,transitionTimingFunction:b},e._x_transition.enter.start={opacity:c,transform:`scale(${d})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"};if(o)e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${u}s`,transitionProperty:m,transitionDuration:`${p}s`,transitionTimingFunction:b},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${d})`}}function cn(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Ot(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Ot(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}}}function dn(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:dn(t)}function Ot(e,t,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,l,c;ks(e,{start(){a=t(e,n)},during(){l=t(e,r)},before:o,end(){a(),c=t(e,i)},after:s,cleanup(){l(),c()}})}function ks(e,t){let r,n,i,o=Tt(()=>{_(()=>{if(r=!0,!n)t.before();if(!i)t.end(),St();if(t.after(),e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:Tt(function(){while(this.beforeCancels.length)this.beforeCancels.shift()();o()}),finish:o},_(()=>{t.start(),t.during()}),gs(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1000,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1000;if(s===0)s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1000;_(()=>{t.before()}),n=!0,requestAnimationFrame(()=>{if(r)return;_(()=>{t.end()}),St(),setTimeout(e._x_transitioning.finish,s+a),i=!0})})}function he(e,t,r){if(e.indexOf(t)===-1)return r;let n=e[e.indexOf(t)+1];if(!n)return r;if(t==="scale"){if(isNaN(n))return r}if(t==="duration"||t==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2]))return[n,e[e.indexOf(t)+2]].join(" ")}return n}function un(e,t,r,n=[]){if(!e._x_bindings)e._x_bindings=le({});switch(e._x_bindings[t]=r,t=n.includes("camel")?Ls(t):t,t){case"value":As(e,r);break;case"style":Cs(e,r);break;case"class":Ss(e,r);break;case"selected":case"checked":Ts(e,t,r);break;default:Jt(e,t,r);break}}function As(e,t){if(Gt(e)){if(e.attributes.value===void 0)e.value=t}else if(qe(e))if(Number.isInteger(t))e.value=t;else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t))e.value=String(t);else if(Array.isArray(t))e.checked=t.some((r)=>Ds(r,e.value));else e.checked=!!t;else if(e.tagName==="SELECT")Is(e,t);else if(e.tagName==="OPTION")Jt(e,"value",t);else{if(e.value===t&&(typeof t!=="object"||t===null))return;e.value=t===void 0?"":t}}function Ss(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=Yt(e,t)}function Cs(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=Ze(e,t)}function Ts(e,t,r){Jt(e,t,r),Ms(e,t,r)}function Jt(e,t,r){if([null,void 0,!1].includes(r)&&Bs(t))e.removeAttribute(t);else{if(fn(t))r=t;if(Ps(r))r=JSON.stringify(r);Os(e,t,r)}}function Os(e,t,r){if(e.getAttribute(t)!=r)e.setAttribute(t,r)}function Ms(e,t,r){if(e[t]!==r)e[t]=r}function Is(e,t){let r=[].concat(t).map((n)=>n+"");Array.from(e.options).forEach((n)=>{n.selected=r.includes(n.value)})}function Ls(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ds(e,t){return e==t}function Re(e){if([1,"1","true","on","yes",!0].includes(e))return!0;if([0,"0","false","off","no",!1].includes(e))return!1;return e?Boolean(e):null}function fn(e){return Ns.has(e)}function Bs(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Ps(e){return typeof e==="object"&&e!==null}function $s(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return hn(e,t,r)}function Rs(e,t,r,n=!0){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let i=e._x_inlineBindings[t];return i.extract=n,Ur(()=>Y(e,i.expression))}return hn(e,t,r)}function hn(e,t,r){let n=e.getAttribute(t);if(n===null)return typeof r==="function"?r():r;if(n==="")return!0;if(fn(t))return!![t,"true"].includes(n);return n}function qe(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function Gt(e){return e.type==="radio"||e.localName==="ui-radio"}function pn(e,t){let r;return function(){let n=this,i=arguments,o=function(){r=null,e.apply(n,i)};clearTimeout(r),r=setTimeout(o,t)}}function bn(e,t){let r;return function(){let n=this,i=arguments;if(!r)e.apply(n,i),r=!0,setTimeout(()=>r=!1,t)}}function mn({get:e,set:t},{get:r,set:n}){let i=!0,o,s,a=re(()=>{let l=e(),c=r();if(i)n(ct(l)),i=!1;else{let d=JSON.stringify(l),u=JSON.stringify(c);if(d!==o)n(ct(l));else if(d!==u)t(ct(c))}o=JSON.stringify(e()),s=JSON.stringify(r())});return()=>{$t(a),ce(a)}}function ct(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}function zs(e){(Array.isArray(e)?e:[e]).forEach((r)=>r(ue))}function Hs(e,t){if(!gr)B=le(B),gr=!0;if(t===void 0)return B[e];if(B[e]=t,typeof t==="object"&&t!==null&&t._x_interceptor)B[e]=t.initialize(B,e,e,()=>{});else jt(B[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function")B[e].init()}function Us(){return B}function js(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element)return xn(e,r());else gn[e]=r;return()=>{}}function qs(e){return Object.entries(gn).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...n)=>r(...n)}})}),e}function xn(e,t,r){let n=[];while(n.length)n.pop()();let i=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Fr(i);return i=i.map((s)=>{if(o.find((a)=>a.name===s.name))return{name:`x-bind:${s.name}`,value:`"${s.value}"`};return s}),Je(e,i,r).map((s)=>{n.push(s.runCleanups),s()}),()=>{while(n.length)n.pop()()}}function Fs(e,t){yn[e]=t}function Ks(e,t){return Object.entries(yn).forEach(([r,n])=>{Object.defineProperty(e,r,{get(){return(...i)=>n.bind(t)(...i)},enumerable:!1})}),e}function wn(e){try{let r=new Ys(e).tokenize(),i=new Js(r).parse(),o=new Gs;return function(s={}){let{scope:a={},context:l=null,forceBindingRootScopeToFunctions:c=!1}=s;return o.evaluate({node:i,scope:a,context:l,forceBindingRootScopeToFunctions:c})}}catch(t){throw Error(`CSP Parser Error: ${t.message}`)}}function Xs(e,t,r={}){let n=_n(e),i=G([r.scope??{},...n]),o=r.params??[],a=wn(t)({scope:i,forceBindingRootScopeToFunctions:!0});if(typeof a==="function"&&W)return a.apply(i,o);return a}function Zs(e,t){let r=_n(e);if(typeof t==="function")return Gi(r,t);let n=Qs(e,t,r);return Ki.bind(null,e,t,n)}function _n(e){let t={};return Ue(t,e),[t,...ae(e)]}function Qs(e,t,r){if(e instanceof HTMLIFrameElement)throw Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(e instanceof HTMLScriptElement)throw Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:o=[]}={})=>{let s=G([i,...r]),l=wn(t)({scope:s,forceBindingRootScopeToFunctions:!0});if(W&&typeof l==="function"){let c=l.apply(l,o);if(c instanceof Promise)c.then((d)=>n(d));else n(c)}else if(typeof l==="object"&&l instanceof Promise)l.then((c)=>n(c));else n(l)}}function En(e){let t=Object.create(null);for(let r of e.split(","))t[r]=1;return(r)=>(r in t)}function Z(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function oo(e,t=!1){if(e.flags|=8,t){e.next=ye,ye=e;return}e.next=xe,xe=e}function Zt(){Cn++}function Qt(){if(--Cn>0)return;if(ye){let t=ye;ye=void 0;while(t){let r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;while(xe){let t=xe;xe=void 0;while(t){let r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){if(!e)e=n}t=r}}if(e)throw e}function Tn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function On(e){let t,r=e.depsTail,n=r;while(n){let i=n.prevDep;if(n.version===-1){if(n===r)r=i;er(n),lo(n)}else t=n;n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=r}function It(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ao(t.dep.computed)||t.dep.version!==t.version))return!0;if(e._dirty)return!0;return!1}function ao(e){if(e.flags&4&&!(e.flags&16))return;if(e.flags&=-17,e.globalVersion===Fe)return;if(e.globalVersion=Fe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!It(e)))return;e.flags|=2;let t=e.dep,r=y,n=O;y=e,O=!0;try{Tn(e);let i=e.fn(e._value);if(t.version===0||K(i,e._value))e.flags|=128,e._value=i,t.version++}catch(i){throw t.version++,i}finally{y=r,O=n,On(e),e.flags&=-3}}function er(e,t=!1){let{dep:r,prevSub:n,nextSub:i}=e;if(n)n.nextSub=i,e.prevSub=void 0;if(i)i.prevSub=n,e.nextSub=void 0;if(r.subsHead===e)r.subsHead=i;if(r.subs===e){if(r.subs=n,!n&&r.computed){r.computed.flags&=-5;for(let o=r.computed.deps;o;o=o.nextDep)er(o,!0)}}if(!t&&!--r.sc&&r.map)r.map.delete(r.key)}function lo(e){let{prevDep:t,nextDep:r}=e;if(t)t.nextDep=r,e.prevDep=void 0;if(r)r.prevDep=t,e.nextDep=void 0}function co(e,t){if(e.effect instanceof yr)e=e.effect.fn;let r=new yr(e);if(t)we(r,t);try{r.run()}catch(i){throw r.stop(),i}let n=r.run.bind(r);return n.effect=r,n}function uo(e){e.effect.stop()}function fo(){Mn.push(O),O=!1}function ho(){let e=Mn.pop();O=e===void 0?!0:e}function vr(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let r=y;y=void 0;try{t()}finally{y=r}}}function In(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)In(n)}let r=e.dep.subs;if(r!==e){if(e.prevSub=r,r)r.nextSub=e}if(e.dep.subsHead===void 0)e.dep.subsHead=e;e.dep.subs=e}}function S(e,t,r){if(O&&y){let n=Lt.get(e);if(!n)Lt.set(e,n=new Map);let i=n.get(r);if(!i)n.set(r,i=new bo),i.map=n,i.key=r;i.track({target:e,type:t,key:r})}}function U(e,t,r,n,i,o){let s=Lt.get(e);if(!s){Fe++;return}let a=(l)=>{if(l)l.trigger({target:e,type:t,key:r,newValue:n,oldValue:i,oldTarget:o})};if(Zt(),t==="clear")s.forEach(a);else{let l=_e(e),c=l&&Xt(r);if(l&&r==="length"){let d=Number(n);s.forEach((u,f)=>{if(f==="length"||f===ke||!Te(f)&&f>=d)a(u)})}else{if(r!==void 0||s.has(void 0))a(s.get(r));if(c)a(s.get(ke));switch(t){case"add":if(!l){if(a(s.get(J)),ge(e))a(s.get(Dt))}else if(c)a(s.get("length"));break;case"delete":if(!l){if(a(s.get(J)),ge(e))a(s.get(Dt))}break;case"set":if(ge(e))a(s.get(J));break}}}Qt()}function se(e){let t=v(e);if(t===e)return t;return S(t,"iterate",ke),ee(e)?t:t.map(te)}function tr(e){return S(e=v(e),"iterate",ke),e}function I(e,t){if(Q(e))return Rn(e)?Ae(te(t)):Ae(t);return te(t)}function ft(e,t,r){let n=tr(e),i=n[t]();if(n!==e&&!ee(e))i._next=i.next,i.next=()=>{let o=i._next();if(!o.done)o.value=r(o.value);return o};return i}function N(e,t,r,n,i,o){let s=tr(e),a=s!==e&&!ee(e),l=s[t];if(l!==go[t]){let u=l.apply(e,o);return a?te(u):u}let c=r;if(s!==e){if(a)c=function(u,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 wr(e,t,r,n){let i=tr(e),o=i!==e&&!ee(e),s=r,a=!1;if(i!==e){if(o)a=n.length===0,s=function(c,d,u){if(a)a=!1,c=I(e,c);return r.call(this,c,I(e,d),u,e)};else if(r.length>3)s=function(c,d,u){return r.call(this,c,d,u,e)}}let l=i[t](s,...n);return a?I(e,l):l}function ht(e,t,r){let n=v(e);S(n,"iterate",ke);let i=n[t](...r);if((i===-1||i===!1)&&Io(r[0]))return r[0]=v(r[0]),n[t](...r);return i}function pe(e,t,r=[]){fo(),Zt();let n=v(e)[t].apply(e,r);return Qt(),ho(),n}function yo(e){if(!Te(e))e=String(e);let t=v(this);return S(t,"has",e),t.hasOwnProperty(e)}function ko(e,t,r){return function(...n){let i=this.__v_raw,o=v(i),s=ge(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...n),d=r?Nt:t?Ae:te;return!t&&S(o,"iterate",l?Dt:J),we(Object.create(c),{next(){let{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:a?[d(u[0]),d(u[1])]:d(u),done:f}}})}}function Pe(e){return function(...t){{let r=t[0]?`on key "${t[0]}" `:"";Z(`${Sn(e)} operation ${r}failed: target is readonly.`,v(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Ao(e,t){let r={get(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(K(i,a))S(s,"get",i);S(s,"get",a)}let{has:l}=Be(s),c=t?Nt:e?Ae:te;if(l.call(s,i))return c(o.get(i));else if(l.call(s,a))return c(o.get(a));else if(o!==s)o.get(i)},get size(){let i=this.__v_raw;return!e&&S(v(i),"iterate",J),i.size},has(i){let o=this.__v_raw,s=v(o),a=v(i);if(!e){if(K(i,a))S(s,"has",i);S(s,"has",a)}return i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){let s=this,a=s.__v_raw,l=v(a),c=t?Nt:e?Ae:te;return!e&&S(l,"iterate",J),a.forEach((d,u)=>i.call(o,c(d),c(u),s))}};return we(r,e?{add:Pe("add"),set:Pe("set"),delete:Pe("delete"),clear:Pe("clear")}:{add(i){let o=v(this),s=Be(o),a=v(i),l=!t&&!ee(i)&&!Q(i)?a:i;if(!(s.has.call(o,l)||K(i,l)&&s.has.call(o,i)||K(a,l)&&s.has.call(o,a)))o.add(l),U(o,"add",l,l);return this},set(i,o){if(!t&&!ee(o)&&!Q(o))o=v(o);let s=v(this),{has:a,get:l}=Be(s),c=a.call(s,i);if(!c)i=v(i),c=a.call(s,i);else _r(s,a,i);let d=l.call(s,i);if(s.set(i,o),!c)U(s,"add",i,o);else if(K(o,d))U(s,"set",i,o,d);return this},delete(i){let o=v(this),{has:s,get:a}=Be(o),l=s.call(o,i);if(!l)i=v(i),l=s.call(o,i);else _r(o,s,i);let c=a?a.call(o,i):void 0,d=o.delete(i);if(l)U(o,"delete",i,void 0,c);return d},clear(){let i=v(this),o=i.size!==0,s=ge(i)?new Map(i):new Set(i),a=i.clear();if(o)U(i,"clear",void 0,void 0,s);return a}}),["keys","values","entries",Symbol.iterator].forEach((i)=>{r[i]=ko(i,e,t)}),r}function Nn(e,t){let r=Ao(e,t);return(n,i,o)=>{if(i==="__v_isReactive")return!e;else if(i==="__v_isReadonly")return e;else if(i==="__v_raw")return n;return Reflect.get(Mt(r,i)&&i in n?r:n,i,o)}}function _r(e,t,r){let n=v(r);if(n!==r&&t.call(e,n)){let i=An(e);Z(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}function Mo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rr(e){if(Q(e))return e;return $n(e,!1,_o,So,Bn)}function Bt(e){return $n(e,!0,Eo,Co,Pn)}function $n(e,t,r,n,i){if(!Ee(e))return Z(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;let o=i.get(e);if(o)return o;let s=Mo(An(e));if(s===0)return e;let a=new Proxy(e,s===2?n:r);return i.set(e,a),a}function Rn(e){if(Q(e))return Rn(e.__v_raw);return!!(e&&e.__v_isReactive)}function Q(e){return!!(e&&e.__v_isReadonly)}function ee(e){return!!(e&&e.__v_isShallow)}function Io(e){return e?!!e.__v_raw:!1}function v(e){let t=e&&e.__v_raw;return t?v(t):e}function ve(e){return e?e.__v_isRef===!0:!1}function Lo(e){let t=[];return T(e,(r)=>{if(r._x_refs)t.push(r._x_refs)}),t}function zn(e){if(!pt[e])pt[e]=0;return++pt[e]}function Do(e,t){return T(e,(r)=>{if(r._x_ids&&r._x_ids[t])return!0})}function No(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=zn(t)}function Bo(e,t,r,n){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let i=n();return e._x_id[t]=i,r(()=>{delete e._x_id[t]}),i}function Hn(e,t,r){M(t,(n)=>L(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}function Er(e){let t=R(()=>document.querySelector(e),()=>Po)();if(!t)L(`Cannot find x-teleport element for selector: "${e}"`);return t}function oe(e,t,r,n){let i=e,o=(l)=>n(l),s={},a=(l,c)=>(d)=>c(l,d);if(r.includes("dot"))t=$o(t);if(r.includes("camel"))t=Ro(t);if(r.includes("capture"))s.capture=!0;if(r.includes("window"))i=window;if(r.includes("document"))i=document;if(r.includes("passive"))s.passive=r[r.indexOf("passive")+1]!=="false";if(o=jn(r,o),r.includes("prevent"))o=a(o,(l,c)=>{c.preventDefault(),l(c)});if(r.includes("stop"))o=a(o,(l,c)=>{c.stopPropagation(),l(c)});if(r.includes("once"))o=a(o,(l,c)=>{l(c),i.removeEventListener(t,o,s)});if(r.includes("away")||r.includes("outside"))i=document,o=a(o,(l,c)=>{if(e.contains(c.target))return;if(c.target.isConnected===!1)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===!1)return;l(c)});if(r.includes("self"))o=a(o,(l,c)=>{c.target===e&&l(c)});if(t==="submit")o=a(o,(l,c)=>{if(c.target._x_pendingModelUpdates)c.target._x_pendingModelUpdates.forEach((d)=>d());l(c)});if(Ho(t)||qn(t))o=a(o,(l,c)=>{if(jo(c,r))return;l(c)});return i.addEventListener(t,o,s),()=>{i.removeEventListener(t,o,s)}}function jn(e,t){if(e.includes("debounce")){let r=e[e.indexOf("debounce")+1]||"invalid-wait",n=Ke(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=pn(t,n)}if(e.includes("throttle")){let r=e[e.indexOf("throttle")+1]||"invalid-wait",n=Ke(r.split("ms")[0])?Number(r.split("ms")[0]):250;t=bn(t,n)}return t}function $o(e){return e.replace(/-/g,".")}function Ro(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Ke(e){return!Array.isArray(e)&&!isNaN(e)}function zo(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Ho(e){return["keydown","keyup"].includes(e)}function qn(e){return["contextmenu","click","mouse"].some((t)=>e.includes(t))}function jo(e,t){let r=t.filter((o,s)=>{if(o==="false"&&t[s-1]==="passive")return!1;return!Uo.includes(o)});if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Ke((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Ke((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return!1;if(r.length===1&&kr(e.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter((o)=>r.includes(o));if(r=r.filter((o)=>!i.includes(o)),i.length>0){if(i.filter((s)=>{if(s==="cmd"||s==="super")s="meta";return e[`${s}Key`]}).length===i.length){if(qn(e.type))return!1;if(kr(e.key).includes(r[0]))return!1}}return!0}function kr(e){if(!e)return[];e=zo(e);let t={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map((r)=>{if(t[r]===e)return r}).filter((r)=>r)}function $e(e,t,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(qe(e))if(Array.isArray(n)){let i=null;if(t.includes("number"))i=bt(r.target.value);else if(t.includes("boolean"))i=Re(r.target.value);else i=r.target.value;return r.target.checked?n.includes(i)?n:n.concat([i]):n.filter((o)=>!qo(o,i))}else return r.target.checked;else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return bt(o)});else if(t.includes("boolean"))return Array.from(r.target.selectedOptions).map((i)=>{let o=i.value||i.text;return Re(o)});return Array.from(r.target.selectedOptions).map((i)=>i.value||i.text)}else{let i;if(Gt(e))if(r.target.checked)i=r.target.value;else i=n;else i=r.target.value;if(t.includes("number"))return bt(i);else if(t.includes("boolean"))return Re(i);else if(t.includes("trim"))return i.trim();else return i}})}function bt(e){let t=e?parseFloat(e):null;return Fo(t)?t:e}function qo(e,t){return e==t}function Fo(e){return!Array.isArray(e)&&!isNaN(e)}function Ar(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}function Ko(e,t){e._x_keyExpression=t}function Vo(e,t){Object.keys(t).forEach((r)=>{let n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);if(n.get||n.set||i?.get||i?.set){if(i)delete e[r];if(!i)e[r]=void 0;n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}else e[r]=t[r]}),Object.keys(e).filter((r)=>!Object.prototype.hasOwnProperty.call(t,r)).forEach((r)=>delete e[r])}function Wo(e){if(!j)return!1;if(kt)return!0;return e.hasAttribute("data-has-alpine-state")}function Yo(e){return(t)=>{Object.entries(t).forEach(([r,n])=>{e[r]=n})}}function Jo(e,t,r,n){r((i)=>{if(Zo(i))i=Array.from({length:i},(c,d)=>d+1);if(i===void 0||i===null)i=[];if(i instanceof Set)i=Array.from(i);if(i instanceof Map)i=Array.from(i);let o=e._x_lookup,s=new Map;e._x_lookup=s;let a=Qo(i),l=Object.entries(i).map(([c,d])=>{if(!a)c=parseInt(c);let u=Xo(t,d,c,i),f;return n((m)=>{if(typeof m==="object")L("x-for key cannot be an object, it must be a string or an integer",e);if(o.has(m))s.set(m,o.get(m)),o.delete(m);f=m},{scope:{index:c,...u}}),[f,u]});_(()=>{o.forEach((u)=>{ne(u),u.remove()});let c=new Set,d=e;if(l.forEach(([u,f])=>{if(s.has(u)){let p=s.get(u);if(p._x_refreshXForScope(f),d.nextElementSibling!==p){if(d.nextElementSibling)p.replaceWith(d.nextElementSibling);d.after(p)}if(d=p,p._x_currentIfEl){if(p.nextElementSibling!==p._x_currentIfEl)d.after(p._x_currentIfEl);d=p._x_currentIfEl}return}if(e.content.children.length>1)L("x-for templates require a single root element, additional elements will be ignored.",e);let m=document.importNode(e.content,!0).firstElementChild,g=le(f);Se(m,g,e),m._x_refreshXForScope=Yo(g),s.set(u,m),c.add(m),d.after(m),d=m}),c.forEach((u)=>D(u)),d!==e)e._x_lastRenderedEl=d;else delete e._x_lastRenderedEl})})}function Go(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\b(?:in|of)\b([\s\S]*)/,i=e.match(n);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(r,"").trim(),a=s.match(t);if(a){if(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2])o.collection=a[2].trim()}else o.item=s;return o}function Xo(e,t,r,n){let i={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t))e.item.replace("[","").replace("]","").split(",").map((s)=>s.trim()).forEach((s,a)=>{i[s]=t[a]});else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object")e.item.replace("{","").replace("}","").split(",").map((s)=>s.trim()).forEach((s)=>{i[s]=t[s]});else i[e.item]=t;if(e.index)i[e.index]=r;if(e.collection)i[e.collection]=n;return i}function Zo(e){return typeof e!=="object"&&!isNaN(e)}function Qo(e){return typeof e==="object"&&!Array.isArray(e)}function Kn(){}function et(e,t,r){E(t,(n)=>L(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}var mt=!1,gt=!1,P,xt=-1,ze=!1,Pt=!1,le,re,ce,Cr,Mi=0,yt=!0,Or,Mr,Ir,Ve,zt=!1,F,Ut=!1,He,Ui,zr,Hr,W=!0,jr=()=>{},qr,qt="x-",je,_t=!1,be,Kr,Wr=(e,t)=>({name:r,value:n})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:n}},Yr=(e)=>e,Gr,Zr=()=>new RegExp(`^${qt}([^:^.]+)\\b`),Et="DEFAULT",V,j=!1,Qr,kt=!1,Ge=0,br=!1,Kt,rn,ln,bs=1,At,Vt=!1,Ns,B,gr=!1,gn,yn,Vs,ue,xr,vn,k=class{constructor(e,t,r,n){this.type=e,this.value=t,this.start=r,this.end=n}},Ws,Ys=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){while(this.position<this.input.length){if(this.skipWhitespace(),this.position>=this.input.length)break;let e=this.input[this.position];if(this.isDigit(e))this.readNumber();else if(this.isAlpha(e)||e==="_"||e==="$")this.readIdentifierOrKeyword();else if(e==='"'||e==="'")this.readString();else if(e==="/"&&this.peek()==="/")this.skipLineComment();else this.readOperatorOrPunctuation()}return this.tokens.push(new k("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){while(this.position<this.input.length&&/\s/.test(this.input[this.position]))this.position++}skipLineComment(){while(this.position<this.input.length&&this.input[this.position]!==`
|
|
6
6
|
`)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){let e=this.position,t=!1;while(this.position<this.input.length){let n=this.input[this.position];if(this.isDigit(n))this.position++;else if(n==="."&&!t)t=!0,this.position++;else break}let r=this.input.slice(e,this.position);this.tokens.push(new k("NUMBER",parseFloat(r),e,this.position))}readIdentifierOrKeyword(){let e=this.position;while(this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]))this.position++;let t=this.input.slice(e,this.position);if(["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(t))if(t==="true"||t==="false")this.tokens.push(new k("BOOLEAN",t==="true",e,this.position));else if(t==="null")this.tokens.push(new k("NULL",null,e,this.position));else if(t==="undefined")this.tokens.push(new k("UNDEFINED",void 0,e,this.position));else this.tokens.push(new k("KEYWORD",t,e,this.position));else this.tokens.push(new k("IDENTIFIER",t,e,this.position))}readString(){let e=this.position,t=this.input[this.position];this.position++;let r="",n=!1;while(this.position<this.input.length){let i=this.input[this.position];if(n){switch(i){case"n":r+=`
|
|
7
|
-
`;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let o=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(o))r+=String.fromCharCode(parseInt(o,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new k("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},Ys=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return Vs.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},Js=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let b=t[e.name];if(this.checkForDangerousValues(b),typeof b==="function")return b.bind(t);return b}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let o;if(e.computed)o=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else o=e.property.name;this.checkForDangerousKeywords(o);let s=i[o];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let a=e.arguments.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let b=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h;if(e.callee.computed)h=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else h=e.callee.property.name;this.checkForDangerousKeywords(h);let v=b[h];if(typeof v!=="function")throw Error("Value is not a function");l=v.apply(b,a)}else if(e.callee.type==="Identifier"){let b=e.callee.name,h;if(b in t)h=t[b];else throw Error(`Undefined variable: ${b}`);if(typeof h!=="function")throw Error("Value is not a function");let v=r!==null?r:t;l=h.apply(v,a)}else{let b=this.evaluate({node:e.callee,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(typeof b!=="function")throw Error("Value is not a function");l=b.apply(r,a)}return this.checkForDangerousValues(l),l;case"UnaryExpression":let c=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!c;case"-":return-c;case"+":return+c;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let b=e.argument.name;if(!(b in t))throw Error(`Undefined variable: ${b}`);let h=t[b];if(e.operator==="++")t[b]=h+1;else if(e.operator==="--")t[b]=h-1;return e.prefix?t[b]:h}else if(e.argument.type==="MemberExpression"){let b=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(h);let v=b[h];if(e.operator==="++")b[h]=v+1;else if(e.operator==="--")b[h]=v-1;return e.prefix?b[h]:v}throw Error("Invalid update expression target");case"BinaryExpression":let d=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return d&&u();if(e.operator==="||")return d||u();let f=u();switch(e.operator){case"+":return d+f;case"-":return d-f;case"*":return d*f;case"/":return d/f;case"%":return d%f;case"==":return d==f;case"!=":return d!=f;case"===":return d===f;case"!==":return d!==f;case"<":return d<f;case">":return d>f;case"<=":return d<=f;case">=":return d>=f;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let g=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=g,g;else if(e.left.type==="MemberExpression"){let b=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(h),b[h]=g,g}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let b of e.properties){let h=b.computed?this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):b.key.type==="Identifier"?b.key.name:this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),v=this.evaluate({node:b.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[h]=v}return p;default:throw Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){if(e instanceof Node)return!0;if(typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration)return!0;if(typeof DOMStringMap<"u"&&e instanceof DOMStringMap)return!0;if(typeof DOMTokenList<"u"&&e instanceof DOMTokenList)return!0;if(typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap)return!0;let t=e!=null&&e.constructor;if(t&&typeof t.name==="string"&&/^(SVG|CSS|DOM)[A-Z]/.test(t.name))return!0;return!1}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","createElement","createElementNS","createDocumentFragment","createContextualFragment","appendChild","insertBefore","replaceChild"].includes(e))throw Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e===null)return;if(typeof e!=="object"&&typeof e!=="function")return;if(mr.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(vn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return mr.set(e,!0),!0}},Aa,Sa,we,Qs,Mt=(e,t)=>Qs.call(e,t),_e,ge=(e)=>_n(e)==="[object Map]",eo=(e)=>typeof e==="string",Te=(e)=>typeof e==="symbol",Ee=(e)=>e!==null&&typeof e==="object",to,_n=(e)=>to.call(e),En=(e)=>_n(e).slice(8,-1),Xt=(e)=>eo(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qe=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},ro,Ca,no,Ta,kn,Oa,K=(e,t)=>!Object.is(e,t),io="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ma,dt,x,ut,gr=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,dt)if(dt.active)dt.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ut.has(this))ut.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))so(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,vr(this),Sn(this);let e=x,t=O;x=this,O=!0;try{return this.fn()}finally{if(x!==this)Z("Active effect was not restored correctly - this is likely a Vue internal bug.");Cn(this),x=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)er(e);this.deps=this.depsTail=void 0,vr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ut.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(It(this))this.run()}get dirty(){return It(this)}},An=0,ve,xe,O=!0,Tn,Fe=0,ho=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},po=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!x||!O||x===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==x){if(t=this.activeLink=new ho(x,this),!x.deps)x.deps=x.depsTail=t;else t.prevDep=x.depsTail,x.depsTail.nextDep=t,x.depsTail=t;On(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=x.depsTail,t.nextDep=void 0,x.depsTail.nextDep=t,x.depsTail=t,x.deps===t)x.deps=r}}if(x.onTrack)x.onTrack(we({effect:x},e));return t}trigger(e){this.version++,Fe++,this.notify(e)}notify(e){Zt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(we({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Qt()}}},Lt,J,Dt,ke,bo,mo,go,Mn,In=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?To:Nn:i?Co:Dn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=_e(e);if(!n){let a;if(o&&(a=bo[t]))return a;if(t==="hasOwnProperty")return vo}let s=Reflect.get(e,t,ye(e)?e:r);if(Te(t)?Mn.has(t):go(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ye(s)){let a=o&&Xt(t)?s:s.value;return n&&Ee(a)?Bt(a):a}if(Ee(s))return n?Bt(s):rr(s);return s}},xo,yo,wo,_o,Nt=(e)=>e,Be=(e)=>Reflect.getPrototypeOf(e),Ao,So,Dn,Co,Nn,To,te=(e)=>Ee(e)?rr(e):e,Ae=(e)=>Ee(e)?Bt(e):e,pt,Bo,zn=()=>{},Ho,jn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};js(l),A(e,n)((d)=>{mn(e,d,i)},{scope:l});return}if(t==="key")return Fo(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=A(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>cn(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},q,Fn,Qo;var Vn=yi(()=>{P=[];Cr=[],Tr=[],Or=[];Ve=new MutationObserver(We);F=[];He=[];Hi={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return Ui;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=Br(s,t),i)break;if(!i)i=e[e.length-1];let o=Object.getOwnPropertyDescriptor(i,t);if(o?.set&&o?.get)return o.set.call(n,r)||!0;return Reflect.set(i,t,r)}};$r={};Rr=Vi;je={};be=new Map,qr=Symbol();Yr=[];V=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",Et,"teleport"];Xr=[];Ce((e,t)=>{if(Ge===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(T(e,(r)=>r._x_deferInit))t._x_ignore=!0});Kt=[],en=[];on=[];At=[];E("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")_s(e,r,t);else ws(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(t){if(e._x_transition&&(e._x_transition.enter||e._x_transition.leave))e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):o();else e._x_transition?e._x_transition.in(r):o();return}e._x_hidePromise=e._x_transition?new Promise((s,a)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=ln(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Ds=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);B={};bn={};gn={};Ks={get reactive(){return le},get release(){return ce},get effect(){return re},get raw(){return Ar},get transaction(){return Di},version:"3.17.4",flushAndStopDeferringMutations:zi,dontAutoEvaluateFunctions:zr,disableEffectScheduling:Mi,startObservingMutations:Ht,stopObservingMutations:Dr,setReactivityEngine:Ii,onAttributeRemoved:Ir,onAttributesAdded:Mr,closestDataStack:ae,skipDuringClone:R,onlyDuringClone:ns,addRootSelector:nn,addInitSelector:sn,setErrorHandler:Ki,interceptClone:Ce,addScopeToNode:Se,deferMutations:Ri,mapAttributes:Ft,evaluateLater:A,interceptInit:hs,initInterceptors:jt,injectMagics:Ue,setEvaluator:Wi,setRawEvaluator:Yi,mergeProxies:G,extractProp:$s,findClosest:T,onElRemoved:Rt,closestRoot:Xe,destroyTree:ne,interceptor:Pr,transition:Ot,setStyles:Ze,mutateDom:_,deferInit:as,directive:E,entangle:pn,throttle:hn,debounce:fn,evaluate:Y,evaluateRaw:Gi,initTree:D,nextTick:Wt,prefixed:de,prefix:Xi,plugin:Rs,magic:M,store:zs,start:us,clone:ss,cloneNode:is,bound:Ps,$data:Nr,watch:Sr,walk:X,data:qs,bind:Us},ue=Ks,mr=new WeakMap,vn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}vn.add(t)});Vs=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];Aa=Object.freeze({}),Sa=Object.freeze([]),we=Object.assign,Qs=Object.prototype.hasOwnProperty,_e=Array.isArray,to=Object.prototype.toString,ro=/-\w/g,Ca=Qe((e)=>e.replace(ro,(t)=>t.slice(1).toUpperCase())),no=/\B([A-Z])/g,Ta=Qe((e)=>e.replace(no,"-$1").toLowerCase()),kn=Qe((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Oa=Qe((e)=>e?`on${kn(e)}`:""),Ma=wn(io+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ut=new WeakSet;Tn=[];Lt=new WeakMap,J=Symbol("Object iterate"),Dt=Symbol("Map keys iterate"),ke=Symbol("Array iterate");bo={__proto__:null,[Symbol.iterator](){return ft(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>_e(t)?se(t):t))},entries(){return ft(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return N(this,"every",e,t,void 0,arguments)},filter(e,t){return N(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return N(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return N(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return N(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return N(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return N(this,"forEach",e,t,void 0,arguments)},includes(...e){return ht(this,"includes",e)},indexOf(...e){return ht(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return ht(this,"lastIndexOf",e)},map(e,t){return N(this,"map",e,t,void 0,arguments)},pop(){return pe(this,"pop")},push(...e){return pe(this,"push",e)},reduce(e,...t){return xr(this,"reduce",e,t)},reduceRight(e,...t){return xr(this,"reduceRight",e,t)},shift(){return pe(this,"shift")},some(e,t){return N(this,"some",e,t,void 0,arguments)},splice(...e){return pe(this,"splice",e)},toReversed(){return se(this).toReversed()},toSorted(e){return se(this).toSorted(e)},toSpliced(...e){return se(this).toSpliced(...e)},unshift(...e){return pe(this,"unshift",e)},values(){return ft(this,"values",(e)=>I(this,e))}};mo=Array.prototype;go=wn("__proto__,__v_isRef,__isVue"),Mn=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Te));xo=class extends In{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=_e(e)&&Xt(t);if(!this._isShallow){let l=Q(i);if(!ee(r)&&!Q(r))i=y(i),r=y(r);if(!o&&ye(i)&&!ye(r))if(l)return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=o?Number(t)<e.length:Mt(e,t),a=Reflect.set(e,t,r,ye(e)?e:n);if(e===y(n)&&a){if(!s)H(e,"add",t,r);else if(K(r,i))H(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=Mt(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)H(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Te(t)||!Mn.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",_e(e)?"length":J),Reflect.ownKeys(e)}},yo=class extends In{constructor(e=!1){super(!0,e)}set(e,t){return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return Z(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},wo=new xo,_o=new yo;Ao={get:Ln(!1,!1)},So={get:Ln(!0,!1)};Dn=new WeakMap,Co=new WeakMap,Nn=new WeakMap,To=new WeakMap;M("nextTick",()=>Wt);M("dispatch",(e)=>me.bind(me,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=Sr(()=>{let l;return o((c)=>l=c),l},i);r(a)});M("store",Hs);M("data",(e)=>Nr(e));M("root",(e)=>Xe(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=G(Io(e)),e._x_refs_proxy});pt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return No(e,i,t,()=>{let o=Lo(e,r),s=o?o._x_ids[r]:$n(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Ce((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Rn("Focus","focus","focus");Rn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let d;return o((u)=>d=u),d},a=n(`${t} = __placeholder`),l=(d)=>a(()=>{},{scope:{__placeholder:d}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let d=e._x_model.get,u=e._x_model.setWithModifiers,f=pn({get(){return d()},set(m){u(m)}},{get(){return s()},set(m){l(m)}});i(f)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=wr(r),o=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((a)=>{o.addEventListener(a,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Se(o,{},e);let s=(a,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(a,l);else if(c.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};_(()=>{R(()=>{s(o,i,t),D(o)})()}),e._x_teleportPutBack=()=>{let a=wr(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),ne(o)}))});Bo=document.createElement("div");zn.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};E("ignore",zn);E("effect",R((e,{expression:t},{effect:r})=>{r(A(e,t))}));Ho=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];E("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=T(e,(p)=>p!==e);let s=A(o,r),a;if(typeof r==="string")a=A(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=A(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let p;return s((b)=>p=b),Er(p)?p.get():p},c=(p)=>{let b;if(s((h)=>b=h),Er(b))b.set(p);else a(()=>{},{scope:{__placeholder:p}})};if(typeof r==="string"&&e.type==="radio")_(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let d=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),f=t.includes("enter"),m=d||u||f,g;if(U)g=()=>{};else if(m){let p=[],b=(h)=>c($e(e,t,h,l()));if(d)p.push(oe(e,"change",t,b));if(u){if(p.push(oe(e,"blur",t,b)),e.form){let h=e.form,v=()=>b({target:e});if(!h._x_pendingModelUpdates)h._x_pendingModelUpdates=[];h._x_pendingModelUpdates.push(v),i(()=>{if(h._x_pendingModelUpdates)h._x_pendingModelUpdates.splice(h._x_pendingModelUpdates.indexOf(v),1)})}}if(f)p.push(oe(e,"keydown",t,(h)=>{if(h.key==="Enter")b(h)}));g=()=>p.forEach((h)=>h())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";g=oe(e,p,t,(b)=>{c($e(e,t,b,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||qe(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c($e(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=g,i(()=>e._x_removeModelListeners.default()),e.form){let p=oe(e.form,"reset",[],(b)=>{Wt(()=>e._x_model&&e._x_model.set($e(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){c(p)},setWithModifiers:Hn(t,c)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";_(()=>{if(qe(e))if(Array.isArray(p))e.checked=p.some((b)=>b==e.value);else e.checked=!!p;else if(Gt(e))if(typeof p==="boolean")e.checked=Re(e.value)===p;else e.checked=e.value==p;else cn(e,"value",p)})},e.tagName==="SELECT"){let p=new MutationObserver(()=>{e._x_forceModelUpdate(l())});p.observe(e,{childList:!0}),i(()=>p.disconnect())}n(()=>{let p=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(p)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(de("cloak")))));sn(()=>`[${de("init")}]`);E("init",R((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));E("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>ne(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Ft(Kr(":",Vr(de("bind:"))));jn.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};E("bind",jn);nn(()=>`[${de("data")}]`);q=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Vo(e))return;let n=e[q];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Ue(i,e);let o={};Fs(o,i);let s=Y(e,t,{scope:o});if(s===void 0||s===!0)s={};Ue(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Ko(a,s);let c={expression:t};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})}else a=le(s);jt(a,r);let l=Se(e,a);R(()=>{a.init&&Y(e,a.init)})(),r(()=>{a.destroy&&Y(e,a.destroy),l();let c={reactiveData:a};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})})});Ce((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});E("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=A(e,r);if(!e._x_doHide)e._x_doHide=()=>{_(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{_(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else e.style.removeProperty("display")})};let o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=Tt((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?a():o();l(u),c=u,d=!1}))});E("for",R((e,{expression:t},{effect:r,cleanup:n})=>{let i=Jo(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>Yo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{ne(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));qn.inline=(e,{expression:t},{cleanup:r})=>{let n=Xe(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",qn);E("if",R((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=A(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Se(a,{},e),_(()=>{e.after(a),D(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{ne(a),a.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},a},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((a)=>{a?o():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>Do(e,i))});Ce((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Ft(Kr("@",Vr(de("on:"))));E("on",R((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?A(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let s=oe(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));et("Collapse","collapse","collapse");et("Intersect","intersect","intersect");et("Focus","trap","focus");et("Mask","mask","mask");E("html",(e,{expression:t})=>{Ye(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(Xs);ue.setRawEvaluator(Gs);ue.setReactivityEngine({reactive:rr,effect:(e,t={})=>{let r;return r=lo(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:co,raw:y});Fn=ue,Qo=Fn;/*! Bundled license information:
|
|
7
|
+
`;break;case"t":r+="\t";break;case"r":r+="\r";break;case"\\":r+="\\";break;case t:r+=t;break;case"u":{let o=this.input.slice(this.position+1,this.position+5);if(/^[0-9a-fA-F]{4}$/.test(o))r+=String.fromCharCode(parseInt(o,16)),this.position+=4;else r+=i;break}default:r+=i}n=!1}else if(i==="\\")n=!0;else if(i===t){this.position++,this.tokens.push(new k("STRING",r,e,this.position));return}else r+=i;this.position++}throw Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,t=this.input[this.position],r=this.peek(),n=this.peek(2);if(t==="="&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","===",e,this.position));else if(t==="!"&&r==="="&&n==="=")this.position+=3,this.tokens.push(new k("OPERATOR","!==",e,this.position));else if(t==="="&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","==",e,this.position));else if(t==="!"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","!=",e,this.position));else if(t==="<"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR","<=",e,this.position));else if(t===">"&&r==="=")this.position+=2,this.tokens.push(new k("OPERATOR",">=",e,this.position));else if(t==="&"&&r==="&")this.position+=2,this.tokens.push(new k("OPERATOR","&&",e,this.position));else if(t==="|"&&r==="|")this.position+=2,this.tokens.push(new k("OPERATOR","||",e,this.position));else if(t==="+"&&r==="+")this.position+=2,this.tokens.push(new k("OPERATOR","++",e,this.position));else if(t==="-"&&r==="-")this.position+=2,this.tokens.push(new k("OPERATOR","--",e,this.position));else{this.position++;let i="()[]{},.;:?".includes(t)?"PUNCTUATION":"OPERATOR";this.tokens.push(new k(i,t,e,this.position))}}},Js=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let t=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:t};throw Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let t=this.parseExpression();this.consume("PUNCTUATION",":");let r=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:t,alternate:r}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();while(this.match("OPERATOR","||")){let t=this.previous().value,r=this.parseLogicalAnd();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseLogicalAnd(){let e=this.parseEquality();while(this.match("OPERATOR","&&")){let t=this.previous().value,r=this.parseEquality();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseEquality(){let e=this.parseRelational();while(this.match("OPERATOR","==","!=","===","!==")){let t=this.previous().value,r=this.parseRelational();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseRelational(){let e=this.parseAdditive();while(this.match("OPERATOR","<",">","<=",">=")){let t=this.previous().value,r=this.parseAdditive();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseAdditive(){let e=this.parseMultiplicative();while(this.match("OPERATOR","+","-")){let t=this.previous().value,r=this.parseMultiplicative();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseMultiplicative(){let e=this.parseUnary();while(this.match("OPERATOR","*","/","%")){let t=this.previous().value,r=this.parseUnary();e={type:"BinaryExpression",operator:t,left:e,right:r}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,t=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:t,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,t=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:t,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();if(this.match("OPERATOR","++","--"))return{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1};return e}parseMember(){let e=this.parsePrimary();while(!0)if(this.match("PUNCTUATION",".")){let t=this.consumeIdentifierName();e={type:"MemberExpression",object:e,property:{type:"Identifier",name:t},computed:!1}}else if(this.match("PUNCTUATION","[")){let t=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:t,computed:!0}}else if(this.match("PUNCTUATION","(")){let t=this.parseArguments();e={type:"CallExpression",callee:e,arguments:t}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];while(!this.check("PUNCTUATION","]")&&!this.isAtEnd())if(e.push(this.parseExpression()),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","]"))break}else break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];while(!this.check("PUNCTUATION","}")&&!this.isAtEnd()){let t,r=!1;if(this.match("STRING"))t={type:"Literal",value:this.previous().value};else if(this.checkIdentifierName())t={type:"Identifier",name:this.consumeIdentifierName()};else if(this.match("PUNCTUATION","["))t=this.parseExpression(),r=!0,this.consume("PUNCTUATION","]");else throw Error("Expected property key");this.consume("PUNCTUATION",":");let n=this.parseExpression();if(e.push({type:"Property",key:t,value:n,computed:r,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let t=0;t<e.length;t++){let r=e[t];if(t===0&&e.length>1){let n=r;for(let i=1;i<e.length;i++)if(this.check(n,e[i]))return this.advance(),!0;return!1}else if(e.length===1){if(this.checkType(r))return this.advance(),!0;return!1}}return!1}check(e,t){if(this.isAtEnd())return!1;if(t!==void 0)return this.current().type===e&&this.current().value===t;return this.current().type===e}checkType(e){if(this.isAtEnd())return!1;return this.current().type===e}advance(){if(!this.isAtEnd())this.position++;return this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,t){if(t!==void 0){if(this.check(e,t))return this.advance();throw Error(`Expected ${e} "${t}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}checkIdentifierName(){if(this.isAtEnd())return!1;return Ws.includes(this.current().type)}consumeIdentifierName(){if(!this.checkIdentifierName())throw Error(`Expected an identifier name but got ${this.current().type} "${this.current().value}"`);let e=this.advance();switch(e.type){case"BOOLEAN":return e.value?"true":"false";case"NULL":return"null";case"UNDEFINED":return"undefined";default:return e.value}}},Gs=class{evaluate({node:e,scope:t={},context:r=null,forceBindingRootScopeToFunctions:n=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in t){let b=t[e.name];if(this.checkForDangerousValues(b),typeof b==="function")return b.bind(t);return b}throw Error(`Undefined variable: ${e.name}`);case"MemberExpression":let i=this.evaluate({node:e.object,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(i==null)throw Error("Cannot read property of null or undefined");let o;if(e.computed)o=this.evaluate({node:e.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else o=e.property.name;this.checkForDangerousKeywords(o);let s=i[o];if(this.checkForDangerousValues(s),typeof s==="function")if(n)return s.bind(t);else return s.bind(i);return s;case"CallExpression":let a=e.arguments.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n})),l;if(e.callee.type==="MemberExpression"){let b=this.evaluate({node:e.callee.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h;if(e.callee.computed)h=this.evaluate({node:e.callee.property,scope:t,context:r,forceBindingRootScopeToFunctions:n});else h=e.callee.property.name;this.checkForDangerousKeywords(h);let x=b[h];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,h;if(b in t)h=t[b];else throw Error(`Undefined variable: ${b}`);if(typeof h!=="function")throw Error("Value is not a function");let x=r!==null?r:t;l=h.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 c=this.evaluate({node:e.argument,scope:t,context:r,forceBindingRootScopeToFunctions:n});switch(e.operator){case"!":return!c;case"-":return-c;case"+":return+c;default:throw Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let b=e.argument.name;if(!(b in t))throw Error(`Undefined variable: ${b}`);let h=t[b];if(e.operator==="++")t[b]=h+1;else if(e.operator==="--")t[b]=h-1;return e.prefix?t[b]:h}else if(e.argument.type==="MemberExpression"){let b=this.evaluate({node:e.argument.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.argument.computed?this.evaluate({node:e.argument.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.argument.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(h);let x=b[h];if(e.operator==="++")b[h]=x+1;else if(e.operator==="--")b[h]=x-1;return e.prefix?b[h]:x}throw Error("Invalid update expression target");case"BinaryExpression":let d=this.evaluate({node:e.left,scope:t,context:r,forceBindingRootScopeToFunctions:n}),u=()=>this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.operator==="&&")return d&&u();if(e.operator==="||")return d||u();let f=u();switch(e.operator){case"+":return d+f;case"-":return d-f;case"*":return d*f;case"/":return d/f;case"%":return d%f;case"==":return d==f;case"!=":return d!=f;case"===":return d===f;case"!==":return d!==f;case"<":return d<f;case">":return d>f;case"<=":return d<=f;case">=":return d>=f;default:throw Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:t,context:r,forceBindingRootScopeToFunctions:n})?this.evaluate({node:e.consequent,scope:t,context:r,forceBindingRootScopeToFunctions:n}):this.evaluate({node:e.alternate,scope:t,context:r,forceBindingRootScopeToFunctions:n});case"AssignmentExpression":let g=this.evaluate({node:e.right,scope:t,context:r,forceBindingRootScopeToFunctions:n});if(e.left.type==="Identifier")return t[e.left.name]=g,g;else if(e.left.type==="MemberExpression"){let b=this.evaluate({node:e.left.object,scope:t,context:r,forceBindingRootScopeToFunctions:n}),h=e.left.computed?this.evaluate({node:e.left.property,scope:t,context:r,forceBindingRootScopeToFunctions:n}):e.left.property.name;if(this.isDOMObject(b))throw Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(h),b[h]=g,g}throw Error("Invalid assignment target");case"ArrayExpression":return e.elements.map((b)=>this.evaluate({node:b,scope:t,context:r,forceBindingRootScopeToFunctions:n}));case"ObjectExpression":let p={};for(let b of e.properties){let h=b.computed?this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}):b.key.type==="Identifier"?b.key.name:this.evaluate({node:b.key,scope:t,context:r,forceBindingRootScopeToFunctions:n}),x=this.evaluate({node:b.value,scope:t,context:r,forceBindingRootScopeToFunctions:n});p[h]=x}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(xr.has(e))return;if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement||typeof SVGScriptElement<"u"&&e instanceof SVGScriptElement)throw Error("Accessing iframes and scripts is prohibited in the CSP build");if(typeof Document<"u"&&e instanceof Document)throw Error("Accessing document objects is prohibited in the CSP build");if(vn.has(e))throw Error("Accessing global variables is prohibited in the CSP build");return xr.set(e,!0),!0}},Oa,Ma,we,eo,Mt=(e,t)=>eo.call(e,t),_e,ge=(e)=>kn(e)==="[object Map]",to=(e)=>typeof e==="string",Te=(e)=>typeof e==="symbol",Ee=(e)=>e!==null&&typeof e==="object",ro,kn=(e)=>ro.call(e),An=(e)=>kn(e).slice(8,-1),Xt=(e)=>to(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qe=(e)=>{let t=Object.create(null);return(r)=>t[r]||(t[r]=e(r))},no,Ia,io,La,Sn,Da,K=(e,t)=>!Object.is(e,t),so="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Na,dt,y,ut,yr=class{constructor(e){if(this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,dt)if(dt.active)dt.effects.push(this);else this.flags&=-2}pause(){this.flags|=64}resume(){if(this.flags&64){if(this.flags&=-65,ut.has(this))ut.delete(this),this.trigger()}}notify(){if(this.flags&2&&!(this.flags&32))return;if(!(this.flags&8))oo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,vr(this),Tn(this);let e=y,t=O;y=this,O=!0;try{return this.fn()}finally{if(y!==this)Z("Active effect was not restored correctly - this is likely a Vue internal bug.");On(this),y=e,O=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)er(e);this.deps=this.depsTail=void 0,vr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){if(this.flags&64)ut.add(this);else if(this.scheduler)this.scheduler();else this.runIfDirty()}runIfDirty(){if(It(this))this.run()}get dirty(){return It(this)}},Cn=0,xe,ye,O=!0,Mn,Fe=0,po=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},bo=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!y||!O||y===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==y){if(t=this.activeLink=new po(y,this),!y.deps)y.deps=y.depsTail=t;else t.prevDep=y.depsTail,y.depsTail.nextDep=t,y.depsTail=t;In(t)}else if(t.version===-1){if(t.version=this.version,t.nextDep){let r=t.nextDep;if(r.prevDep=t.prevDep,t.prevDep)t.prevDep.nextDep=r;if(t.prevDep=y.depsTail,t.nextDep=void 0,y.depsTail.nextDep=t,y.depsTail=t,y.deps===t)y.deps=r}}if(y.onTrack)y.onTrack(we({effect:y},e));return t}trigger(e){this.version++,Fe++,this.notify(e)}notify(e){Zt();try{for(let t=this.subsHead;t;t=t.nextSub)if(t.sub.onTrigger&&!(t.sub.flags&8))t.sub.onTrigger(we({effect:t.sub},e));for(let t=this.subs;t;t=t.prevSub)if(t.sub.notify())t.sub.dep.notify()}finally{Qt()}}},Lt,J,Dt,ke,mo,go,xo,Ln,Dn=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;let n=this._isReadonly,i=this._isShallow;if(t==="__v_isReactive")return!n;else if(t==="__v_isReadonly")return n;else if(t==="__v_isShallow")return i;else if(t==="__v_raw"){if(r===(n?i?Oo:Pn:i?To:Bn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r))return e;return}let o=_e(e);if(!n){let a;if(o&&(a=mo[t]))return a;if(t==="hasOwnProperty")return yo}let s=Reflect.get(e,t,ve(e)?e:r);if(Te(t)?Ln.has(t):xo(t))return s;if(!n)S(e,"get",t);if(i)return s;if(ve(s)){let a=o&&Xt(t)?s:s.value;return n&&Ee(a)?Bt(a):a}if(Ee(s))return n?Bt(s):rr(s);return s}},vo,wo,_o,Eo,Nt=(e)=>e,Be=(e)=>Reflect.getPrototypeOf(e),So,Co,Bn,To,Pn,Oo,te=(e)=>Ee(e)?rr(e):e,Ae=(e)=>Ee(e)?Bt(e):e,pt,Po,Un=()=>{},Uo,Fn=(e,{value:t,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!t){let l={};qs(l),A(e,n)((d)=>{xn(e,d,i)},{scope:l});return}if(t==="key")return Ko(e,n);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract)return;let a=A(e,n);o(()=>a((l)=>{if(l===void 0&&typeof n==="string"&&n.match(/\./))l="";_(()=>un(e,t,l,r))})),s(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedStyles&&e._x_undoAddedStyles()})},q,Vn,ea;var Yn=wi(()=>{P=[];Or=[],Mr=[],Ir=[];Ve=new MutationObserver(We);F=[];He=[];Ui={ownKeys({objects:e}){return Array.from(new Set(e.flatMap((t)=>Object.keys(t))))},has({objects:e},t){if(t==Symbol.unscopables)return!1;return e.some((r)=>Object.prototype.hasOwnProperty.call(r,t)||Reflect.has(r,t))},get({objects:e},t,r){if(t=="toJSON")return ji;return Reflect.get(e.find((n)=>Reflect.has(n,t))||{},t,r)},set({objects:e},t,r,n){let i;for(let s of e)if(i=$r(s,t),i)break;if(!i)i=e[e.length-1];let o=Object.getOwnPropertyDescriptor(i,t);if(o?.set&&o?.get)return o.set.call(n,r)||!0;return Reflect.set(i,t,r)}};zr={};Hr=Wi;je={};be=new Map,Kr=Symbol();Gr=[];V=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",Et,"teleport"];Qr=[];Ce((e,t)=>{if(Ge===0)return;if(!e||e.nodeType!==1||!t||t.nodeType!==1)return;if(T(e,(r)=>r._x_deferInit))t._x_ignore=!0});Kt=[],rn=[];ln=[];At=[];E("transition",(e,{value:t,modifiers:r,expression:n},{evaluate:i})=>{if(typeof n==="function")n=i(n);if(n===!1)return;if(!n||typeof n==="boolean")Es(e,r,t);else _s(e,n,t)});window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(t){if(e._x_transition&&(e._x_transition.enter||e._x_transition.leave))e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):o();else e._x_transition?e._x_transition.in(r):o();return}e._x_hidePromise=e._x_transition?new Promise((s,a)=>{e._x_transition.out(()=>{},()=>s(n)),e._x_transitioning&&e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=dn(e);if(s){if(!s._x_hideChildren)s._x_hideChildren=[];s._x_hideChildren.push(e)}else i(()=>{let a=(l)=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([d])=>d?.());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch((l)=>{if(!l.isFromCancelledTransition)throw l})})})};Ns=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);B={};gn={};yn={};Vs={get reactive(){return le},get release(){return ce},get effect(){return re},get raw(){return Cr},get transaction(){return Ni},version:"3.17.4",flushAndStopDeferringMutations:Hi,dontAutoEvaluateFunctions:Ur,disableEffectScheduling:Ii,startObservingMutations:Ht,stopObservingMutations:Br,setReactivityEngine:Li,onAttributeRemoved:Dr,onAttributesAdded:Lr,closestDataStack:ae,skipDuringClone:R,onlyDuringClone:is,addRootSelector:on,addInitSelector:an,setErrorHandler:Vi,interceptClone:Ce,addScopeToNode:Se,deferMutations:zi,mapAttributes:Ft,evaluateLater:A,interceptInit:ps,initInterceptors:jt,injectMagics:Ue,setEvaluator:Yi,setRawEvaluator:Ji,mergeProxies:G,extractProp:Rs,findClosest:T,onElRemoved:Rt,closestRoot:Xe,destroyTree:ne,interceptor:Rr,transition:Ot,setStyles:Ze,mutateDom:_,deferInit:ls,directive:E,entangle:mn,throttle:bn,debounce:pn,evaluate:Y,evaluateRaw:Xi,initTree:D,nextTick:Wt,prefixed:de,prefix:Zi,plugin:zs,magic:M,store:Hs,start:fs,clone:os,cloneNode:ss,bound:$s,$data:Pr,watch:Tr,walk:X,data:Fs,bind:js},ue=Vs,xr=new WeakMap,vn=new Set;Object.getOwnPropertyNames(globalThis).forEach((e)=>{if(e==="styleMedia"||e==="sharedStorage")return;let t;try{t=globalThis[e]}catch{return}vn.add(t)});Ws=["IDENTIFIER","KEYWORD","BOOLEAN","NULL","UNDEFINED"];Oa=Object.freeze({}),Ma=Object.freeze([]),we=Object.assign,eo=Object.prototype.hasOwnProperty,_e=Array.isArray,ro=Object.prototype.toString,no=/-\w/g,Ia=Qe((e)=>e.replace(no,(t)=>t.slice(1).toUpperCase())),io=/\B([A-Z])/g,La=Qe((e)=>e.replace(io,"-$1").toLowerCase()),Sn=Qe((e)=>e.charAt(0).toUpperCase()+e.slice(1)),Da=Qe((e)=>e?`on${Sn(e)}`:""),Na=En(so+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");ut=new WeakSet;Mn=[];Lt=new WeakMap,J=Symbol("Object iterate"),Dt=Symbol("Map keys iterate"),ke=Symbol("Array iterate");mo={__proto__:null,[Symbol.iterator](){return ft(this,Symbol.iterator,(e)=>I(this,e))},concat(...e){return se(this).concat(...e.map((t)=>_e(t)?se(t):t))},entries(){return ft(this,"entries",(e)=>(e[1]=I(this,e[1]),e))},every(e,t){return N(this,"every",e,t,void 0,arguments)},filter(e,t){return N(this,"filter",e,t,(r)=>r.map((n)=>I(this,n)),arguments)},find(e,t){return N(this,"find",e,t,(r)=>I(this,r),arguments)},findIndex(e,t){return N(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return N(this,"findLast",e,t,(r)=>I(this,r),arguments)},findLastIndex(e,t){return N(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return N(this,"forEach",e,t,void 0,arguments)},includes(...e){return ht(this,"includes",e)},indexOf(...e){return ht(this,"indexOf",e)},join(e){return se(this).join(e)},lastIndexOf(...e){return ht(this,"lastIndexOf",e)},map(e,t){return N(this,"map",e,t,void 0,arguments)},pop(){return pe(this,"pop")},push(...e){return pe(this,"push",e)},reduce(e,...t){return wr(this,"reduce",e,t)},reduceRight(e,...t){return wr(this,"reduceRight",e,t)},shift(){return pe(this,"shift")},some(e,t){return N(this,"some",e,t,void 0,arguments)},splice(...e){return pe(this,"splice",e)},toReversed(){return se(this).toReversed()},toSorted(e){return se(this).toSorted(e)},toSpliced(...e){return se(this).toSpliced(...e)},unshift(...e){return pe(this,"unshift",e)},values(){return ft(this,"values",(e)=>I(this,e))}};go=Array.prototype;xo=En("__proto__,__v_isRef,__isVue"),Ln=new Set(Object.getOwnPropertyNames(Symbol).filter((e)=>e!=="arguments"&&e!=="caller").map((e)=>Symbol[e]).filter(Te));vo=class extends Dn{constructor(e=!1){super(!1,e)}set(e,t,r,n){let i=e[t],o=_e(e)&&Xt(t);if(!this._isShallow){let l=Q(i);if(!ee(r)&&!Q(r))i=v(i),r=v(r);if(!o&&ve(i)&&!ve(r))if(l)return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e[t]),!0;else return i.value=r,!0}let s=o?Number(t)<e.length:Mt(e,t),a=Reflect.set(e,t,r,ve(e)?e:n);if(e===v(n)&&a){if(!s)U(e,"add",t,r);else if(K(r,i))U(e,"set",t,r,i)}return a}deleteProperty(e,t){let r=Mt(e,t),n=e[t],i=Reflect.deleteProperty(e,t);if(i&&r)U(e,"delete",t,void 0,n);return i}has(e,t){let r=Reflect.has(e,t);if(!Te(t)||!Ln.has(t))S(e,"has",t);return r}ownKeys(e){return S(e,"iterate",_e(e)?"length":J),Reflect.ownKeys(e)}},wo=class extends Dn{constructor(e=!1){super(!0,e)}set(e,t){return Z(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return Z(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}},_o=new vo,Eo=new wo;So={get:Nn(!1,!1)},Co={get:Nn(!0,!1)};Bn=new WeakMap,To=new WeakMap,Pn=new WeakMap,Oo=new WeakMap;M("nextTick",()=>Wt);M("dispatch",(e)=>me.bind(me,e));M("watch",(e,{evaluateLater:t,cleanup:r})=>(n,i)=>{let o=t(n),a=Tr(()=>{let l;return o((c)=>l=c),l},i);r(a)});M("store",Us);M("data",(e)=>Pr(e));M("root",(e)=>Xe(e));M("refs",(e)=>{if(e._x_refs_proxy)return e._x_refs_proxy;return e._x_refs_proxy=G(Lo(e)),e._x_refs_proxy});pt={};M("id",(e,{cleanup:t})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return Bo(e,i,t,()=>{let o=Do(e,r),s=o?o._x_ids[r]:zn(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});Ce((e,t)=>{if(e._x_id)t._x_id=e._x_id});M("el",(e)=>e);Hn("Focus","focus","focus");Hn("Persist","persist","persist");E("modelable",(e,{expression:t},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(t),s=()=>{let d;return o((u)=>d=u),d},a=n(`${t} = __placeholder`),l=(d)=>a(()=>{},{scope:{__placeholder:d}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let d=e._x_model.get,u=e._x_model.setWithModifiers,f=mn({get(){return d()},set(m){u(m)}},{get(){return s()},set(m){l(m)}});i(f)})});E("teleport",(e,{modifiers:t,expression:r},{cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-teleport can only be used on a <template> tag",e);let i=Er(r),o=e.content.cloneNode(!0).firstElementChild;if(e._x_teleport=o,o._x_teleportBack=e,e.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),e._x_forwardEvents)e._x_forwardEvents.forEach((a)=>{o.addEventListener(a,(l)=>{l.stopPropagation(),e.dispatchEvent(new l.constructor(l.type,l))})});Se(o,{},e);let s=(a,l,c)=>{if(c.includes("prepend"))l.parentNode.insertBefore(a,l);else if(c.includes("append"))l.parentNode.insertBefore(a,l.nextSibling);else l.appendChild(a)};_(()=>{R(()=>{s(o,i,t),D(o)})()}),e._x_teleportPutBack=()=>{let a=Er(r);_(()=>{s(e._x_teleport,a,t)})},n(()=>_(()=>{o.remove(),ne(o)}))});Po=document.createElement("div");Un.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};E("ignore",Un);E("effect",R((e,{expression:t},{effect:r})=>{r(A(e,t))}));Uo=["window","document","prevent","stop","once","capture","self","away","outside","passive","dot","camel","preserve-scroll","blur","change","lazy","number","boolean","trim","fill","unintrusive","parent"];E("model",(e,{modifiers:t,expression:r},{effect:n,cleanup:i})=>{let o=e;if(t.includes("parent"))o=T(e,(p)=>p!==e);let s=A(o,r),a;if(typeof r==="string")a=A(o,`${r} = __placeholder`);else if(typeof r==="function"&&typeof r()==="string")a=A(o,`${r()} = __placeholder`);else a=()=>{};let l=()=>{let p;return s((b)=>p=b),Ar(p)?p.get():p},c=(p)=>{let b;if(s((h)=>b=h),Ar(b))b.set(p);else a(()=>{},{scope:{__placeholder:p}})};if(typeof r==="string"&&e.type==="radio")_(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)});let d=t.includes("change")||t.includes("lazy"),u=t.includes("blur"),f=t.includes("enter"),m=d||u||f,g;if(j)g=()=>{};else if(m){let p=[],b=(h)=>c($e(e,t,h,l()));if(d)p.push(oe(e,"change",t,b));if(u){if(p.push(oe(e,"blur",t,b)),e.form){let h=e.form,x=()=>b({target:e});if(!h._x_pendingModelUpdates)h._x_pendingModelUpdates=[];h._x_pendingModelUpdates.push(x),i(()=>{if(h._x_pendingModelUpdates)h._x_pendingModelUpdates.splice(h._x_pendingModelUpdates.indexOf(x),1)})}}if(f)p.push(oe(e,"keydown",t,(h)=>{if(h.key==="Enter")b(h)}));g=()=>p.forEach((h)=>h())}else{let p=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)?"change":"input";g=oe(e,p,t,(b)=>{c($e(e,t,b,l()))})}if(t.includes("fill")){if([void 0,null,""].includes(l())||qe(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple)c($e(e,t,{target:e},l()))}if(!e._x_removeModelListeners)e._x_removeModelListeners={};if(e._x_removeModelListeners.default=g,i(()=>e._x_removeModelListeners.default()),e.form){let p=oe(e.form,"reset",[],(b)=>{Wt(()=>e._x_model&&e._x_model.set($e(e,t,{target:e},l())))});i(()=>p())}if(e._x_model={get(){return l()},set(p){c(p)},setWithModifiers:jn(t,c)},e._x_forceModelUpdate=(p)=>{if(p===void 0&&typeof r==="string"&&r.match(/\./))p="";_(()=>{if(qe(e))if(Array.isArray(p))e.checked=p.some((b)=>b==e.value);else e.checked=!!p;else if(Gt(e))if(typeof p==="boolean")e.checked=Re(e.value)===p;else e.checked=e.value==p;else un(e,"value",p)})},e.tagName==="SELECT"){let p=new MutationObserver(()=>{e._x_forceModelUpdate(l())});p.observe(e,{childList:!0}),i(()=>p.disconnect())}n(()=>{let p=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(p)})});E("cloak",(e)=>queueMicrotask(()=>_(()=>e.removeAttribute(de("cloak")))));an(()=>`[${de("init")}]`);E("init",R((e,{expression:t},{evaluate:r})=>{if(typeof t==="string")return!!t.trim()&&r(t,{},!1);return r(t,{},!1)}));E("text",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{e.textContent=o})})})});E("html",(e,{expression:t},{effect:r,evaluateLater:n})=>{let i=n(t);r(()=>{i((o)=>{_(()=>{Array.from(e.children).forEach((s)=>ne(s)),e.innerHTML=o??"",e._x_ignoreSelf=!0,D(e),delete e._x_ignoreSelf})})},{priority:"structural"})});Ft(Wr(":",Yr(de("bind:"))));Fn.inline=(e,{value:t,modifiers:r,expression:n})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:n,extract:!1}};E("bind",Fn);on(()=>`[${de("data")}]`);q=Symbol();E("data",(e,{expression:t},{cleanup:r})=>{if(Wo(e))return;let n=e[q];if(n?.expression===t)return;t=t===""?"{}":t;let i={};Ue(i,e);let o={};Ks(o,i);let s=Y(e,t,{scope:o});if(s===void 0||s===!0)s={};Ue(s,e);let a;if(n?.reactiveData){a=n.reactiveData,Vo(a,s);let c={expression:t};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})}else a=le(s);jt(a,r);let l=Se(e,a);R(()=>{a.init&&Y(e,a.init)})(),r(()=>{a.destroy&&Y(e,a.destroy),l();let c={reactiveData:a};e[q]=c,queueMicrotask(()=>{if(e[q]===c)delete e[q]})})});Ce((e,t)=>{if(e._x_dataStack)t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)});E("show",(e,{modifiers:t,expression:r},{effect:n})=>{let i=A(e,r);if(!e._x_doHide)e._x_doHide=()=>{_(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{_(()=>{if(e.style.length===1&&e.style.display==="none")e.removeAttribute("style");else e.style.removeProperty("display")})};let o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=Tt((u)=>u?s():o(),(u)=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function")e._x_toggleAndCascadeWithTransitions(e,u,s,o);else u?a():o()}),c,d=!0;n(()=>i((u)=>{if(!d&&u===c)return;if(t.includes("immediate"))u?a():o();l(u),c=u,d=!1}))});E("for",R((e,{expression:t},{effect:r,cleanup:n})=>{let i=Go(t),o=A(e,i.items),s=A(e,e._x_keyExpression||"index");e._x_lookup=new Map,r(()=>Jo(e,i,o,s),{priority:"structural"}),n(()=>{e._x_lookup.forEach((a)=>_(()=>{ne(a),a.remove()})),delete e._x_lookup,delete e._x_lastRenderedEl})}));Kn.inline=(e,{expression:t},{cleanup:r})=>{let n=Xe(e);if(!n)return;if(!n._x_refs)n._x_refs={};n._x_refs[t]=e,r(()=>delete n._x_refs[t])};E("ref",Kn);E("if",R((e,{expression:t},{effect:r,cleanup:n})=>{if(e.tagName.toLowerCase()!=="template")L("x-if can only be used on a <template> tag",e);let i=A(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return Se(a,{},e),_(()=>{e.after(a),D(a)}),e._x_currentIfEl=a,e._x_lastRenderedEl=a,e._x_undoIf=()=>{_(()=>{ne(a),a.remove()}),delete e._x_currentIfEl,delete e._x_lastRenderedEl},a},s=()=>{if(!e._x_undoIf)return;e._x_undoIf(),delete e._x_undoIf};r(()=>i((a)=>{a?o():s()}),{priority:"structural"}),n(()=>e._x_undoIf&&e._x_undoIf())}));E("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach((i)=>No(e,i))});Ce((e,t)=>{if(e._x_ids)t._x_ids=e._x_ids});Ft(Wr("@",Yr(de("on:"))));E("on",R((e,{value:t,modifiers:r,expression:n},{cleanup:i})=>{let o=n?A(e,n):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let s=oe(e,t,r,(a)=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));et("Collapse","collapse","collapse");et("Intersect","intersect","intersect");et("Focus","trap","focus");et("Mask","mask","mask");E("html",(e,{expression:t})=>{Ye(Error("Using the x-html directive is prohibited in the CSP build"),e)});ue.setEvaluator(Zs);ue.setRawEvaluator(Xs);ue.setReactivityEngine({reactive:rr,effect:(e,t={})=>{let r;return r=co(e,{scheduler:()=>{if(!r)return;t.scheduler?t.scheduler(r):r()}}),r},release:uo,raw:v});Vn=ue,ea=Vn;/*! Bundled license information:
|
|
8
8
|
|
|
9
9
|
@vue/shared/dist/shared.esm-bundler.js:
|
|
10
10
|
(**
|
|
@@ -19,7 +19,7 @@ ${r?'Expression: "'+r+`"
|
|
|
19
19
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
20
20
|
* @license MIT
|
|
21
21
|
**)
|
|
22
|
-
*/});var De=typeof HTMLElement==="function"?HTMLElement:class{};function
|
|
22
|
+
*/});var De=typeof HTMLElement==="function"?HTMLElement:class{};function ur(e,t){if(typeof customElements>"u"||customElements.get?.(e))return;try{customElements.define(e,t)}catch(r){console.warn(`bare-v3: ${e} was not registered`,r)}}function fr(e,t,r={},n=[]){let i=()=>{for(let s of n)if(!e.classList.contains(s))e.classList.add(s);for(let[s,a]of Object.entries(r))if(!e.hasAttribute(s))e.setAttribute(s,a)};i();let o=new MutationObserver(i);o.observe(e,{attributes:!0,attributeFilter:["class",...Object.keys(r)]}),t.addEventListener("abort",()=>o.disconnect(),{once:!0})}var _i=Symbol.for("bare-v3.styles");function Ne(e,t,r){if(!e?.head||e.getElementById(t))return;let n=e[_i]??=new Set;if(n.has(t))return;let i=e.defaultView;if(i&&"adoptedStyleSheets"in e&&"replaceSync"in i.CSSStyleSheet.prototype){let s=new i.CSSStyleSheet;s.replaceSync(r),e.adoptedStyleSheets=[...e.adoptedStyleSheets,s],n.add(t);return}let o=e.createElement("style");o.id=t,o.textContent=r,e.head.append(o)}var Oe=null;function Jn(){if(Oe)return Oe;let e=(Yn(),gi(Wn)).default;return e.prefix("b3x-"),e.setErrorHandler((t,r,n)=>{console.warn(`bare-v3: component template error${n?` in "${n}"`:""}`,t,r)}),Oe=e}var Gn=(e)=>Jn().reactive(e),Xn=(e)=>Oe?Oe.raw(e):e;function Zn(e,t,r){let n=Jn(),i=n.reactive(r);return e.innerHTML=t,n.addScopeToNode(e,i),n.initTree(e),i}function ta(e,t){let r=e.ownerDocument||e,n=r.defaultView,i={signal:t},o=null,s=null,a=0,l=null,c=0,d=null,u=new n.MutationObserver((g)=>{if(!o.isConnected||g.some(({target:p})=>s.contains(p)&&!d.contains(p)))f()});function f(){if(!o)return;n.clearTimeout(c),u.disconnect();let g=o.dataset.b3Confirm;if(l&&g&&o.textContent===g)o.replaceChildren(...l);o.removeAttribute("data-b3-armed"),o=s=l=null,d.textContent=""}function m(g){if(!d?.isConnected)d=r.createElement("span"),d.className="b3-visually-hidden",d.setAttribute("role","status"),r.body.append(d);let p=d;o=g,a=n.performance.now(),s=g.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||g.parentElement;let b=g.dataset.b3Confirm;if(b)l=[...g.childNodes],g.replaceChildren(b);g.setAttribute("data-b3-armed",""),u.observe(e,{childList:!0,subtree:!0}),u.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),c=n.setTimeout(f,4000),n.requestAnimationFrame(()=>{if(o===g)p.textContent=b||"Press again to confirm"})}e.addEventListener("click",(g)=>{let p=g.target.closest?.("[data-b3-confirm]");if(o&&p!==o)f();if(!p||p.disabled||!e.contains(p))return;if(p===o&&n.performance.now()-a>=350)return f();if(g.preventDefault(),g.stopImmediatePropagation(),p!==o)m(p)},{...i,capture:!0}),e.addEventListener("focusout",({target:g})=>{if(g===o)n.queueMicrotask(()=>g===o&&f())},i),e.addEventListener("keydown",(g)=>{let p=g;if(p.key==="Escape")f();else if(p.repeat&&(p.key==="Enter"||p.key===" ")&&p.target.closest?.("[data-b3-confirm]"))p.preventDefault()},{...i,capture:!0}),t?.addEventListener("abort",()=>{f(),d?.remove()},{once:!0})}var Qn=Symbol.for("bare-v3.confirm");function ei(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let e=document;if(e[Qn])return;e[Qn]=!0,ta(document)}var fe=1.001,ra=320,na=30,ia=350,sa="b3-image-viewer-style",oa=`
|
|
23
23
|
.b3-image-viewer{position:relative;display:block;overflow:hidden;touch-action:pan-y;
|
|
24
24
|
background:var(--b3-color-canvas,#f6f5f0);color:var(--b3-color-text,#202923);
|
|
25
25
|
border-radius:var(--b3-radius,.75rem);-webkit-user-select:none;user-select:none;}
|
|
@@ -38,9 +38,9 @@ ${r?'Expression: "'+r+`"
|
|
|
38
38
|
min-height:44px;min-width:44px;}
|
|
39
39
|
.b3-image-viewer>.b3-image-viewer-close{inset-inline-end:var(--b3-space,1rem);}
|
|
40
40
|
.b3-image-viewer>.b3-image-viewer-fit{inset-inline-start:var(--b3-space,1rem);}
|
|
41
|
-
`;class nr extends De{static observedAttributes=["src","alt","max-scale","open"];#e=1;#t=0;#n=0;#a=!1;#s=null;#i=new Map;#l=!1;#h=0;#r=0;#m=0;#g=0;#y=!1;#v=null;#p=null;#w=new WeakSet;#o=null;get scale(){return this.#e}get fitted(){return this.#e<=fe}get src(){return this.#o??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#o=e.src??e.default??String(e);else if(this.#o=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#_()}get alt(){return this.getAttribute("alt")??""}set alt(e){this.setAttribute("alt",e??"")}get maxScale(){let e=Number(this.getAttribute("max-scale"));return e>=1?e:8}set maxScale(e){this.setAttribute("max-scale",String(e))}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",Boolean(e))}connectedCallback(){if(this.#y)return;if(this.#y=!0,Ne(this.ownerDocument,ia,sa),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#E(),this.#_(),this.#M(),this.#p=new MutationObserver(()=>{this.#S(),this.#u()}),this.#p.observe(this,{childList:!0}),this.#S(),this.#u()}disconnectedCallback(){this.#v?.abort(),this.#v=null,this.#p?.disconnect(),this.#p=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#s=null,this.#l=!1,this.#y=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#_(),this.reset();if(e==="alt"){let n=this.#c();if(n)n.alt=this.alt;this.#E()}if(e==="open"){if(this.#S(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#e>this.maxScale)this.zoomTo(this.maxScale)}#c(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#_(){let e=this.#c(),t=this.src,r=!1;if(!e&&t)e=this.ownerDocument.createElement("img"),r=!0,this.prepend(e);if(!e)return;if(t&&e.tagName==="IMG"&&e.getAttribute("src")!==t)e.setAttribute("src",t);if(e.tagName==="IMG"&&(r||this.hasAttribute("alt")))e.alt=this.alt;if(this.#E(),e.tagName==="IMG")this.#k(e)}#E(){if(this.hasAttribute("aria-labelledby"))return;let e=this.getAttribute("alt");if(e)this.setAttribute("aria-label",e);else if(!this.hasAttribute("aria-label"))this.setAttribute("aria-label","Zoomable image")}#k(e){if(this.#w.has(e))return;if(this.#w.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#A(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#A(e)},0)}#A(e){if(this.hasAttribute("data-b3-error"))return;this.setAttribute("data-b3-error",""),this.dispatchEvent(new CustomEvent("b3-error",{bubbles:!0,composed:!0,detail:{src:e.getAttribute("src")??this.src??null}}))}#S(){if(!this.open){for(let t of this.querySelectorAll(":scope > .b3-image-viewer-close"))t.remove();return}if(this.querySelector(":scope > .b3-image-viewer-close"))return;let e=this.ownerDocument.createElement("button");e.type="button",e.className="b3-image-viewer-close",e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",(t)=>{t.preventDefault(),t.stopPropagation(),this.requestClose()}),e.addEventListener("pointerdown",(t)=>t.stopPropagation()),this.append(e)}#d(){let e=this.#c();if(!e)return null;let t=e.style.transform;e.style.transform="none";let r=this.getBoundingClientRect(),n=e.getBoundingClientRect();return e.style.transform=t,this.#a=n.width>r.width+1||n.height>r.height+1,{element:e,vw:r.width,vh:r.height,x:n.left-r.left,y:n.top-r.top,w:n.width,h:n.height}}#f(e){if(this.#e<=fe&&!this.#a){this.#t=0,this.#n=0;return}let t=e.w*this.#e,r=e.h*this.#e;this.#t=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#t)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#u(e){let t=e?.element??this.#c();if(!t)return;let r=this.#e<=fe,n=!r||this.#a;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#t&&!this.#n?"":`translate(${this.#t}px, ${this.#n}px) scale(${this.#e})`,t.style.setProperty("--b3-zoom",String(this.#e)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#C(e,t,r,n=this.#d()){if(!n)return;let i=this.#e;e=Math.max(1,Math.min(this.maxScale,e));let o=(t-this.#t)/this.#e,s=(r-this.#n)/this.#e;if(this.#t=t-o*e,this.#n=r-s*e,this.#e=e,this.#f(n),this.#u(n),i!==this.#e)this.#x()}#x(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#e,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#e!==1;this.#e=1,this.#t=0,this.#n=0;let t=this.#d();if(t)this.#f(t);if(this.#u(t),e)this.#x()}zoomTo(e){let t=this.#d();if(t)this.#C(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#T(){let e=0,t=0;for(let r of this.#i.values())e+=r.x,t+=r.y;return{x:e/this.#i.size,y:t/this.#i.size}}#O(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#v=new AbortController;let e={signal:this.#v.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#c())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#s=this.#d(),this.#i.size>1||this.#e>fe||this.#a)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#e<=fe&&!this.#a){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#s??=this.#d(),!this.#s)return;n.preventDefault();let o=this.#T(),s=i?this.#O():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let a=this.#T(),l=i?this.#O():0,c=this.getBoundingClientRect(),d=this.#e,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#e*(l/s))):this.#e,f=(o.x-c.left-this.#t)/this.#e,m=(o.y-c.top-this.#n)/this.#e;if(this.#t=a.x-c.left-f*u,this.#n=a.y-c.top-m*u,this.#e=u,this.#f(this.#s),this.#u(this.#s),this.#l=!0,d!==this.#e)this.#x()},t);let r=(n)=>{if(!this.#i.delete(n.pointerId))return;if(this.hasPointerCapture?.(n.pointerId))this.releasePointerCapture(n.pointerId);if(this.#i.size){this.#s=this.#d();return}if(this.#s=null,this.#l){this.#h=performance.now(),this.#l=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),o=Math.hypot(n.clientX-this.#m,n.clientY-this.#g)<ra;if(i-this.#r<ta&&o){this.#r=0;let s=this.getBoundingClientRect();this.#C(this.#e>fe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#h=i}else this.#r=i,this.#m=n.clientX,this.#g=n.clientY};this.addEventListener("pointerup",r,e),this.addEventListener("pointercancel",r,e),this.addEventListener("click",(n)=>{if(n.target.closest?.(".b3-image-viewer-close, .b3-image-viewer-fit"))return;if(performance.now()-this.#h<na){n.preventDefault(),n.stopPropagation();return}if(this.open&&this.fitted&&n.target===this)this.requestClose()},{...e,capture:!0}),this.addEventListener("wheel",(n)=>{let i=this.getBoundingClientRect();if(n.ctrlKey){n.preventDefault(),this.#C(this.#e*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let o=this.#d();if(!o||o.h*this.#e<=o.vh&&!this.#a)return;let s=this.#n;if(this.#n-=n.deltaY,this.#f(o),this.#n===s)return;n.preventDefault(),this.#u(o)},t);for(let n of["gesturestart","gesturechange","gestureend"])this.addEventListener(n,(i)=>i.preventDefault(),t);this.addEventListener("keydown",(n)=>{if(n.metaKey||n.altKey)return;let i=n.shiftKey?80:40,o=(s,a)=>{let l=this.#d();if(!l||this.fitted)return!1;return this.#t+=s,this.#n+=a,this.#f(l),this.#u(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#e*1.5);break;case"-":case"_":this.zoomTo(this.#e/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!o(i,0))return;break;case"ArrowRight":if(!o(-i,0))return;break;case"ArrowUp":if(!o(0,i))return;break;case"ArrowDown":if(!o(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#d();if(n)this.#f(n),this.#u(n)},e)}}var Qn=nr;function ir(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=Qn;return Qn=class extends nr{},customElements.define(e,r),r}ir();var oa=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,aa=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,la=350,Ie=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),ei=(e)=>JSON.parse(JSON.stringify(Jn(e))),w=(e,t)=>e!=null&&String(e)===String(t),tt=(e)=>!!e&&typeof e==="object",C=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],rt=(e)=>Array.isArray(e.comments)?e.comments:[];function ca(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,o]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=o)return`${Math.floor(n/o)}${i} ago`;return`${n}m ago`}var ai=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function ti(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Ie();t.add(String(n.id))};return e.filter(tt).map((n)=>{r(n),n.cards=ai(Array.isArray(n.cards)?n.cards.filter(tt):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(tt(o))r(o)}if(Array.isArray(i.comments)){for(let o of i.comments)if(tt(o))r(o)}}return n})}function ri(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>w(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>w(o.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let o of n.cards){let s=C(o),a=s.findIndex((l)=>w(l.id,r));if(a>=0)return void s.splice(a,1)}}}var da=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function ua(e){return[e.title??"",e.description??"",...C(e).map((t)=>t.title??""),...st(e)].join(`
|
|
41
|
+
`;class nr extends De{static observedAttributes=["src","alt","max-scale","open"];#t=1;#e=0;#n=0;#o=!1;#s=null;#i=new Map;#a=!1;#b=0;#r=0;#x=0;#y=0;#E=!1;#v=null;#m=null;#k=new WeakSet;#l=null;get scale(){return this.#t}get fitted(){return this.#t<=fe}get src(){return this.#l??this.getAttribute("src")}set src(e){if(e&&typeof e==="object")this.#l=e.src??e.default??String(e);else if(this.#l=null,e==null)this.removeAttribute("src");else this.setAttribute("src",e);this.#w()}get alt(){return this.getAttribute("alt")??""}set alt(e){this.setAttribute("alt",e??"")}get maxScale(){let e=Number(this.getAttribute("max-scale"));return e>=1?e:8}set maxScale(e){this.setAttribute("max-scale",String(e))}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",Boolean(e))}connectedCallback(){if(this.#E)return;if(this.#E=!0,Ne(this.ownerDocument,sa,oa),this.classList.add("b3-image-viewer"),!this.hasAttribute("tabindex"))this.tabIndex=0;if(!this.hasAttribute("role"))this.setAttribute("role","group");this.#_(),this.#w(),this.#M(),this.#m=new MutationObserver(()=>{this.#A(),this.#u()}),this.#m.observe(this,{childList:!0}),this.#A(),this.#u()}disconnectedCallback(){this.#v?.abort(),this.#v=null,this.#m?.disconnect(),this.#m=null;for(let e of this.#i.keys())if(this.hasPointerCapture?.(e))this.releasePointerCapture(e);this.#i.clear(),this.#s=null,this.#a=!1,this.#E=!1}attributeChangedCallback(e,t,r){if(t===r)return;if(e==="src")this.#w(),this.reset();if(e==="alt"){let n=this.#h();if(n)n.alt=this.alt;this.#_()}if(e==="open"){if(this.#A(),this.reset(),this.open)this.focus({preventScroll:!0})}if(e==="max-scale"&&this.#t>this.maxScale)this.zoomTo(this.maxScale)}#h(){return this.querySelector(":scope > img, :scope > svg, :scope > canvas")}#w(){let e=this.#h(),t=this.src,r=!1;if(!e&&t)e=this.ownerDocument.createElement("img"),r=!0,this.prepend(e);if(!e)return;if(t&&e.tagName==="IMG"&&e.getAttribute("src")!==t)e.setAttribute("src",t);if(e.tagName==="IMG"&&(r||this.hasAttribute("alt")))e.alt=this.alt;if(this.#_(),e.tagName==="IMG")this.#f(e)}#_(){if(this.hasAttribute("aria-labelledby"))return;let e=this.getAttribute("alt");if(e)this.setAttribute("aria-label",e);else if(!this.hasAttribute("aria-label"))this.setAttribute("aria-label","Zoomable image")}#f(e){if(this.#k.has(e))return;if(this.#k.add(e),e.addEventListener("load",()=>{this.removeAttribute("data-b3-error"),this.reset()}),e.addEventListener("error",()=>this.#g(e)),e.complete&&e.naturalWidth===0&&e.getAttribute("src"))setTimeout(()=>{if(e.isConnected&&e.complete&&e.naturalWidth===0)this.#g(e)},0)}#g(e){if(this.hasAttribute("data-b3-error"))return;this.setAttribute("data-b3-error",""),this.dispatchEvent(new CustomEvent("b3-error",{bubbles:!0,composed:!0,detail:{src:e.getAttribute("src")??this.src??null}}))}#A(){if(!this.open){for(let t of this.querySelectorAll(":scope > .b3-image-viewer-close"))t.remove();return}if(this.querySelector(":scope > .b3-image-viewer-close"))return;let e=this.ownerDocument.createElement("button");e.type="button",e.className="b3-image-viewer-close",e.setAttribute("aria-label","Close"),e.textContent="×",e.addEventListener("click",(t)=>{t.preventDefault(),t.stopPropagation(),this.requestClose()}),e.addEventListener("pointerdown",(t)=>t.stopPropagation()),this.append(e)}#c(){let e=this.#h();if(!e)return null;let t=e.style.transform;e.style.transform="none";let r=this.getBoundingClientRect(),n=e.getBoundingClientRect();return e.style.transform=t,this.#o=n.width>r.width+1||n.height>r.height+1,{element:e,vw:r.width,vh:r.height,x:n.left-r.left,y:n.top-r.top,w:n.width,h:n.height}}#d(e){if(this.#t<=fe&&!this.#o){this.#e=0,this.#n=0;return}let t=e.w*this.#t,r=e.h*this.#t;this.#e=t<=e.vw?(e.vw-t)/2-e.x:Math.min(-e.x,Math.max(-e.x-(t-e.vw),this.#e)),this.#n=r<=e.vh?(e.vh-r)/2-e.y:Math.min(-e.y,Math.max(-e.y-(r-e.vh),this.#n))}#u(e){let t=e?.element??this.#h();if(!t)return;let r=this.#t<=fe,n=!r||this.#o;t.style.transformOrigin="0 0",t.style.transform=r&&!this.#e&&!this.#n?"":`translate(${this.#e}px, ${this.#n}px) scale(${this.#t})`,t.style.setProperty("--b3-zoom",String(this.#t)),this.toggleAttribute("data-b3-zoomed",!r),this.toggleAttribute("data-b3-pannable",n),this.style.touchAction=n||this.open?"none":"pan-y";let i=this.querySelector(":scope > .b3-image-viewer-fit");if(i)i.hidden=r}#S(e,t,r,n=this.#c()){if(!n)return;let i=this.#t;e=Math.max(1,Math.min(this.maxScale,e));let o=(t-this.#e)/this.#t,s=(r-this.#n)/this.#t;if(this.#e=t-o*e,this.#n=r-s*e,this.#t=e,this.#d(n),this.#u(n),i!==this.#t)this.#C()}#C(){this.dispatchEvent(new CustomEvent("b3-zoom",{bubbles:!0,composed:!0,detail:{scale:this.#t,fitted:this.fitted,src:this.src}}))}reset(){let e=this.#t!==1;this.#t=1,this.#e=0,this.#n=0;let t=this.#c();if(t)this.#d(t);if(this.#u(t),e)this.#C()}zoomTo(e){let t=this.#c();if(t)this.#S(e,t.vw/2,t.vh/2,t)}requestClose(){this.dispatchEvent(new CustomEvent("b3-close",{bubbles:!0,composed:!0,detail:{src:this.src}}))}#T(){let e=0,t=0;for(let r of this.#i.values())e+=r.x,t+=r.y;return{x:e/this.#i.size,y:t/this.#i.size}}#O(){let[e,t]=[...this.#i.values()];return Math.hypot(e.x-t.x,e.y-t.y)}#M(){this.#v=new AbortController;let e={signal:this.#v.signal},t={...e,passive:!1};this.addEventListener("pointerdown",(n)=>{if(n.pointerType==="mouse"&&n.button!==0)return;if(!this.#h())return;if(this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY}),this.#s=this.#c(),this.#i.size>1||this.#t>fe||this.#o)this.setPointerCapture(n.pointerId),n.preventDefault()},e),this.addEventListener("pointermove",(n)=>{if(!this.#i.has(n.pointerId))return;let i=this.#i.size===2;if(!i&&this.#t<=fe&&!this.#o){this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});return}if(this.#s??=this.#c(),!this.#s)return;n.preventDefault();let o=this.#T(),s=i?this.#O():0;this.#i.set(n.pointerId,{x:n.clientX,y:n.clientY});let a=this.#T(),l=i?this.#O():0,c=this.getBoundingClientRect(),d=this.#t,u=i&&s>0?Math.max(1,Math.min(this.maxScale,this.#t*(l/s))):this.#t,f=(o.x-c.left-this.#e)/this.#t,m=(o.y-c.top-this.#n)/this.#t;if(this.#e=a.x-c.left-f*u,this.#n=a.y-c.top-m*u,this.#t=u,this.#d(this.#s),this.#u(this.#s),this.#a=!0,d!==this.#t)this.#C()},t);let r=(n)=>{if(!this.#i.delete(n.pointerId))return;if(this.hasPointerCapture?.(n.pointerId))this.releasePointerCapture(n.pointerId);if(this.#i.size){this.#s=this.#c();return}if(this.#s=null,this.#a){this.#b=performance.now(),this.#a=!1;return}if(n.type!=="pointerup")return;let i=performance.now(),o=Math.hypot(n.clientX-this.#x,n.clientY-this.#y)<na;if(i-this.#r<ra&&o){this.#r=0;let s=this.getBoundingClientRect();this.#S(this.#t>fe?1:2.5,n.clientX-s.left,n.clientY-s.top),this.#b=i}else this.#r=i,this.#x=n.clientX,this.#y=n.clientY};this.addEventListener("pointerup",r,e),this.addEventListener("pointercancel",r,e),this.addEventListener("click",(n)=>{if(n.target.closest?.(".b3-image-viewer-close, .b3-image-viewer-fit"))return;if(performance.now()-this.#b<ia){n.preventDefault(),n.stopPropagation();return}if(this.open&&this.fitted&&n.target===this)this.requestClose()},{...e,capture:!0}),this.addEventListener("wheel",(n)=>{let i=this.getBoundingClientRect();if(n.ctrlKey){n.preventDefault(),this.#S(this.#t*Math.exp(-n.deltaY/180),n.clientX-i.left,n.clientY-i.top);return}let o=this.#c();if(!o||o.h*this.#t<=o.vh&&!this.#o)return;let s=this.#n;if(this.#n-=n.deltaY,this.#d(o),this.#n===s)return;n.preventDefault(),this.#u(o)},t);for(let n of["gesturestart","gesturechange","gestureend"])this.addEventListener(n,(i)=>i.preventDefault(),t);this.addEventListener("keydown",(n)=>{if(n.metaKey||n.altKey)return;let i=n.shiftKey?80:40,o=(s,a)=>{let l=this.#c();if(!l||this.fitted)return!1;return this.#e+=s,this.#n+=a,this.#d(l),this.#u(l),!0};switch(n.key){case"+":case"=":this.zoomTo(this.#t*1.5);break;case"-":case"_":this.zoomTo(this.#t/1.5);break;case"0":this.reset();break;case"Enter":case" ":this.zoomTo(this.fitted?2.5:1);break;case"Escape":if(!this.open)return;this.requestClose();break;case"ArrowLeft":if(!o(i,0))return;break;case"ArrowRight":if(!o(-i,0))return;break;case"ArrowUp":if(!o(0,i))return;break;case"ArrowDown":if(!o(0,-i))return;break;default:return}n.preventDefault()},e),this.ownerDocument.defaultView.addEventListener("resize",()=>{let n=this.#c();if(n)this.#d(n),this.#u(n)},e)}}var ti=nr;function ir(e="b3-image-viewer"){if(typeof customElements>"u")return null;let t=customElements.get?.(e);if(t)return t;let r=ti;return ti=class extends nr{},customElements.define(e,r),r}ir();var aa=/(^|\s)([#@][\p{L}\p{N}_-]+)/gu,la=/(?:\s+[#@][\p{L}\p{N}_-]+)+\s*$/u,ca=350,Ie=()=>globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,11),sr=(e)=>JSON.parse(JSON.stringify(Xn(e))),w=(e,t)=>e!=null&&String(e)===String(t),tt=(e)=>!!e&&typeof e==="object",C=(e)=>Array.isArray(e.subtasks)?e.subtasks:[],rt=(e)=>Array.isArray(e.comments)?e.comments:[];function da(e,t){if(e==null||e==="")return"";let r=new Date(typeof e==="string"?e.replace(" ","T"):e).getTime();if(!Number.isFinite(r))return"";let n=Math.max(0,Math.round((t-r)/60000));if(n<1)return"just now";for(let[i,o]of[["y",525600],["mo",43200],["w",10080],["d",1440],["h",60]])if(n>=o)return`${Math.floor(n/o)}${i} ago`;return`${n}m ago`}var li=(e)=>[...e.filter((t)=>t.starred),...e.filter((t)=>!t.starred)];function or(e){if(!Array.isArray(e))return[];let t=new Set,r=(n)=>{let{id:i}=n;if(!(typeof i==="string"&&i!==""||typeof i==="number"&&Number.isFinite(i))||t.has(String(i)))n.id=Ie();t.add(String(n.id))};return e.filter(tt).map((n)=>{r(n),n.cards=li(Array.isArray(n.cards)?n.cards.filter(tt):[]);for(let i of n.cards){if(r(i),Array.isArray(i.subtasks)){for(let o of i.subtasks)if(tt(o))r(o)}if(Array.isArray(i.comments)){for(let o of i.comments)if(tt(o))r(o)}}return n})}function ri(e,{field:t,id:r}){if(t==="name"){let n=e.findIndex((i)=>w(i.id,r));if(n>=0)e.splice(n,1);return}for(let n of e){let i=n.cards.findIndex((o)=>w(o.id,r));if(t==="title"&&i>=0)return void n.cards.splice(i,1);if(t==="subtask")for(let o of n.cards){let s=C(o),a=s.findIndex((l)=>w(l.id,r));if(a>=0)return void s.splice(a,1)}}}var ua=(e)=>e.toLowerCase().split(/\s+/).filter(Boolean);function fa(e){return[e.title??"",e.description??"",...C(e).map((t)=>t.title??""),...st(e)].join(`
|
|
42
42
|
`).toLowerCase()}function st(e){let t=new Set((e.tags??[]).map((n)=>(/^[#@]/.test(n)?n:`#${n}`).toLowerCase())),r=[e.title??"",e.description??"",...C(e).map((n)=>n.title??"")].join(`
|
|
43
|
-
`);for(let[,,n]of r.matchAll(
|
|
43
|
+
`);for(let[,,n]of r.matchAll(aa))t.add(n.toLowerCase());return[...t]}var ni=String.raw`(<[^<>\n]+>|(?:[^()\n]|\([^()\n]*\))+)`,ha=new RegExp(String.raw`!\[([^\]\n]*)\]\(${ni}\)|\[([^\]\n]+)\]\(${ni}\)|\bhttps?:\/\/[^\s<>]+`,"giu"),pa=new Set(["javascript","data","vbscript","file","blob","about"]),ba=(e)=>{let t=e.trim();return t.startsWith("<")&&t.endsWith(">")?t.slice(1,-1):t.replace(/\s+"[^"\n]*"$/,"")};function ma(e,t=[]){if(/[\u0000-\u001f\u007f\\]/.test(e)||/\s/.test(e.replaceAll(" ",""))||e!==e.trim()||!e)return null;let r=/^([a-z][a-z\d+.-]*):/i.exec(e)?.[1].toLowerCase();if(r==="http"||r==="https"||r==="mailto")return{href:e,file:!1};if(r)return!pa.has(r)&&t.includes(r)?{href:e,file:!1}:null;return e.startsWith("//")?null:{href:e,file:!0}}var ii=(e)=>(e??"").toLowerCase().split(/[\s,]+/).map((t)=>t.replace(/:$/,"")).filter(Boolean);function lr(e,t=[]){let r=[],n=0;for(let i of e.matchAll(ha)){let o=i[2]!==void 0,[s]=i,a=o?i[1]:i[3],l=o?i[2]:i[4],c=i.index+s.length;if(!l){let u=s;for(;;){if(u=u.replace(/[.,;:!?'"\]]+$/u,""),!u.endsWith(")")||u.split("(").length>=u.split(")").length)break;u=u.slice(0,-1)}c-=s.length-u.length,s=a=l=u}else l=ba(l);let d=ma(l,t);if(!d||o&&!d.file&&!/^https?:/i.test(d.href))continue;if(i.index>n)r.push(e.slice(n,i.index));r.push({text:a,...d,...o?{image:o}:{}}),n=c}if(n<e.length)r.push(e.slice(n));return r}var si=(e,t=[])=>lr(e,t).map((r)=>typeof r==="string"?r:r.text).join(""),ar=null;function ga(e,t,r=[]){let n=e.ownerDocument;e.replaceChildren(...lr(t,r).map((i)=>{if(typeof i==="string")return n.createTextNode(i);let o=n.createElement("a");if(o.className="b3-board-ref",o.href=i.href,o.dataset.href=i.href,o.draggable=!1,i.image){let s=n.createElement("img");if(s.src=i.href,s.alt=i.text,s.loading="lazy",s.draggable=!1,o.classList.add("b3-board-image"),o.append(s),i.file)o.dataset.file="";else o.target="_blank",o.rel="noopener noreferrer";return o}if(i.file){if(o.dataset.file="",!ar){let s=n.createElement("template");s.innerHTML=wa,ar=s.content.firstElementChild}o.append(ar.cloneNode(!0))}else if(/^https?:/i.test(i.href))o.target="_blank",o.rel="noopener noreferrer";return o.append(i.text),o}))}var xa="b3-board-style",ya=`
|
|
44
44
|
:where(b3-board){--b3-board-hit:var(--b3-d-control,var(--b3-touch,2.75rem));--b3-board-chip:var(--b3-d-control-small,2rem);
|
|
45
45
|
--b3-board-tag:var(--b3-color-accent);--b3-board-mention:var(--b3-color-info);--b3-board-star:var(--b3-color-warning);
|
|
46
46
|
--b3-board-line:color-mix(in srgb,var(--b3-color-border) 70%,transparent);--b3-board-soft:color-mix(in srgb,var(--b3-color-text) 5%,var(--b3-color-surface));}
|
|
@@ -50,6 +50,14 @@ b3-board{display:flex;flex-direction:column;min-inline-size:0;min-block-size:0;c
|
|
|
50
50
|
.b3-board-icon{flex:none;inline-size:1rem;block-size:1rem;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
|
|
51
51
|
.b3-board-filters{flex:none;display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--b3-space-3,.75rem);font-size:.8125rem;}
|
|
52
52
|
.b3-board-filters[hidden]{display:none;}
|
|
53
|
+
.b3-board-search{display:inline-flex;align-items:center;margin-inline-start:auto;}
|
|
54
|
+
.b3-board-search[data-open]{flex:0 1 14rem;min-inline-size:8rem;}
|
|
55
|
+
.b3-board-search>.b3-board-quiet{margin:0;}
|
|
56
|
+
.b3-board-search-input{flex:1;inline-size:100%;min-inline-size:0;min-block-size:var(--b3-board-chip);padding:.125rem .5rem;font:inherit;color:var(--b3-color-text);
|
|
57
|
+
border:1px solid transparent;border-radius:var(--b3-radius-small,.375rem);background:color-mix(in srgb,var(--b3-color-text) 6%,transparent);}
|
|
58
|
+
.b3-board-search-input:focus{outline:none;border-color:var(--b3-color-focus);background:var(--b3-color-canvas);}
|
|
59
|
+
.b3-board-search-input[hidden],.b3-board-search>[hidden]{display:none;}
|
|
60
|
+
@media (pointer:coarse){.b3-board-search-input{font-size:max(1em,16px);}}
|
|
53
61
|
.b3-board-caption{color:var(--b3-color-muted);font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;}
|
|
54
62
|
/* A tag or mention is a word in its colour; choosing it underlines and bolds it. */
|
|
55
63
|
.b3-board-chip{display:inline-flex;align-items:center;max-inline-size:100%;min-block-size:var(--b3-board-chip);padding:0;border:0;background:none;
|
|
@@ -192,15 +200,20 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
192
200
|
:is(.b3-board-cards,.b3-board-subtasks)[data-b3-drop="end"]{box-shadow:inset 0 -3px 0 -1px var(--b3-color-accent);}
|
|
193
201
|
.b3-board-columns[data-b3-drop="end"]{box-shadow:inset -3px 0 0 -1px var(--b3-color-accent);}
|
|
194
202
|
@media (prefers-reduced-motion:reduce){.b3-board-toggle>.b3-board-icon,.b3-board-card{transition:none;}.b3-board-ghost{rotate:none;}}
|
|
195
|
-
`,
|
|
203
|
+
`,z=(e)=>`<svg class="b3-board-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">${e}</svg>`,oi=z('<circle cx="9" cy="5" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="9" cy="19" r="1"/><circle cx="15" cy="5" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="15" cy="19" r="1"/>'),nt=z('<path d="M5 12h14M12 5v14"/>'),it=z('<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"/>'),va=z('<path d="m9 18 6-6-6-6"/>'),wa=z('<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4M10 9H8M16 13H8M16 17H8"/>'),ai=z('<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>'),_a=z('<path d="M11 12H3M16 6H3M16 18H3M18 9v6M21 12h-6"/>'),Ea=z('<circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/>'),ka=z('<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"/>'),Me=(e,t,r=!0)=>`<template b3x-if="isEditing('${e}', ${t})">
|
|
196
204
|
<textarea class="b3-board-editor" rows="1" b3x-model="editing.draft" b3x-init="focusEditor($el)"
|
|
197
|
-
b3x-on:keydown="keyEditor($event, ${r})" b3x-on:paste="pasteEditor($event, '${e}', ${t})" b3x-on:blur="blurEditor('${e}', ${t})" aria-label="Edit"></textarea></template>`,
|
|
198
|
-
<div class="b3-board-filters" b3x-bind:hidden="!tokens().length" role="group" aria-label="Filter">
|
|
199
|
-
<span class="b3-board-caption" aria-hidden="true">Filter</span>
|
|
205
|
+
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=`
|
|
206
|
+
<div class="b3-board-filters" b3x-bind:hidden="!tokens().length && !searchable" role="group" aria-label="Filter">
|
|
207
|
+
<span class="b3-board-caption" aria-hidden="true" b3x-show="tokens().length">Filter</span>
|
|
200
208
|
<template b3x-for="token in tokens()" b3x-bind:key="token">
|
|
201
209
|
<button type="button" class="b3-board-chip" b3x-bind:data-mention="mention(token)" b3x-bind:aria-pressed="pressed(token)" b3x-on:click="toggleFilter(token)" b3x-text="token"></button>
|
|
202
210
|
</template>
|
|
203
211
|
<button type="button" class="b3-board-link" b3x-show="filter.length" b3x-on:click="setFilter([])">Clear</button>
|
|
212
|
+
<span class="b3-board-search" b3x-show="searchable" b3x-bind:data-open="searchShown() ? '' : null">
|
|
213
|
+
<button type="button" class="b3-board-quiet" b3x-bind:hidden="searchShown()" b3x-on:click="openSearch()" aria-label="Search cards" title="Search cards (/)">${Ea}</button>
|
|
214
|
+
<input type="search" class="b3-board-search-input" b3x-bind:hidden="!searchShown()" b3x-bind:value="search" placeholder="Search" aria-label="Search cards"
|
|
215
|
+
spellcheck="false" autocomplete="off" enterkeyhint="search" b3x-on:input="typeSearch($event)" b3x-on:keydown="keySearch($event)" b3x-on:blur="blurSearch()">
|
|
216
|
+
</span>
|
|
204
217
|
</div>
|
|
205
218
|
<div class="b3-board-columns">
|
|
206
219
|
<template b3x-for="column in columns" b3x-bind:key="column.id">
|
|
@@ -218,18 +231,18 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
218
231
|
<ol class="b3-board-cards">
|
|
219
232
|
<template b3x-for="card in visible(column)" b3x-bind:key="card.id">
|
|
220
233
|
<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)">
|
|
221
|
-
<span class="b3-board-grip" b3x-show="!readonly">${
|
|
234
|
+
<span class="b3-board-grip" b3x-show="!readonly">${oi}</span>
|
|
222
235
|
<div class="b3-board-card-head">
|
|
223
236
|
${Me("title","card.id")}
|
|
224
237
|
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('title', card.id)" b3x-on:click="edit('title', card.id, card.title)"
|
|
225
238
|
b3x-on:keydown="keyText($event, 'title', card.id, card.title)" b3x-effect="rich($el, label(card.title))"></span>
|
|
226
239
|
<span class="b3-board-tools" b3x-show="!isEditing('title', card.id)">
|
|
227
240
|
<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)"
|
|
228
|
-
b3x-on:click="addDetails(card)">${
|
|
241
|
+
b3x-on:click="addDetails(card)">${_a}</button>
|
|
229
242
|
<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)"
|
|
230
243
|
b3x-on:click="removeCard(column, card)">${it}</button>
|
|
231
244
|
<button type="button" class="b3-board-quiet b3-board-star" b3x-show="!readonly || card.starred" b3x-bind:disabled="readonly"
|
|
232
|
-
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${
|
|
245
|
+
b3x-bind:aria-pressed="starred(card)" b3x-bind:aria-label="(card.starred ? 'Unstar ' : 'Star ') + plain(card.title)" b3x-on:click="toggleStar(card)">${ka}</button>
|
|
233
246
|
</span>
|
|
234
247
|
</div>
|
|
235
248
|
<div class="b3-board-tags" b3x-show="tokensOf(card).length">
|
|
@@ -240,9 +253,9 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
240
253
|
<div class="b3-board-foot" b3x-show="(disclosable(card) && (hasDetails(card) || isOpen(card))) || ago(card.updated)">
|
|
241
254
|
<button type="button" class="b3-board-toggle" b3x-show="disclosable(card) && (hasDetails(card) || isOpen(card))" b3x-bind:aria-expanded="expanded(card)"
|
|
242
255
|
b3x-bind:aria-label="(isOpen(card) ? 'Collapse ' : 'Expand ') + plain(card.title)" b3x-on:click="toggle(card)">
|
|
243
|
-
${
|
|
256
|
+
${va}
|
|
244
257
|
<span class="b3-board-progress" b3x-show="subtasksOf(card).length" b3x-bind:data-complete="complete(card) ? '' : null" b3x-text="done(card) + '/' + subtasksOf(card).length"></span>
|
|
245
|
-
<span class="b3-board-talk" b3x-show="commentsOf(card).length" b3x-bind:aria-label="commentsOf(card).length + ' comments'">${
|
|
258
|
+
<span class="b3-board-talk" b3x-show="commentsOf(card).length" b3x-bind:aria-label="commentsOf(card).length + ' comments'">${ai}<span b3x-text="commentsOf(card).length"></span></span>
|
|
246
259
|
<span class="b3-board-preview" b3x-show="!isOpen(card) && card.description" b3x-text="preview(card)"></span>
|
|
247
260
|
<span class="b3-board-hide" b3x-show="isOpen(card) && !subtasksOf(card).length && !commentsOf(card).length">Hide details</span>
|
|
248
261
|
</button>
|
|
@@ -257,7 +270,7 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
257
270
|
<ul class="b3-board-subtasks" b3x-show="subtasksOf(card).length">
|
|
258
271
|
<template b3x-for="sub in subtasksOf(card)" b3x-bind:key="sub.id">
|
|
259
272
|
<li class="b3-board-subtask" b3x-bind:data-subtask="sub.id" b3x-bind:data-done="sub.done ? '' : null">
|
|
260
|
-
<span class="b3-board-subtask-grip" b3x-show="!readonly">${
|
|
273
|
+
<span class="b3-board-subtask-grip" b3x-show="!readonly">${oi}</span>
|
|
261
274
|
<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)">
|
|
262
275
|
${Me("subtask","sub.id",!1)}
|
|
263
276
|
<span class="b3-board-title" role="button" tabindex="0" b3x-show="!isEditing('subtask', sub.id)"
|
|
@@ -279,7 +292,7 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
279
292
|
<div class="b3-board-actions" b3x-show="!readonly">
|
|
280
293
|
<button type="button" class="b3-board-link" b3x-show="!card.description && !isEditing('description', card.id)" b3x-on:click="edit('description', card.id, '')">${nt}<span>Add details</span></button>
|
|
281
294
|
<button type="button" class="b3-board-link" b3x-on:click="addSubtask(card)">${nt}<span>Add subtask</span></button>
|
|
282
|
-
<button type="button" class="b3-board-link" b3x-show="!isEditing('comment', card.id)" b3x-on:click="edit('comment', card.id, '')">${
|
|
295
|
+
<button type="button" class="b3-board-link" b3x-show="!isEditing('comment', card.id)" b3x-on:click="edit('comment', card.id, '')">${ai}<span>Comment</span></button>
|
|
283
296
|
</div>
|
|
284
297
|
</div>
|
|
285
298
|
</template>
|
|
@@ -290,8 +303,8 @@ b3-board [data-b3-drop="before"]{box-shadow:0 -3px 0 -1px var(--b3-color-accent)
|
|
|
290
303
|
</template>
|
|
291
304
|
<button type="button" class="b3-board-link b3-board-add" b3x-show="!readonly" b3x-on:click="addColumn()">${nt}<span>Add column</span></button>
|
|
292
305
|
</div>
|
|
293
|
-
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class
|
|
294
|
-
`).map(
|
|
306
|
+
<span class="b3-visually-hidden" role="status" b3x-text="announcement"></span>`;class ci extends De{static observedAttributes=["readonly","search","link-schemes","searchable"];#t=null;#e=null;#n=null;#o=null;#s=null;#i=!1;#a=null;#b=null;#r=null;#x=!1;#y=null;#E=0;#v=Math.random().toString(36).slice(2,8);#m=!1;#k=[];#l={past:[],future:[],now:null,key:"",at:0};#h=!1;get columns(){let e=sr(this.#e?.columns??this.#n??[]),t=this.#e?.editing;if(t?.fresh)ri(e,t);return e}set columns(e){let t=or(sr(e));if(!this.#e){this.#n=t;return}this.#p();let r=this.#e;if(r.columns=t,r.editing&&!this.#f(r.editing.id))r.editing=null;if(!this.#h)this.#l={past:[],future:[],now:null,key:"",at:0};this.#l.now=this.columns}undo(){return this.#w(-1)}openSearch(){if(!this.#e?.searchable)return!1;return this.#e.openSearch(),!0}redo(){return this.#w(1)}get canUndo(){return!this.readonly&&(this.#l.past.length>0||!!this.#e?.editing)}get canRedo(){return!this.readonly&&this.#l.future.length>0}#w(e){let t=this.#e;if(!t||this.readonly)return!1;t.settle();let r=this.#l,i=(e<0?r.past:r.future).pop();if(!i||!r.now)return!1;(e<0?r.future:r.past).push(r.now),r.key="";let o=new Map(t.columns.flatMap((a)=>a.cards.map((l)=>[String(l.id),l.expanded]))),s=or(sr(i));for(let a of s)for(let l of a.cards){let c=o.get(String(l.id));if(o.has(String(l.id)))if(c)l.expanded=!0;else delete l.expanded}return this.#p(),t.columns=s,r.now=this.columns,this.#d(e<0?"Undone":"Redone"),this.#_({type:e<0?"undo":"redo"}),!0}#_(e){this.#h=!0;try{this.dispatchEvent(new CustomEvent("b3-change",{bubbles:!0,detail:{columns:this.columns,action:e}}))}finally{this.#h=!1}}get filter(){return[...this.#e?.filter??this.#o??[]]}set filter(e){let t=[...e??[]].map((r)=>String(r).toLowerCase());if(this.#e){if(t.join(" ")!==this.#e.filter.join(" "))this.#e.kept=[];this.#e.filter=t}else this.#o=t}get search(){return this.#e?.search??this.#s??""}set search(e){let t=String(e??"");if(this.#e){if(t!==this.#e.search)this.#e.kept=[];this.#e.search=t}else this.#s=t}get defaultColumn(){return this.getAttribute("default-column")??""}set defaultColumn(e){if(e)this.setAttribute("default-column",String(e));else this.removeAttribute("default-column")}addCard(e){let t=this.#e;if(!t||this.readonly)return!1;let r=e??this.defaultColumn,n=String(r).trim().toLowerCase(),i=r!==""&&(t.columns.find((o)=>w(o.id,r))??t.columns.find((o)=>String(o.name??"").trim().toLowerCase()===n))||(e===void 0?t.columns[0]:void 0);if(!i)return!1;return t.addCard(i),!0}get upload(){return this.#y}set upload(e){this.#y=typeof e==="function"?e:null}get readonly(){return this.hasAttribute("readonly")}set readonly(e){this.toggleAttribute("readonly",!!e)}connectedCallback(){for(let t of["columns","filter","search","defaultColumn","readonly","upload"]){if(!Object.hasOwn(this,t))continue;let r=this[t];delete this[t],this[t]=r}let e=this.ownerDocument;if(!this.#t&&e.readyState==="loading"){if(!this.#i)this.#i=!0,e.addEventListener("DOMContentLoaded",()=>{if(this.#i=!1,this.isConnected)this.connectedCallback()},{once:!0});return}if(Ne(e,xa,ya),ei(),!this.#t){let t=this.querySelector(':scope > script[type="application/json"]'),r=this.#n;if(!r&&t)try{r=or(JSON.parse(t.textContent||"[]"))}catch(n){console.warn("b3-board: ignoring unreadable JSON data",n)}this.#t=e.createElement("div"),this.#t.className="b3-board-ui",this.append(this.#t),this.#e=Zn(this.#t,Aa,this.#A(r??[],this.#o??[],this.#s??this.getAttribute("search")??"")),this.#n=this.#o=this.#s=null,this.#l.now=this.columns}else if(this.#t.parentNode!==this)this.append(this.#t);this.#b=new MutationObserver(()=>{if(this.#t&&this.#t.parentNode!==this)this.append(this.#t)}),this.#b.observe(this,{childList:!0}),this.#M(),fr(this,this.#a.signal,{role:"region"})}disconnectedCallback(){this.#p(),this.#a?.abort(),this.#a=null,this.#I(),this.#b?.disconnect(),this.#b=null}attributeChangedCallback(e,t,r){if(e==="search")return void(this.search=r??"");if(!this.#e)return;if(e==="link-schemes")return void(this.#e.schemes=ii(r));if(e==="searchable")return void(this.#e.searchable=r!==null);if(this.#e.readonly=this.readonly,this.#e.viewed={},this.readonly)this.#p(),this.#e.editing=null}#f(e){for(let t of this.#e?.columns??[]){if(w(t.id,e))return t;for(let r of t.cards)if(w(r.id,e)||C(r).some((n)=>w(n.id,e)))return r}return null}#g(e){let t="card"in e&&e.card!=null&&e.type!=="toggle"&&e.type!=="remove"?this.#f(e.card):null;if(t){if(t.updated=new Date().toISOString(),e.type==="add")t.created=t.updated}let r=this.#l,n=Date.now();if(e.type!=="toggle"){let i=e.type==="edit"?JSON.stringify([e.card,e.column,e.field,e.subtask]):"";if(r.now&&!(i&&i===r.key&&n-r.at<1000)){if(r.past.push(r.now),r.past.length>100)r.past.shift()}r.future=[],r.key=i,r.at=n}r.now=this.columns,this.#_(e)}#A(e,t,r){let n=this,i=(a)=>this.#g(a),o=(a)=>{for(let l of s.columns){let c=l.cards.findIndex((d)=>w(d.id,a));if(c>=0)return{column:l,index:c,card:l.cards[c]}}return null},s=Gn({columns:e,filter:t,search:r,kept:[],editing:null,announcement:"",readonly:n.readonly,searchable:n.hasAttribute("searchable"),searching:!1,schemes:ii(n.getAttribute("link-schemes")),viewed:{},tokensOf:st,subtasksOf:C,commentsOf:rt,now:Date.now(),ago(a){return da(a,s.now)},label(a){let l=String(a??"");return l.replace(la,"").trim()||l},pressed(a){return String(s.filter.includes(a))},mention(a){return a.startsWith("@")?"":null},starred(a){return String(!!a.starred)},hasDetails(a){return!!(a.description||C(a).length||rt(a).length)},complete(a){let l=C(a).length;return l>0&&s.done(a)===l},preview(a){let l=String(a.description??"");return l.split(`
|
|
307
|
+
`).map((d)=>si(d,s.schemes)).find((d)=>d.trim())?.trim()??(lr(l,s.schemes).some((d)=>typeof d!=="string"&&d.image)?"Image":"")},plain(a){return si(s.label(a),s.schemes)},rich(a,l){ga(a,String(l??""),s.schemes)},keyText(a,l,c,d){if(a.target!==a.currentTarget||a.key!=="Enter"&&a.key!==" ")return;a.preventDefault(),a.stopPropagation(),s.edit(l,c,d)},isOpen(a){let l=s.viewed[String(a.id)];return s.readonly&&l!==void 0?l:!!a.expanded},expanded(a){return String(s.isOpen(a))},isEditing(a,l){return!!s.editing&&s.editing.field===a&&s.editing.id===l},focusEditor(a){queueMicrotask(()=>n.#S(a))},blurEditor(a,l){if(s.isEditing(a,l))s.commit()},tokens(){let a=new Set;for(let l of s.columns)for(let c of l.cards)for(let d of st(c))a.add(d);return[...a].sort()},visible(a){let l=ua(s.search);if(!s.filter.length&&!l.length)return a.cards;let c=s.editing&&n.#f(s.editing.id);return a.cards.filter((d)=>{if(d===c||s.kept.some((m)=>w(d.id,m)))return!0;let u=st(d),f=l.length?fa(d):"";return s.filter.every((m)=>u.includes(m))&&l.every((m)=>f.includes(m))})},count(a){let l=s.visible(a).length;return l===a.cards.length?String(l):`${l}/${a.cards.length}`},done(a){return C(a).filter((l)=>l.done).length},disclosable(a){return!!(s.hasDetails(a)||!s.readonly)},toggleFilter(a){s.kept=[],s.filter=s.filter.includes(a)?s.filter.filter((l)=>l!==a):[...s.filter,a]},setFilter(a){s.kept=[],s.filter=a},searchShown(){return s.searching||!!s.search},openSearch(){s.searching=!0;let a=n.querySelector(".b3-board-search-input");if(!a)return;a.hidden=!1,a.closest(".b3-board-filters").hidden=!1,a.focus(),a.select()},typeSearch(a){n.search=a.target.value},keySearch(a){if(a.isComposing||a.keyCode===229)return;if(a.key!=="Escape"&&a.key!=="Enter")return;a.preventDefault(),a.stopPropagation();let l=a.target;if(a.key==="Escape")l.value="",n.search="";l.blur()},blurSearch(){s.searching=!1},toggleStar(a){let l=o(a.id);if(s.readonly||!l)return;if(a.starred)delete a.starred;else a.starred=!0;l.column.cards=li(l.column.cards);let c=!!a.starred;s.announcement=`${a.title??""} ${c?"starred":"unstarred"}`,i({type:"star",card:a.id,starred:c}),n.#T(a.id)},toggle(a){if(s.readonly){s.viewed={...s.viewed,[String(a.id)]:!s.isOpen(a)};return}a.expanded=!a.expanded,i({type:"toggle",card:a.id,expanded:a.expanded})},edit(a,l,c,d=!1,u=!1){if(s.readonly||n.#r?.started)return;if(s.editing&&!s.isEditing(a,l))s.commit();s.editing={field:a,id:l,draft:c??"",fresh:d,opened:u},n.#C()},addDetails(a){if(s.readonly)return;let l=!a.expanded;a.expanded=!0,s.edit("description",a.id,String(a.description??""),!1,l)},keyEditor(a,l){if(a.stopPropagation(),a.key==="Escape")a.preventDefault(),s.cancel();else if(a.key==="Enter"&&!(l&&a.shiftKey)&&!a.isComposing)a.preventDefault(),s.commit(!0)},pasteEditor(a,l,c){let d=[...a.clipboardData?.files??[]].filter((u)=>u.type.startsWith("image/"));if(s.readonly||!n.upload||l!=="title"&&l!=="description"||!d.length)return;if(a.clipboardData?.getData("text/plain").trim())return;a.preventDefault();for(let u of d)n.#c(c,u,l==="description"?a.target:null)},cancel(){let a=s.editing;if(s.editing=null,a?.fresh)s.discard(a);if(a?.opened)s.close(a);n.#O(a)},close(a){let l=n.#f(a.id);if(l&&!s.hasDetails(l))l.expanded=!1},commit(a=!1){let l=s.editing;if(!l)return;if(s.editing=null,s.readonly)return;let c=l.field==="description"||l.field==="comment"?l.draft.trim():l.draft.replace(/\s+/g," ").trim(),d=n.#f(l.id);if(!d)return;if(!c&&l.fresh)return s.discard(l);if(!c&&l.opened)s.close(l);let u=null;if(l.field==="comment"){let f=d;if(c){let m={id:Ie(),at:new Date().toISOString(),by:n.getAttribute("author")||"you",text:c};f.comments=[...rt(f),m],u={type:"comment",card:f.id,comment:m.id,op:"add"}}}else if(l.field==="name"){let f=d;if(c&&c!==f.name)f.name=c,u={type:"edit",column:f.id,field:"name"};if(l.fresh)u={type:"add",column:f.id}}else if(l.field==="subtask"){let f=d,m=C(f).find((g)=>w(g.id,l.id));if(!c)return s.removeSubtask(f,m);if(c!==m.title)m.title=c,u={type:"edit",card:f.id,field:"subtask",subtask:m.id};if(l.fresh)u={type:"subtask",card:f.id,subtask:m.id,op:"add"}}else{let f=d,m=l.field;if((c||m==="description")&&c!==(f[m]??""))f[m]=c,u={type:"edit",card:f.id,field:m};if(l.fresh)u={type:"add",card:f.id,column:o(f.id).column.id},s.kept=[...s.kept,f.id]}if(u)i(u);if(l.fresh&&l.field==="subtask"&&a)s.addSubtask(d);else if(l.fresh&&l.field==="title"&&a&&!n.hasAttribute("compact"))s.addDetails(d);else n.#O(l)},discard(a){ri(s.columns,a)},settle(){if(s.editing)s.commit()},addCard(a){if(s.readonly)return;s.settle();let l={id:Ie(),title:""};a.cards.push(l),s.edit("title",l.id,"",!0)},addColumn(){if(s.readonly)return;s.settle();let a={id:Ie(),name:"",cards:[]};s.columns.push(a),s.edit("name",a.id,"",!0)},addSubtask(a){if(s.readonly)return;s.settle();let l={id:Ie(),title:"",done:!1};if(a.expanded=!0,!Array.isArray(a.subtasks))a.subtasks=[];a.subtasks.push(l),s.edit("subtask",l.id,"",!0)},removeCard(a,l){if(s.readonly)return;a.cards=a.cards.filter((c)=>c!==l),i({type:"remove",card:l.id,column:a.id})},removeColumn(a){if(s.readonly)return;s.columns=s.columns.filter((l)=>l!==a),i({type:"remove",column:a.id})},removeSubtask(a,l){if(s.readonly)return;a.subtasks=C(a).filter((c)=>c!==l),i({type:"subtask",card:a.id,subtask:l.id,op:"remove"})},removeComment(a,l){if(s.readonly)return;a.comments=rt(a).filter((c)=>c!==l),i({type:"comment",card:a.id,comment:l.id,op:"remove"})},check(a,l,c){if(s.readonly)return;l.done=c,i({type:"check",card:a.id,subtask:l.id,done:c})},keyCard(a,l){if(a.target!==a.currentTarget)return;if(a.key==="Enter")return a.preventDefault(),s.edit("title",l.id,l.title);if(!a.altKey||s.readonly)return;let c=o(l.id);if(!c)return;let d=getComputedStyle(n).direction==="rtl",u={ArrowUp:-1,ArrowDown:1,ArrowLeft:d?1:-1,ArrowRight:d?-1:1}[a.key];if(!u)return;if(a.preventDefault(),a.key==="ArrowUp"||a.key==="ArrowDown"){let m=s.visible(c.column),g=m[m.indexOf(c.card)+u];if(g&&!g.starred===!l.starred)n.moveCard(l.id,c.column.id,c.column.cards.indexOf(g));return}let f=s.columns[s.columns.indexOf(c.column)+u];if(f)n.moveCard(l.id,f.id,Math.min(c.index,f.cards.length))},keySubtask(a,l,c){s.keyText(a,"subtask",c.id,c.title);let d=a.key==="ArrowUp"?-1:a.key==="ArrowDown"?1:0;if(!a.altKey||!d||s.readonly)return;a.preventDefault(),a.stopPropagation(),n.#u(l,c.id,C(l).indexOf(c)+d)},keyColumn(a,l){if(!a.altKey||s.readonly)return;let c=getComputedStyle(n).direction==="rtl",d=a.key==="ArrowLeft"?c?1:-1:a.key==="ArrowRight"?c?-1:1:0;if(!d)return;a.preventDefault();let u=s.columns.indexOf(l)+d;if(u>=0&&u<s.columns.length)n.moveColumn(l.id,u)}});return s}async#c(e,t,r){let n=this.#e,i=()=>n.editing?.field==="description"&&w(n.editing.id,e)?n.editing:null,o=`![Uploading image ${this.#v}-${++this.#E}…]()`,s="",a=i();if(a&&r){let{selectionStart:h,selectionEnd:x}=r;s=h&&r.value[h-1]!==`
|
|
295
308
|
`?`
|
|
296
|
-
${o}`:o,a.draft=r.value=r.value.slice(0,h)+s+r.value.slice(
|
|
297
|
-
${d}`:d:h;let v=u(h);return v?h.slice(0,v[0])+v[2]+h.slice(v[1]):h},m=i();if(m){let h=this.querySelector("textarea.b3-board-editor"),v=h?.value===m.draft&&u(h.value);if(h&&v){let[z,ie,ot]=v,{selectionStart:ci,selectionEnd:di,selectionDirection:ui}=h,ar=(Le)=>Le>=ie?Le+ot.length-(ie-z):Le>z?z+ot.length:Le;h.setRangeText(ot,z,ie),h.setSelectionRange(ar(ci),ar(di),ui??void 0),m.draft=h.value}else if(f(m.draft)!==m.draft)m.draft=f(m.draft);else if(d)this.#k("Image not added");return}let g=this.#o(e);if(s&&!String(g?.description??"").includes(o))g=n.columns.flatMap((h)=>h.cards).find((h)=>String(h.description??"").includes(o))??g;let p=String(g?.description??""),b=f(p).trim();if(!g||this.readonly||b===p.trim()){if(d)this.#k("Image not added");return}g.description=b,g.expanded=!0,this.#c({type:"edit",card:g.id,field:"description"})}#k(e){let t=this.#t;t.announcement="",requestAnimationFrame(()=>{if(!t.announcement)t.announcement=e})}moveCard(e,t,r){let n=this.#t;if(!n||this.readonly)return!1;let i=n.columns.find((u)=>u.cards.some((f)=>w(f.id,e))),o=n.columns.find((u)=>w(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>w(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(o.cards.length,r)),d=a.starred?Math.min(c,l):Math.max(c,l);if(o.cards.splice(d,0,a),i===o&&s===d)return!1;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${d+1} of ${o.cards.length}`,this.#c({type:"move",card:a.id,from:i.id,to:o.id,index:d}),this.#f(a.id),!0}moveColumn(e,t){let r=this.#t;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>w(s.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),o=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(o,0,i),n===o)return!1;return r.announcement=`${i.name??""} moved to position ${o+1} of ${r.columns.length}`,this.#c({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#A(e,t,r){let n=this.#t,i=C(e),o=i.findIndex((l)=>w(l.id,t));if(!n||this.readonly||o<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(o===s)return!1;let[a]=i.splice(o,1);return i.splice(s,0,a),n.announcement=`${a.title??""} moved to position ${s+1} of ${i.length}`,this.#c({type:"subtask",card:e.id,subtask:a.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(a.id))}"] .b3-board-title`)?.focus()),!0}#S(e){if(!e.isConnected)return;e.focus({preventScroll:!0}),e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,o=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),s=o(),a=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=o(),c=l.scale===s.scale&&l.height<s.height;if(s=l,!c)return;if(r(),t!==e)e.scrollIntoView({block:"nearest",inline:"nearest"})};for(let l of[n,n.visualViewport])l?.addEventListener("resize",a,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#d(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#e?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#e?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#f(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#u(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#C(){this.#l?.abort(),this.#l=new AbortController;let e=this.#l.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#t)this.#t.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(o)=>this.#M(o),{signal:e}),t.addEventListener("pointermove",(o)=>this.#N(o),{signal:e}),t.addEventListener("pointerup",(o)=>this.#B(o),{signal:e}),t.addEventListener("pointercancel",(o)=>{if(o.pointerId===this.#r?.pointerId)this.#b()},{signal:e}),t.addEventListener("keydown",(o)=>{if(o.key==="Escape"&&this.#r?.started)o.preventDefault(),this.#b()},{signal:e}),this.addEventListener("touchmove",(o)=>{if(this.#r?.started)o.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(o)=>{if(this.#r)o.preventDefault()},{signal:e}),this.addEventListener("click",(o)=>{if(!this.#m)return;this.#m=!1,o.preventDefault(),o.stopImmediatePropagation()},{signal:e,capture:!0});let n=(o)=>this.#T(o);this.addEventListener("click",n,{signal:e,capture:!0}),this.addEventListener("auxclick",(o)=>{if(o.button===1)n(o)},{signal:e,capture:!0});let i=()=>this.#x();this.addEventListener("compositionstart",()=>{this.#p=!0},{signal:e}),this.addEventListener("compositionend",i,{signal:e}),this.addEventListener("focusout",i,{signal:e})}#x(){this.#p=!1;for(let e of this.#w.splice(0))e()}#T(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#t?.columns.find((c)=>w(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>w(c.id,r("[data-card]")?.dataset.card)),o=i&&C(i).find((c)=>w(c.id,r("[data-subtask]")?.dataset.subtask)),s={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(o)s.subtask=o.id;let a=t.querySelector("img");if(a&&!s.newTab&&e.type==="click"){e.preventDefault(),this.#O(t,a,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#O(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),ir();let i=n.createElement("b3-image-viewer");i.className="b3-board-lightbox",i.setAttribute("alt",t.alt||"Image"),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let o=n.createElement("img");o.src=t.currentSrc||t.src,o.alt=t.alt;let s=n.createElement("button");s.type="button",s.className="b3-board-lightbox-open",s.textContent="Open",i.append(o,s);let a=n.activeElement,l=[...n.body.children].filter((d)=>d instanceof HTMLElement&&!d.inert),c=()=>{i.remove();for(let d of l)d.inert=!1;if(e.isConnected)e.focus({preventScroll:!0});else a?.focus?.({preventScroll:!0})};i.addEventListener("b3-close",c),i.addEventListener("click",(d)=>{if(d.target===i)c()}),s.addEventListener("pointerdown",(d)=>d.stopPropagation()),s.addEventListener("click",(d)=>{if(d.stopPropagation(),c(),e.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:{...r}}))&&!r.file)this.ownerDocument.defaultView?.open(r.href,"_blank","noopener")}),n.body.append(i);for(let d of l)d.inert=!0;i.setAttribute("open",""),i.focus({preventScroll:!0})}#M(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#t?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#I(e.clientX,e.clientY)},la)}#I(e,t){let r=this.#r;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let s of[i,...i.querySelectorAll("[id]")])s.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#e.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#r!==r)return;this.#$(r.px,r.py),this.#P(this.#L(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#N(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#b();return}if(r<5)return;this.#I(e.clientX,e.clientY)}e.preventDefault(),t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#B(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#b();let r=this.#L(e.clientX,e.clientY);if(this.#b(),this.#m=!0,setTimeout(()=>{this.#m=!1},0),!r)return;let n=this.#t;if(t.kind==="card"){let i=n.columns.find((l)=>w(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((c)=>w(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>w(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>w(l.id,t.id));if(o===i&&a<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#o(t.card);if(!i)return;let o=C(i),s=r.before?o.findIndex((a)=>w(a.id,r.before)):o.length;if(o.findIndex((a)=>w(a.id,t.id))<s)s-=1;this.#A(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>w(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>w(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#L(e,t){let r=this.#r,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#D(e,n);if(!l)return null;let c=l.querySelector(".b3-board-cards"),d=[...c.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=d.find((m)=>{let g=m.getBoundingClientRect();return t<g.top+g.height/2}),f=(m)=>!!(m!=null&&this.#o(m)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((m)=>!f(m.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:c}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let f=u.getBoundingClientRect();return t<f.top+f.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.find((l)=>{let c=l.getBoundingClientRect();return s?e>c.left+c.width/2:e<c.left+c.width/2})?.dataset.column??null,list:i}}#P(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#r.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#D(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#$(e,t){let r=(s,a,l)=>s<a+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#r?.kind==="card"?this.#D(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let o=this.ownerDocument.defaultView;o.scrollBy(0,r(t,0,o.innerHeight))}#b(){let e=this.#r;if(!e)return;this.#r=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}cr("b3-board",li);export{li as B3Board};
|
|
309
|
+
${o}`:o,a.draft=r.value=r.value.slice(0,h)+s+r.value.slice(x),r.setSelectionRange(h+s.length,h+s.length)}let l=n.columns.find((h)=>h.cards.some((x)=>w(x.id,e))),c=null;try{c=await this.#y?.(t,{card:e,column:l?.id})}catch(h){console.warn("b3-board: image upload failed",h)}let d=c?`.replace(/[\s()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`)})`:"";if(!d)this.#d("Image not added");while(this.#m)await new Promise((h)=>this.#k.push(h));let u=(h)=>{if(!s)return null;let x=h.indexOf(s),H=x>=0?x:h.indexOf(o);if(H<0)return null;let ie=x>=0?s:o;return[H,H+ie.length,d?ie.replace(o,d):""]},f=(h)=>{if(!s)return d?h.trim()?`${h.replace(/\s+$/,"")}
|
|
310
|
+
${d}`:d:h;let x=u(h);return x?h.slice(0,x[0])+x[2]+h.slice(x[1]):h},m=i();if(m){let h=this.querySelector("textarea.b3-board-editor"),x=h?.value===m.draft&&u(h.value);if(h&&x){let[H,ie,ot]=x,{selectionStart:di,selectionEnd:ui,selectionDirection:fi}=h,cr=(Le)=>Le>=ie?Le+ot.length-(ie-H):Le>H?H+ot.length:Le;h.setRangeText(ot,H,ie),h.setSelectionRange(cr(di),cr(ui),fi??void 0),m.draft=h.value}else if(f(m.draft)!==m.draft)m.draft=f(m.draft);else if(d)this.#d("Image not added");return}let g=this.#f(e);if(s&&!String(g?.description??"").includes(o))g=n.columns.flatMap((h)=>h.cards).find((h)=>String(h.description??"").includes(o))??g;let p=String(g?.description??""),b=f(p).trim();if(!g||this.readonly||b===p.trim()){if(d)this.#d("Image not added");return}g.description=b,g.expanded=!0,this.#g({type:"edit",card:g.id,field:"description"})}#d(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((f)=>w(f.id,e))),o=n.columns.find((u)=>w(u.id,t));if(!i||!o)return!1;let s=i.cards.findIndex((u)=>w(u.id,e)),[a]=i.cards.splice(s,1),l=o.cards.filter((u)=>u.starred).length,c=Math.max(0,Math.min(o.cards.length,r)),d=a.starred?Math.min(c,l):Math.max(c,l);if(o.cards.splice(d,0,a),i===o&&s===d)return!1;return n.announcement=`${a.title??""} moved to ${o.name??""}, position ${d+1} of ${o.cards.length}`,this.#g({type:"move",card:a.id,from:i.id,to:o.id,index:d}),this.#T(a.id),!0}moveColumn(e,t){let r=this.#e;if(!r||this.readonly)return!1;let n=r.columns.findIndex((s)=>w(s.id,e));if(n<0)return!1;let[i]=r.columns.splice(n,1),o=Math.max(0,Math.min(r.columns.length,t));if(r.columns.splice(o,0,i),n===o)return!1;return r.announcement=`${i.name??""} moved to position ${o+1} of ${r.columns.length}`,this.#g({type:"reorder",column:i.id,index:o}),queueMicrotask(()=>this.querySelector(`[data-column="${CSS.escape(String(i.id))}"] .b3-board-column-name`)?.focus()),!0}#u(e,t,r){let n=this.#e,i=C(e),o=i.findIndex((l)=>w(l.id,t));if(!n||this.readonly||o<0)return!1;let s=Math.max(0,Math.min(i.length-1,r));if(o===s)return!1;let[a]=i.splice(o,1);return i.splice(s,0,a),n.announcement=`${a.title??""} moved to position ${s+1} of ${i.length}`,this.#g({type:"subtask",card:e.id,subtask:a.id,op:"move",index:s}),requestAnimationFrame(()=>this.querySelector(`[data-subtask="${CSS.escape(String(a.id))}"] .b3-board-title`)?.focus()),!0}#S(e){if(!e.isConnected)return;e.focus({preventScroll:!0}),e.select();let t=e.closest(".b3-board-card-head")?e.closest(".b3-board-card"):e.closest(".b3-board-column-header")?e.closest(".b3-board-column"):e.parentElement?.matches(".b3-board-body")?e.parentElement:e,r=()=>t.scrollIntoView({block:"nearest",inline:"nearest"});requestAnimationFrame(r);let n=this.ownerDocument.defaultView;if(!n)return;let i=new AbortController,o=()=>({height:n.visualViewport?.height??n.innerHeight,scale:n.visualViewport?.scale??1}),s=o(),a=()=>{if(!e.isConnected||this.ownerDocument.activeElement!==e)return i.abort();let l=o(),c=l.scale===s.scale&&l.height<s.height;if(s=l,!c)return;if(r(),t!==e)e.scrollIntoView({block:"nearest",inline:"nearest"})};for(let l of[n,n.visualViewport])l?.addEventListener("resize",a,{signal:i.signal});e.addEventListener("blur",()=>i.abort(),{signal:i.signal,once:!0})}#C(){let e=this.ownerDocument,t=e.activeElement;if(!e.defaultView?.matchMedia("(pointer: coarse)").matches||t?.matches("textarea, input"))return;let r=this.#t?.querySelector(":scope > .b3-board-holder");if(!r)r=e.createElement("textarea"),r.className="b3-board-holder",r.tabIndex=-1,r.setAttribute("aria-hidden","true"),this.#t?.append(r);r.focus({preventScroll:!0}),requestAnimationFrame(()=>requestAnimationFrame(()=>{if(e.activeElement===r)r.blur()}))}#T(e){requestAnimationFrame(()=>this.querySelector(`[data-card="${CSS.escape(String(e))}"]`)?.focus({preventScroll:!1}))}#O(e){if(!e)return;let t=CSS.escape(String(e.id));requestAnimationFrame(()=>{if(this.contains(this.ownerDocument.activeElement)&&this.ownerDocument.activeElement!==this.ownerDocument.body)return;let r=e.field==="name"?`[data-column="${t}"] .b3-board-column-name`:e.field==="subtask"?null:`[data-card="${t}"]`;if(r)this.querySelector(r)?.focus({preventScroll:!0})})}#M(){this.#a?.abort(),this.#a=new AbortController;let e=this.#a.signal,t=this.ownerDocument.defaultView,r=t.setInterval(()=>{if(this.#e)this.#e.now=Date.now()},60000);e.addEventListener("abort",()=>t.clearInterval(r)),this.addEventListener("pointerdown",(o)=>this.#$(o),{signal:e}),t.addEventListener("pointermove",(o)=>this.#R(o),{signal:e}),t.addEventListener("pointerup",(o)=>this.#z(o),{signal:e}),t.addEventListener("pointercancel",(o)=>{if(o.pointerId===this.#r?.pointerId)this.#p()},{signal:e}),t.addEventListener("keydown",(o)=>{if(o.key==="Escape"&&this.#r?.started)o.preventDefault(),this.#p()},{signal:e}),this.addEventListener("touchmove",(o)=>{if(this.#r?.started)o.preventDefault()},{signal:e,passive:!1}),this.addEventListener("contextmenu",(o)=>{if(this.#r)o.preventDefault()},{signal:e}),this.addEventListener("click",(o)=>{if(!this.#x)return;this.#x=!1,o.preventDefault(),o.stopImmediatePropagation()},{signal:e,capture:!0}),this.addEventListener("keydown",(o)=>{if(o.defaultPrevented||o.altKey||!(o.metaKey||o.ctrlKey))return;if(o.target.closest?.('input, textarea, select, [contenteditable]:not([contenteditable="false"])'))return;let s=o.key.toLowerCase(),a=s==="y"||s==="z"&&o.shiftKey;if(s!=="z"&&s!=="y")return;if(o.preventDefault(),a)this.redo();else this.undo()},{signal:e});let n=(o)=>this.#B(o);this.addEventListener("click",n,{signal:e,capture:!0}),this.addEventListener("auxclick",(o)=>{if(o.button===1)n(o)},{signal:e,capture:!0});let i=()=>this.#I();this.addEventListener("compositionstart",()=>{this.#m=!0},{signal:e}),this.addEventListener("compositionend",i,{signal:e}),this.addEventListener("focusout",i,{signal:e})}#I(){this.#m=!1;for(let e of this.#k.splice(0))e()}#B(e){let t=e.target.closest?.("a.b3-board-ref");if(!t||!this.contains(t))return;e.stopPropagation();let r=(c)=>t.closest(c),n=this.#e?.columns.find((c)=>w(c.id,r("[data-column]")?.dataset.column)),i=n?.cards.find((c)=>w(c.id,r("[data-card]")?.dataset.card)),o=i&&C(i).find((c)=>w(c.id,r("[data-subtask]")?.dataset.subtask)),s={href:t.dataset.href??"",text:t.textContent??"",file:t.hasAttribute("data-file"),newTab:e.metaKey||e.ctrlKey||e.shiftKey||e.button===1,card:i?.id,column:n?.id};if(o)s.subtask=o.id;let a=t.querySelector("img");if(a&&!s.newTab&&e.type==="click"){e.preventDefault(),this.#P(t,a,s);return}if(!t.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:s}))||s.file)e.preventDefault()}#P(e,t,r){let n=this.ownerDocument;n.body.querySelector(":scope > .b3-board-lightbox")?.dispatchEvent(new CustomEvent("b3-close")),ir();let i=n.createElement("b3-image-viewer");i.className="b3-board-lightbox",i.setAttribute("alt",t.alt||"Image"),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let o=n.createElement("img");o.src=t.currentSrc||t.src,o.alt=t.alt;let s=n.createElement("button");s.type="button",s.className="b3-board-lightbox-open",s.textContent="Open",i.append(o,s);let a=n.activeElement,l=[...n.body.children].filter((d)=>d instanceof HTMLElement&&!d.inert),c=()=>{i.remove();for(let d of l)d.inert=!1;if(e.isConnected)e.focus({preventScroll:!0});else a?.focus?.({preventScroll:!0})};i.addEventListener("b3-close",c),i.addEventListener("click",(d)=>{if(d.target===i)c()}),s.addEventListener("pointerdown",(d)=>d.stopPropagation()),s.addEventListener("click",(d)=>{if(d.stopPropagation(),c(),e.dispatchEvent(new CustomEvent("b3-link",{bubbles:!0,cancelable:!0,detail:{...r}}))&&!r.file)this.ownerDocument.defaultView?.open(r.href,"_blank","noopener")}),n.body.append(i);for(let d of l)d.inert=!0;i.setAttribute("open",""),i.focus({preventScroll:!0})}#$(e){if(this.readonly||this.#r||!e.isPrimary||e.button!==0||this.#e?.editing)return;let t=e.target,r=t.closest(".b3-board-subtask-grip")?.closest(".b3-board-subtask"),n;if(r)n={kind:"subtask",id:r.dataset.subtask,card:r.closest(".b3-board-card").dataset.card,node:r,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0};else{if(t.closest("input, textarea, select, a, .b3-board-quiet, .b3-board-chip, .b3-board-link, .b3-board-toggle, .b3-board-description"))return;let i=t.closest(".b3-board-card"),o=!i&&t.closest(".b3-board-column-header")?t.closest(".b3-board-column"):null,s=i??o;if(!s)return;n={kind:i?"card":"column",id:i?i.dataset.card:o.dataset.column,node:s,pointerId:e.pointerId,x:e.clientX,y:e.clientY,started:!1,hold:0}}if(!this.contains(n.node))return;if(this.#r=n,e.pointerType!=="mouse")n.hold=window.setTimeout(()=>{if(this.#r===n)this.#L(e.clientX,e.clientY)},ca)}#L(e,t){let r=this.#r;r.started=!0;let n=r.node.getBoundingClientRect(),i=r.node.cloneNode(!0);i.classList.add("b3-board-ghost"),i.removeAttribute("data-b3-dragging");for(let s of[i,...i.querySelectorAll("[id]")])s.removeAttribute("id");i.setAttribute("aria-hidden","true"),Object.assign(i.style,{inlineSize:`${n.width}px`,left:`${n.left}px`,top:`${n.top}px`}),r.dx=e-n.left,r.dy=t-n.top,r.ghost=i,this.#t.append(i),r.node.setAttribute("data-b3-dragging",""),this.ownerDocument.getSelection()?.removeAllRanges(),r.px=e,r.py=t;let o=()=>{if(this.#r!==r)return;this.#U(r.px,r.py),this.#H(this.#D(r.px,r.py)),r.frame=requestAnimationFrame(o)};r.frame=requestAnimationFrame(o)}#R(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started){let r=Math.hypot(e.clientX-t.x,e.clientY-t.y);if(e.pointerType!=="mouse"){if(r>8)this.#p();return}if(r<5)return;this.#L(e.clientX,e.clientY)}e.preventDefault(),t.ghost.style.left=`${e.clientX-t.dx}px`,t.ghost.style.top=`${e.clientY-t.dy}px`,t.px=e.clientX,t.py=e.clientY}#z(e){let t=this.#r;if(!t||e.pointerId!==t.pointerId)return;if(!t.started)return this.#p();let r=this.#D(e.clientX,e.clientY);if(this.#p(),this.#x=!0,setTimeout(()=>{this.#x=!1},0),!r)return;let n=this.#e;if(t.kind==="card"){let i=n.columns.find((l)=>w(l.id,r.column)),o=n.columns.find((l)=>l.cards.some((c)=>w(c.id,t.id))),s=r.before?i.cards.findIndex((l)=>w(l.id,r.before)):i.cards.length,a=o.cards.findIndex((l)=>w(l.id,t.id));if(o===i&&a<s)s-=1;this.moveCard(t.id,i.id,s)}else if(t.kind==="subtask"){let i=this.#f(t.card);if(!i)return;let o=C(i),s=r.before?o.findIndex((a)=>w(a.id,r.before)):o.length;if(o.findIndex((a)=>w(a.id,t.id))<s)s-=1;this.#u(i,t.id,s)}else{let i=r.before?n.columns.findIndex((s)=>w(s.id,r.before)):n.columns.length;if(n.columns.findIndex((s)=>w(s.id,t.id))<i)i-=1;this.moveColumn(t.id,i)}}#D(e,t){let r=this.#r,n=this.ownerDocument.elementFromPoint(e,t);if(!n||!this.contains(n))return null;if(r.kind==="card"){let l=this.#N(e,n);if(!l)return null;let c=l.querySelector(".b3-board-cards"),d=[...c.querySelectorAll(":scope > .b3-board-card:not([data-b3-dragging])")],u=d.find((m)=>{let g=m.getBoundingClientRect();return t<g.top+g.height/2}),f=(m)=>!!(m!=null&&this.#f(m)?.starred);if(f(u?.dataset.card)!==f(r.id)&&(u||f(r.id)))u=d.find((m)=>!f(m.dataset.card));return{column:l.dataset.column,before:u?.dataset.card??null,list:c}}if(r.kind==="subtask"){let l=r.node.parentElement;return{column:"",before:[...l.querySelectorAll(":scope > .b3-board-subtask:not([data-b3-dragging])")].find((u)=>{let f=u.getBoundingClientRect();return t<f.top+f.height/2})?.dataset.subtask??null,list:l}}let i=this.querySelector(".b3-board-columns"),o=[...i.querySelectorAll(":scope > .b3-board-column:not([data-b3-dragging])")],s=getComputedStyle(this).direction==="rtl";return{column:"",before:o.find((l)=>{let c=l.getBoundingClientRect();return s?e>c.left+c.width/2:e<c.left+c.width/2})?.dataset.column??null,list:i}}#H(e){for(let n of this.querySelectorAll("[data-b3-drop]"))n.removeAttribute("data-b3-drop");if(!e)return;let t=`[data-${this.#r.kind}="${CSS.escape(e.before??"")}"]`,r=e.before?e.list.querySelector(t):null;(r??e.list).setAttribute("data-b3-drop",r?"before":"end")}#N(e,t){return t?.closest(".b3-board-column")??[...this.querySelectorAll(".b3-board-column")].find((r)=>{let n=r.getBoundingClientRect();return e>=n.left&&e<=n.right})}#U(e,t){let r=(s,a,l)=>s<a+40?-12:s>l-40?12:0,n=this.querySelector(".b3-board-columns");if(n){let s=n.getBoundingClientRect();n.scrollLeft+=r(e,s.left,s.right)}let i=this.#r?.kind==="card"?this.#N(e,this.ownerDocument.elementFromPoint(e,t))?.querySelector(".b3-board-cards"):null;if(i&&i.scrollHeight>i.clientHeight){let s=i.getBoundingClientRect();i.scrollTop+=r(t,s.top,s.bottom)}let o=this.ownerDocument.defaultView;o.scrollBy(0,r(t,0,o.innerHeight))}#p(){let e=this.#r;if(!e)return;this.#r=null,clearTimeout(e.hold),cancelAnimationFrame(e.frame??0),e.ghost?.remove(),e.node.removeAttribute("data-b3-dragging");for(let t of this.querySelectorAll("[data-b3-drop]"))t.removeAttribute("data-b3-drop")}}ur("b3-board",ci);export{ci as B3Board};
|
package/dist/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var nt=typeof HTMLElement==="function"?HTMLElement:class{};function v(t,l){if(typeof customElements>"u"||customElements.get?.(t))return;try{customElements.define(t,l)}catch(p){console.warn(`bare-v3: ${t} was not registered`,p)}}class w extends nt{#t=null;#n=null;#e=null;target(){return this}connectedCallback(){let t=this.ownerDocument;if(t.readyState==="loading"){t.addEventListener("DOMContentLoaded",()=>{if(this.isConnected)this.#r()},{once:!0});return}this.#r()}disconnectedCallback(){this.#o(),this.#e?.disconnect(),this.#e=null}#r(){if(this.#t)return;let t=this.target();if(t!==this&&!this.#e)this.#e=new MutationObserver(()=>{if(this.target()!==this.#n)this.#o(),this.#r()}),this.#e.observe(this,{childList:!0});if(!t)return;this.#t=new AbortController,this.#n=t,this.mount(t,this.#t.signal)}#o(){this.#t?.abort(),this.#t=null,this.#n=null}}function k(t,l,p={},s=[]){let u=()=>{for(let f of s)if(!t.classList.contains(f))t.classList.add(f);for(let[f,m]of Object.entries(p))if(!t.hasAttribute(f))t.setAttribute(f,m)};u();let i=new MutationObserver(u);i.observe(t,{attributes:!0,attributeFilter:["class",...Object.keys(p)]}),l.addEventListener("abort",()=>i.disconnect(),{once:!0})}function P(t,l){let p=t.ownerDocument,s=(r)=>r.closest(t.localName)===t,u=(r)=>[...r.querySelectorAll('[role="tab"]')].filter((d)=>d.closest('[role="tablist"]')===r),i=new WeakMap,f=(r,d,c)=>{if(r.getAttribute(d)!==c)r.setAttribute(d,c)};function m(r,d=!1){let c=r.closest('[role="tablist"]');if(!c||r.disabled)return;i.set(c,r);for(let h of u(c)){let e=h===r;f(h,"aria-selected",String(e)),f(h,"tabindex",e?"0":"-1");let n=h.getAttribute("aria-controls"),b=n?p.getElementById(n):null;if(b&&b.hidden===e)b.hidden=!e}if(d)r.focus({preventScroll:!0}),r.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"})}function a(){for(let r of t.querySelectorAll('[role="tablist"]')){if(!s(r))continue;let d=u(r).filter((n)=>!n.disabled),c=i.get(r),e=d.filter((n)=>n.getAttribute("aria-selected")==="true").find((n)=>n!==c)??(c&&d.includes(c)?c:d[0]);if(e)m(e)}}a();let o=new p.defaultView.MutationObserver(a);o.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-selected","tabindex","hidden"]}),l.addEventListener("abort",()=>o.disconnect(),{once:!0}),t.addEventListener("click",(r)=>{let d=r.target.closest?.('[role="tab"]'),c=d?.closest('[role="tablist"]');if(d&&c&&s(c)&&!d.disabled)m(d)},{signal:l}),t.addEventListener("keydown",(r)=>{let d=r.target.closest?.('[role="tab"]'),c=d?.closest('[role="tablist"]');if(!d||!c||!s(c))return;let h=u(c).filter((A)=>!A.disabled),e=h.indexOf(d),n=c.getAttribute("aria-orientation")==="vertical",b=p.defaultView.getComputedStyle(c).direction==="rtl",E=n?"ArrowDown":b?"ArrowLeft":"ArrowRight",g=n?"ArrowUp":b?"ArrowRight":"ArrowLeft",y;if(r.key===E)y=h[(e+1)%h.length];if(r.key===g)y=h[(e-1+h.length)%h.length];if(r.key==="Home")y=h[0];if(r.key==="End")y=h.at(-1);if(y)r.preventDefault(),m(y,!0)},{signal:l})}function N(t,l){let p=t.ownerDocument,s=p.defaultView,u=()=>s.getComputedStyle(t).direction==="rtl",i=()=>[...t.children].filter((n)=>n.getClientRects().length>0),f=(n)=>{let b=t.getBoundingClientRect(),E=n.getBoundingClientRect();return u()?b.right-E.right:E.left-b.left},m=()=>{let n=-1,b=1/0;return i().forEach((E,g)=>{let y=Math.abs(f(E));if(y<b-1)b=y,n=g}),n},a=(n)=>Math.max(0,Math.min(i().length-1,Math.trunc(n)||0)),o=()=>t.id?[...p.querySelectorAll("[data-b3-reel-to]")].filter((n)=>n.getAttribute("aria-controls")===t.id):[],r=(n=!0)=>{let b=m(),E=t.dataset.b3ReelIndex;if(b<0)delete t.dataset.b3ReelIndex;else if(E!==String(b))t.dataset.b3ReelIndex=String(b);for(let g of o()){let y=g.dataset.b3ReelTo;if(String(b)===y){if(g.getAttribute("aria-current")!=="true")g.setAttribute("aria-current","true")}else if(Number.isInteger(Number(y)))g.removeAttribute("aria-current")}if(n&&E!==void 0&&E!==String(b))t.dispatchEvent(new CustomEvent("b3-reel-change",{bubbles:!0,detail:{index:b,count:i().length}}))},d=(n,b="smooth")=>{let E=i()[a(n)];if(!E)return;let g=f(E);t.scrollBy({left:u()?-g:g,behavior:b})},c=new s.ResizeObserver(()=>r(!1));c.observe(t);let h=new s.MutationObserver(()=>r(!1));h.observe(t,{attributes:!0,attributeFilter:["data-b3-reel-index"]}),l.addEventListener("abort",()=>{c.disconnect(),h.disconnect()},{once:!0});let e=0;return t.addEventListener("scroll",()=>{s.cancelAnimationFrame(e),e=s.requestAnimationFrame(()=>r())},{signal:l}),p.addEventListener("click",(n)=>{let b=n.target.closest?.("[data-b3-reel-to]");if(!b||!t.id||b.getAttribute("aria-controls")!==t.id)return;let E=b.dataset.b3ReelTo,g=m();d(E==="next"?g+1:E==="previous"?g-1:Number(E))},{signal:l}),t.addEventListener("keydown",(n)=>{if(n.target!==t)return;let b=m(),E=u()?"ArrowLeft":"ArrowRight",g=u()?"ArrowRight":"ArrowLeft",y;if(n.key===E)y=b+1;if(n.key===g)y=b-1;if(n.key==="Home")y=0;if(n.key==="End")y=i().length-1;if(y===void 0)return;n.preventDefault(),d(y)},{signal:l}),r(!1),{get index(){return m()},get count(){return i().length},to:d}}var rt=["transform","inset-block-start","inset-block-end","max-block-size","max-inline-size","min-inline-size"];function F(t,l){let p=t.ownerDocument,s=p.defaultView,u=null,i=()=>t.querySelector(".b3-dropdown-panel");function f(a){if(!u)return;for(let[o,r,d]of u)if(r)a.style.setProperty(o,r,d);else a.style.removeProperty(o)}l.addEventListener("abort",()=>{let a=i();if(a)f(a);u=null},{once:!0});function m(){let a=i();if(!a)return;if(f(a),!t.open){u=null;return}u??=rt.map((L)=>[L,a.style.getPropertyValue(L),a.style.getPropertyPriority(L)]);let o={left:0,right:s.innerWidth,top:0,bottom:s.innerHeight};for(let L=t.parentElement;L;L=L.parentElement){let M=s.getComputedStyle(L),x=L.getBoundingClientRect(),S=L.offsetWidth?x.width/L.offsetWidth:1,R=L.offsetHeight?x.height/L.offsetHeight:1,O=x.left+L.clientLeft*S,q=x.top+L.clientTop*R;if(/^(auto|scroll|hidden|clip)$/.test(M.overflowX))o.left=Math.max(o.left,O),o.right=Math.min(o.right,O+L.clientWidth*S);if(/^(auto|scroll|hidden|clip)$/.test(M.overflowY))o.top=Math.max(o.top,q),o.bottom=Math.min(o.bottom,q+L.clientHeight*R)}let r=t.getBoundingClientRect();if(r.bottom<=o.top||r.top>=o.bottom||r.right<=o.left||r.left>=o.right){t.open=!1;return}let d=Math.max(0,o.right-o.left-16),c=a.getBoundingClientRect(),h=a.offsetWidth?c.width/a.offsetWidth:1,e=a.offsetHeight?c.height/a.offsetHeight:1;if(!(h>0&&e>0))return;if(c.width>d)a.style.minInlineSize="0",a.style.maxInlineSize=`${d/h}px`;let n=a.getBoundingClientRect(),b=n.left<o.left+8?o.left+8-n.left:n.right>o.right-8?o.right-8-n.right:0;a.style.transform=`translateX(${b/h}px)`;let E=Math.max(0,n.top-r.bottom),g=Math.max(0,o.bottom-r.bottom-E-8),y=Math.max(0,r.top-o.top-E-8),A=n.height>g&&y>g;if(a.style.maxBlockSize=`${Math.min(n.height,A?y:g)/e}px`,A)a.style.insetBlockStart="auto",a.style.insetBlockEnd="calc(100% + .5rem)"}t.addEventListener("toggle",m,{signal:l}),s.addEventListener("resize",()=>{if(t.open)m()},{signal:l}),s.addEventListener("scroll",(a)=>{if(!t.open||a.target?.nodeType&&i()?.contains(a.target))return;m()},{signal:l,capture:!0,passive:!0}),t.addEventListener("keydown",(a)=>{if(a.key!=="Escape"||a.target.closest?.("details[open]")!==t)return;t.open=!1,t.querySelector("summary")?.focus()},{signal:l}),p.addEventListener("click",(a)=>{if(t.open&&!t.contains(a.target))t.open=!1},{signal:l})}var T=new WeakMap;var ot={enter:{keyframes:[{opacity:0,transform:"translateY(12px) scale(.985)"},{opacity:1,transform:"none"}],duration:320},exit:{keyframes:[{opacity:1,transform:"none"},{opacity:0,transform:"translateY(-6px) scale(.98)"}],duration:180,easing:"cubic-bezier(.4,0,1,1)"},update:{keyframes:[{opacity:0.35},{opacity:1}],duration:180},confirm:{keyframes:[{transform:"scale(.9)"},{transform:"scale(1.08)",offset:0.5},{transform:"scale(.985)",offset:0.8},{transform:"scale(1)"}],duration:380},reveal:{keyframes:[{opacity:0,clipPath:"inset(0 0 100%)",transform:"translateY(8px)"},{opacity:1,clipPath:"inset(0)",transform:"none"}],duration:440}},H=(t)=>!!(t.ownerDocument?.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches||t.closest('[data-b3-motion="reduce"]'));function D(t,l,p){if(T.get(t)?.cancel(),!t.isConnected||!t.animate||H(t))return null;let s=t.animate(l,{easing:"cubic-bezier(.16,1,.3,1)",fill:"backwards",...p});T.set(t,s);let u=t.ownerDocument.defaultView.matchMedia("(prefers-reduced-motion: reduce)"),i=()=>{if(u.matches)s.cancel()};u.addEventListener("change",i);let f=()=>{if(u.removeEventListener("change",i),T.get(t)===s)T.delete(t)};return s.addEventListener("finish",f,{once:!0}),s.addEventListener("cancel",f,{once:!0}),s}function I(t,l="update",p={}){let s=ot[l];if(!s)throw TypeError(`Unknown motion intent: ${l}`);return D(t,s.keyframes,{duration:s.duration,easing:s.easing||"cubic-bezier(.16,1,.3,1)",delay:Math.min(200,Math.max(0,p.delay||0))})}function it(t,l="enter"){return Array.from(t,(p,s)=>I(p,l,{delay:Math.min(s*45,180)})).filter((p)=>!!p)}function st(t,l){let p=()=>{let i=new Map;for(let f of t.querySelectorAll("[data-b3-layout]")){let m=f.dataset.b3Layout;if(!m||i.has(m))throw Error("Layout motion requires unique, non-empty data-b3-layout keys");i.set(m,{element:f,rect:f.getBoundingClientRect()})}return i},s=p();for(let{element:i}of s.values())T.get(i)?.cancel();l();let u=[];for(let[i,{element:f,rect:m}]of p()){let a=s.get(i);if(!a||a.element!==f){let n=I(f,"enter");if(n)u.push(n);continue}let o=a.rect;if(!m.width||!m.height||!o.width||!o.height)continue;let r=o.x-m.x,d=o.y-m.y,c=o.width/m.width,h=o.height/m.height;if(Math.abs(r)+Math.abs(d)+Math.abs(c-1)+Math.abs(h-1)<0.01)continue;let e=D(f,[{transformOrigin:"top left",transform:`translate(${r}px,${d}px) scale(${c},${h})`},{transformOrigin:"top left",transform:"none"}],{duration:420});if(e)u.push(e)}return u}function B(t,{x:l=0,y:p=0}={}){if(!Number.isFinite(l)||!Number.isFinite(p))throw TypeError("Settle displacement must be finite");let s=Array.from({length:41},(u,i)=>{let f=i/40,m=i===40?0:Math.exp(-7*f)*(Math.cos(11*f)+0.6*Math.sin(11*f));return{offset:f,transform:`translate(${l*m}px,${p*m}px)`}});return D(t,s,{duration:460,easing:"linear"})}function V(t,{signal:l,backdrop:p}){let s=t.ownerDocument,u=s.defaultView,i={signal:l},f=null,m=null,a=null,o=!1,r=(e)=>{let n=t.getBoundingClientRect();return e.clientX<n.left||e.clientX>n.right||e.clientY<n.top||e.clientY>n.bottom},d=()=>{m=null,delete t.dataset.b3Closing},c=()=>{if(!t.open||m)return!1;if(!t.dispatchEvent(new Event("cancel",{cancelable:!0})))return!1;if(H(t)||!t.animate)return t.close(),!0;let e=u.getComputedStyle(t),n=t.matches(".b3-sheet")?"translateY(100%)":t.dataset.b3Placement==="end"?`translateX(${e.direction==="rtl"?"-":""}100%)`:"scale(.985)",b=t.animate([{transform:e.transform,opacity:1},{transform:n,opacity:0}],{duration:160,easing:"cubic-bezier(.4, 0, 1, 1)"});return m=b,t.dataset.b3Closing="",b.finished.then(()=>{if(t.open)t.close()},()=>{}).finally(()=>{if(m===b)d()}),!0},h=(e=null)=>{if(f=e,!t.open)t.showModal()};return t.addEventListener("cancel",(e)=>{if(!e.cancelable||e.defaultPrevented||!e.isTrusted||e.target!==t)return;e.preventDefault(),e.stopImmediatePropagation(),c()},{...i,capture:!0}),l.addEventListener("abort",()=>{m?.cancel(),d()},{once:!0}),t.addEventListener("pointerdown",(e)=>{o=!1,a=e.isPrimary&&e.button===0&&e.target===t&&p()&&t.matches(":modal")&&r(e)?e.pointerId:null},i),t.addEventListener("pointerup",(e)=>{let n=a;if(a=null,n!==null&&n===e.pointerId&&e.target===t&&r(e))o=!0},i),t.addEventListener("pointercancel",()=>{a=null,o=!1},i),t.addEventListener("click",(e)=>{let n=o;if(o=!1,!n||e.target!==t||!r(e))return;e.preventDefault(),e.stopImmediatePropagation(),c()},{...i,capture:!0}),t.addEventListener("close",(e)=>{if(e.target!==t)return;m?.cancel(),d();let n=f;if(f=null,n?.isConnected&&!n.disabled)n.focus()},{...i,capture:!0}),t.addEventListener("click",(e)=>{let n=e.target.closest?.("[data-b3-close]");if(n&&!n.disabled&&n.closest("dialog")===t)c()},i),s.addEventListener("click",(e)=>{let n=e.target.closest?.("[data-b3-open]");if(n&&!n.disabled&&t.id&&n.dataset.b3Open===t.id)h(n)},i),{dismiss:c,show:h}}var at=["tabindex","autofocus","data-b3-initial-focus"];function Y(t,l){let p=t.ownerDocument,s=null,u=()=>{if(!s)return;let{title:f,original:m}=s;for(let[a,o]of Object.entries(m)){let r=a==="tabindex"?"-1":"";if(f.getAttribute(a)!==r)continue;if(o===null)f.removeAttribute(a);else f.setAttribute(a,o)}s=null},i=()=>{if([...t.querySelectorAll("[autofocus]")].find((o)=>o!==s?.title))return u();let m=t.getAttribute("aria-labelledby")?.trim().split(/\s+/)[0],a=m?p.getElementById(m):null;if(!a||!t.contains(a)||s?.title===a)return;u(),s={title:a,original:Object.fromEntries(at.map((o)=>[o,a.getAttribute(o)]))},a.setAttribute("tabindex","-1"),a.setAttribute("autofocus",""),a.setAttribute("data-b3-initial-focus","")};i(),t.addEventListener("beforetoggle",(f)=>{if(f.newState==="open")i()},{signal:l}),l.addEventListener("abort",u,{once:!0})}function W(t,l,p){let s={signal:p},u=null,i=null,f=null,m=(o,r=!0)=>{let{handle:d,pointerId:c,distance:h}=o;if(u=null,delete t.dataset.b3Dragging,t.style.removeProperty("transform"),d.hasPointerCapture(c))d.releasePointerCapture(c);if(r&&h&&t.open&&!H(t)){let e=B(t,{y:h});if(!e)return;f=e,e.finished.catch(()=>{}).finally(()=>{if(f===e)f=null})}};t.addEventListener("pointerdown",(o)=>{i=null;let r=o.target.closest?.(".b3-sheet-handle");if(!r||r.closest("dialog")!==t||!t.matches(":modal"))return;if(u||!o.isPrimary||o.button!==0||t.hasAttribute("data-b3-closing"))return;f?.cancel();for(let d of t.getAnimations())d.cancel();u={handle:r,pointerId:o.pointerId,y:o.clientY,distance:0,moved:!1},t.dataset.b3Dragging="",r.setPointerCapture(o.pointerId)},s),t.addEventListener("pointermove",(o)=>{if(!u||o.pointerId!==u.pointerId)return;u.distance=Math.max(0,o.clientY-u.y),u.moved||=Math.abs(o.clientY-u.y)>6,t.style.transform=`translateY(${u.distance}px)`},s),t.addEventListener("pointerup",(o)=>{if(!u||o.pointerId!==u.pointerId)return;let r=u;if(r.moved)i={pointerId:r.pointerId,handle:r.handle};let d=Math.min(120,t.offsetHeight*0.25);if(r.moved&&r.distance>=d){let c=l();m(r,!c)}else m(r)},s);let a=(o)=>{if(u&&o.pointerId===u.pointerId)m(u)};t.addEventListener("pointercancel",a,s),t.addEventListener("lostpointercapture",a,s),t.addEventListener("click",(o)=>{let r=i;if(i=null,r&&o.detail!==0&&(o.pointerId===r.pointerId||r.handle.contains(o.target)))o.preventDefault(),o.stopImmediatePropagation()},{...s,capture:!0}),t.addEventListener("close",()=>{if(u)m(u,!1);f?.cancel()},{...s,capture:!0}),p.addEventListener("abort",()=>{if(u)m(u,!1);f?.cancel(),f=null},{once:!0})}function z(t,l){let p={signal:l},s=()=>{let e=t.querySelector('input[role="combobox"]'),n=t.querySelector('[role="listbox"]');if(!e||!n?.id||e.getAttribute("aria-controls")!==n.id)return null;return{input:e,list:n,empty:t.querySelector("[data-b3-command-empty]"),status:t.querySelector("[data-b3-command-status]")}},u=null,i=[],f=(e)=>[...e.querySelectorAll('[role="option"]')];function m(e,n=!0){let b=s();if(!b)return;u=e||null;for(let E of f(b.list))E.setAttribute("aria-selected",String(E===u));if(u){if(b.input.setAttribute("aria-activedescendant",u.id),n)u.scrollIntoView({block:"nearest"})}else b.input.removeAttribute("aria-activedescendant")}function a(){let e=s();if(!e)return;let{input:n,list:b,empty:E,status:g}=e,y=n.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean),A=f(b);for(let M of A){let x=`${M.textContent} ${M.dataset.b3Keywords||""}`.toLocaleLowerCase();M.hidden=!y.every((S)=>x.includes(S))}for(let M of b.querySelectorAll('[role="group"]'))M.hidden=![...M.querySelectorAll('[role="option"]')].some((x)=>!x.hidden);let L=A.filter((M)=>!M.hidden);if(i=L.filter((M)=>M.id&&M.getAttribute("aria-disabled")!=="true"),b.hidden=!L.length,n.setAttribute("aria-expanded",String(t.open&&!!L.length)),E)E.hidden=!!L.length;if(g)g.textContent=`${i.length} ${i.length===1?"action":"actions"} available.`;m(i[0],t.open&&!!b.parentElement?.classList.contains("b3-scroll"))}let o=()=>{if(!i.every((e)=>e.isConnected)||u&&!u.isConnected)a();return s()};function r(e){let n=o();if(!n||!e||!i.includes(e)||e.hidden||e.getAttribute("aria-disabled")==="true"||!n.list.contains(e))return;if(t.dispatchEvent(new CustomEvent("b3:command",{bubbles:!0,cancelable:!0,detail:{value:e.dataset.b3Value,item:e}})))t.close()}let d=(e)=>e.target===s()?.input;t.addEventListener("input",(e)=>{if(d(e))a()},p),t.addEventListener("keydown",(e)=>{if(!d(e)||e.isComposing||e.altKey||e.ctrlKey||e.metaKey)return;if(e.key==="ArrowDown"||e.key==="ArrowUp"){if(e.preventDefault(),o(),!i.length)return;let n=i.indexOf(u),b=e.key==="ArrowDown"?Math.min(n+1,i.length-1):Math.max(n-1,0);m(i[b])}else if(e.key==="Enter")e.preventDefault(),o(),r(u)},p);let c=(e)=>{let n=e.target.closest?.('[role="option"]');return n&&s()?.list.contains(n)?n:null};t.addEventListener("pointerdown",(e)=>{if(c(e))e.preventDefault()},p),t.addEventListener("click",(e)=>{let n=c(e);if(n)r(n)},p);let h=new MutationObserver(()=>{let e=s();if(t.open){if(e)e.input.value="";a()}else if(e)e.input.setAttribute("aria-expanded","false"),e.input.removeAttribute("aria-activedescendant")});h.observe(t,{attributes:!0,attributeFilter:["open"]}),l.addEventListener("abort",()=>h.disconnect(),{once:!0}),a()}function K(t,l){let p=t.ownerDocument;t.addEventListener("click",(s)=>{let u=s.target.closest?.("[data-b3-dismiss]"),i=u?.closest(".b3-toast");if(!u||!i||u.disabled||!t.contains(i))return;let f=i.contains(p.activeElement),m=[...t.querySelectorAll(".b3-toast")],a=m.indexOf(i),o=i.dataset.b3ReturnFocus||t.dataset.b3ReturnFocus,r=o?p.getElementById(o):null;if(i.remove(),!f)return;let d=[...m.slice(a+1),...m.slice(0,a).reverse()].flatMap((c)=>[...c.querySelectorAll("[data-b3-dismiss]")]);if(r)d.push(r);if(t.hasAttribute("tabindex"))d.push(t);for(let c of d){if(!c.isConnected||c.matches(":disabled")||c.closest("[inert]")||!c.getClientRects().length)continue;if(c.focus(),p.activeElement===c)break}},{signal:l})}function X(t,l){let p=t.ownerDocument,s=p.defaultView,u=()=>[...t.querySelectorAll('a[href^="#"]')].flatMap((r)=>{let d;try{d=decodeURIComponent(r.getAttribute("href").slice(1))}catch{return[]}let c=p.getElementById(d);if(!c)r.removeAttribute("aria-current");return c?[{link:r,heading:c}]:[]});function i(r){for(let d=r.parentElement;d&&d!==p.body;d=d.parentElement)if(d.scrollHeight>d.clientHeight+1&&/(auto|scroll)/.test(s.getComputedStyle(d).overflowY))return d;return null}let f=0;function m(){f=0;let r=u(),d=r.filter(({heading:g})=>g.getClientRects().length).sort((g,y)=>g.heading.getBoundingClientRect().top-y.heading.getBoundingClientRect().top),c=d.length?i(d[0].heading):null,h=c?c.getBoundingClientRect().top+c.clientTop:0,e=d[0];for(let g of d){let y=parseFloat(s.getComputedStyle(g.heading).scrollMarginBlockStart)||0;if(g.heading.getBoundingClientRect().top<=h+y+1)e=g}let n=c?c.scrollTop:s.scrollY,b=c?c.clientHeight:s.innerHeight,E=c?c.scrollHeight:p.documentElement.scrollHeight;if(n>0&&n+b>=E-2)e=d.at(-1);for(let g of r)if(g!==e)g.link.removeAttribute("aria-current");else if(g.link.getAttribute("aria-current")!=="location")g.link.setAttribute("aria-current","location")}let a=()=>{if(!f)f=s.requestAnimationFrame(m)};s.addEventListener("scroll",a,{signal:l,capture:!0,passive:!0}),s.addEventListener("resize",a,{signal:l}),s.addEventListener("hashchange",a,{signal:l});let o=new s.MutationObserver(a);o.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-current","href"]}),o.observe(p.body,{childList:!0,subtree:!0}),l.addEventListener("abort",()=>{s.cancelAnimationFrame(f),o.disconnect()},{once:!0}),m()}function lt(t,l){let p=t.ownerDocument||t,s=p.defaultView,u={signal:l},i=null,f=null,m=0,a=null,o=0,r=null,d=new s.MutationObserver((e)=>{if(!i.isConnected||e.some(({target:n})=>f.contains(n)&&!r.contains(n)))c()});function c(){if(!i)return;s.clearTimeout(o),d.disconnect();let e=i.dataset.b3Confirm;if(a&&e&&i.textContent===e)i.replaceChildren(...a);i.removeAttribute("data-b3-armed"),i=f=a=null,r.textContent=""}function h(e){if(!r?.isConnected)r=p.createElement("span"),r.className="b3-visually-hidden",r.setAttribute("role","status"),p.body.append(r);let n=r;i=e,m=s.performance.now(),f=e.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||e.parentElement;let b=e.dataset.b3Confirm;if(b)a=[...e.childNodes],e.replaceChildren(b);e.setAttribute("data-b3-armed",""),d.observe(t,{childList:!0,subtree:!0}),d.observe(f,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),o=s.setTimeout(c,4000),s.requestAnimationFrame(()=>{if(i===e)n.textContent=b||"Press again to confirm"})}t.addEventListener("click",(e)=>{let n=e.target.closest?.("[data-b3-confirm]");if(i&&n!==i)c();if(!n||n.disabled||!t.contains(n))return;if(n===i&&s.performance.now()-m>=350)return c();if(e.preventDefault(),e.stopImmediatePropagation(),n!==i)h(n)},{...u,capture:!0}),t.addEventListener("focusout",({target:e})=>{if(e===i)s.queueMicrotask(()=>e===i&&c())},u),t.addEventListener("keydown",(e)=>{let n=e;if(n.key==="Escape")c();else if(n.repeat&&(n.key==="Enter"||n.key===" ")&&n.target.closest?.("[data-b3-confirm]"))n.preventDefault()},{...u,capture:!0}),l?.addEventListener("abort",()=>{c(),r?.remove()},{once:!0})}var j=Symbol.for("bare-v3.confirm");function U(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let t=document;if(t[j])return;t[j]=!0,lt(document)}class G extends w{mount(t,l){P(t,l)}}class _ extends w{#t=null;get index(){return this.#t?.index??-1}set index(t){this.#t?.to(t)}get count(){return this.#t?.count??0}to(t,l){this.#t?.to(t,l)}mount(t,l){k(t,l,{tabindex:"0"},["b3-reel"]),this.#t=N(t,l),l.addEventListener("abort",()=>{this.#t=null},{once:!0})}}class J extends w{target(){return this.querySelector(":scope > details")}mount(t,l){F(t,l)}}class C extends w{#t=null;target(){return this.querySelector(":scope > dialog")}mount(t,l){this.#t=V(t,{signal:l,backdrop:()=>this.getAttribute("backdrop")==="dismiss"}),l.addEventListener("abort",()=>{this.#t=null},{once:!0})}show(t){if(this.#t)this.#t.show(t??null);else if(!this.target()?.open)this.target()?.showModal()}close(){if(this.#t)return this.#t.dismiss();return this.target()?.close(),!0}}class Q extends C{mount(t,l){super.mount(t,l),Y(t,l),W(t,()=>this.close(),l)}}class Z extends C{mount(t,l){super.mount(t,l),z(t,l)}}class tt extends w{mount(t,l){k(t,l,{},["b3-toast-region"]),K(t,l)}}class et extends w{mount(t,l){k(t,l,{role:"navigation"},["b3-toc"]),X(t,l)}}v("b3-tabs",G);v("b3-reel",_);v("b3-dropdown",J);v("b3-dialog",C);v("b3-sheet",Q);v("b3-command",Z);v("b3-toast-region",tt);v("b3-toc",et);U();export{Z as B3Command,C as B3Dialog,J as B3Dropdown,_ as B3Reel,Q as B3Sheet,G as B3Tabs,tt as B3ToastRegion,et as B3Toc,st as layout,I as motion,it as sequence,B as settle};
|
|
1
|
+
var nt=typeof HTMLElement==="function"?HTMLElement:class{};function x(t,a){if(typeof customElements>"u"||customElements.get?.(t))return;try{customElements.define(t,a)}catch(b){console.warn(`bare-v3: ${t} was not registered`,b)}}class w extends nt{#t=null;#n=null;#e=null;target(){return this}connectedCallback(){let t=this.ownerDocument;if(t.readyState==="loading"){t.addEventListener("DOMContentLoaded",()=>{if(this.isConnected)this.#r()},{once:!0});return}this.#r()}disconnectedCallback(){this.#o(),this.#e?.disconnect(),this.#e=null}#r(){if(this.#t)return;let t=this.target();if(t!==this&&!this.#e)this.#e=new MutationObserver(()=>{if(this.target()!==this.#n)this.#o(),this.#r()}),this.#e.observe(this,{childList:!0});if(!t)return;this.#t=new AbortController,this.#n=t,this.mount(t,this.#t.signal)}#o(){this.#t?.abort(),this.#t=null,this.#n=null}}function k(t,a,b={},i=[]){let l=()=>{for(let u of i)if(!t.classList.contains(u))t.classList.add(u);for(let[u,f]of Object.entries(b))if(!t.hasAttribute(u))t.setAttribute(u,f)};l();let o=new MutationObserver(l);o.observe(t,{attributes:!0,attributeFilter:["class",...Object.keys(b)]}),a.addEventListener("abort",()=>o.disconnect(),{once:!0})}function P(t,a){let b=t.ownerDocument,i=(p)=>p.closest(t.localName)===t,l=(p)=>[...p.querySelectorAll('[role="tab"]')].filter((e)=>e.closest('[role="tablist"]')===p),o=new WeakMap,u=(p,e,n)=>{if(p.getAttribute(e)!==n)p.setAttribute(e,n)},f=()=>[...t.querySelectorAll('[role="tablist"]')].filter(i);function s(p,e){o.set(p,e);for(let n of l(p))u(n,"aria-selected",String(n===e)),u(n,"tabindex",n===e?"0":"-1")}function r(){let p=new Map;for(let e of f()){let n=o.get(e);if(!n)continue;for(let d of l(e)){let E=d.getAttribute("aria-controls"),g=E?b.getElementById(E):null;if(g)p.set(g,d===n||!!p.get(g))}}for(let[e,n]of p)if(e.hidden===n)e.hidden=!n}function c(p,e=!1){let n=p.closest('[role="tablist"]');if(!n||p.disabled)return;if(s(n,p),r(),e)p.focus({preventScroll:!0}),p.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"})}function h(){for(let p of f()){let e=l(p).filter((g)=>!g.disabled),n=o.get(p),E=e.filter((g)=>g.getAttribute("aria-selected")==="true").find((g)=>g!==n)??(n&&e.includes(n)?n:e[0]);if(E)s(p,E)}r()}h();let m=new b.defaultView.MutationObserver(h);m.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-selected","tabindex","hidden"]}),a.addEventListener("abort",()=>m.disconnect(),{once:!0}),t.addEventListener("click",(p)=>{let e=p.target.closest?.('[role="tab"]'),n=e?.closest('[role="tablist"]');if(e&&n&&i(n)&&!e.disabled)c(e)},{signal:a}),t.addEventListener("keydown",(p)=>{let e=p.target.closest?.('[role="tab"]'),n=e?.closest('[role="tablist"]');if(!e||!n||!i(n))return;let d=l(n).filter((v)=>!v.disabled),E=d.indexOf(e),g=n.getAttribute("aria-orientation")==="vertical",y=b.defaultView.getComputedStyle(n).direction==="rtl",A=g?"ArrowDown":y?"ArrowLeft":"ArrowRight",L=g?"ArrowUp":y?"ArrowRight":"ArrowLeft",M;if(p.key===A)M=d[(E+1)%d.length];if(p.key===L)M=d[(E-1+d.length)%d.length];if(p.key==="Home")M=d[0];if(p.key==="End")M=d.at(-1);if(M)p.preventDefault(),c(M,!0)},{signal:a})}function N(t,a){let b=t.ownerDocument,i=b.defaultView,l=()=>i.getComputedStyle(t).direction==="rtl",o=()=>[...t.children].filter((n)=>n.getClientRects().length>0),u=(n)=>{let d=t.getBoundingClientRect(),E=n.getBoundingClientRect();return l()?d.right-E.right:E.left-d.left},f=()=>{let n=-1,d=1/0;return o().forEach((E,g)=>{let y=Math.abs(u(E));if(y<d-1)d=y,n=g}),n},s=(n)=>Math.max(0,Math.min(o().length-1,Math.trunc(n)||0)),r=()=>t.id?[...b.querySelectorAll("[data-b3-reel-to]")].filter((n)=>n.getAttribute("aria-controls")===t.id):[],c=(n=!0)=>{let d=f(),E=t.dataset.b3ReelIndex;if(d<0)delete t.dataset.b3ReelIndex;else if(E!==String(d))t.dataset.b3ReelIndex=String(d);for(let g of r()){let y=g.dataset.b3ReelTo;if(String(d)===y){if(g.getAttribute("aria-current")!=="true")g.setAttribute("aria-current","true")}else if(Number.isInteger(Number(y)))g.removeAttribute("aria-current")}if(n&&E!==void 0&&E!==String(d))t.dispatchEvent(new CustomEvent("b3-reel-change",{bubbles:!0,detail:{index:d,count:o().length}}))},h=(n,d="smooth")=>{let E=o()[s(n)];if(!E)return;let g=u(E);t.scrollBy({left:l()?-g:g,behavior:d})},m=new i.ResizeObserver(()=>c(!1));m.observe(t);let p=new i.MutationObserver(()=>c(!1));p.observe(t,{attributes:!0,attributeFilter:["data-b3-reel-index"]}),a.addEventListener("abort",()=>{m.disconnect(),p.disconnect()},{once:!0});let e=0;return t.addEventListener("scroll",()=>{i.cancelAnimationFrame(e),e=i.requestAnimationFrame(()=>c())},{signal:a}),b.addEventListener("click",(n)=>{let d=n.target.closest?.("[data-b3-reel-to]");if(!d||!t.id||d.getAttribute("aria-controls")!==t.id)return;let E=d.dataset.b3ReelTo,g=f();h(E==="next"?g+1:E==="previous"?g-1:Number(E))},{signal:a}),t.addEventListener("keydown",(n)=>{if(n.target!==t)return;let d=f(),E=l()?"ArrowLeft":"ArrowRight",g=l()?"ArrowRight":"ArrowLeft",y;if(n.key===E)y=d+1;if(n.key===g)y=d-1;if(n.key==="Home")y=0;if(n.key==="End")y=o().length-1;if(y===void 0)return;n.preventDefault(),h(y)},{signal:a}),c(!1),{get index(){return f()},get count(){return o().length},to:h}}var rt=["transform","inset-block-start","inset-block-end","max-block-size","max-inline-size","min-inline-size"];function F(t,a){let b=t.ownerDocument,i=b.defaultView,l=null,o=()=>t.querySelector(".b3-dropdown-panel");function u(s){if(!l)return;for(let[r,c,h]of l)if(c)s.style.setProperty(r,c,h);else s.style.removeProperty(r)}a.addEventListener("abort",()=>{let s=o();if(s)u(s);l=null},{once:!0});function f(){let s=o();if(!s)return;if(u(s),!t.open){l=null;return}l??=rt.map((L)=>[L,s.style.getPropertyValue(L),s.style.getPropertyPriority(L)]);let r={left:0,right:i.innerWidth,top:0,bottom:i.innerHeight};for(let L=t.parentElement;L;L=L.parentElement){let M=i.getComputedStyle(L),v=L.getBoundingClientRect(),S=L.offsetWidth?v.width/L.offsetWidth:1,R=L.offsetHeight?v.height/L.offsetHeight:1,O=v.left+L.clientLeft*S,q=v.top+L.clientTop*R;if(/^(auto|scroll|hidden|clip)$/.test(M.overflowX))r.left=Math.max(r.left,O),r.right=Math.min(r.right,O+L.clientWidth*S);if(/^(auto|scroll|hidden|clip)$/.test(M.overflowY))r.top=Math.max(r.top,q),r.bottom=Math.min(r.bottom,q+L.clientHeight*R)}let c=t.getBoundingClientRect();if(c.bottom<=r.top||c.top>=r.bottom||c.right<=r.left||c.left>=r.right){t.open=!1;return}let h=Math.max(0,r.right-r.left-16),m=s.getBoundingClientRect(),p=s.offsetWidth?m.width/s.offsetWidth:1,e=s.offsetHeight?m.height/s.offsetHeight:1;if(!(p>0&&e>0))return;if(m.width>h)s.style.minInlineSize="0",s.style.maxInlineSize=`${h/p}px`;let n=s.getBoundingClientRect(),d=n.left<r.left+8?r.left+8-n.left:n.right>r.right-8?r.right-8-n.right:0;s.style.transform=`translateX(${d/p}px)`;let E=Math.max(0,n.top-c.bottom),g=Math.max(0,r.bottom-c.bottom-E-8),y=Math.max(0,c.top-r.top-E-8),A=n.height>g&&y>g;if(s.style.maxBlockSize=`${Math.min(n.height,A?y:g)/e}px`,A)s.style.insetBlockStart="auto",s.style.insetBlockEnd="calc(100% + .5rem)"}t.addEventListener("toggle",f,{signal:a}),i.addEventListener("resize",()=>{if(t.open)f()},{signal:a}),i.addEventListener("scroll",(s)=>{if(!t.open||s.target?.nodeType&&o()?.contains(s.target))return;f()},{signal:a,capture:!0,passive:!0}),t.addEventListener("keydown",(s)=>{if(s.key!=="Escape"||s.target.closest?.("details[open]")!==t)return;t.open=!1,t.querySelector("summary")?.focus()},{signal:a}),b.addEventListener("click",(s)=>{if(t.open&&!t.contains(s.target))t.open=!1},{signal:a})}var T=new WeakMap;var ot={enter:{keyframes:[{opacity:0,transform:"translateY(12px) scale(.985)"},{opacity:1,transform:"none"}],duration:320},exit:{keyframes:[{opacity:1,transform:"none"},{opacity:0,transform:"translateY(-6px) scale(.98)"}],duration:180,easing:"cubic-bezier(.4,0,1,1)"},update:{keyframes:[{opacity:0.35},{opacity:1}],duration:180},confirm:{keyframes:[{transform:"scale(.9)"},{transform:"scale(1.08)",offset:0.5},{transform:"scale(.985)",offset:0.8},{transform:"scale(1)"}],duration:380},reveal:{keyframes:[{opacity:0,clipPath:"inset(0 0 100%)",transform:"translateY(8px)"},{opacity:1,clipPath:"inset(0)",transform:"none"}],duration:440}},H=(t)=>!!(t.ownerDocument?.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches||t.closest('[data-b3-motion="reduce"]'));function D(t,a,b){if(T.get(t)?.cancel(),!t.isConnected||!t.animate||H(t))return null;let i=t.animate(a,{easing:"cubic-bezier(.16,1,.3,1)",fill:"backwards",...b});T.set(t,i);let l=t.ownerDocument.defaultView.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{if(l.matches)i.cancel()};l.addEventListener("change",o);let u=()=>{if(l.removeEventListener("change",o),T.get(t)===i)T.delete(t)};return i.addEventListener("finish",u,{once:!0}),i.addEventListener("cancel",u,{once:!0}),i}function I(t,a="update",b={}){let i=ot[a];if(!i)throw TypeError(`Unknown motion intent: ${a}`);return D(t,i.keyframes,{duration:i.duration,easing:i.easing||"cubic-bezier(.16,1,.3,1)",delay:Math.min(200,Math.max(0,b.delay||0))})}function it(t,a="enter"){return Array.from(t,(b,i)=>I(b,a,{delay:Math.min(i*45,180)})).filter((b)=>!!b)}function st(t,a){let b=()=>{let o=new Map;for(let u of t.querySelectorAll("[data-b3-layout]")){let f=u.dataset.b3Layout;if(!f||o.has(f))throw Error("Layout motion requires unique, non-empty data-b3-layout keys");o.set(f,{element:u,rect:u.getBoundingClientRect()})}return o},i=b();for(let{element:o}of i.values())T.get(o)?.cancel();a();let l=[];for(let[o,{element:u,rect:f}]of b()){let s=i.get(o);if(!s||s.element!==u){let n=I(u,"enter");if(n)l.push(n);continue}let r=s.rect;if(!f.width||!f.height||!r.width||!r.height)continue;let c=r.x-f.x,h=r.y-f.y,m=r.width/f.width,p=r.height/f.height;if(Math.abs(c)+Math.abs(h)+Math.abs(m-1)+Math.abs(p-1)<0.01)continue;let e=D(u,[{transformOrigin:"top left",transform:`translate(${c}px,${h}px) scale(${m},${p})`},{transformOrigin:"top left",transform:"none"}],{duration:420});if(e)l.push(e)}return l}function B(t,{x:a=0,y:b=0}={}){if(!Number.isFinite(a)||!Number.isFinite(b))throw TypeError("Settle displacement must be finite");let i=Array.from({length:41},(l,o)=>{let u=o/40,f=o===40?0:Math.exp(-7*u)*(Math.cos(11*u)+0.6*Math.sin(11*u));return{offset:u,transform:`translate(${a*f}px,${b*f}px)`}});return D(t,i,{duration:460,easing:"linear"})}function V(t,{signal:a,backdrop:b}){let i=t.ownerDocument,l=i.defaultView,o={signal:a},u=null,f=null,s=null,r=!1,c=(e)=>{let n=t.getBoundingClientRect();return e.clientX<n.left||e.clientX>n.right||e.clientY<n.top||e.clientY>n.bottom},h=()=>{f=null,delete t.dataset.b3Closing},m=()=>{if(!t.open||f)return!1;if(!t.dispatchEvent(new Event("cancel",{cancelable:!0})))return!1;if(H(t)||!t.animate)return t.close(),!0;let e=l.getComputedStyle(t),n=t.matches(".b3-sheet")?"translateY(100%)":t.dataset.b3Placement==="end"?`translateX(${e.direction==="rtl"?"-":""}100%)`:"scale(.985)",d=t.animate([{transform:e.transform,opacity:1},{transform:n,opacity:0}],{duration:160,easing:"cubic-bezier(.4, 0, 1, 1)"});return f=d,t.dataset.b3Closing="",d.finished.then(()=>{if(t.open)t.close()},()=>{}).finally(()=>{if(f===d)h()}),!0},p=(e=null)=>{if(u=e,!t.open)t.showModal()};return t.addEventListener("cancel",(e)=>{if(!e.cancelable||e.defaultPrevented||!e.isTrusted||e.target!==t)return;e.preventDefault(),e.stopImmediatePropagation(),m()},{...o,capture:!0}),a.addEventListener("abort",()=>{f?.cancel(),h()},{once:!0}),t.addEventListener("pointerdown",(e)=>{r=!1,s=e.isPrimary&&e.button===0&&e.target===t&&b()&&t.matches(":modal")&&c(e)?e.pointerId:null},o),t.addEventListener("pointerup",(e)=>{let n=s;if(s=null,n!==null&&n===e.pointerId&&e.target===t&&c(e))r=!0},o),t.addEventListener("pointercancel",()=>{s=null,r=!1},o),t.addEventListener("click",(e)=>{let n=r;if(r=!1,!n||e.target!==t||!c(e))return;e.preventDefault(),e.stopImmediatePropagation(),m()},{...o,capture:!0}),t.addEventListener("close",(e)=>{if(e.target!==t)return;f?.cancel(),h();let n=u;if(u=null,n?.isConnected&&!n.disabled)n.focus()},{...o,capture:!0}),t.addEventListener("click",(e)=>{let n=e.target.closest?.("[data-b3-close]");if(n&&!n.disabled&&n.closest("dialog")===t)m()},o),i.addEventListener("click",(e)=>{let n=e.target.closest?.("[data-b3-open]");if(n&&!n.disabled&&t.id&&n.dataset.b3Open===t.id)p(n)},o),{dismiss:m,show:p}}var at=["tabindex","autofocus","data-b3-initial-focus"];function Y(t,a){let b=t.ownerDocument,i=null,l=()=>{if(!i)return;let{title:u,original:f}=i;for(let[s,r]of Object.entries(f)){let c=s==="tabindex"?"-1":"";if(u.getAttribute(s)!==c)continue;if(r===null)u.removeAttribute(s);else u.setAttribute(s,r)}i=null},o=()=>{if([...t.querySelectorAll("[autofocus]")].find((r)=>r!==i?.title))return l();let f=t.getAttribute("aria-labelledby")?.trim().split(/\s+/)[0],s=f?b.getElementById(f):null;if(!s||!t.contains(s)||i?.title===s)return;l(),i={title:s,original:Object.fromEntries(at.map((r)=>[r,s.getAttribute(r)]))},s.setAttribute("tabindex","-1"),s.setAttribute("autofocus",""),s.setAttribute("data-b3-initial-focus","")};o(),t.addEventListener("beforetoggle",(u)=>{if(u.newState==="open")o()},{signal:a}),a.addEventListener("abort",l,{once:!0})}function W(t,a,b){let i={signal:b},l=null,o=null,u=null,f=(r,c=!0)=>{let{handle:h,pointerId:m,distance:p}=r;if(l=null,delete t.dataset.b3Dragging,t.style.removeProperty("transform"),h.hasPointerCapture(m))h.releasePointerCapture(m);if(c&&p&&t.open&&!H(t)){let e=B(t,{y:p});if(!e)return;u=e,e.finished.catch(()=>{}).finally(()=>{if(u===e)u=null})}};t.addEventListener("pointerdown",(r)=>{o=null;let c=r.target.closest?.(".b3-sheet-handle");if(!c||c.closest("dialog")!==t||!t.matches(":modal"))return;if(l||!r.isPrimary||r.button!==0||t.hasAttribute("data-b3-closing"))return;u?.cancel();for(let h of t.getAnimations())h.cancel();l={handle:c,pointerId:r.pointerId,y:r.clientY,distance:0,moved:!1},t.dataset.b3Dragging="",c.setPointerCapture(r.pointerId)},i),t.addEventListener("pointermove",(r)=>{if(!l||r.pointerId!==l.pointerId)return;l.distance=Math.max(0,r.clientY-l.y),l.moved||=Math.abs(r.clientY-l.y)>6,t.style.transform=`translateY(${l.distance}px)`},i),t.addEventListener("pointerup",(r)=>{if(!l||r.pointerId!==l.pointerId)return;let c=l;if(c.moved)o={pointerId:c.pointerId,handle:c.handle};let h=Math.min(120,t.offsetHeight*0.25);if(c.moved&&c.distance>=h){let m=a();f(c,!m)}else f(c)},i);let s=(r)=>{if(l&&r.pointerId===l.pointerId)f(l)};t.addEventListener("pointercancel",s,i),t.addEventListener("lostpointercapture",s,i),t.addEventListener("click",(r)=>{let c=o;if(o=null,c&&r.detail!==0&&(r.pointerId===c.pointerId||c.handle.contains(r.target)))r.preventDefault(),r.stopImmediatePropagation()},{...i,capture:!0}),t.addEventListener("close",()=>{if(l)f(l,!1);u?.cancel()},{...i,capture:!0}),b.addEventListener("abort",()=>{if(l)f(l,!1);u?.cancel(),u=null},{once:!0})}function z(t,a){let b={signal:a},i=()=>{let e=t.querySelector('input[role="combobox"]'),n=t.querySelector('[role="listbox"]');if(!e||!n?.id||e.getAttribute("aria-controls")!==n.id)return null;return{input:e,list:n,empty:t.querySelector("[data-b3-command-empty]"),status:t.querySelector("[data-b3-command-status]")}},l=null,o=[],u=(e)=>[...e.querySelectorAll('[role="option"]')];function f(e,n=!0){let d=i();if(!d)return;l=e||null;for(let E of u(d.list))E.setAttribute("aria-selected",String(E===l));if(l){if(d.input.setAttribute("aria-activedescendant",l.id),n)l.scrollIntoView({block:"nearest"})}else d.input.removeAttribute("aria-activedescendant")}function s(){let e=i();if(!e)return;let{input:n,list:d,empty:E,status:g}=e,y=n.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean),A=u(d);for(let M of A){let v=`${M.textContent} ${M.dataset.b3Keywords||""}`.toLocaleLowerCase();M.hidden=!y.every((S)=>v.includes(S))}for(let M of d.querySelectorAll('[role="group"]'))M.hidden=![...M.querySelectorAll('[role="option"]')].some((v)=>!v.hidden);let L=A.filter((M)=>!M.hidden);if(o=L.filter((M)=>M.id&&M.getAttribute("aria-disabled")!=="true"),d.hidden=!L.length,n.setAttribute("aria-expanded",String(t.open&&!!L.length)),E)E.hidden=!!L.length;if(g)g.textContent=`${o.length} ${o.length===1?"action":"actions"} available.`;f(o[0],t.open&&!!d.parentElement?.classList.contains("b3-scroll"))}let r=()=>{if(!o.every((e)=>e.isConnected)||l&&!l.isConnected)s();return i()};function c(e){let n=r();if(!n||!e||!o.includes(e)||e.hidden||e.getAttribute("aria-disabled")==="true"||!n.list.contains(e))return;if(t.dispatchEvent(new CustomEvent("b3:command",{bubbles:!0,cancelable:!0,detail:{value:e.dataset.b3Value,item:e}})))t.close()}let h=(e)=>e.target===i()?.input;t.addEventListener("input",(e)=>{if(h(e))s()},b),t.addEventListener("keydown",(e)=>{if(!h(e)||e.isComposing||e.altKey||e.ctrlKey||e.metaKey)return;if(e.key==="ArrowDown"||e.key==="ArrowUp"){if(e.preventDefault(),r(),!o.length)return;let n=o.indexOf(l),d=e.key==="ArrowDown"?Math.min(n+1,o.length-1):Math.max(n-1,0);f(o[d])}else if(e.key==="Enter")e.preventDefault(),r(),c(l)},b);let m=(e)=>{let n=e.target.closest?.('[role="option"]');return n&&i()?.list.contains(n)?n:null};t.addEventListener("pointerdown",(e)=>{if(m(e))e.preventDefault()},b),t.addEventListener("click",(e)=>{let n=m(e);if(n)c(n)},b);let p=new MutationObserver(()=>{let e=i();if(t.open){if(e)e.input.value="";s()}else if(e)e.input.setAttribute("aria-expanded","false"),e.input.removeAttribute("aria-activedescendant")});p.observe(t,{attributes:!0,attributeFilter:["open"]}),a.addEventListener("abort",()=>p.disconnect(),{once:!0}),s()}function K(t,a){let b=t.ownerDocument;t.addEventListener("click",(i)=>{let l=i.target.closest?.("[data-b3-dismiss]"),o=l?.closest(".b3-toast");if(!l||!o||l.disabled||!t.contains(o))return;let u=o.contains(b.activeElement),f=[...t.querySelectorAll(".b3-toast")],s=f.indexOf(o),r=o.dataset.b3ReturnFocus||t.dataset.b3ReturnFocus,c=r?b.getElementById(r):null;if(o.remove(),!u)return;let h=[...f.slice(s+1),...f.slice(0,s).reverse()].flatMap((m)=>[...m.querySelectorAll("[data-b3-dismiss]")]);if(c)h.push(c);if(t.hasAttribute("tabindex"))h.push(t);for(let m of h){if(!m.isConnected||m.matches(":disabled")||m.closest("[inert]")||!m.getClientRects().length)continue;if(m.focus(),b.activeElement===m)break}},{signal:a})}function X(t,a){let b=t.ownerDocument,i=b.defaultView,l=()=>[...t.querySelectorAll('a[href^="#"]')].flatMap((c)=>{let h;try{h=decodeURIComponent(c.getAttribute("href").slice(1))}catch{return[]}let m=b.getElementById(h);if(!m)c.removeAttribute("aria-current");return m?[{link:c,heading:m}]:[]});function o(c){for(let h=c.parentElement;h&&h!==b.body;h=h.parentElement)if(h.scrollHeight>h.clientHeight+1&&/(auto|scroll)/.test(i.getComputedStyle(h).overflowY))return h;return null}let u=0;function f(){u=0;let c=l(),h=c.filter(({heading:g})=>g.getClientRects().length).sort((g,y)=>g.heading.getBoundingClientRect().top-y.heading.getBoundingClientRect().top),m=h.length?o(h[0].heading):null,p=m?m.getBoundingClientRect().top+m.clientTop:0,e=h[0];for(let g of h){let y=parseFloat(i.getComputedStyle(g.heading).scrollMarginBlockStart)||0;if(g.heading.getBoundingClientRect().top<=p+y+1)e=g}let n=m?m.scrollTop:i.scrollY,d=m?m.clientHeight:i.innerHeight,E=m?m.scrollHeight:b.documentElement.scrollHeight;if(n>0&&n+d>=E-2)e=h.at(-1);for(let g of c)if(g!==e)g.link.removeAttribute("aria-current");else if(g.link.getAttribute("aria-current")!=="location")g.link.setAttribute("aria-current","location")}let s=()=>{if(!u)u=i.requestAnimationFrame(f)};i.addEventListener("scroll",s,{signal:a,capture:!0,passive:!0}),i.addEventListener("resize",s,{signal:a}),i.addEventListener("hashchange",s,{signal:a});let r=new i.MutationObserver(s);r.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-current","href"]}),r.observe(b.body,{childList:!0,subtree:!0}),a.addEventListener("abort",()=>{i.cancelAnimationFrame(u),r.disconnect()},{once:!0}),f()}function lt(t,a){let b=t.ownerDocument||t,i=b.defaultView,l={signal:a},o=null,u=null,f=0,s=null,r=0,c=null,h=new i.MutationObserver((e)=>{if(!o.isConnected||e.some(({target:n})=>u.contains(n)&&!c.contains(n)))m()});function m(){if(!o)return;i.clearTimeout(r),h.disconnect();let e=o.dataset.b3Confirm;if(s&&e&&o.textContent===e)o.replaceChildren(...s);o.removeAttribute("data-b3-armed"),o=u=s=null,c.textContent=""}function p(e){if(!c?.isConnected)c=b.createElement("span"),c.className="b3-visually-hidden",c.setAttribute("role","status"),b.body.append(c);let n=c;o=e,f=i.performance.now(),u=e.parentElement.closest("li, tr, article, [data-id], .b3-row, .b3-card")||e.parentElement;let d=e.dataset.b3Confirm;if(d)s=[...e.childNodes],e.replaceChildren(d);e.setAttribute("data-b3-armed",""),h.observe(t,{childList:!0,subtree:!0}),h.observe(u,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),r=i.setTimeout(m,4000),i.requestAnimationFrame(()=>{if(o===e)n.textContent=d||"Press again to confirm"})}t.addEventListener("click",(e)=>{let n=e.target.closest?.("[data-b3-confirm]");if(o&&n!==o)m();if(!n||n.disabled||!t.contains(n))return;if(n===o&&i.performance.now()-f>=350)return m();if(e.preventDefault(),e.stopImmediatePropagation(),n!==o)p(n)},{...l,capture:!0}),t.addEventListener("focusout",({target:e})=>{if(e===o)i.queueMicrotask(()=>e===o&&m())},l),t.addEventListener("keydown",(e)=>{let n=e;if(n.key==="Escape")m();else if(n.repeat&&(n.key==="Enter"||n.key===" ")&&n.target.closest?.("[data-b3-confirm]"))n.preventDefault()},{...l,capture:!0}),a?.addEventListener("abort",()=>{m(),c?.remove()},{once:!0})}var j=Symbol.for("bare-v3.confirm");function U(){if(typeof document>"u"||!document.defaultView?.MutationObserver)return;let t=document;if(t[j])return;t[j]=!0,lt(document)}class G extends w{mount(t,a){P(t,a)}}class _ extends w{#t=null;get index(){return this.#t?.index??-1}set index(t){this.#t?.to(t)}get count(){return this.#t?.count??0}to(t,a){this.#t?.to(t,a)}mount(t,a){k(t,a,{tabindex:"0"},["b3-reel"]),this.#t=N(t,a),a.addEventListener("abort",()=>{this.#t=null},{once:!0})}}class J extends w{target(){return this.querySelector(":scope > details")}mount(t,a){F(t,a)}}class C extends w{#t=null;target(){return this.querySelector(":scope > dialog")}mount(t,a){this.#t=V(t,{signal:a,backdrop:()=>this.getAttribute("backdrop")==="dismiss"}),a.addEventListener("abort",()=>{this.#t=null},{once:!0})}show(t){if(this.#t)this.#t.show(t??null);else if(!this.target()?.open)this.target()?.showModal()}close(){if(this.#t)return this.#t.dismiss();return this.target()?.close(),!0}}class Q extends C{mount(t,a){super.mount(t,a),Y(t,a),W(t,()=>this.close(),a)}}class Z extends C{mount(t,a){super.mount(t,a),z(t,a)}}class tt extends w{mount(t,a){k(t,a,{},["b3-toast-region"]),K(t,a)}}class et extends w{mount(t,a){k(t,a,{role:"navigation"},["b3-toc"]),X(t,a)}}x("b3-tabs",G);x("b3-reel",_);x("b3-dropdown",J);x("b3-dialog",C);x("b3-sheet",Q);x("b3-command",Z);x("b3-toast-region",tt);x("b3-toc",et);U();export{Z as B3Command,C as B3Dialog,J as B3Dropdown,_ as B3Reel,Q as B3Sheet,G as B3Tabs,tt as B3ToastRegion,et as B3Toc,st as layout,I as motion,it as sequence,B as settle};
|
package/dist/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.0-alpha.
|
|
2
|
+
"version": "0.1.0-alpha.85",
|
|
3
3
|
"cssSha256": "3b9a615b1efe3f2b63524bac154c1da07a0f14ca67073f906a7085a9a2196e9a",
|
|
4
4
|
"classes": [
|
|
5
5
|
"b3-accordion",
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
"b3-tab",
|
|
298
298
|
"b3-tabpanel"
|
|
299
299
|
],
|
|
300
|
-
"guidance": "Wrap the tablist and its panels in the <b3-tabs> component; it adds no box of its own. Use native buttons with role=tab, unique id, aria-controls, aria-selected and matching role=tabpanel with aria-labelledby. Inactive panels start hidden. Arrow keys, Home/End and RTL direction select and focus tabs; disabled tabs are skipped. Native Tab exits the tablist. Tabs remain in a horizontal scroller; long labels wrap within its width, and keyboard selection immediately reveals the active tab without a smooth-scroll delay.",
|
|
300
|
+
"guidance": "Wrap the tablist and its panels in the <b3-tabs> component; it adds no box of its own. Use native buttons with role=tab, unique id, aria-controls, aria-selected and matching role=tabpanel with aria-labelledby. Inactive panels start hidden. Several tabs may control one panel (All / Pinned over one list the app filters on click): it shows while any of them is selected. Arrow keys, Home/End and RTL direction select and focus tabs; disabled tabs are skipped. Native Tab exits the tablist. Tabs remain in a horizontal scroller; long labels wrap within its width, and keyboard selection immediately reveals the active tab without a smooth-scroll delay.",
|
|
301
301
|
"example": "<b3-tabs><div class=\"b3-tablist\" role=\"tablist\" aria-label=\"Project\"><button class=\"b3-tab\" id=\"tab-a\" role=\"tab\" aria-controls=\"panel-a\" aria-selected=\"true\">Summary</button><button class=\"b3-tab\" id=\"tab-b\" role=\"tab\" aria-controls=\"panel-b\" aria-selected=\"false\" tabindex=\"-1\">Activity</button></div><section class=\"b3-tabpanel\" id=\"panel-a\" role=\"tabpanel\" aria-labelledby=\"tab-a\">Summary content</section><section class=\"b3-tabpanel\" id=\"panel-b\" role=\"tabpanel\" aria-labelledby=\"tab-b\" hidden>Activity content</section></b3-tabs>"
|
|
302
302
|
},
|
|
303
303
|
{
|
package/dist/references/board.md
CHANGED
|
@@ -45,7 +45,7 @@ be set before the element is connected or the module has loaded.
|
|
|
45
45
|
`action.type` is `move`, `reorder` (a column), `add`, `remove`, `edit` (`field`: title,
|
|
46
46
|
description, name or subtask), `toggle` (a card opened or closed), `star` (`starred`: true or
|
|
47
47
|
false), `check` (a subtask), `subtask` (`op`: add, remove, or move with its new `index`) or `comment` (`op`: add or
|
|
48
|
-
remove, with the `comment` id). Every card action but `toggle` and `remove` stamps the card's `updated` (ISO, now) before
|
|
48
|
+
remove, with the `comment` id), or `undo` / `redo` (see Undo). Every card action but `toggle` and `remove` stamps the card's `updated` (ISO, now) before
|
|
49
49
|
it is reported, and `add` also its `created` — the event's `columns` carry them. A new card, column or subtask is reported once it has a name;
|
|
50
50
|
one abandoned blank never reaches the app (nor `board.columns` while it is being named). TypeScript: `document.querySelector('b3-board')` is
|
|
51
51
|
typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3-link`: `CustomEvent<BoardLinkDetail>`).
|
|
@@ -86,24 +86,38 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
86
86
|
edited stays shown, so Add card works with chips chosen.
|
|
87
87
|
- **Search**: `board.search` (or the `search` attribute) shows only cards whose title, description,
|
|
88
88
|
subtasks or tags hold every word of it — case-insensitive, any order (`#web` matches the tag). It
|
|
89
|
-
combines with the chosen labels, and counts show shown/total.
|
|
90
|
-
|
|
89
|
+
combines with the chosen labels, and counts show shown/total. With the `searchable` attribute the board has its own
|
|
90
|
+
search box at the end of the Filter row (shown for it even without labels): a magnifier that opens into the field on
|
|
91
|
+
click or `board.openSearch()` (wire the host's `/` or ⌘F to it), filters as typed, and folds back to the magnifier when
|
|
92
|
+
left empty; Escape clears it, Enter leaves it. Without `searchable` the host puts its own box where it fits (an input
|
|
93
|
+
setting `board.search` on `input`).
|
|
91
94
|
A card added while filtered or searched stays shown, even if it does not match, until the filter or
|
|
92
95
|
search changes — a new card never vanishes as it is committed.
|
|
96
|
+
- **Undo**: `board.undo()` / `board.redo()` (and ⌘Z / ⌘⇧Z, Ctrl+Z / Ctrl+Shift+Z or Ctrl+Y, with focus in the board
|
|
97
|
+
but not in a text field, which keeps its own undo) step through the person's edits, each reported as a `b3-change` of
|
|
98
|
+
type `undo` / `redo` whose `columns` are the whole board after the step — save it like any other change.
|
|
99
|
+
`canUndo` / `canRedo` tell whether there is a step (an open editor counts: undo commits it first, then undoes it).
|
|
100
|
+
Opening or closing a card is not a step, and undo leaves cards open or closed as they are. Edits of the same text
|
|
101
|
+
within a second are one step; a new edit drops the redo steps; up to 100 steps. Setting `columns` is the host's data
|
|
102
|
+
(a reload, another writer): it starts a new history, so an undo never reverts a change made elsewhere — except a write
|
|
103
|
+
made inside a `b3-change` handler (the host adjusting the step it was just told about), which keeps it.
|
|
93
104
|
- **Add to the default column**: `board.addCard(column?)` starts a new card at the end of `column` (an
|
|
94
105
|
id, or a name matched case-insensitively), its title editor focused and in view — as the column's +
|
|
95
106
|
does; it is reported once named. With no argument it uses `default-column` (`board.defaultColumn`, an
|
|
96
107
|
id or name), else the first column. Returns false when readonly or the column does not exist. Wire it
|
|
97
108
|
to the host's own shortcut, e.g. `default-column="TODO"` and N.
|
|
98
109
|
- **Links**: `[text](target)` and bare `http(s)://` URLs in a title, description or subtask render as
|
|
99
|
-
links, built as DOM nodes (never as HTML). Only http, https, mailto and
|
|
100
|
-
|
|
101
|
-
|
|
110
|
+
links, built as DOM nodes (never as HTML). Only http, https, mailto, paths and the schemes named in the
|
|
111
|
+
`link-schemes` attribute (e.g. `link-schemes="bare"` for `bare://…`; space or comma separated) link; any other scheme,
|
|
112
|
+
and always `javascript:`, `data:`, `vbscript:`, `file:`, `blob:` and `about:`, stays plain text, as does a target with a
|
|
113
|
+
control character, a tab or newline or a backslash. A target may hold spaces — `[Videos](~/Desktop/Blank Videos)`
|
|
114
|
+
runs to the closing `)`, or write it `[Doc](<my notes/a b.md>)` — and a trailing `"title"` is dropped. It may hold one
|
|
115
|
+
level of balanced parentheses (`Foo_(bar)`); a bare URL
|
|
102
116
|
drops trailing punctuation, a `)` only when unmatched. A path (`spec.md`, `../notes/a.md`, `/abs`) is
|
|
103
117
|
a file reference and gets a file icon. Clicking a link fires a cancelable, bubbling `b3-link`
|
|
104
118
|
event, detail `{ href, text, file, newTab, card, column, subtask? }` (`href` as written; `newTab`
|
|
105
|
-
for a Cmd/Ctrl/Shift or middle click). Not prevented, a URL opens as a normal
|
|
106
|
-
http/https) and a path does nothing: resolving and opening a file is the host's job. Editing the
|
|
119
|
+
for a Cmd/Ctrl/Shift or middle click; `file` false for a URL of any scheme). Not prevented, a URL opens as a normal
|
|
120
|
+
link (a new tab for http/https; a `link-schemes` URL in place, so the host should handle it) and a path does nothing: resolving and opening a file is the host's job. Editing the
|
|
107
121
|
text shows its raw source.
|
|
108
122
|
- **Images**: `` renders the image (at most 10rem tall), with the same target rules as a
|
|
109
123
|
link (http/https or a path; a path resolves like any relative URL on the page, so a host can serve a
|
|
@@ -128,7 +142,7 @@ typed, and a `b3-change` listener receives `CustomEvent<BoardChangeDetail>` (`b3
|
|
|
128
142
|
|
|
129
143
|
## Attributes and styling
|
|
130
144
|
|
|
131
|
-
- `search`, `default-column`: see Search and
|
|
145
|
+
- `search`, `searchable`, `default-column`, `link-schemes`: see Search, Add and Links above.
|
|
132
146
|
- `readonly`: no editing, adding, deleting, checking or dragging — enforced by the component, not
|
|
133
147
|
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.
|
|
134
148
|
- **Height**: unbounded, the board grows with its cards. Give it a height (e.g. `flex: 1;
|
package/dist/references/tabs.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tabbed views
|
|
2
2
|
|
|
3
|
-
Wrap the tablist and its panels in the <b3-tabs> component; it adds no box of its own. Use native buttons with role=tab, unique id, aria-controls, aria-selected and matching role=tabpanel with aria-labelledby. Inactive panels start hidden. Arrow keys, Home/End and RTL direction select and focus tabs; disabled tabs are skipped. Native Tab exits the tablist. Tabs remain in a horizontal scroller; long labels wrap within its width, and keyboard selection immediately reveals the active tab without a smooth-scroll delay.
|
|
3
|
+
Wrap the tablist and its panels in the <b3-tabs> component; it adds no box of its own. Use native buttons with role=tab, unique id, aria-controls, aria-selected and matching role=tabpanel with aria-labelledby. Inactive panels start hidden. Several tabs may control one panel (All / Pinned over one list the app filters on click): it shows while any of them is selected. Arrow keys, Home/End and RTL direction select and focus tabs; disabled tabs are skipped. Native Tab exits the tablist. Tabs remain in a horizontal scroller; long labels wrap within its width, and keyboard selection immediately reveals the active tab without a smooth-scroll delay.
|
|
4
4
|
|
|
5
5
|
Classes: b3-tablist, b3-tab, b3-tabpanel
|
|
6
6
|
|