From e5a26ff31964b5c0db60dc8da8f6c371dc739fef Mon Sep 17 00:00:00 2001 From: Alexander Opekunov Date: Wed, 18 Dec 2024 23:05:53 +0300 Subject: [PATCH 1/3] fix: #1267 1. Check Network with window.navigator.onLine before send request 2. Add Error toast to axios Unknown Error --- public/assets/app.js | 2 +- resources/js/alpine/asyncFunctions.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/public/assets/app.js b/public/assets/app.js index 4b186ad14..236506c54 100644 --- a/public/assets/app.js +++ b/public/assets/app.js @@ -6,7 +6,7 @@ ${r?'Expression: "'+r+`" -`:""}`,t),setTimeout(()=>{throw e},0)}var ta=!0;function ng(e){let t=ta;ta=!1;let r=e();return ta=t,r}function pi(e,t,r={}){let o;return jt(e,t)(s=>o=s,r),o}function jt(...e){return rg(...e)}var rg=ig;function EA(e){rg=e}function ig(e,t){let r={};Tu(r,e);let o=[r,...ji(e)],s=typeof t=="function"?SA(o,t):xA(o,t,e);return wA.bind(null,e,t,s)}function SA(e,t){return(r=()=>{},{scope:o={},params:s=[]}={})=>{let a=t.apply(Yo([o,...e]),s);ca(r,a)}}var eu={};function AA(e,t){if(eu[e])return eu[e];let r=Object.getPrototypeOf(async function(){}).constructor,o=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,a=(()=>{try{let c=new r(["__self","scope"],`with (scope) { __self.result = ${o} }; __self.finished = true; return __self.result;`);return Object.defineProperty(c,"name",{value:`[Alpine] ${e}`}),c}catch(c){return Wo(c,t,e),Promise.resolve()}})();return eu[e]=a,a}function xA(e,t,r){let o=AA(t,r);return(s=()=>{},{scope:a={},params:c=[]}={})=>{o.result=void 0,o.finished=!1;let u=Yo([a,...e]);if(typeof o=="function"){let f=o(o,u).catch(h=>Wo(h,r,t));o.finished?(ca(s,o.result,u,c,r),o.result=void 0):f.then(h=>{ca(s,h,u,c,r)}).catch(h=>Wo(h,r,t)).finally(()=>o.result=void 0)}}}function ca(e,t,r,o,s){if(ta&&typeof t=="function"){let a=t.apply(r,o);a instanceof Promise?a.then(c=>ca(e,c,r,o)).catch(c=>Wo(c,s,t)):e(a)}else typeof t=="object"&&t instanceof Promise?t.then(a=>e(a)):e(t)}var lc="x-";function eo(e=""){return lc+e}function OA(e){lc=e}var Iu={};function bt(e,t){return Iu[e]=t,{before(r){if(!Iu[r]){console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution");return}const o=di.indexOf(r);di.splice(o>=0?o:di.indexOf("DEFAULT"),0,e)}}}function uc(e,t,r){if(t=Array.from(t),e._x_virtualDirectives){let a=Object.entries(e._x_virtualDirectives).map(([u,f])=>({name:u,value:f})),c=og(a);a=a.map(u=>c.find(f=>f.name===u.name)?{name:`x-bind:${u.name}`,value:`"${u.value}"`}:u),t=t.concat(a)}let o={};return t.map(cg((a,c)=>o[a]=c)).filter(dg).map(IA(o,r)).sort(LA).map(a=>TA(e,a))}function og(e){return Array.from(e).map(cg()).filter(t=>!dg(t))}var Lu=!1,xo=new Map,sg=Symbol();function CA(e){Lu=!0;let t=Symbol();sg=t,xo.set(t,[]);let r=()=>{for(;xo.get(t).length;)xo.get(t).shift()();xo.delete(t)},o=()=>{Lu=!1,r()};e(r),o()}function ag(e){let t=[],r=u=>t.push(u),[o,s]=lA(e);return t.push(s),[{Alpine:Go,effect:o,cleanup:r,evaluateLater:jt.bind(jt,e),evaluate:pi.bind(pi,e)},()=>t.forEach(u=>u())]}function TA(e,t){let r=()=>{},o=Iu[t.type]||r,[s,a]=ag(e);Gp(e,t.original,a);let c=()=>{e._x_ignore||e._x_ignoreSelf||(o.inline&&o.inline(e,t,s),o=o.bind(o,e,t,s),Lu?xo.get(sg).push(o):o())};return c.runCleanups=a,c}var lg=(e,t)=>({name:r,value:o})=>(r.startsWith(e)&&(r=r.replace(e,t)),{name:r,value:o}),ug=e=>e;function cg(e=()=>{}){return({name:t,value:r})=>{let{name:o,value:s}=fg.reduce((a,c)=>c(a),{name:t,value:r});return o!==t&&e(o,t),{name:o,value:s}}}var fg=[];function cc(e){fg.push(e)}function dg({name:e}){return hg().test(e)}var hg=()=>new RegExp(`^${lc}([^:^.]+)\\b`);function IA(e,t){return({name:r,value:o})=>{let s=r.match(hg()),a=r.match(/:([a-zA-Z0-9\-_:]+)/),c=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],u=t||e[r]||r;return{type:s?s[1]:null,value:a?a[1]:null,modifiers:c.map(f=>f.replace(".","")),expression:o,original:u}}}var Pu="DEFAULT",di=["ignore","ref","data","id","bind","init","for","model","modelable","transition","show","if",Pu,"teleport"];function LA(e,t){let r=di.indexOf(e.type)===-1?Pu:e.type,o=di.indexOf(t.type)===-1?Pu:t.type;return di.indexOf(r)-di.indexOf(o)}var Du=[],fc=!1;function dc(e=()=>{}){return queueMicrotask(()=>{fc||setTimeout(()=>{Mu()})}),new Promise(t=>{Du.push(()=>{e(),t()})})}function Mu(){for(fc=!1;Du.length;)Du.shift()()}function PA(){fc=!0}function hc(e,t){return Array.isArray(t)?yh(e,t.join(" ")):typeof t=="object"&&t!==null?DA(e,t):typeof t=="function"?hc(e,t()):yh(e,t)}function yh(e,t){let r=s=>s.split(" ").filter(a=>!e.classList.contains(a)).filter(Boolean),o=s=>(e.classList.add(...s),()=>{e.classList.remove(...s)});return t=t===!0?t="":t||"",o(r(t))}function DA(e,t){let r=u=>u.split(" ").filter(Boolean),o=Object.entries(t).flatMap(([u,f])=>f?r(u):!1).filter(Boolean),s=Object.entries(t).flatMap(([u,f])=>f?!1:r(u)).filter(Boolean),a=[],c=[];return s.forEach(u=>{e.classList.contains(u)&&(e.classList.remove(u),c.push(u))}),o.forEach(u=>{e.classList.contains(u)||(e.classList.add(u),a.push(u))}),()=>{c.forEach(u=>e.classList.add(u)),a.forEach(u=>e.classList.remove(u))}}function Ta(e,t){return typeof t=="object"&&t!==null?MA(e,t):RA(e,t)}function MA(e,t){let r={};return Object.entries(t).forEach(([o,s])=>{r[o]=e.style[o],o.startsWith("--")||(o=NA(o)),e.style.setProperty(o,s)}),setTimeout(()=>{e.style.length===0&&e.removeAttribute("style")}),()=>{Ta(e,r)}}function RA(e,t){let r=e.getAttribute("style",t);return e.setAttribute("style",t),()=>{e.setAttribute("style",r||"")}}function NA(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ru(e,t=()=>{}){let r=!1;return function(){r?t.apply(this,arguments):(r=!0,e.apply(this,arguments))}}bt("transition",(e,{value:t,modifiers:r,expression:o},{evaluate:s})=>{typeof o=="function"&&(o=s(o)),o!==!1&&(!o||typeof o=="boolean"?kA(e,r,t):FA(e,o,t))});function FA(e,t,r){pg(e,hc,""),{enter:s=>{e._x_transition.enter.during=s},"enter-start":s=>{e._x_transition.enter.start=s},"enter-end":s=>{e._x_transition.enter.end=s},leave:s=>{e._x_transition.leave.during=s},"leave-start":s=>{e._x_transition.leave.start=s},"leave-end":s=>{e._x_transition.leave.end=s}}[r](t)}function kA(e,t,r){pg(e,Ta);let o=!t.includes("in")&&!t.includes("out")&&!r,s=o||t.includes("in")||["enter"].includes(r),a=o||t.includes("out")||["leave"].includes(r);t.includes("in")&&!o&&(t=t.filter((D,P)=>PP>t.indexOf("out")));let c=!t.includes("opacity")&&!t.includes("scale"),u=c||t.includes("opacity"),f=c||t.includes("scale"),h=u?0:1,p=f?bo(t,"scale",95)/100:1,g=bo(t,"delay",0)/1e3,m=bo(t,"origin","center"),y="opacity, transform",b=bo(t,"duration",150)/1e3,S=bo(t,"duration",75)/1e3,C="cubic-bezier(0.4, 0.0, 0.2, 1)";s&&(e._x_transition.enter.during={transformOrigin:m,transitionDelay:`${g}s`,transitionProperty:y,transitionDuration:`${b}s`,transitionTimingFunction:C},e._x_transition.enter.start={opacity:h,transform:`scale(${p})`},e._x_transition.enter.end={opacity:1,transform:"scale(1)"}),a&&(e._x_transition.leave.during={transformOrigin:m,transitionDelay:`${g}s`,transitionProperty:y,transitionDuration:`${S}s`,transitionTimingFunction:C},e._x_transition.leave.start={opacity:1,transform:"scale(1)"},e._x_transition.leave.end={opacity:h,transform:`scale(${p})`})}function pg(e,t,r={}){e._x_transition||(e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(o=()=>{},s=()=>{}){Nu(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},o,s)},out(o=()=>{},s=()=>{}){Nu(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},o,s)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,o){const s=document.visibilityState==="visible"?requestAnimationFrame:setTimeout;let a=()=>s(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):a():e._x_transition?e._x_transition.in(r):a();return}e._x_hidePromise=e._x_transition?new Promise((c,u)=>{e._x_transition.out(()=>{},()=>c(o)),e._x_transitioning.beforeCancel(()=>u({isFromCancelledTransition:!0}))}):Promise.resolve(o),queueMicrotask(()=>{let c=gg(e);c?(c._x_hideChildren||(c._x_hideChildren=[]),c._x_hideChildren.push(e)):s(()=>{let u=f=>{let h=Promise.all([f._x_hidePromise,...(f._x_hideChildren||[]).map(u)]).then(([p])=>p());return delete f._x_hidePromise,delete f._x_hideChildren,h};u(e).catch(f=>{if(!f.isFromCancelledTransition)throw f})})})};function gg(e){let t=e.parentNode;if(t)return t._x_hidePromise?t:gg(t)}function Nu(e,t,{during:r,start:o,end:s}={},a=()=>{},c=()=>{}){if(e._x_transitioning&&e._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(o).length===0&&Object.keys(s).length===0){a(),c();return}let u,f,h;$A(e,{start(){u=t(e,o)},during(){f=t(e,r)},before:a,end(){u(),h=t(e,s)},after:c,cleanup(){f(),h()}})}function $A(e,t){let r,o,s,a=Ru(()=>{At(()=>{r=!0,o||t.before(),s||(t.end(),Mu()),t.after(),e.isConnected&&t.cleanup(),delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(c){this.beforeCancels.push(c)},cancel:Ru(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();a()}),finish:a},At(()=>{t.start(),t.during()}),PA(),requestAnimationFrame(()=>{if(r)return;let c=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,u=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;c===0&&(c=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3),At(()=>{t.before()}),o=!0,requestAnimationFrame(()=>{r||(At(()=>{t.end()}),Mu(),setTimeout(e._x_transitioning.finish,c+u),s=!0)})})}function bo(e,t,r){if(e.indexOf(t)===-1)return r;const o=e[e.indexOf(t)+1];if(!o||t==="scale"&&isNaN(o))return r;if(t==="duration"||t==="delay"){let s=o.match(/([0-9]+)ms/);if(s)return s[1]}return t==="origin"&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[o,e[e.indexOf(t)+2]].join(" "):o}var qr=!1;function Ia(e,t=()=>{}){return(...r)=>qr?t(...r):e(...r)}function BA(e){return(...t)=>qr&&e(...t)}function UA(e,t){e._x_dataStack&&(t._x_dataStack=e._x_dataStack,t.setAttribute("data-has-alpine-state",!0)),qr=!0,mg(()=>{wr(t,(r,o)=>{o(r,()=>{})})}),qr=!1}var Fu=!1;function WA(e,t){t._x_dataStack||(t._x_dataStack=e._x_dataStack),qr=!0,Fu=!0,mg(()=>{HA(t)}),qr=!1,Fu=!1}function HA(e){let t=!1;wr(e,(o,s)=>{Kr(o,(a,c)=>{if(t&&cA(a))return c();t=!0,s(a,c)})})}function mg(e){let t=Qi;vh((r,o)=>{let s=t(r);return Vo(s),()=>{}}),e(),vh(t)}function jA(e){return qr?Fu?!0:e.hasAttribute("data-has-alpine-state"):!1}function vg(e,t,r,o=[]){switch(e._x_bindings||(e._x_bindings=Zi({})),e._x_bindings[t]=r,t=o.includes("camel")?JA(t):t,t){case"value":KA(e,r);break;case"style":VA(e,r);break;case"class":qA(e,r);break;case"selected":case"checked":zA(e,t,r);break;default:_g(e,t,r);break}}function KA(e,t){if(e.type==="radio")e.attributes.value===void 0&&(e.value=t),window.fromModel&&(e.checked=bh(e.value,t));else if(e.type==="checkbox")Number.isInteger(t)?e.value=t:!Array.isArray(t)&&typeof t!="boolean"&&![null,void 0].includes(t)?e.value=String(t):Array.isArray(t)?e.checked=t.some(r=>bh(r,e.value)):e.checked=!!t;else if(e.tagName==="SELECT")XA(e,t);else{if(e.value===t)return;e.value=t===void 0?"":t}}function qA(e,t){e._x_undoAddedClasses&&e._x_undoAddedClasses(),e._x_undoAddedClasses=hc(e,t)}function VA(e,t){e._x_undoAddedStyles&&e._x_undoAddedStyles(),e._x_undoAddedStyles=Ta(e,t)}function zA(e,t,r){_g(e,t,r),GA(e,t,r)}function _g(e,t,r){[null,void 0,!1].includes(r)&&ZA(t)?e.removeAttribute(t):(yg(t)&&(r=t),YA(e,t,r))}function YA(e,t,r){e.getAttribute(t)!=r&&e.setAttribute(t,r)}function GA(e,t,r){e[t]!==r&&(e[t]=r)}function XA(e,t){const r=[].concat(t).map(o=>o+"");Array.from(e.options).forEach(o=>{o.selected=r.includes(o.value)})}function JA(e){return e.toLowerCase().replace(/-(\w)/g,(t,r)=>r.toUpperCase())}function bh(e,t){return e==t}function yg(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 ZA(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function QA(e,t,r){return e._x_bindings&&e._x_bindings[t]!==void 0?e._x_bindings[t]:bg(e,t,r)}function ex(e,t,r,o=!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 s=e._x_inlineBindings[t];return s.extract=o,ng(()=>pi(e,s.expression))}return bg(e,t,r)}function bg(e,t,r){let o=e.getAttribute(t);return o===null?typeof r=="function"?r():r:o===""?!0:yg(t)?!![t,"true"].includes(o):o}function wg(e,t){var r;return function(){var o=this,s=arguments,a=function(){r=null,e.apply(o,s)};clearTimeout(r),r=setTimeout(a,t)}}function Eg(e,t){let r;return function(){let o=this,s=arguments;r||(e.apply(o,s),r=!0,setTimeout(()=>r=!1,t))}}function Sg({get:e,set:t},{get:r,set:o}){let s=!0,a,c=Qi(()=>{const u=e(),f=r();if(s)o(tu(u)),s=!1,a=JSON.stringify(u);else{const h=JSON.stringify(u);h!==a?(o(tu(u)),a=h):(t(tu(f)),a=JSON.stringify(f))}JSON.stringify(r()),JSON.stringify(e())});return()=>{Vo(c)}}function tu(e){return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}function tx(e){(Array.isArray(e)?e:[e]).forEach(r=>r(Go))}var li={},wh=!1;function nx(e,t){if(wh||(li=Zi(li),wh=!0),t===void 0)return li[e];li[e]=t,typeof t=="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init=="function"&&li[e].init(),Qp(li[e])}function rx(){return li}var Ag={};function ix(e,t){let r=typeof t!="function"?()=>t:t;return e instanceof Element?xg(e,r()):(Ag[e]=r,()=>{})}function ox(e){return Object.entries(Ag).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...o)=>r(...o)}})}),e}function xg(e,t,r){let o=[];for(;o.length;)o.pop()();let s=Object.entries(t).map(([c,u])=>({name:c,value:u})),a=og(s);return s=s.map(c=>a.find(u=>u.name===c.name)?{name:`x-bind:${c.name}`,value:`"${c.value}"`}:c),uc(e,s,r).map(c=>{o.push(c.runCleanups),c()}),()=>{for(;o.length;)o.pop()()}}var Og={};function sx(e,t){Og[e]=t}function ax(e,t){return Object.entries(Og).forEach(([r,o])=>{Object.defineProperty(e,r,{get(){return(...s)=>o.bind(t)(...s)},enumerable:!1})}),e}var lx={get reactive(){return Zi},get release(){return Vo},get effect(){return Qi},get raw(){return $p},version:"3.13.2",flushAndStopDeferringMutations:vA,dontAutoEvaluateFunctions:ng,disableEffectScheduling:sA,startObservingMutations:oc,stopObservingMutations:Jp,setReactivityEngine:aA,onAttributeRemoved:Gp,onAttributesAdded:Yp,closestDataStack:ji,skipDuringClone:Ia,onlyDuringClone:BA,addRootSelector:Hp,addInitSelector:jp,addScopeToNode:zo,deferMutations:mA,mapAttributes:cc,evaluateLater:jt,interceptInit:fA,setEvaluator:EA,mergeProxies:Yo,extractProp:ex,findClosest:Ca,onElRemoved:nc,closestRoot:Oa,destroyTree:tc,interceptor:eg,transition:Nu,setStyles:Ta,mutateDom:At,directive:bt,entangle:Sg,throttle:Eg,debounce:wg,evaluate:pi,initTree:wr,nextTick:dc,prefixed:eo,prefix:OA,plugin:tx,magic:Bn,store:nx,start:uA,clone:WA,cloneNode:UA,bound:QA,$data:Zp,walk:Kr,data:sx,bind:ix},Go=lx;function ux(e,t){const r=Object.create(null),o=e.split(",");for(let s=0;s!!r[s.toLowerCase()]:s=>!!r[s]}var cx=Object.freeze({}),fx=Object.prototype.hasOwnProperty,La=(e,t)=>fx.call(e,t),gi=Array.isArray,Po=e=>Cg(e)==="[object Map]",dx=e=>typeof e=="string",pc=e=>typeof e=="symbol",Pa=e=>e!==null&&typeof e=="object",hx=Object.prototype.toString,Cg=e=>hx.call(e),Tg=e=>Cg(e).slice(8,-1),gc=e=>dx(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,px=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},gx=px(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ig=(e,t)=>e!==t&&(e===e||t===t),ku=new WeakMap,wo=[],qn,mi=Symbol("iterate"),$u=Symbol("Map key iterate");function mx(e){return e&&e._isEffect===!0}function vx(e,t=cx){mx(e)&&(e=e.raw);const r=bx(e,t);return t.lazy||r(),r}function _x(e){e.active&&(Lg(e),e.options.onStop&&e.options.onStop(),e.active=!1)}var yx=0;function bx(e,t){const r=function(){if(!r.active)return e();if(!wo.includes(r)){Lg(r);try{return Ex(),wo.push(r),qn=r,e()}finally{wo.pop(),Pg(),qn=wo[wo.length-1]}}};return r.id=yx++,r.allowRecurse=!!t.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=e,r.deps=[],r.options=t,r}function Lg(e){const{deps:t}=e;if(t.length){for(let r=0;r{p&&p.forEach(g=>{(g!==qn||g.allowRecurse)&&u.add(g)})};if(t==="clear")c.forEach(f);else if(r==="length"&&gi(e))c.forEach((p,g)=>{(g==="length"||g>=o)&&f(p)});else switch(r!==void 0&&f(c.get(r)),t){case"add":gi(e)?gc(r)&&f(c.get("length")):(f(c.get(mi)),Po(e)&&f(c.get($u)));break;case"delete":gi(e)||(f(c.get(mi)),Po(e)&&f(c.get($u)));break;case"set":Po(e)&&f(c.get(mi));break}const h=p=>{p.options.onTrigger&&p.options.onTrigger({effect:p,target:e,key:r,type:t,newValue:o,oldValue:s,oldTarget:a}),p.options.scheduler?p.options.scheduler(p):p()};u.forEach(h)}var Sx=ux("__proto__,__v_isRef,__isVue"),Dg=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(pc)),Ax=Mg(),xx=Mg(!0),Eh=Ox();function Ox(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...r){const o=ot(this);for(let a=0,c=this.length;a{e[t]=function(...r){wx();const o=ot(this)[t].apply(this,r);return Pg(),o}}),e}function Mg(e=!1,t=!1){return function(o,s,a){if(s==="__v_isReactive")return!e;if(s==="__v_isReadonly")return e;if(s==="__v_raw"&&a===(e?t?Hx:kg:t?Wx:Fg).get(o))return o;const c=gi(o);if(!e&&c&&La(Eh,s))return Reflect.get(Eh,s,a);const u=Reflect.get(o,s,a);return(pc(s)?Dg.has(s):Sx(s))||(e||$n(o,"get",s),t)?u:Bu(u)?!c||!gc(s)?u.value:u:Pa(u)?e?$g(u):bc(u):u}}var Cx=Tx();function Tx(e=!1){return function(r,o,s,a){let c=r[o];if(!e&&(s=ot(s),c=ot(c),!gi(r)&&Bu(c)&&!Bu(s)))return c.value=s,!0;const u=gi(r)&&gc(o)?Number(o)Pa(e)?bc(e):e,_c=e=>Pa(e)?$g(e):e,yc=e=>e,Da=e=>Reflect.getPrototypeOf(e);function Ws(e,t,r=!1,o=!1){e=e.__v_raw;const s=ot(e),a=ot(t);t!==a&&!r&&$n(s,"get",t),!r&&$n(s,"get",a);const{has:c}=Da(s),u=o?yc:r?_c:vc;if(c.call(s,t))return u(e.get(t));if(c.call(s,a))return u(e.get(a));e!==s&&e.get(t)}function Hs(e,t=!1){const r=this.__v_raw,o=ot(r),s=ot(e);return e!==s&&!t&&$n(o,"has",e),!t&&$n(o,"has",s),e===s?r.has(e):r.has(e)||r.has(s)}function js(e,t=!1){return e=e.__v_raw,!t&&$n(ot(e),"iterate",mi),Reflect.get(e,"size",e)}function Sh(e){e=ot(e);const t=ot(this);return Da(t).has.call(t,e)||(t.add(e),Vr(t,"add",e,e)),this}function Ah(e,t){t=ot(t);const r=ot(this),{has:o,get:s}=Da(r);let a=o.call(r,e);a?Ng(r,o,e):(e=ot(e),a=o.call(r,e));const c=s.call(r,e);return r.set(e,t),a?Ig(t,c)&&Vr(r,"set",e,t,c):Vr(r,"add",e,t),this}function xh(e){const t=ot(this),{has:r,get:o}=Da(t);let s=r.call(t,e);s?Ng(t,r,e):(e=ot(e),s=r.call(t,e));const a=o?o.call(t,e):void 0,c=t.delete(e);return s&&Vr(t,"delete",e,void 0,a),c}function Oh(){const e=ot(this),t=e.size!==0,r=Po(e)?new Map(e):new Set(e),o=e.clear();return t&&Vr(e,"clear",void 0,void 0,r),o}function Ks(e,t){return function(o,s){const a=this,c=a.__v_raw,u=ot(c),f=t?yc:e?_c:vc;return!e&&$n(u,"iterate",mi),c.forEach((h,p)=>o.call(s,f(h),f(p),a))}}function qs(e,t,r){return function(...o){const s=this.__v_raw,a=ot(s),c=Po(a),u=e==="entries"||e===Symbol.iterator&&c,f=e==="keys"&&c,h=s[e](...o),p=r?yc:t?_c:vc;return!t&&$n(a,"iterate",f?$u:mi),{next(){const{value:g,done:m}=h.next();return m?{value:g,done:m}:{value:u?[p(g[0]),p(g[1])]:p(g),done:m}},[Symbol.iterator](){return this}}}}function Ur(e){return function(...t){{const r=t[0]?`on key "${t[0]}" `:"";console.warn(`${gx(e)} operation ${r}failed: target is readonly.`,ot(this))}return e==="delete"?!1:this}}function Rx(){const e={get(a){return Ws(this,a)},get size(){return js(this)},has:Hs,add:Sh,set:Ah,delete:xh,clear:Oh,forEach:Ks(!1,!1)},t={get(a){return Ws(this,a,!1,!0)},get size(){return js(this)},has:Hs,add:Sh,set:Ah,delete:xh,clear:Oh,forEach:Ks(!1,!0)},r={get(a){return Ws(this,a,!0)},get size(){return js(this,!0)},has(a){return Hs.call(this,a,!0)},add:Ur("add"),set:Ur("set"),delete:Ur("delete"),clear:Ur("clear"),forEach:Ks(!0,!1)},o={get(a){return Ws(this,a,!0,!0)},get size(){return js(this,!0)},has(a){return Hs.call(this,a,!0)},add:Ur("add"),set:Ur("set"),delete:Ur("delete"),clear:Ur("clear"),forEach:Ks(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{e[a]=qs(a,!1,!1),r[a]=qs(a,!0,!1),t[a]=qs(a,!1,!0),o[a]=qs(a,!0,!0)}),[e,r,t,o]}var[Nx,Fx,kx,$x]=Rx();function Rg(e,t){const r=t?e?$x:kx:e?Fx:Nx;return(o,s,a)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?o:Reflect.get(La(r,s)&&s in o?r:o,s,a)}var Bx={get:Rg(!1,!1)},Ux={get:Rg(!0,!1)};function Ng(e,t,r){const o=ot(r);if(o!==r&&t.call(e,o)){const s=Tg(e);console.warn(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="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 Fg=new WeakMap,Wx=new WeakMap,kg=new WeakMap,Hx=new WeakMap;function jx(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Kx(e){return e.__v_skip||!Object.isExtensible(e)?0:jx(Tg(e))}function bc(e){return e&&e.__v_isReadonly?e:Bg(e,!1,Dx,Bx,Fg)}function $g(e){return Bg(e,!0,Mx,Ux,kg)}function Bg(e,t,r,o,s){if(!Pa(e))return console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=s.get(e);if(a)return a;const c=Kx(e);if(c===0)return e;const u=new Proxy(e,c===2?o:r);return s.set(e,u),u}function ot(e){return e&&ot(e.__v_raw)||e}function Bu(e){return!!(e&&e.__v_isRef===!0)}Bn("nextTick",()=>dc);Bn("dispatch",e=>Io.bind(Io,e));Bn("watch",(e,{evaluateLater:t,effect:r})=>(o,s)=>{let a=t(o),c=!0,u,f=r(()=>a(h=>{JSON.stringify(h),c?u=h:queueMicrotask(()=>{s(h,u),u=h}),c=!1}));e._x_effects.delete(f)});Bn("store",rx);Bn("data",e=>Zp(e));Bn("root",e=>Oa(e));Bn("refs",e=>(e._x_refs_proxy||(e._x_refs_proxy=Yo(qx(e))),e._x_refs_proxy));function qx(e){let t=[],r=e;for(;r;)r._x_refs&&t.push(r._x_refs),r=r.parentNode;return t}var nu={};function Ug(e){return nu[e]||(nu[e]=0),++nu[e]}function Vx(e,t){return Ca(e,r=>{if(r._x_ids&&r._x_ids[t])return!0})}function zx(e,t){e._x_ids||(e._x_ids={}),e._x_ids[t]||(e._x_ids[t]=Ug(t))}Bn("id",e=>(t,r=null)=>{let o=Vx(e,t),s=o?o._x_ids[t]:Ug(t);return r?`${t}-${s}-${r}`:`${t}-${s}`});Bn("el",e=>e);Wg("Focus","focus","focus");Wg("Persist","persist","persist");function Wg(e,t,r){Bn(t,o=>br(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,o))}bt("modelable",(e,{expression:t},{effect:r,evaluateLater:o,cleanup:s})=>{let a=o(t),c=()=>{let p;return a(g=>p=g),p},u=o(`${t} = __placeholder`),f=p=>u(()=>{},{scope:{__placeholder:p}}),h=c();f(h),queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners.default();let p=e._x_model.get,g=e._x_model.set,m=Sg({get(){return p()},set(y){g(y)}},{get(){return c()},set(y){f(y)}});s(m)})});bt("teleport",(e,{modifiers:t,expression:r},{cleanup:o})=>{e.tagName.toLowerCase()!=="template"&&br("x-teleport can only be used on a