ChatGPT-Next-Web/templates/assets/dist/main.iife.js

6 lines
53 KiB
JavaScript

var main=function(N){"use strict";const uo="",fo="";var Ne=!1,Ie=!1,H=[],Me=-1;function Gr(e){Qr(e)}function Qr(e){H.includes(e)||H.push(e),Zr()}function Ct(e){let t=H.indexOf(e);t!==-1&&t>Me&&H.splice(t,1)}function Zr(){!Ie&&!Ne&&(Ne=!0,queueMicrotask(Xr))}function Xr(){Ne=!1,Ie=!0;for(let e=0;e<H.length;e++)H[e](),Me=e;H.length=0,Me=-1,Ie=!1}var z,U,Q,Et,ke=!0;function en(e){ke=!1,e(),ke=!0}function tn(e){z=e.reactive,Q=e.release,U=t=>e.effect(t,{scheduler:r=>{ke?Gr(r):r()}}),Et=e.raw}function At(e){U=e}function rn(e){let t=()=>{};return[i=>{let n=U(i);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(n),t=()=>{n!==void 0&&(e._x_effects.delete(n),Q(n))},n},()=>{t()}]}var Ot=[],Tt=[],Lt=[];function nn(e){Lt.push(e)}function Nt(e,t){typeof t=="function"?(e._x_cleanups||(e._x_cleanups=[]),e._x_cleanups.push(t)):(t=e,Tt.push(t))}function on(e){Ot.push(e)}function sn(e,t,r){e._x_attributeCleanups||(e._x_attributeCleanups={}),e._x_attributeCleanups[t]||(e._x_attributeCleanups[t]=[]),e._x_attributeCleanups[t].push(r)}function It(e,t){e._x_attributeCleanups&&Object.entries(e._x_attributeCleanups).forEach(([r,i])=>{(t===void 0||t.includes(r))&&(i.forEach(n=>n()),delete e._x_attributeCleanups[r])})}var Pe=new MutationObserver(He),je=!1;function Re(){Pe.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),je=!0}function Mt(){an(),Pe.disconnect(),je=!1}var Z=[],$e=!1;function an(){Z=Z.concat(Pe.takeRecords()),Z.length&&!$e&&($e=!0,queueMicrotask(()=>{ln(),$e=!1}))}function ln(){He(Z),Z.length=0}function C(e){if(!je)return e();Mt();let t=e();return Re(),t}var qe=!1,fe=[];function cn(){qe=!0}function un(){qe=!1,He(fe),fe=[]}function He(e){if(qe){fe=fe.concat(e);return}let t=[],r=[],i=new Map,n=new Map;for(let o=0;o<e.length;o++)if(!e[o].target._x_ignoreMutationObserver&&(e[o].type==="childList"&&(e[o].addedNodes.forEach(s=>s.nodeType===1&&t.push(s)),e[o].removedNodes.forEach(s=>s.nodeType===1&&r.push(s))),e[o].type==="attributes")){let s=e[o].target,a=e[o].attributeName,l=e[o].oldValue,c=()=>{i.has(s)||i.set(s,[]),i.get(s).push({name:a,value:s.getAttribute(a)})},u=()=>{n.has(s)||n.set(s,[]),n.get(s).push(a)};s.hasAttribute(a)&&l===null?c():s.hasAttribute(a)?(u(),c()):u()}n.forEach((o,s)=>{It(s,o)}),i.forEach((o,s)=>{Ot.forEach(a=>a(s,o))});for(let o of r)if(!t.includes(o)&&(Tt.forEach(s=>s(o)),o._x_cleanups))for(;o._x_cleanups.length;)o._x_cleanups.pop()();t.forEach(o=>{o._x_ignoreSelf=!0,o._x_ignore=!0});for(let o of t)r.includes(o)||o.isConnected&&(delete o._x_ignoreSelf,delete o._x_ignore,Lt.forEach(s=>s(o)),o._x_ignore=!0,o._x_ignoreSelf=!0);t.forEach(o=>{delete o._x_ignoreSelf,delete o._x_ignore}),t=null,r=null,i=null,n=null}function kt(e){return ee(W(e))}function X(e,t,r){return e._x_dataStack=[t,...W(r||e)],()=>{e._x_dataStack=e._x_dataStack.filter(i=>i!==t)}}function Pt(e,t){let r=e._x_dataStack[0];Object.entries(t).forEach(([i,n])=>{r[i]=n})}function W(e){return e._x_dataStack?e._x_dataStack:typeof ShadowRoot=="function"&&e instanceof ShadowRoot?W(e.host):e.parentNode?W(e.parentNode):[]}function ee(e){let t=new Proxy({},{ownKeys:()=>Array.from(new Set(e.flatMap(r=>Object.keys(r)))),has:(r,i)=>e.some(n=>n.hasOwnProperty(i)),get:(r,i)=>(e.find(n=>{if(n.hasOwnProperty(i)){let o=Object.getOwnPropertyDescriptor(n,i);if(o.get&&o.get._x_alreadyBound||o.set&&o.set._x_alreadyBound)return!0;if((o.get||o.set)&&o.enumerable){let s=o.get,a=o.set,l=o;s=s&&s.bind(t),a=a&&a.bind(t),s&&(s._x_alreadyBound=!0),a&&(a._x_alreadyBound=!0),Object.defineProperty(n,i,{...l,get:s,set:a})}return!0}return!1})||{})[i],set:(r,i,n)=>{let o=e.find(s=>s.hasOwnProperty(i));return o?o[i]=n:e[e.length-1][i]=n,!0}});return t}function jt(e){let t=i=>typeof i=="object"&&!Array.isArray(i)&&i!==null,r=(i,n="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([o,{value:s,enumerable:a}])=>{if(a===!1||s===void 0)return;let l=n===""?o:`${n}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?i[o]=s.initialize(e,l,o):t(s)&&s!==i&&!(s instanceof Element)&&r(s,l)})};return r(e)}function Rt(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(i,n,o){return e(this.initialValue,()=>fn(i,n),s=>Fe(i,n,s),n,o)}};return t(r),i=>{if(typeof i=="object"&&i!==null&&i._x_interceptor){let n=r.initialize.bind(r);r.initialize=(o,s,a)=>{let l=i.initialize(o,s,a);return r.initialValue=l,n(o,s,a)}}else r.initialValue=i;return r}}function fn(e,t){return t.split(".").reduce((r,i)=>r[i],e)}function Fe(e,t,r){if(typeof t=="string"&&(t=t.split(".")),t.length===1)e[t[0]]=r;else{if(t.length===0)throw error;return e[t[0]]||(e[t[0]]={}),Fe(e[t[0]],t.slice(1),r)}}var $t={};function T(e,t){$t[e]=t}function De(e,t){return Object.entries($t).forEach(([r,i])=>{Object.defineProperty(e,`$${r}`,{get(){let[n,o]=Kt(t);return n={interceptor:Rt,...n},Nt(t,o),i(t,n)},enumerable:!1})}),e}function dn(e,t,r,...i){try{return r(...i)}catch(n){te(n,e,t)}}function te(e,t,r=void 0){Object.assign(e,{el:t,expression:r}),console.warn(`Alpine Expression Error: ${e.message}
${r?'Expression: "'+r+`"
`:""}`,t),setTimeout(()=>{throw e},0)}var de=!0;function pn(e){let t=de;de=!1,e(),de=t}function V(e,t,r={}){let i;return A(e,t)(n=>i=n,r),i}function A(...e){return qt(...e)}var qt=Ht;function hn(e){qt=e}function Ht(e,t){let r={};De(r,e);let i=[r,...W(e)],n=typeof t=="function"?_n(i,t):mn(i,t,e);return dn.bind(null,e,t,n)}function _n(e,t){return(r=()=>{},{scope:i={},params:n=[]}={})=>{let o=t.apply(ee([i,...e]),n);pe(r,o)}}var Ke={};function gn(e,t){if(Ke[e])return Ke[e];let r=Object.getPrototypeOf(async function(){}).constructor,i=/^[\n\s]*if.*\(.*\)/.test(e)||/^(let|const)\s/.test(e)?`(async()=>{ ${e} })()`:e,o=(()=>{try{return new r(["__self","scope"],`with (scope) { __self.result = ${i} }; __self.finished = true; return __self.result;`)}catch(s){return te(s,t,e),Promise.resolve()}})();return Ke[e]=o,o}function mn(e,t,r){let i=gn(t,r);return(n=()=>{},{scope:o={},params:s=[]}={})=>{i.result=void 0,i.finished=!1;let a=ee([o,...e]);if(typeof i=="function"){let l=i(i,a).catch(c=>te(c,r,t));i.finished?(pe(n,i.result,a,s,r),i.result=void 0):l.then(c=>{pe(n,c,a,s,r)}).catch(c=>te(c,r,t)).finally(()=>i.result=void 0)}}}function pe(e,t,r,i,n){if(de&&typeof t=="function"){let o=t.apply(r,i);o instanceof Promise?o.then(s=>pe(e,s,r,i)).catch(s=>te(s,n,t)):e(o)}else typeof t=="object"&&t instanceof Promise?t.then(o=>e(o)):e(t)}var Be="x-";function J(e=""){return Be+e}function vn(e){Be=e}var ze={};function w(e,t){return ze[e]=t,{before(r){if(!ze[r]){console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution");return}const i=F.indexOf(r);F.splice(i>=0?i:F.indexOf("DEFAULT"),0,e)}}}function Ue(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=Ft(o);o=o.map(a=>s.find(l=>l.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),t=t.concat(o)}let i={};return t.map(Ut((o,s)=>i[o]=s)).filter(Vt).map(xn(i,r)).sort(Sn).map(o=>bn(e,o))}function Ft(e){return Array.from(e).map(Ut()).filter(t=>!Vt(t))}var We=!1,re=new Map,Dt=Symbol();function yn(e){We=!0;let t=Symbol();Dt=t,re.set(t,[]);let r=()=>{for(;re.get(t).length;)re.get(t).shift()();re.delete(t)},i=()=>{We=!1,r()};e(r),i()}function Kt(e){let t=[],r=a=>t.push(a),[i,n]=rn(e);return t.push(n),[{Alpine:ae,effect:i,cleanup:r,evaluateLater:A.bind(A,e),evaluate:V.bind(V,e)},()=>t.forEach(a=>a())]}function bn(e,t){let r=()=>{},i=ze[t.type]||r,[n,o]=Kt(e);sn(e,t.original,o);let s=()=>{e._x_ignore||e._x_ignoreSelf||(i.inline&&i.inline(e,t,n),i=i.bind(i,e,t,n),We?re.get(Dt).push(i):i())};return s.runCleanups=o,s}var Bt=(e,t)=>({name:r,value:i})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:i}),zt=e=>e;function Ut(e=()=>{}){return({name:t,value:r})=>{let{name:i,value:n}=Wt.reduce((o,s)=>s(o),{name:t,value:r});return i!==t&&e(i,t),{name:i,value:n}}}var Wt=[];function Ve(e){Wt.push(e)}function Vt({name:e}){return Jt().test(e)}var Jt=()=>new RegExp(`^${Be}([^:^.]+)\\b`);function xn(e,t){return({name:r,value:i})=>{let n=r.match(Jt()),o=r.match(/:([a-zA-Z0-9\-:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=t||e[r]||r;return{type:n?n[1]:null,value:o?o[1]:null,modifiers:s.map(l=>l.replace(".","")),expression:i,original:a}}}var Je="DEFAULT",F=["ignore","ref","data","id","bind","init","for","model","modelable","transition","show","if",Je,"teleport"];function Sn(e,t){let r=F.indexOf(e.type)===-1?Je:e.type,i=F.indexOf(t.type)===-1?Je:t.type;return F.indexOf(r)-F.indexOf(i)}function ne(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:!0,composed:!0,cancelable:!0}))}function k(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(n=>k(n,t));return}let r=!1;if(t(e,()=>r=!0),r)return;let i=e.firstElementChild;for(;i;)k(i,t),i=i.nextElementSibling}function Y(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}function wn(){document.body||Y("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),ne(document,"alpine:init"),ne(document,"alpine:initializing"),Re(),nn(t=>P(t,k)),Nt(t=>tr(t)),on((t,r)=>{Ue(t,r).forEach(i=>i())});let e=t=>!he(t.parentElement,!0);Array.from(document.querySelectorAll(Qt())).filter(e).forEach(t=>{P(t)}),ne(document,"alpine:initialized")}var Ye=[],Yt=[];function Gt(){return Ye.map(e=>e())}function Qt(){return Ye.concat(Yt).map(e=>e())}function Zt(e){Ye.push(e)}function Xt(e){Yt.push(e)}function he(e,t=!1){return _e(e,r=>{if((t?Qt():Gt()).some(n=>r.matches(n)))return!0})}function _e(e,t){if(e){if(t(e))return e;if(e._x_teleportBack&&(e=e._x_teleportBack),!!e.parentElement)return _e(e.parentElement,t)}}function Cn(e){return Gt().some(t=>e.matches(t))}var er=[];function En(e){er.push(e)}function P(e,t=k,r=()=>{}){yn(()=>{t(e,(i,n)=>{r(i,n),er.forEach(o=>o(i,n)),Ue(i,i.attributes).forEach(o=>o()),i._x_ignore&&n()})})}function tr(e){k(e,t=>It(t))}var Ge=[],Qe=!1;function Ze(e=()=>{}){return queueMicrotask(()=>{Qe||setTimeout(()=>{Xe()})}),new Promise(t=>{Ge.push(()=>{e(),t()})})}function Xe(){for(Qe=!1;Ge.length;)Ge.shift()()}function An(){Qe=!0}function et(e,t){return Array.isArray(t)?rr(e,t.join(" ")):typeof t=="object"&&t!==null?On(e,t):typeof t=="function"?et(e,t()):rr(e,t)}function rr(e,t){let r=n=>n.split(" ").filter(o=>!e.classList.contains(o)).filter(Boolean),i=n=>(e.classList.add(...n),()=>{e.classList.remove(...n)});return t=t===!0?t="":t||"",i(r(t))}function On(e,t){let r=a=>a.split(" ").filter(Boolean),i=Object.entries(t).flatMap(([a,l])=>l?r(a):!1).filter(Boolean),n=Object.entries(t).flatMap(([a,l])=>l?!1:r(a)).filter(Boolean),o=[],s=[];return n.forEach(a=>{e.classList.contains(a)&&(e.classList.remove(a),s.push(a))}),i.forEach(a=>{e.classList.contains(a)||(e.classList.add(a),o.push(a))}),()=>{s.forEach(a=>e.classList.add(a)),o.forEach(a=>e.classList.remove(a))}}function ge(e,t){return typeof t=="object"&&t!==null?Tn(e,t):Ln(e,t)}function Tn(e,t){let r={};return Object.entries(t).forEach(([i,n])=>{r[i]=e.style[i],i.startsWith("--")||(i=Nn(i)),e.style.setProperty(i,n)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{ge(e,r)}}function Ln(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function Nn(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function tt(e,t=()=>{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}w("transition",(e,{value:t,modifiers:r,expression:i},{evaluate:n})=>{typeof i=="function"&&(i=n(i)),i?In(e,i,t):Mn(e,r,t)});function In(e,t,r){nr(e,et,""),{enter:n=>{e._x_transition.enter.during=n},"enter-start":n=>{e._x_transition.enter.start=n},"enter-end":n=>{e._x_transition.enter.end=n},leave:n=>{e._x_transition.leave.during=n},"leave-start":n=>{e._x_transition.leave.start=n},"leave-end":n=>{e._x_transition.leave.end=n}}[r](t)}function Mn(e,t,r){nr(e,ge);let i=!t.includes("in")&&!t.includes("out")&&!r,n=i||t.includes("in")||["enter"].includes(r),o=i||t.includes("out")||["leave"].includes(r);t.includes("in")&&!i&&(t=t.filter((p,d)=>d<t.indexOf("out"))),t.includes("out")&&!i&&(t=t.filter((p,d)=>d>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,u=l?ie(t,"scale",95)/100:1,f=ie(t,"delay",0),h=ie(t,"origin","center"),v="opacity, transform",y=ie(t,"duration",150)/1e3,O=ie(t,"duration",75)/1e3,_="cubic-bezier(0.4, 0.0, 0.2, 1)";n&&(e._x_transition.enter.during={transformOrigin:h,transitionDelay:f,transitionProperty:v,transitionDuration:`${y}s`,transitionTimingFunction:_},e._x_transition.enter.start={opacity:c,transform:`scale(${u})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(e._x_transition.leave.during={transformOrigin:h,transitionDelay:f,transitionProperty:v,transitionDuration:`${O}s`,transitionTimingFunction:_},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:c,transform:`scale(${u})`})}function nr(e,t,r={}){e._x_transition||(e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(i=()=>{},n=()=>{}){rt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},i,n)},out(i=()=>{},n=()=>{}){rt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},i,n)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,i){const n=document.visibilityState==="visible"?requestAnimationFrame:setTimeout;let o=()=>n(r);if(t){e._x_transition&&(e._x_transition.enter||e._x_transition.leave)?e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):o():e._x_transition?e._x_transition.in(r):o();return}e._x_hidePromise=e._x_transition?new Promise((s,a)=>{e._x_transition.out(()=>{},()=>s(i)),e._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(i),queueMicrotask(()=>{let s=ir(e);s?(s._x_hideChildren||(s._x_hideChildren=[]),s._x_hideChildren.push(e)):n(()=>{let a=l=>{let c=Promise.all([l._x_hidePromise,...(l._x_hideChildren||[]).map(a)]).then(([u])=>u());return delete l._x_hidePromise,delete l._x_hideChildren,c};a(e).catch(l=>{if(!l.isFromCancelledTransition)throw l})})})};function ir(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:ir(t)}function rt(e,t,{during:r,start:i,end:n}={},o=()=>{},s=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(i).length===0&&Object.keys(n).length===0){o(),s();return}let a,l,c;kn(e,{start(){a=t(e,i)},during(){l=t(e,r)},before:o,end(){a(),c=t(e,n)},after:s,cleanup(){l(),c()}})}function kn(e,t){let r,i,n,o=tt(()=>{C(()=>{r=!0,i||t.before(),n||(t.end(),Xe()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:tt(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},C(()=>{t.start(),t.during()}),An(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;s===0&&(s=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),C(()=>{t.before()}),i=!0,requestAnimationFrame(()=>{r||(C(()=>{t.end()}),Xe(),setTimeout(e._x_transitioning.finish,s+a),n=!0)})})}function ie(e,t,r){if(e.indexOf(t)===-1)return r;const i=e[e.indexOf(t)+1];if(!i||t==="scale"&&isNaN(i))return r;if(t==="duration"){let n=i.match(/([0-9]+)ms/);if(n)return n[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[i,e[e.indexOf(t)+2]].join(" "):i}var oe=!1;function se(e,t=()=>{}){return(...r)=>oe?t(...r):e(...r)}function Pn(e){return(...t)=>oe&&e(...t)}function jn(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),oe=!0,$n(()=>{Rn(t)}),oe=!1}function Rn(e){let t=!1;P(e,(i,n)=>{k(i,(o,s)=>{if(t&&Cn(o))return s();t=!0,n(o,s)})})}function $n(e){let t=U;At((r,i)=>{let n=t(r);return Q(n),()=>{}}),e(),At(t)}function or(e,t,r,i=[]){switch(e._x_bindings||(e._x_bindings=z({})),e._x_bindings[t]=r,t=i.includes("camel")?zn(t):t,t){case"value":qn(e,r);break;case"style":Fn(e,r);break;case"class":Hn(e,r);break;default:Dn(e,t,r);break}}function qn(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=sr(e.value,t));else if(e.type==="checkbox")Number.isInteger(t)?e.value=t:!Number.isInteger(t)&&!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(r=>sr(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")Bn(e,t);else{if(e.value===t)return;e.value=t}}function Hn(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=et(e,t)}function Fn(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=ge(e,t)}function Dn(e,t,r){[null,void 0,!1].includes(r)&&Un(t)?e.removeAttribute(t):(ar(t)&&(r=t),Kn(e,t,r))}function Kn(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function Bn(e,t){const r=[].concat(t).map(i=>i+"");Array.from(e.options).forEach(i=>{i.selected=r.includes(i.value)})}function zn(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function sr(e,t){return e==t}function ar(e){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}function Un(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function Wn(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];let i=e.getAttribute(t);return i===null?typeof r=="function"?r():r:i===""?!0:ar(t)?!![t,"true"].includes(i):i}function lr(e,t){var r;return function(){var i=this,n=arguments,o=function(){r=null,e.apply(i,n)};clearTimeout(r),r=setTimeout(o,t)}}function cr(e,t){let r;return function(){let i=this,n=arguments;r||(e.apply(i,n),r=!0,setTimeout(()=>r=!1,t))}}function Vn(e){e(ae)}var D={},ur=!1;function Jn(e,t){if(ur||(D=z(D),ur=!0),t===void 0)return D[e];D[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&D[e].init(),jt(D[e])}function Yn(){return D}var fr={};function Gn(e,t){let r=typeof t!="function"?()=>t:t;e instanceof Element?dr(e,r()):fr[e]=r}function Qn(e){return Object.entries(fr).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...i)=>r(...i)}})}),e}function dr(e,t,r){let i=[];for(;i.length;)i.pop()();let n=Object.entries(t).map(([s,a])=>({name:s,value:a})),o=Ft(n);n=n.map(s=>o.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),Ue(e,n,r).map(s=>{i.push(s.runCleanups),s()})}var pr={};function Zn(e,t){pr[e]=t}function Xn(e,t){return Object.entries(pr).forEach(([r,i])=>{Object.defineProperty(e,r,{get(){return(...n)=>i.bind(t)(...n)},enumerable:!1})}),e}var ei={get reactive(){return z},get release(){return Q},get effect(){return U},get raw(){return Et},version:"3.12.0",flushAndStopDeferringMutations:un,dontAutoEvaluateFunctions:pn,disableEffectScheduling:en,startObservingMutations:Re,stopObservingMutations:Mt,setReactivityEngine:tn,closestDataStack:W,skipDuringClone:se,onlyDuringClone:Pn,addRootSelector:Zt,addInitSelector:Xt,addScopeToNode:X,deferMutations:cn,mapAttributes:Ve,evaluateLater:A,interceptInit:En,setEvaluator:hn,mergeProxies:ee,findClosest:_e,closestRoot:he,destroyTree:tr,interceptor:Rt,transition:rt,setStyles:ge,mutateDom:C,directive:w,throttle:cr,debounce:lr,evaluate:V,initTree:P,nextTick:Ze,prefixed:J,prefix:vn,plugin:Vn,magic:T,store:Jn,start:wn,clone:jn,bound:Wn,$data:kt,walk:k,data:Zn,bind:Gn},ae=ei;function ti(e,t){const r=Object.create(null),i=e.split(",");for(let n=0;n<i.length;n++)r[i[n]]=!0;return t?n=>!!r[n.toLowerCase()]:n=>!!r[n]}var ri=Object.freeze({}),hr=Object.assign,ni=Object.prototype.hasOwnProperty,me=(e,t)=>ni.call(e,t),K=Array.isArray,le=e=>_r(e)==="[object Map]",ii=e=>typeof e=="string",nt=e=>typeof e=="symbol",ve=e=>e!==null&&typeof e=="object",oi=Object.prototype.toString,_r=e=>oi.call(e),gr=e=>_r(e).slice(8,-1),it=e=>ii(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,si=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},ai=si(e=>e.charAt(0).toUpperCase()+e.slice(1)),mr=(e,t)=>e!==t&&(e===e||t===t),ot=new WeakMap,ce=[],I,B=Symbol("iterate"),st=Symbol("Map key iterate");function li(e){return e&&e._isEffect===!0}function ci(e,t=ri){li(e)&&(e=e.raw);const r=di(e,t);return t.lazy||r(),r}function ui(e){e.active&&(vr(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var fi=0;function di(e,t){const r=function(){if(!r.active)return e();if(!ce.includes(r)){vr(r);try{return hi(),ce.push(r),I=r,e()}finally{ce.pop(),yr(),I=ce[ce.length-1]}}};return r.id=fi++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function vr(e){const{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++)t[r].delete(e);t.length=0}}var G=!0,at=[];function pi(){at.push(G),G=!1}function hi(){at.push(G),G=!0}function yr(){const e=at.pop();G=e===void 0?!0:e}function L(e,t,r){if(!G||I===void 0)return;let i=ot.get(e);i||ot.set(e,i=new Map);let n=i.get(r);n||i.set(r,n=new Set),n.has(I)||(n.add(I),I.deps.push(n),I.options.onTrack&&I.options.onTrack({effect:I,target:e,type:t,key:r}))}function j(e,t,r,i,n,o){const s=ot.get(e);if(!s)return;const a=new Set,l=u=>{u&&u.forEach(f=>{(f!==I||f.allowRecurse)&&a.add(f)})};if(t==="clear")s.forEach(l);else if(r==="length"&&K(e))s.forEach((u,f)=>{(f==="length"||f>=i)&&l(u)});else switch(r!==void 0&&l(s.get(r)),t){case"add":K(e)?it(r)&&l(s.get("length")):(l(s.get(B)),le(e)&&l(s.get(st)));break;case"delete":K(e)||(l(s.get(B)),le(e)&&l(s.get(st)));break;case"set":le(e)&&l(s.get(B));break}const c=u=>{u.options.onTrigger&&u.options.onTrigger({effect:u,target:e,key:r,type:t,newValue:i,oldValue:n,oldTarget:o}),u.options.scheduler?u.options.scheduler(u):u()};a.forEach(c)}var _i=ti("__proto__,__v_isRef,__isVue"),br=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(nt)),gi=be(),mi=be(!1,!0),vi=be(!0),yi=be(!0,!0),ye={};["includes","indexOf","lastIndexOf"].forEach(e=>{const t=Array.prototype[e];ye[e]=function(...r){const i=b(this);for(let o=0,s=this.length;o<s;o++)L(i,"get",o+"");const n=t.apply(i,r);return n===-1||n===!1?t.apply(i,r.map(b)):n}}),["push","pop","shift","unshift","splice"].forEach(e=>{const t=Array.prototype[e];ye[e]=function(...r){pi();const i=t.apply(this,r);return yr(),i}});function be(e=!1,t=!1){return function(i,n,o){if(n==="__v_isReactive")return!e;if(n==="__v_isReadonly")return e;if(n==="__v_raw"&&o===(e?t?Li:jr:t?Ti:Pr).get(i))return i;const s=K(i);if(!e&&s&&me(ye,n))return Reflect.get(ye,n,o);const a=Reflect.get(i,n,o);return(nt(n)?br.has(n):_i(n))||(e||L(i,"get",n),t)?a:dt(a)?!s||!it(n)?a.value:a:ve(a)?e?Rr(a):ft(a):a}}var bi=xr(),xi=xr(!0);function xr(e=!1){return function(r,i,n,o){let s=r[i];if(!e&&(n=b(n),s=b(s),!K(r)&&dt(s)&&!dt(n)))return s.value=n,!0;const a=K(r)&&it(i)?Number(i)<r.length:me(r,i),l=Reflect.set(r,i,n,o);return r===b(o)&&(a?mr(n,s)&&j(r,"set",i,n,s):j(r,"add",i,n)),l}}function Si(e,t){const r=me(e,t),i=e[t],n=Reflect.deleteProperty(e,t);return n&&r&&j(e,"delete",t,void 0,i),n}function wi(e,t){const r=Reflect.has(e,t);return(!nt(t)||!br.has(t))&&L(e,"has",t),r}function Ci(e){return L(e,"iterate",K(e)?"length":B),Reflect.ownKeys(e)}var Sr={get:gi,set:bi,deleteProperty:Si,has:wi,ownKeys:Ci},wr={get:vi,set(e,t){return console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0},deleteProperty(e,t){return console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}};hr({},Sr,{get:mi,set:xi}),hr({},wr,{get:yi});var lt=e=>ve(e)?ft(e):e,ct=e=>ve(e)?Rr(e):e,ut=e=>e,xe=e=>Reflect.getPrototypeOf(e);function Se(e,t,r=!1,i=!1){e=e.__v_raw;const n=b(e),o=b(t);t!==o&&!r&&L(n,"get",t),!r&&L(n,"get",o);const{has:s}=xe(n),a=i?ut:r?ct:lt;if(s.call(n,t))return a(e.get(t));if(s.call(n,o))return a(e.get(o));e!==n&&e.get(t)}function we(e,t=!1){const r=this.__v_raw,i=b(r),n=b(e);return e!==n&&!t&&L(i,"has",e),!t&&L(i,"has",n),e===n?r.has(e):r.has(e)||r.has(n)}function Ce(e,t=!1){return e=e.__v_raw,!t&&L(b(e),"iterate",B),Reflect.get(e,"size",e)}function Cr(e){e=b(e);const t=b(this);return xe(t).has.call(t,e)||(t.add(e),j(t,"add",e,e)),this}function Er(e,t){t=b(t);const r=b(this),{has:i,get:n}=xe(r);let o=i.call(r,e);o?kr(r,i,e):(e=b(e),o=i.call(r,e));const s=n.call(r,e);return r.set(e,t),o?mr(t,s)&&j(r,"set",e,t,s):j(r,"add",e,t),this}function Ar(e){const t=b(this),{has:r,get:i}=xe(t);let n=r.call(t,e);n?kr(t,r,e):(e=b(e),n=r.call(t,e));const o=i?i.call(t,e):void 0,s=t.delete(e);return n&&j(t,"delete",e,void 0,o),s}function Or(){const e=b(this),t=e.size!==0,r=le(e)?new Map(e):new Set(e),i=e.clear();return t&&j(e,"clear",void 0,void 0,r),i}function Ee(e,t){return function(i,n){const o=this,s=o.__v_raw,a=b(s),l=t?ut:e?ct:lt;return!e&&L(a,"iterate",B),s.forEach((c,u)=>i.call(n,l(c),l(u),o))}}function Ae(e,t,r){return function(...i){const n=this.__v_raw,o=b(n),s=le(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=n[e](...i),u=r?ut:t?ct:lt;return!t&&L(o,"iterate",l?st:B),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:a?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function R(e){return function(...t){{const r=t[0]?`on key "${t[0]}" `:"";console.warn(`${ai(e)} operation ${r}failed: target is readonly.`,b(this))}return e==="delete"?!1:this}}var Tr={get(e){return Se(this,e)},get size(){return Ce(this)},has:we,add:Cr,set:Er,delete:Ar,clear:Or,forEach:Ee(!1,!1)},Lr={get(e){return Se(this,e,!1,!0)},get size(){return Ce(this)},has:we,add:Cr,set:Er,delete:Ar,clear:Or,forEach:Ee(!1,!0)},Nr={get(e){return Se(this,e,!0)},get size(){return Ce(this,!0)},has(e){return we.call(this,e,!0)},add:R("add"),set:R("set"),delete:R("delete"),clear:R("clear"),forEach:Ee(!0,!1)},Ir={get(e){return Se(this,e,!0,!0)},get size(){return Ce(this,!0)},has(e){return we.call(this,e,!0)},add:R("add"),set:R("set"),delete:R("delete"),clear:R("clear"),forEach:Ee(!0,!0)},Ei=["keys","values","entries",Symbol.iterator];Ei.forEach(e=>{Tr[e]=Ae(e,!1,!1),Nr[e]=Ae(e,!0,!1),Lr[e]=Ae(e,!1,!0),Ir[e]=Ae(e,!0,!0)});function Mr(e,t){const r=t?e?Ir:Lr:e?Nr:Tr;return(i,n,o)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?i:Reflect.get(me(r,n)&&n in i?r:i,n,o)}var Ai={get:Mr(!1,!1)},Oi={get:Mr(!0,!1)};function kr(e,t,r){const i=b(r);if(i!==r&&t.call(e,i)){const n=gr(e);console.warn(`Reactive ${n} contains both the raw and reactive versions of the same object${n==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Pr=new WeakMap,Ti=new WeakMap,jr=new WeakMap,Li=new WeakMap;function Ni(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ii(e){return e.__v_skip||!Object.isExtensible(e)?0:Ni(gr(e))}function ft(e){return e&&e.__v_isReadonly?e:$r(e,!1,Sr,Ai,Pr)}function Rr(e){return $r(e,!0,wr,Oi,jr)}function $r(e,t,r,i,n){if(!ve(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=n.get(e);if(o)return o;const s=Ii(e);if(s===0)return e;const a=new Proxy(e,s===2?i:r);return n.set(e,a),a}function b(e){return e&&b(e.__v_raw)||e}function dt(e){return!!(e&&e.__v_isRef===!0)}T("nextTick",()=>Ze),T("dispatch",e=>ne.bind(ne,e)),T("watch",(e,{evaluateLater:t,effect:r})=>(i,n)=>{let o=t(i),s=!0,a,l=r(()=>o(c=>{JSON.stringify(c),s?a=c:queueMicrotask(()=>{n(c,a),a=c}),s=!1}));e._x_effects.delete(l)}),T("store",Yn),T("data",e=>kt(e)),T("root",e=>he(e)),T("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=ee(Mi(e))),e._x_refs_proxy));function Mi(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var pt={};function qr(e){return pt[e]||(pt[e]=0),++pt[e]}function ki(e,t){return _e(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function Pi(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=qr(t))}T("id",e=>(t,r=null)=>{let i=ki(e,t),n=i?i._x_ids[t]:qr(t);return r?`${t}-${n}-${r}`:`${t}-${n}`}),T("el",e=>e),Hr("Focus","focus","focus"),Hr("Persist","persist","persist");function Hr(e,t,r){T(t,i=>Y(`You can't use [$${directiveName}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,i))}function ji({get:e,set:t},{get:r,set:i}){let n=!0,o,s,a=U(()=>{let l,c;n?(l=e(),i(l),c=r(),n=!1):(l=e(),c=r(),s=JSON.stringify(l),JSON.stringify(c),s!==o?(c=r(),i(l),c=l):(t(c),l=c)),o=JSON.stringify(l),JSON.stringify(c)});return()=>{Q(a)}}w("modelable",(e,{expression:t},{effect:r,evaluateLater:i,cleanup:n})=>{let o=i(t),s=()=>{let u;return o(f=>u=f),u},a=i(`${t} = __placeholder`),l=u=>a(()=>{},{scope:{__placeholder:u}}),c=s();l(c),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let u=e._x_model.get,f=e._x_model.set,h=ji({get(){return u()},set(v){f(v)}},{get(){return s()},set(v){l(v)}});n(h)})});var Ri=document.createElement("div");w("teleport",(e,{modifiers:t,expression:r},{cleanup:i})=>{e.tagName.toLowerCase()!=="template"&&Y("x-teleport can only be used on a <template> tag",e);let n=se(()=>document.querySelector(r),()=>Ri)();n||Y(`Cannot find x-teleport element for selector: "${r}"`);let o=e.content.cloneNode(!0).firstElementChild;e._x_teleport=o,o._x_teleportBack=e,e._x_forwardEvents&&e._x_forwardEvents.forEach(s=>{o.addEventListener(s,a=>{a.stopPropagation(),e.dispatchEvent(new a.constructor(a.type,a))})}),X(o,{},e),C(()=>{t.includes("prepend")?n.parentNode.insertBefore(o,n):t.includes("append")?n.parentNode.insertBefore(o,n.nextSibling):n.appendChild(o),P(o),o._x_ignore=!0}),i(()=>o.remove())});var Fr=()=>{};Fr.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=!0:e._x_ignore=!0,r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})},w("ignore",Fr),w("effect",(e,{expression:t},{effect:r})=>r(A(e,t)));function ht(e,t,r,i){let n=e,o=l=>i(l),s={},a=(l,c)=>u=>c(l,u);if(r.includes("dot")&&(t=$i(t)),r.includes("camel")&&(t=qi(t)),r.includes("passive")&&(s.passive=!0),r.includes("capture")&&(s.capture=!0),r.includes("window")&&(n=window),r.includes("document")&&(n=document),r.includes("prevent")&&(o=a(o,(l,c)=>{c.preventDefault(),l(c)})),r.includes("stop")&&(o=a(o,(l,c)=>{c.stopPropagation(),l(c)})),r.includes("self")&&(o=a(o,(l,c)=>{c.target===e&&l(c)})),(r.includes("away")||r.includes("outside"))&&(n=document,o=a(o,(l,c)=>{e.contains(c.target)||c.target.isConnected!==!1&&(e.offsetWidth<1&&e.offsetHeight<1||e._x_isShown!==!1&&l(c))})),r.includes("once")&&(o=a(o,(l,c)=>{l(c),n.removeEventListener(t,o,s)})),o=a(o,(l,c)=>{Fi(t)&&Di(c,r)||l(c)}),r.includes("debounce")){let l=r[r.indexOf("debounce")+1]||"invalid-wait",c=Oe(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=lr(o,c)}if(r.includes("throttle")){let l=r[r.indexOf("throttle")+1]||"invalid-wait",c=Oe(l.split("ms")[0])?Number(l.split("ms")[0]):250;o=cr(o,c)}return n.addEventListener(t,o,s),()=>{n.removeEventListener(t,o,s)}}function $i(e){return e.replace(/-/g,".")}function qi(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function Oe(e){return!Array.isArray(e)&&!isNaN(e)}function Hi(e){return[" ","_"].includes(e)?e:e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function Fi(e){return["keydown","keyup"].includes(e)}function Di(e,t){let r=t.filter(o=>!["window","document","prevent","stop","once","capture"].includes(o));if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Oe((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Oe((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&Dr(e.key).includes(r[0]))return!1;const n=["ctrl","shift","alt","meta","cmd","super"].filter(o=>r.includes(o));return r=r.filter(o=>!n.includes(o)),!(n.length>0&&n.filter(s=>((s==="cmd"||s==="super")&&(s="meta"),e[`${s}Key`])).length===n.length&&Dr(e.key).includes(r[0]))}function Dr(e){if(!e)return[];e=Hi(e);let t={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",equal:"=",minus:"-",underscore:"_"};return t[e]=e,Object.keys(t).map(r=>{if(t[r]===e)return r}).filter(r=>r)}w("model",(e,{modifiers:t,expression:r},{effect:i,cleanup:n})=>{let o=e;t.includes("parent")&&(o=e.parentNode);let s=A(o,r),a;typeof r=="string"?a=A(o,`${r} = __placeholder`):typeof r=="function"&&typeof r()=="string"?a=A(o,`${r()} = __placeholder`):a=()=>{};let l=()=>{let h;return s(v=>h=v),Kr(h)?h.get():h},c=h=>{let v;s(y=>v=y),Kr(v)?v.set(h):a(()=>{},{scope:{__placeholder:h}})};t.includes("fill")&&e.hasAttribute("value")&&(l()===null||l()==="")&&c(e.value),typeof r=="string"&&e.type==="radio"&&C(()=>{e.hasAttribute("name")||e.setAttribute("name",r)});var u=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let f=oe?()=>{}:ht(e,u,t,h=>{c(Ki(e,t,h,l()))});if(e._x_removeModelListeners||(e._x_removeModelListeners={}),e._x_removeModelListeners.default=f,n(()=>e._x_removeModelListeners.default()),e.form){let h=ht(e.form,"reset",[],v=>{Ze(()=>e._x_model&&e._x_model.set(e.value))});n(()=>h())}e._x_model={get(){return l()},set(h){c(h)}},e._x_forceModelUpdate=h=>{h=h===void 0?l():h,h===void 0&&typeof r=="string"&&r.match(/\./)&&(h=""),window.fromModel=!0,C(()=>or(e,"value",h)),delete window.fromModel},i(()=>{let h=l();t.includes("unintrusive")&&document.activeElement.isSameNode(e)||e._x_forceModelUpdate(h)})});function Ki(e,t,r,i){return C(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return typeof r.detail<"u"?r.detail:r.target.value;if(e.type==="checkbox")if(Array.isArray(i)){let n=t.includes("number")?_t(r.target.value):r.target.value;return r.target.checked?i.concat([n]):i.filter(o=>!Bi(o,n))}else return r.target.checked;else{if(e.tagName.toLowerCase()==="select"&&e.multiple)return t.includes("number")?Array.from(r.target.selectedOptions).map(n=>{let o=n.value||n.text;return _t(o)}):Array.from(r.target.selectedOptions).map(n=>n.value||n.text);{let n=r.target.value;return t.includes("number")?_t(n):t.includes("trim")?n.trim():n}}})}function _t(e){let t=e?parseFloat(e):null;return zi(t)?t:e}function Bi(e,t){return e==t}function zi(e){return!Array.isArray(e)&&!isNaN(e)}function Kr(e){return e!==null&&typeof e=="object"&&typeof e.get=="function"&&typeof e.set=="function"}w("cloak",e=>queueMicrotask(()=>C(()=>e.removeAttribute(J("cloak"))))),Xt(()=>`[${J("init")}]`),w("init",se((e,{expression:t},{evaluate:r})=>typeof t=="string"?!!t.trim()&&r(t,{},!1):r(t,{},!1))),w("text",(e,{expression:t},{effect:r,evaluateLater:i})=>{let n=i(t);r(()=>{n(o=>{C(()=>{e.textContent=o})})})}),w("html",(e,{expression:t},{effect:r,evaluateLater:i})=>{let n=i(t);r(()=>{n(o=>{C(()=>{e.innerHTML=o,e._x_ignoreSelf=!0,P(e),delete e._x_ignoreSelf})})})}),Ve(Bt(":",zt(J("bind:")))),w("bind",(e,{value:t,modifiers:r,expression:i,original:n},{effect:o})=>{if(!t){let a={};Qn(a),A(e,i)(c=>{dr(e,c,n)},{scope:a});return}if(t==="key")return Ui(e,i);let s=A(e,i);o(()=>s(a=>{a===void 0&&typeof i=="string"&&i.match(/\./)&&(a=""),C(()=>or(e,t,a,r))}))});function Ui(e,t){e._x_keyExpression=t}Zt(()=>`[${J("data")}]`),w("data",se((e,{expression:t},{cleanup:r})=>{t=t===""?"{}":t;let i={};De(i,e);let n={};Xn(n,i);let o=V(e,t,{scope:n});(o===void 0||o===!0)&&(o={}),De(o,e);let s=z(o);jt(s);let a=X(e,s);s.init&&V(e,s.init),r(()=>{s.destroy&&V(e,s.destroy),a()})})),w("show",(e,{modifiers:t,expression:r},{effect:i})=>{let n=A(e,r);e._x_doHide||(e._x_doHide=()=>{C(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})}),e._x_doShow||(e._x_doShow=()=>{C(()=>{e.style.length===1&&e.style.display==="none"?e.removeAttribute("style"):e.style.removeProperty("display")})});let o=()=>{e._x_doHide(),e._x_isShown=!1},s=()=>{e._x_doShow(),e._x_isShown=!0},a=()=>setTimeout(s),l=tt(f=>f?s():o(),f=>{typeof e._x_toggleAndCascadeWithTransitions=="function"?e._x_toggleAndCascadeWithTransitions(e,f,s,o):f?a():o()}),c,u=!0;i(()=>n(f=>{!u&&f===c||(t.includes("immediate")&&(f?a():o()),l(f),c=f,u=!1)}))}),w("for",(e,{expression:t},{effect:r,cleanup:i})=>{let n=Vi(t),o=A(e,n.items),s=A(e,e._x_keyExpression||"index");e._x_prevKeys=[],e._x_lookup={},r(()=>Wi(e,n,o,s)),i(()=>{Object.values(e._x_lookup).forEach(a=>a.remove()),delete e._x_prevKeys,delete e._x_lookup})});function Wi(e,t,r,i){let n=s=>typeof s=="object"&&!Array.isArray(s),o=e;r(s=>{Ji(s)&&s>=0&&(s=Array.from(Array(s).keys(),_=>_+1)),s===void 0&&(s=[]);let a=e._x_lookup,l=e._x_prevKeys,c=[],u=[];if(n(s))s=Object.entries(s).map(([_,p])=>{let d=Br(t,p,_,s);i(g=>u.push(g),{scope:{index:_,...d}}),c.push(d)});else for(let _=0;_<s.length;_++){let p=Br(t,s[_],_,s);i(d=>u.push(d),{scope:{index:_,...p}}),c.push(p)}let f=[],h=[],v=[],y=[];for(let _=0;_<l.length;_++){let p=l[_];u.indexOf(p)===-1&&v.push(p)}l=l.filter(_=>!v.includes(_));let O="template";for(let _=0;_<u.length;_++){let p=u[_],d=l.indexOf(p);if(d===-1)l.splice(_,0,p),f.push([O,_]);else if(d!==_){let g=l.splice(_,1)[0],m=l.splice(d-1,1)[0];l.splice(_,0,m),l.splice(d,0,g),h.push([g,m])}else y.push(p);O=p}for(let _=0;_<v.length;_++){let p=v[_];a[p]._x_effects&&a[p]._x_effects.forEach(Ct),a[p].remove(),a[p]=null,delete a[p]}for(let _=0;_<h.length;_++){let[p,d]=h[_],g=a[p],m=a[d],x=document.createElement("div");C(()=>{m.after(x),g.after(m),m._x_currentIfEl&&m.after(m._x_currentIfEl),x.before(g),g._x_currentIfEl&&g.after(g._x_currentIfEl),x.remove()}),Pt(m,c[u.indexOf(d)])}for(let _=0;_<f.length;_++){let[p,d]=f[_],g=p==="template"?o:a[p];g._x_currentIfEl&&(g=g._x_currentIfEl);let m=c[d],x=u[d],S=document.importNode(o.content,!0).firstElementChild;X(S,z(m),o),C(()=>{g.after(S),P(S)}),typeof x=="object"&&Y("x-for key cannot be an object, it must be a string or an integer",o),a[x]=S}for(let _=0;_<y.length;_++)Pt(a[y[_]],c[u.indexOf(y[_])]);o._x_prevKeys=u})}function Vi(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,i=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,n=e.match(i);if(!n)return;let o={};o.items=n[2].trim();let s=n[1].replace(r,"").trim(),a=s.match(t);return a?(o.item=s.replace(t,"").trim(),o.index=a[1].trim(),a[2]&&(o.collection=a[2].trim())):o.item=s,o}function Br(e,t,r,i){let n={};return/^\[.*\]$/.test(e.item)&&Array.isArray(t)?e.item.replace("[","").replace("]","").split(",").map(s=>s.trim()).forEach((s,a)=>{n[s]=t[a]}):/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t=="object"?e.item.replace("{","").replace("}","").split(",").map(s=>s.trim()).forEach(s=>{n[s]=t[s]}):n[e.item]=t,e.index&&(n[e.index]=r),e.collection&&(n[e.collection]=i),n}function Ji(e){return!Array.isArray(e)&&!isNaN(e)}function zr(){}zr.inline=(e,{expression:t},{cleanup:r})=>{let i=he(e);i._x_refs||(i._x_refs={}),i._x_refs[t]=e,r(()=>delete i._x_refs[t])},w("ref",zr),w("if",(e,{expression:t},{effect:r,cleanup:i})=>{let n=A(e,t),o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let a=e.content.cloneNode(!0).firstElementChild;return X(a,{},e),C(()=>{e.after(a),P(a)}),e._x_currentIfEl=a,e._x_undoIf=()=>{k(a,l=>{l._x_effects&&l._x_effects.forEach(Ct)}),a.remove(),delete e._x_currentIfEl},a},s=()=>{e._x_undoIf&&(e._x_undoIf(),delete e._x_undoIf)};r(()=>n(a=>{a?o():s()})),i(()=>e._x_undoIf&&e._x_undoIf())}),w("id",(e,{expression:t},{evaluate:r})=>{r(t).forEach(n=>Pi(e,n))}),Ve(Bt("@",zt(J("on:")))),w("on",se((e,{value:t,modifiers:r,expression:i},{cleanup:n})=>{let o=i?A(e,i):()=>{};e.tagName.toLowerCase()==="template"&&(e._x_forwardEvents||(e._x_forwardEvents=[]),e._x_forwardEvents.includes(t)||e._x_forwardEvents.push(t));let s=ht(e,t,r,a=>{o(()=>{},{scope:{$event:a},params:[a]})});n(()=>s())})),Te("Collapse","collapse","collapse"),Te("Intersect","intersect","intersect"),Te("Focus","trap","focus"),Te("Mask","mask","mask");function Te(e,t,r){w(t,i=>Y(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,i))}ae.setEvaluator(Ht),ae.setReactivityEngine({reactive:ft,effect:ci,release:ui,raw:b});var Yi=ae,ue=Yi,gt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mt={},Gi={get exports(){return mt},set exports(e){mt=e}},vt,Ur;function Qi(){return Ur||(Ur=1,vt={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(e){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(e){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollOffset:0}),vt}var yt,Wr;function Zi(){return Wr||(Wr=1,yt=function(e){var t=[].forEach,r=[].some,i=document.body,n,o=!0,s=" ";function a(p,d){var g=d.appendChild(c(p));if(p.children.length){var m=u(p.isCollapsed);p.children.forEach(function(x){a(x,m)}),g.appendChild(m)}}function l(p,d){var g=!1,m=u(g);if(d.forEach(function(x){a(x,m)}),n=p||n,n!==null)return n.firstChild&&n.removeChild(n.firstChild),d.length===0?n:n.appendChild(m)}function c(p){var d=document.createElement("li"),g=document.createElement("a");return e.listItemClass&&d.setAttribute("class",e.listItemClass),e.onClick&&(g.onclick=e.onClick),e.includeTitleTags&&g.setAttribute("title",p.textContent),e.includeHtml&&p.childNodes.length?t.call(p.childNodes,function(m){g.appendChild(m.cloneNode(!0))}):g.textContent=p.textContent,g.setAttribute("href",e.basePath+"#"+p.id),g.setAttribute("class",e.linkClass+s+"node-name--"+p.nodeName+s+e.extraLinkClasses),d.appendChild(g),d}function u(p){var d=e.orderedList?"ol":"ul",g=document.createElement(d),m=e.listClass+s+e.extraListClasses;return p&&(m+=s+e.collapsibleClass,m+=s+e.isCollapsedClass),g.setAttribute("class",m),g}function f(){if(e.scrollContainer&&document.querySelector(e.scrollContainer)){var p;p=document.querySelector(e.scrollContainer).scrollTop}else p=document.documentElement.scrollTop||i.scrollTop;var d=document.querySelector(e.positionFixedSelector);e.fixedSidebarOffset==="auto"&&(e.fixedSidebarOffset=n.offsetTop),p>e.fixedSidebarOffset?d.className.indexOf(e.positionFixedClass)===-1&&(d.className+=s+e.positionFixedClass):d.className=d.className.split(s+e.positionFixedClass).join("")}function h(p){var d=0;return p!==null&&(d=p.offsetTop,e.hasInnerContainers&&(d+=h(p.offsetParent))),d}function v(p){if(e.scrollContainer&&document.querySelector(e.scrollContainer)){var d;d=document.querySelector(e.scrollContainer).scrollTop}else d=document.documentElement.scrollTop||i.scrollTop;e.positionFixedSelector&&f();var g=p,m;if(o&&n!==null&&g.length>0){r.call(g,function(M,Le){if(h(M)>d+e.headingsOffset+10){var co=Le===0?Le:Le-1;return m=g[co],!0}else if(Le===g.length-1)return m=g[g.length-1],!0});var x=n.querySelector("."+e.activeLinkClass),S=n.querySelector("."+e.linkClass+".node-name--"+m.nodeName+'[href="'+e.basePath+"#"+m.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(x===S)return;var $=n.querySelectorAll("."+e.linkClass);t.call($,function(M){M.className=M.className.split(s+e.activeLinkClass).join("")});var E=n.querySelectorAll("."+e.listItemClass);t.call(E,function(M){M.className=M.className.split(s+e.activeListItemClass).join("")}),S&&S.className.indexOf(e.activeLinkClass)===-1&&(S.className+=s+e.activeLinkClass);var q=S&&S.parentNode;q&&q.className.indexOf(e.activeListItemClass)===-1&&(q.className+=s+e.activeListItemClass);var lo=n.querySelectorAll("."+e.listClass+"."+e.collapsibleClass);t.call(lo,function(M){M.className.indexOf(e.isCollapsedClass)===-1&&(M.className+=s+e.isCollapsedClass)}),S&&S.nextSibling&&S.nextSibling.className.indexOf(e.isCollapsedClass)!==-1&&(S.nextSibling.className=S.nextSibling.className.split(s+e.isCollapsedClass).join("")),y(S&&S.parentNode.parentNode)}}function y(p){return p&&p.className.indexOf(e.collapsibleClass)!==-1&&p.className.indexOf(e.isCollapsedClass)!==-1?(p.className=p.className.split(s+e.isCollapsedClass).join(""),y(p.parentNode.parentNode)):p}function O(p){var d=p.target||p.srcElement;typeof d.className!="string"||d.className.indexOf(e.linkClass)===-1||(o=!1)}function _(){o=!0}return{enableTocAnimation:_,disableTocAnimation:O,render:l,updateToc:v}}),yt}var bt,Vr;function Xi(){return Vr||(Vr=1,bt=function(t){var r=[].reduce;function i(c){return c[c.length-1]}function n(c){return+c.nodeName.toUpperCase().replace("H","")}function o(c){if(!(c instanceof window.HTMLElement))return c;if(t.ignoreHiddenElements&&(!c.offsetHeight||!c.offsetParent))return null;const u=c.getAttribute("data-heading-label")||(t.headingLabelCallback?String(t.headingLabelCallback(c.textContent)):c.textContent.trim());var f={id:c.id,children:[],nodeName:c.nodeName,headingLevel:n(c),textContent:u};return t.includeHtml&&(f.childNodes=c.childNodes),t.headingObjectCallback?t.headingObjectCallback(f,c):f}function s(c,u){for(var f=o(c),h=f.headingLevel,v=u,y=i(v),O=y?y.headingLevel:0,_=h-O;_>0&&(y=i(v),!(y&&h===y.headingLevel));)y&&y.children!==void 0&&(v=y.children),_--;return h>=t.collapseDepth&&(f.isCollapsed=!0),v.push(f),v}function a(c,u){var f=u;t.ignoreSelector&&(f=u.split(",").map(function(v){return v.trim()+":not("+t.ignoreSelector+")"}));try{return c.querySelectorAll(f)}catch{return console.warn("Headers not found with selector: "+f),null}}function l(c){return r.call(c,function(f,h){var v=o(h);return v&&s(v,f.nest),f},{nest:[]})}return{nestHeadingsArray:l,selectHeadings:a}}),bt}var xt,Jr;function eo(){return Jr||(Jr=1,xt=function(t){var r=t.tocElement||document.querySelector(t.tocSelector);if(r&&r.scrollHeight>r.clientHeight){var i=r.querySelector("."+t.activeListItemClass);i&&(r.scrollTop=i.offsetTop-t.tocScrollOffset)}}),xt}var St={},Yr;function to(){if(Yr)return St;Yr=1,St.initSmoothScrolling=e;function e(r){var i=r.duration,n=r.offset,o=location.hash?l(location.href):location.href;s();function s(){document.body.addEventListener("click",u,!1);function u(f){!a(f.target)||f.target.className.indexOf("no-smooth-scroll")>-1||f.target.href.charAt(f.target.href.length-2)==="#"&&f.target.href.charAt(f.target.href.length-1)==="!"||f.target.className.indexOf(r.linkClass)===-1||t(f.target.hash,{duration:i,offset:n,callback:function(){c(f.target.hash)}})}}function a(u){return u.tagName.toLowerCase()==="a"&&(u.hash.length>0||u.href.charAt(u.href.length-1)==="#")&&(l(u.href)===o||l(u.href)+"#"===o)}function l(u){return u.slice(0,u.lastIndexOf("#"))}function c(u){var f=document.getElementById(u.substring(1));f&&(/^(?:a|select|input|button|textarea)$/i.test(f.tagName)||(f.tabIndex=-1),f.focus())}}function t(r,i){var n=window.pageYOffset,o={duration:i.duration,offset:i.offset||0,callback:i.callback,easing:i.easing||v},s=document.querySelector('[id="'+decodeURI(r).split("#").join("")+'"]')||document.querySelector('[id="'+r.split("#").join("")+'"]'),a=typeof r=="string"?o.offset+(r?s&&s.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):r,l=typeof o.duration=="function"?o.duration(a):o.duration,c,u;requestAnimationFrame(function(y){c=y,f(y)});function f(y){u=y-c,window.scrollTo(0,o.easing(u,n,a,l)),u<l?requestAnimationFrame(f):h()}function h(){window.scrollTo(0,n+a),typeof o.callback=="function"&&o.callback()}function v(y,O,_,p){return y/=p/2,y<1?_/2*y*y+O:(y--,-_/2*(y*(y-2)-1)+O)}}return St}(function(e,t){(function(r,i){e.exports=i(r)})(typeof gt<"u"?gt:window||gt,function(r){var i=Qi(),n={},o={},s=Zi(),a=Xi(),l=eo(),c,u,f=!!r&&!!r.document&&!!r.document.querySelector&&!!r.addEventListener;if(typeof window>"u"&&!f)return;var h,v=Object.prototype.hasOwnProperty;function y(){for(var d={},g=0;g<arguments.length;g++){var m=arguments[g];for(var x in m)v.call(m,x)&&(d[x]=m[x])}return d}function O(d,g,m){g||(g=250);var x,S;return function(){var $=m||this,E=+new Date,q=arguments;x&&E<x+g?(clearTimeout(S),S=setTimeout(function(){x=E,d.apply($,q)},g)):(x=E,d.apply($,q))}}function _(d){try{return d.contentElement||document.querySelector(d.contentSelector)}catch{return console.warn("Contents element not found: "+d.contentSelector),null}}function p(d){try{return d.tocElement||document.querySelector(d.tocSelector)}catch{return console.warn("TOC element not found: "+d.tocSelector),null}}return o.destroy=function(){var d=p(n);d!==null&&(n.skipRendering||d&&(d.innerHTML=""),n.scrollContainer&&document.querySelector(n.scrollContainer)?(document.querySelector(n.scrollContainer).removeEventListener("scroll",this._scrollListener,!1),document.querySelector(n.scrollContainer).removeEventListener("resize",this._scrollListener,!1),c&&document.querySelector(n.scrollContainer).removeEventListener("click",this._clickListener,!1)):(document.removeEventListener("scroll",this._scrollListener,!1),document.removeEventListener("resize",this._scrollListener,!1),c&&document.removeEventListener("click",this._clickListener,!1)))},o.init=function(d){if(f){n=y(i,d||{}),this.options=n,this.state={},n.scrollSmooth&&(n.duration=n.scrollSmoothDuration,n.offset=n.scrollSmoothOffset,o.scrollSmooth=to().initSmoothScrolling(n)),c=s(n),u=a(n),this._buildHtml=c,this._parseContent=u,this._headingsArray=h,o.destroy();var g=_(n);if(g!==null){var m=p(n);if(m!==null&&(h=u.selectHeadings(g,n.headingSelector),h!==null)){var x=u.nestHeadingsArray(h),S=x.nest;n.skipRendering||c.render(m,S),this._scrollListener=O(function(E){c.updateToc(h),!n.disableTocScrollSync&&l(n);var q=E&&E.target&&E.target.scrollingElement&&E.target.scrollingElement.scrollTop===0;(E&&(E.eventPhase===0||E.currentTarget===null)||q)&&(c.updateToc(h),n.scrollEndCallback&&n.scrollEndCallback(E))},n.throttleTimeout),this._scrollListener(),n.scrollContainer&&document.querySelector(n.scrollContainer)?(document.querySelector(n.scrollContainer).addEventListener("scroll",this._scrollListener,!1),document.querySelector(n.scrollContainer).addEventListener("resize",this._scrollListener,!1)):(document.addEventListener("scroll",this._scrollListener,!1),document.addEventListener("resize",this._scrollListener,!1));var $=null;return this._clickListener=O(function(E){n.scrollSmooth&&c.disableTocAnimation(E),c.updateToc(h),$&&clearTimeout($),$=setTimeout(function(){c.enableTocAnimation()},n.scrollSmoothDuration)},n.throttleTimeout),n.scrollContainer&&document.querySelector(n.scrollContainer)?document.querySelector(n.scrollContainer).addEventListener("click",this._clickListener,!1):document.addEventListener("click",this._clickListener,!1),this}}}},o.refresh=function(d){o.destroy(),o.init(d||this.options)},r.tocbot=o,o})})(Gi);const ro=()=>({show:!1,timer:0,open:function(){this.timer&&window.clearTimeout(this.timer),this.show=!0},close:function(){this.timer=window.setTimeout(()=>this.show=!1,300)}}),no=()=>({colorSchemes:[{label:"暗色",value:"dark",icon:"i-gg-moon"},{label:"亮色",value:"light",icon:"i-gg-sun"},{label:"跟随系统",value:"system",icon:"i-gg-dark-mode"}],currentValue:N.currentColorScheme,get colorScheme(){return this.colorSchemes.find(e=>e.value===this.currentValue)},get nextColorScheme(){const e=this.colorSchemes.findIndex(t=>t.value===this.currentValue);return this.colorSchemes[(e+1)%this.colorSchemes.length]}}),io=()=>({upvotedNames:[],init(){this.upvotedNames=JSON.parse(localStorage.getItem("halo.upvoted.post.names")||"[]")},upvoted(e){return this.upvotedNames.includes(e)},async handleUpvote(e){if(this.upvoted(e))return;const t=new XMLHttpRequest;t.open("POST","/apis/api.halo.run/v1alpha1/trackers/upvote"),t.setRequestHeader("Content-Type","application/json"),t.onload=()=>{this.upvotedNames=[...this.upvotedNames,e],localStorage.setItem("halo.upvoted.post.names",JSON.stringify(this.upvotedNames));const r=document.querySelector('[data-upvote-post-name="'+e+'"]');if(!r)return;const i=parseInt(r.textContent||"0");r.textContent=i+1+" 点赞"},t.onerror=function(){alert("网络请求失败,请稍后再试")},t.send(JSON.stringify({group:"content.halo.run",plural:"posts",name:e}))}});window.Alpine=ue,ue.data("dropdown",ro),ue.data("colorSchemeSwitcher",no),ue.data("postUpvote",io),ue.start();const oo=()=>{const e=document.getElementById("header-menu");window.scrollY>0?e==null||e.classList.add("menu-sticky"):e==null||e.classList.remove("menu-sticky")};window.addEventListener("scroll",oo);function so(){mt.init({tocSelector:".toc",contentSelector:"#content",headingSelector:"h1, h2, h3, h4",extraListClasses:"space-y-1 dark:border-slate-500",extraLinkClasses:"group flex items-center justify-between rounded py-1 px-1.5 transition-all hover:bg-gray-100 text-sm opacity-80 dark:hover:bg-slate-700 dark:text-slate-50",activeLinkClass:"is-active-link bg-gray-100 dark:bg-slate-600",collapseDepth:6,headingsOffset:100,scrollSmooth:!0,scrollSmoothOffset:-100})}N.currentColorScheme="system";function ao(e,t){let r=e;t&&(r=localStorage.getItem("color-scheme")||e),N.currentColorScheme=r,wt(r,!1)}function wt(e,t){if(e==="system"){const r=window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.add(r?"dark":"light"),document.documentElement.classList.remove(r?"light":"dark")}else document.documentElement.classList.add(e),document.documentElement.classList.remove(e==="dark"?"light":"dark");N.currentColorScheme=e,t&&localStorage.setItem("color-scheme",e)}return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",function(){N.currentColorScheme==="system"&&wt("system",!1)}),N.generateToc=so,N.initColorScheme=ao,N.setColorScheme=wt,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),N}({});