(() => { function $parcel$interopDefault(a) { return a && a.__esModule ? a.default : a; } var $parcel$global = typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {}; function $parcel$defineInteropFlag(a) { Object.defineProperty(a, '__esModule', {value: true, configurable: true}); } function $parcel$export(e, n, v, s) { Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); } // packages/alpinejs/src/scheduler.js /** * Make a map and return a function for checking if a key * is in that map. * IMPORTANT: all calls of this function must be prefixed with * \/\*#\_\_PURE\_\_\*\/ * So that rollup can tree-shake them if necessary. */ function $dcd1c8c04a2b6f59$export$b41394a5437791c8(str, expectsLowerCase) { const map = Object.create(null); const list = str.split(","); for(let i = 0; i < list.length; i++)map[list[i]] = true; return expectsLowerCase ? (val)=>!!map[val.toLowerCase()] : (val)=>!!map[val]; } /** * dev only flag -> name mapping */ const $dcd1c8c04a2b6f59$export$def7dc2c2e95a08a = { [1 /* TEXT */ ]: `TEXT`, [2 /* CLASS */ ]: `CLASS`, [4 /* STYLE */ ]: `STYLE`, [8 /* PROPS */ ]: `PROPS`, [16 /* FULL_PROPS */ ]: `FULL_PROPS`, [32 /* HYDRATE_EVENTS */ ]: `HYDRATE_EVENTS`, [64 /* STABLE_FRAGMENT */ ]: `STABLE_FRAGMENT`, [128 /* KEYED_FRAGMENT */ ]: `KEYED_FRAGMENT`, [256 /* UNKEYED_FRAGMENT */ ]: `UNKEYED_FRAGMENT`, [512 /* NEED_PATCH */ ]: `NEED_PATCH`, [1024 /* DYNAMIC_SLOTS */ ]: `DYNAMIC_SLOTS`, [2048 /* DEV_ROOT_FRAGMENT */ ]: `DEV_ROOT_FRAGMENT`, [-1 /* HOISTED */ ]: `HOISTED`, [-2 /* BAIL */ ]: `BAIL` }; /** * Dev only */ const $dcd1c8c04a2b6f59$export$624972196ed3745f = { [1 /* STABLE */ ]: "STABLE", [2 /* DYNAMIC */ ]: "DYNAMIC", [3 /* FORWARDED */ ]: "FORWARDED" }; const $dcd1c8c04a2b6f59$var$GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"; const $dcd1c8c04a2b6f59$export$d6571a1911e4f27e = /*#__PURE__*/ $dcd1c8c04a2b6f59$export$b41394a5437791c8($dcd1c8c04a2b6f59$var$GLOBALS_WHITE_LISTED); const $dcd1c8c04a2b6f59$var$range = 2; function $dcd1c8c04a2b6f59$export$f9c0d8b6684a279b(source, start = 0, end = source.length) { // Split the content into individual lines but capture the newline sequence // that separated each line. This is important because the actual sequence is // needed to properly take into account the full line length for offset // comparison let lines = source.split(/(\r?\n)/); // Separate the lines and newline sequences into separate arrays for easier referencing const newlineSequences = lines.filter((_, idx)=>idx % 2 === 1); lines = lines.filter((_, idx)=>idx % 2 === 0); let count = 0; const res = []; for(let i = 0; i < lines.length; i++){ count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); if (count >= start) { for(let j = i - $dcd1c8c04a2b6f59$var$range; j <= i + $dcd1c8c04a2b6f59$var$range || end > count; j++){ if (j < 0 || j >= lines.length) continue; const line = j + 1; res.push(`${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); const lineLength = lines[j].length; const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; if (j === i) { // push underline const pad = start - (count - (lineLength + newLineSeqLength)); const length = Math.max(1, end > count ? lineLength - pad : end - start); res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); } else if (j > i) { if (end > count) { const length = Math.max(Math.min(end - count, lineLength), 1); res.push(` | ` + "^".repeat(length)); } count += lineLength + newLineSeqLength; } } break; } } return res.join("\n"); } /** * On the client we only need to offer special cases for boolean attributes that * have different names from their corresponding dom properties: * - itemscope -> N/A * - allowfullscreen -> allowFullscreen * - formnovalidate -> formNoValidate * - ismap -> isMap * - nomodule -> noModule * - novalidate -> noValidate * - readonly -> readOnly */ const $dcd1c8c04a2b6f59$var$specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; const $dcd1c8c04a2b6f59$export$d186f5eb2e810715 = /*#__PURE__*/ $dcd1c8c04a2b6f59$export$b41394a5437791c8($dcd1c8c04a2b6f59$var$specialBooleanAttrs); /** * The full list is needed during SSR to produce the correct initial markup. */ const $dcd1c8c04a2b6f59$export$f763ba3b84e9cd8c = /*#__PURE__*/ $dcd1c8c04a2b6f59$export$b41394a5437791c8($dcd1c8c04a2b6f59$var$specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` + `loop,open,required,reversed,scoped,seamless,` + `checked,muted,multiple,selected`); const $dcd1c8c04a2b6f59$var$unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; const $dcd1c8c04a2b6f59$var$attrValidationCache = {}; function $dcd1c8c04a2b6f59$export$d55ef77660f30d12(name) { if ($dcd1c8c04a2b6f59$var$attrValidationCache.hasOwnProperty(name)) return $dcd1c8c04a2b6f59$var$attrValidationCache[name]; const isUnsafe = $dcd1c8c04a2b6f59$var$unsafeAttrCharRE.test(name); if (isUnsafe) console.error(`unsafe attribute name: ${name}`); return $dcd1c8c04a2b6f59$var$attrValidationCache[name] = !isUnsafe; } const $dcd1c8c04a2b6f59$export$b66fd0cae8dec3c8 = { acceptCharset: "accept-charset", className: "class", htmlFor: "for", httpEquiv: "http-equiv" }; /** * CSS properties that accept plain numbers */ const $dcd1c8c04a2b6f59$export$84da53524c6b1314 = /*#__PURE__*/ $dcd1c8c04a2b6f59$export$b41394a5437791c8(`animation-iteration-count,border-image-outset,border-image-slice,` + `border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,` + `columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,` + `grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` + `grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` + `line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` + // SVG `fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,` + `stroke-miterlimit,stroke-opacity,stroke-width`); /** * Known attributes, this is used for stringification of runtime static nodes * so that we don't stringify bindings that cannot be set from HTML. * Don't also forget to allow `data-*` and `aria-*`! * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes */ const $dcd1c8c04a2b6f59$export$94be033ec0a4a248 = /*#__PURE__*/ $dcd1c8c04a2b6f59$export$b41394a5437791c8(`accept,accept-charset,accesskey,action,align,allow,alt,async,` + `autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,` + `border,buffered,capture,challenge,charset,checked,cite,class,code,` + `codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,` + `coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,` + `disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,` + `formaction,formenctype,formmethod,formnovalidate,formtarget,headers,` + `height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,` + `ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,` + `manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,` + `open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,` + `referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,` + `selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,` + `start,step,style,summary,tabindex,target,title,translate,type,usemap,` + `value,width,wrap`); function $dcd1c8c04a2b6f59$export$8756898546458274(value) { if ($dcd1c8c04a2b6f59$export$43bee75e5e14138e(value)) { const res = {}; for(let i = 0; i < value.length; i++){ const item = value[i]; const normalized = $dcd1c8c04a2b6f59$export$8756898546458274($dcd1c8c04a2b6f59$export$844ec244b1367d54(item) ? $dcd1c8c04a2b6f59$export$76a205ce979d066a(item) : item); if (normalized) for(const key in normalized)res[key] = normalized[key]; } return res; } else if ($dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a(value)) return value; } const $dcd1c8c04a2b6f59$var$listDelimiterRE = /;(?![^(]*\))/g; const $dcd1c8c04a2b6f59$var$propertyDelimiterRE = /:(.+)/; function $dcd1c8c04a2b6f59$export$76a205ce979d066a(cssText) { const ret = {}; cssText.split($dcd1c8c04a2b6f59$var$listDelimiterRE).forEach((item)=>{ if (item) { const tmp = item.split($dcd1c8c04a2b6f59$var$propertyDelimiterRE); tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); } }); return ret; } function $dcd1c8c04a2b6f59$export$9466a5a0ee6f1479(styles) { let ret = ""; if (!styles) return ret; for(const key in styles){ const value = styles[key]; const normalizedKey = key.startsWith(`--`) ? key : $dcd1c8c04a2b6f59$export$6e6a0a3676c4b8bb(key); if ($dcd1c8c04a2b6f59$export$844ec244b1367d54(value) || typeof value === "number" && $dcd1c8c04a2b6f59$export$84da53524c6b1314(normalizedKey)) // only render valid values ret += `${normalizedKey}:${value};`; } return ret; } function $dcd1c8c04a2b6f59$export$4f7022d2d68e2c5a(value) { let res = ""; if ($dcd1c8c04a2b6f59$export$844ec244b1367d54(value)) res = value; else if ($dcd1c8c04a2b6f59$export$43bee75e5e14138e(value)) for(let i = 0; i < value.length; i++){ const normalized = $dcd1c8c04a2b6f59$export$4f7022d2d68e2c5a(value[i]); if (normalized) res += normalized + " "; } else if ($dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a(value)) { for(const name in value)if (value[name]) res += name + " "; } return res.trim(); } // These tag configs are shared between compiler-dom and runtime-dom, so they // https://developer.mozilla.org/en-US/docs/Web/HTML/Element const $dcd1c8c04a2b6f59$var$HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; // https://developer.mozilla.org/en-US/docs/Web/SVG/Element const $dcd1c8c04a2b6f59$var$SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; const $dcd1c8c04a2b6f59$var$VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; const $dcd1c8c04a2b6f59$export$1ccf854a0984f890 = /*#__PURE__*/ $dcd1c8c04a2b6f59$export$b41394a5437791c8($dcd1c8c04a2b6f59$var$HTML_TAGS); const $dcd1c8c04a2b6f59$export$6328ce7565ea1049 = /*#__PURE__*/ $dcd1c8c04a2b6f59$export$b41394a5437791c8($dcd1c8c04a2b6f59$var$SVG_TAGS); const $dcd1c8c04a2b6f59$export$e5f2d3d97d9367a4 = /*#__PURE__*/ $dcd1c8c04a2b6f59$export$b41394a5437791c8($dcd1c8c04a2b6f59$var$VOID_TAGS); const $dcd1c8c04a2b6f59$var$escapeRE = /["'&<>]/; function $dcd1c8c04a2b6f59$export$4cf11838cdc2a8a8(string) { const str = "" + string; const match = $dcd1c8c04a2b6f59$var$escapeRE.exec(str); if (!match) return str; let html = ""; let escaped; let index; let lastIndex = 0; for(index = match.index; index < str.length; index++){ switch(str.charCodeAt(index)){ case 34: escaped = """; break; case 38: escaped = "&"; break; case 39: escaped = "'"; break; case 60: escaped = "<"; break; case 62: escaped = ">"; break; default: continue; } if (lastIndex !== index) html += str.substring(lastIndex, index); lastIndex = index + 1; html += escaped; } return lastIndex !== index ? html + str.substring(lastIndex, index) : html; } // https://www.w3.org/TR/html52/syntax.html#comments const $dcd1c8c04a2b6f59$var$commentStripRE = /^-?>||--!>|$dcd1c8c04a2b6f59$export$ae8015769846262c(item, val)); } /** * For converting {{ interpolation }} values to displayed strings. * @private */ const $dcd1c8c04a2b6f59$export$b5b1545233b45293 = (val)=>{ return val == null ? "" : $dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a(val) ? JSON.stringify(val, $dcd1c8c04a2b6f59$var$replacer, 2) : String(val); }; const $dcd1c8c04a2b6f59$var$replacer = (_key, val)=>{ if ($dcd1c8c04a2b6f59$export$5c90113a285f2241(val)) return { [`Map(${val.size})`]: [ ...val.entries() ].reduce((entries, [key, val])=>{ entries[`${key} =>`] = val; return entries; }, {}) }; else if ($dcd1c8c04a2b6f59$export$6750766a7c7ec627(val)) return { [`Set(${val.size})`]: [ ...val.values() ] }; else if ($dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a(val) && !$dcd1c8c04a2b6f59$export$43bee75e5e14138e(val) && !$dcd1c8c04a2b6f59$export$53b83ca8eaab0383(val)) return String(val); return val; }; /** * List of @babel/parser plugins that are used for template expression * transforms and SFC script transforms. By default we enable proposals slated * for ES2020. This will need to be updated as the spec moves forward. * Full list at https://babeljs.io/docs/en/next/babel-parser#plugins */ const $dcd1c8c04a2b6f59$export$10dfb620782d8404 = [ "bigInt", "optionalChaining", "nullishCoalescingOperator" ]; const $dcd1c8c04a2b6f59$export$cf583d23ab39677c = {}; const $dcd1c8c04a2b6f59$export$6bd8558f433f1cc1 = []; const $dcd1c8c04a2b6f59$export$5702a91a6f42969f = ()=>{}; /** * Always return false. */ const $dcd1c8c04a2b6f59$export$c01351c0af048e39 = ()=>false; const $dcd1c8c04a2b6f59$var$onRE = /^on[^a-z]/; const $dcd1c8c04a2b6f59$export$1a2d97de39ecbb75 = (key)=>$dcd1c8c04a2b6f59$var$onRE.test(key); const $dcd1c8c04a2b6f59$export$793aa5469768d691 = (key)=>key.startsWith("onUpdate:"); const $dcd1c8c04a2b6f59$export$8b58be045bf06082 = Object.assign; const $dcd1c8c04a2b6f59$export$cd7f480d6b8286c3 = (arr, el)=>{ const i = arr.indexOf(el); if (i > -1) arr.splice(i, 1); }; const $dcd1c8c04a2b6f59$var$hasOwnProperty = Object.prototype.hasOwnProperty; const $dcd1c8c04a2b6f59$export$b5a638e9b3fff9f3 = (val, key)=>$dcd1c8c04a2b6f59$var$hasOwnProperty.call(val, key); const $dcd1c8c04a2b6f59$export$43bee75e5e14138e = Array.isArray; const $dcd1c8c04a2b6f59$export$5c90113a285f2241 = (val)=>$dcd1c8c04a2b6f59$export$1dccc787cc36538b(val) === "[object Map]"; const $dcd1c8c04a2b6f59$export$6750766a7c7ec627 = (val)=>$dcd1c8c04a2b6f59$export$1dccc787cc36538b(val) === "[object Set]"; const $dcd1c8c04a2b6f59$export$871608497c498473 = (val)=>val instanceof Date; const $dcd1c8c04a2b6f59$export$f6e2535fb5126e54 = (val)=>typeof val === "function"; const $dcd1c8c04a2b6f59$export$844ec244b1367d54 = (val)=>typeof val === "string"; const $dcd1c8c04a2b6f59$export$a244864fd9645c7f = (val)=>typeof val === "symbol"; const $dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a = (val)=>val !== null && typeof val === "object"; const $dcd1c8c04a2b6f59$export$4369c812aac99591 = (val)=>{ return $dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a(val) && $dcd1c8c04a2b6f59$export$f6e2535fb5126e54(val.then) && $dcd1c8c04a2b6f59$export$f6e2535fb5126e54(val.catch); }; const $dcd1c8c04a2b6f59$export$830c053460e5ddf6 = Object.prototype.toString; const $dcd1c8c04a2b6f59$export$1dccc787cc36538b = (value)=>$dcd1c8c04a2b6f59$export$830c053460e5ddf6.call(value); const $dcd1c8c04a2b6f59$export$5ad0a3c360b8fbb5 = (value)=>{ // extract "RawType" from strings like "[object RawType]" return $dcd1c8c04a2b6f59$export$1dccc787cc36538b(value).slice(8, -1); }; const $dcd1c8c04a2b6f59$export$53b83ca8eaab0383 = (val)=>$dcd1c8c04a2b6f59$export$1dccc787cc36538b(val) === "[object Object]"; const $dcd1c8c04a2b6f59$export$e2a2b93446ec9fe = (key)=>$dcd1c8c04a2b6f59$export$844ec244b1367d54(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; const $dcd1c8c04a2b6f59$export$bf7d3c0236f0aa85 = /*#__PURE__*/ $dcd1c8c04a2b6f59$export$b41394a5437791c8(// the leading comma is intentional so empty string "" is also included ",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"); const $dcd1c8c04a2b6f59$var$cacheStringFunction = (fn)=>{ const cache = Object.create(null); return (str)=>{ const hit = cache[str]; return hit || (cache[str] = fn(str)); }; }; const $dcd1c8c04a2b6f59$var$camelizeRE = /-(\w)/g; /** * @private */ const $dcd1c8c04a2b6f59$export$161d051f5dd25de7 = $dcd1c8c04a2b6f59$var$cacheStringFunction((str)=>{ return str.replace($dcd1c8c04a2b6f59$var$camelizeRE, (_, c)=>c ? c.toUpperCase() : ""); }); const $dcd1c8c04a2b6f59$var$hyphenateRE = /\B([A-Z])/g; /** * @private */ const $dcd1c8c04a2b6f59$export$6e6a0a3676c4b8bb = $dcd1c8c04a2b6f59$var$cacheStringFunction((str)=>str.replace($dcd1c8c04a2b6f59$var$hyphenateRE, "-$1").toLowerCase()); /** * @private */ const $dcd1c8c04a2b6f59$export$9a00dee1beb8f576 = $dcd1c8c04a2b6f59$var$cacheStringFunction((str)=>str.charAt(0).toUpperCase() + str.slice(1)); /** * @private */ const $dcd1c8c04a2b6f59$export$8c022799eeaaefcd = $dcd1c8c04a2b6f59$var$cacheStringFunction((str)=>str ? `on${$dcd1c8c04a2b6f59$export$9a00dee1beb8f576(str)}` : ``); // compare whether a value has changed, accounting for NaN. const $dcd1c8c04a2b6f59$export$f619eb8b89076d23 = (value, oldValue)=>value !== oldValue && (value === value || oldValue === oldValue); const $dcd1c8c04a2b6f59$export$39951422d618a9d3 = (fns, arg)=>{ for(let i = 0; i < fns.length; i++)fns[i](arg); }; const $dcd1c8c04a2b6f59$export$8afb76124cf08683 = (obj, key, value)=>{ Object.defineProperty(obj, key, { configurable: true, enumerable: false, value: value }); }; const $dcd1c8c04a2b6f59$export$a0a81dc3380ce7d3 = (val)=>{ const n = parseFloat(val); return isNaN(n) ? val : n; }; let $dcd1c8c04a2b6f59$var$_globalThis; const $dcd1c8c04a2b6f59$export$ff5f2eeb11fc7e14 = ()=>{ return $dcd1c8c04a2b6f59$var$_globalThis || ($dcd1c8c04a2b6f59$var$_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof $parcel$global !== "undefined" ? $parcel$global : {}); }; const $c045fc085b5f16e6$var$targetMap = new WeakMap(); const $c045fc085b5f16e6$var$effectStack = []; let $c045fc085b5f16e6$var$activeEffect; const $c045fc085b5f16e6$export$3c41b1a4e06acc14 = Symbol(""); const $c045fc085b5f16e6$var$MAP_KEY_ITERATE_KEY = Symbol(""); function $c045fc085b5f16e6$var$isEffect(fn) { return fn && fn._isEffect === true; } function $c045fc085b5f16e6$export$dc573d8a6576cdb3(fn, options = (0, $dcd1c8c04a2b6f59$export$cf583d23ab39677c)) { if ($c045fc085b5f16e6$var$isEffect(fn)) fn = fn.raw; const effect = $c045fc085b5f16e6$var$createReactiveEffect(fn, options); if (!options.lazy) effect(); return effect; } function $c045fc085b5f16e6$export$fa6813432f753b0d(effect) { if (effect.active) { $c045fc085b5f16e6$var$cleanup(effect); if (effect.options.onStop) effect.options.onStop(); effect.active = false; } } let $c045fc085b5f16e6$var$uid = 0; function $c045fc085b5f16e6$var$createReactiveEffect(fn, options) { const effect = function reactiveEffect() { if (!effect.active) return fn(); if (!$c045fc085b5f16e6$var$effectStack.includes(effect)) { $c045fc085b5f16e6$var$cleanup(effect); try { $c045fc085b5f16e6$export$1f8ffc6fd33b1d16(); $c045fc085b5f16e6$var$effectStack.push(effect); $c045fc085b5f16e6$var$activeEffect = effect; return fn(); } finally{ $c045fc085b5f16e6$var$effectStack.pop(); $c045fc085b5f16e6$export$c39176b1babaa8b8(); $c045fc085b5f16e6$var$activeEffect = $c045fc085b5f16e6$var$effectStack[$c045fc085b5f16e6$var$effectStack.length - 1]; } } }; effect.id = $c045fc085b5f16e6$var$uid++; effect.allowRecurse = !!options.allowRecurse; effect._isEffect = true; effect.active = true; effect.raw = fn; effect.deps = []; effect.options = options; return effect; } function $c045fc085b5f16e6$var$cleanup(effect) { const { deps: deps } = effect; if (deps.length) { for(let i = 0; i < deps.length; i++)deps[i].delete(effect); deps.length = 0; } } let $c045fc085b5f16e6$var$shouldTrack = true; const $c045fc085b5f16e6$var$trackStack = []; function $c045fc085b5f16e6$export$938a971395fef855() { $c045fc085b5f16e6$var$trackStack.push($c045fc085b5f16e6$var$shouldTrack); $c045fc085b5f16e6$var$shouldTrack = false; } function $c045fc085b5f16e6$export$1f8ffc6fd33b1d16() { $c045fc085b5f16e6$var$trackStack.push($c045fc085b5f16e6$var$shouldTrack); $c045fc085b5f16e6$var$shouldTrack = true; } function $c045fc085b5f16e6$export$c39176b1babaa8b8() { const last = $c045fc085b5f16e6$var$trackStack.pop(); $c045fc085b5f16e6$var$shouldTrack = last === undefined ? true : last; } function $c045fc085b5f16e6$export$6b2a7d5132615086(target, type, key) { if (!$c045fc085b5f16e6$var$shouldTrack || $c045fc085b5f16e6$var$activeEffect === undefined) return; let depsMap = $c045fc085b5f16e6$var$targetMap.get(target); if (!depsMap) $c045fc085b5f16e6$var$targetMap.set(target, depsMap = new Map()); let dep = depsMap.get(key); if (!dep) depsMap.set(key, dep = new Set()); if (!dep.has($c045fc085b5f16e6$var$activeEffect)) { dep.add($c045fc085b5f16e6$var$activeEffect); $c045fc085b5f16e6$var$activeEffect.deps.push(dep); } } function $c045fc085b5f16e6$export$e614dc9140f7ae71(target, type, key, newValue, oldValue, oldTarget) { const depsMap = $c045fc085b5f16e6$var$targetMap.get(target); if (!depsMap) // never been tracked return; const effects = new Set(); const add = (effectsToAdd)=>{ if (effectsToAdd) effectsToAdd.forEach((effect)=>{ if (effect !== $c045fc085b5f16e6$var$activeEffect || effect.allowRecurse) effects.add(effect); }); }; if (type === "clear" /* CLEAR */ ) // collection being cleared // trigger all effects for target depsMap.forEach(add); else if (key === "length" && (0, $dcd1c8c04a2b6f59$export$43bee75e5e14138e)(target)) depsMap.forEach((dep, key)=>{ if (key === "length" || key >= newValue) add(dep); }); else { // schedule runs for SET | ADD | DELETE if (key !== void 0) add(depsMap.get(key)); // also run for iteration key on ADD | DELETE | Map.SET switch(type){ case "add" /* ADD */ : if (!(0, $dcd1c8c04a2b6f59$export$43bee75e5e14138e)(target)) { add(depsMap.get($c045fc085b5f16e6$export$3c41b1a4e06acc14)); if ((0, $dcd1c8c04a2b6f59$export$5c90113a285f2241)(target)) add(depsMap.get($c045fc085b5f16e6$var$MAP_KEY_ITERATE_KEY)); } else if ((0, $dcd1c8c04a2b6f59$export$e2a2b93446ec9fe)(key)) // new index added to array -> length changes add(depsMap.get("length")); break; case "delete" /* DELETE */ : if (!(0, $dcd1c8c04a2b6f59$export$43bee75e5e14138e)(target)) { add(depsMap.get($c045fc085b5f16e6$export$3c41b1a4e06acc14)); if ((0, $dcd1c8c04a2b6f59$export$5c90113a285f2241)(target)) add(depsMap.get($c045fc085b5f16e6$var$MAP_KEY_ITERATE_KEY)); } break; case "set" /* SET */ : if ((0, $dcd1c8c04a2b6f59$export$5c90113a285f2241)(target)) add(depsMap.get($c045fc085b5f16e6$export$3c41b1a4e06acc14)); break; } } const run = (effect)=>{ if (effect.options.scheduler) effect.options.scheduler(effect); else effect(); }; effects.forEach(run); } const $c045fc085b5f16e6$var$isNonTrackableKeys = /*#__PURE__*/ (0, $dcd1c8c04a2b6f59$export$b41394a5437791c8)(`__proto__,__v_isRef,__isVue`); const $c045fc085b5f16e6$var$builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol).map((key)=>Symbol[key]).filter((0, $dcd1c8c04a2b6f59$export$a244864fd9645c7f))); const $c045fc085b5f16e6$var$get = /*#__PURE__*/ $c045fc085b5f16e6$var$createGetter(); const $c045fc085b5f16e6$var$shallowGet = /*#__PURE__*/ $c045fc085b5f16e6$var$createGetter(false, true); const $c045fc085b5f16e6$var$readonlyGet = /*#__PURE__*/ $c045fc085b5f16e6$var$createGetter(true); const $c045fc085b5f16e6$var$shallowReadonlyGet = /*#__PURE__*/ $c045fc085b5f16e6$var$createGetter(true, true); const $c045fc085b5f16e6$var$arrayInstrumentations = /*#__PURE__*/ $c045fc085b5f16e6$var$createArrayInstrumentations(); function $c045fc085b5f16e6$var$createArrayInstrumentations() { const instrumentations = {}; [ "includes", "indexOf", "lastIndexOf" ].forEach((key)=>{ instrumentations[key] = function(...args) { const arr = $c045fc085b5f16e6$export$ab18938b9fc5f28e(this); for(let i = 0, l = this.length; i < l; i++)$c045fc085b5f16e6$export$6b2a7d5132615086(arr, "get" /* GET */ , i + ""); // we run the method using the original args first (which may be reactive) const res = arr[key](...args); if (res === -1 || res === false) // if that didn't work, run it again using raw values. return arr[key](...args.map($c045fc085b5f16e6$export$ab18938b9fc5f28e)); else return res; }; }); [ "push", "pop", "shift", "unshift", "splice" ].forEach((key)=>{ instrumentations[key] = function(...args) { $c045fc085b5f16e6$export$938a971395fef855(); const res = $c045fc085b5f16e6$export$ab18938b9fc5f28e(this)[key].apply(this, args); $c045fc085b5f16e6$export$c39176b1babaa8b8(); return res; }; }); return instrumentations; } function $c045fc085b5f16e6$var$createGetter(isReadonly = false, shallow = false) { return function get(target, key, receiver) { if (key === "__v_isReactive" /* IS_REACTIVE */ ) return !isReadonly; else if (key === "__v_isReadonly" /* IS_READONLY */ ) return isReadonly; else if (key === "__v_raw" /* RAW */ && receiver === (isReadonly ? shallow ? $c045fc085b5f16e6$var$shallowReadonlyMap : $c045fc085b5f16e6$var$readonlyMap : shallow ? $c045fc085b5f16e6$var$shallowReactiveMap : $c045fc085b5f16e6$var$reactiveMap).get(target)) return target; const targetIsArray = (0, $dcd1c8c04a2b6f59$export$43bee75e5e14138e)(target); if (!isReadonly && targetIsArray && (0, $dcd1c8c04a2b6f59$export$b5a638e9b3fff9f3)($c045fc085b5f16e6$var$arrayInstrumentations, key)) return Reflect.get($c045fc085b5f16e6$var$arrayInstrumentations, key, receiver); const res = Reflect.get(target, key, receiver); if ((0, $dcd1c8c04a2b6f59$export$a244864fd9645c7f)(key) ? $c045fc085b5f16e6$var$builtInSymbols.has(key) : $c045fc085b5f16e6$var$isNonTrackableKeys(key)) return res; if (!isReadonly) $c045fc085b5f16e6$export$6b2a7d5132615086(target, "get" /* GET */ , key); if (shallow) return res; if ($c045fc085b5f16e6$export$4f9f5282de18fc69(res)) { // ref unwrapping - does not apply for Array + integer key. const shouldUnwrap = !targetIsArray || !(0, $dcd1c8c04a2b6f59$export$e2a2b93446ec9fe)(key); return shouldUnwrap ? res.value : res; } if ((0, $dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a)(res)) // Convert returned value into a proxy as well. we do the isObject check // here to avoid invalid value warning. Also need to lazy access readonly // and reactive here to avoid circular dependency. return isReadonly ? $c045fc085b5f16e6$export$6ec456bd5b7b3c51(res) : $c045fc085b5f16e6$export$90a44edba14e47be(res); return res; }; } const $c045fc085b5f16e6$var$set = /*#__PURE__*/ $c045fc085b5f16e6$var$createSetter(); const $c045fc085b5f16e6$var$shallowSet = /*#__PURE__*/ $c045fc085b5f16e6$var$createSetter(true); function $c045fc085b5f16e6$var$createSetter(shallow = false) { return function set(target, key, value, receiver) { let oldValue = target[key]; if (!shallow) { value = $c045fc085b5f16e6$export$ab18938b9fc5f28e(value); oldValue = $c045fc085b5f16e6$export$ab18938b9fc5f28e(oldValue); if (!(0, $dcd1c8c04a2b6f59$export$43bee75e5e14138e)(target) && $c045fc085b5f16e6$export$4f9f5282de18fc69(oldValue) && !$c045fc085b5f16e6$export$4f9f5282de18fc69(value)) { oldValue.value = value; return true; } } const hadKey = (0, $dcd1c8c04a2b6f59$export$43bee75e5e14138e)(target) && (0, $dcd1c8c04a2b6f59$export$e2a2b93446ec9fe)(key) ? Number(key) < target.length : (0, $dcd1c8c04a2b6f59$export$b5a638e9b3fff9f3)(target, key); const result = Reflect.set(target, key, value, receiver); // don't trigger if target is something up in the prototype chain of original if (target === $c045fc085b5f16e6$export$ab18938b9fc5f28e(receiver)) { if (!hadKey) $c045fc085b5f16e6$export$e614dc9140f7ae71(target, "add" /* ADD */ , key, value); else if ((0, $dcd1c8c04a2b6f59$export$f619eb8b89076d23)(value, oldValue)) $c045fc085b5f16e6$export$e614dc9140f7ae71(target, "set" /* SET */ , key, value, oldValue); } return result; }; } function $c045fc085b5f16e6$var$deleteProperty(target, key) { const hadKey = (0, $dcd1c8c04a2b6f59$export$b5a638e9b3fff9f3)(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) $c045fc085b5f16e6$export$e614dc9140f7ae71(target, "delete" /* DELETE */ , key, undefined, oldValue); return result; } function $c045fc085b5f16e6$var$has(target, key) { const result = Reflect.has(target, key); if (!(0, $dcd1c8c04a2b6f59$export$a244864fd9645c7f)(key) || !$c045fc085b5f16e6$var$builtInSymbols.has(key)) $c045fc085b5f16e6$export$6b2a7d5132615086(target, "has" /* HAS */ , key); return result; } function $c045fc085b5f16e6$var$ownKeys(target) { $c045fc085b5f16e6$export$6b2a7d5132615086(target, "iterate" /* ITERATE */ , (0, $dcd1c8c04a2b6f59$export$43bee75e5e14138e)(target) ? "length" : $c045fc085b5f16e6$export$3c41b1a4e06acc14); return Reflect.ownKeys(target); } const $c045fc085b5f16e6$var$mutableHandlers = { get: $c045fc085b5f16e6$var$get, set: $c045fc085b5f16e6$var$set, deleteProperty: $c045fc085b5f16e6$var$deleteProperty, has: $c045fc085b5f16e6$var$has, ownKeys: $c045fc085b5f16e6$var$ownKeys }; const $c045fc085b5f16e6$var$readonlyHandlers = { get: $c045fc085b5f16e6$var$readonlyGet, set (target, key) { return true; }, deleteProperty (target, key) { return true; } }; const $c045fc085b5f16e6$var$shallowReactiveHandlers = /*#__PURE__*/ (0, $dcd1c8c04a2b6f59$export$8b58be045bf06082)({}, $c045fc085b5f16e6$var$mutableHandlers, { get: $c045fc085b5f16e6$var$shallowGet, set: $c045fc085b5f16e6$var$shallowSet }); // Props handlers are special in the sense that it should not unwrap top-level // refs (in order to allow refs to be explicitly passed down), but should // retain the reactivity of the normal readonly object. const $c045fc085b5f16e6$var$shallowReadonlyHandlers = /*#__PURE__*/ (0, $dcd1c8c04a2b6f59$export$8b58be045bf06082)({}, $c045fc085b5f16e6$var$readonlyHandlers, { get: $c045fc085b5f16e6$var$shallowReadonlyGet }); const $c045fc085b5f16e6$var$toReactive = (value)=>(0, $dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a)(value) ? $c045fc085b5f16e6$export$90a44edba14e47be(value) : value; const $c045fc085b5f16e6$var$toReadonly = (value)=>(0, $dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a)(value) ? $c045fc085b5f16e6$export$6ec456bd5b7b3c51(value) : value; const $c045fc085b5f16e6$var$toShallow = (value)=>value; const $c045fc085b5f16e6$var$getProto = (v)=>Reflect.getPrototypeOf(v); function $c045fc085b5f16e6$var$get$1(target, key, isReadonly = false, isShallow = false) { // #1772: readonly(reactive(Map)) should return readonly + reactive version // of the value target = target["__v_raw" /* RAW */ ]; const rawTarget = $c045fc085b5f16e6$export$ab18938b9fc5f28e(target); const rawKey = $c045fc085b5f16e6$export$ab18938b9fc5f28e(key); if (key !== rawKey) !isReadonly && $c045fc085b5f16e6$export$6b2a7d5132615086(rawTarget, "get" /* GET */ , key); !isReadonly && $c045fc085b5f16e6$export$6b2a7d5132615086(rawTarget, "get" /* GET */ , rawKey); const { has: has } = $c045fc085b5f16e6$var$getProto(rawTarget); const wrap = isShallow ? $c045fc085b5f16e6$var$toShallow : isReadonly ? $c045fc085b5f16e6$var$toReadonly : $c045fc085b5f16e6$var$toReactive; if (has.call(rawTarget, key)) return wrap(target.get(key)); else if (has.call(rawTarget, rawKey)) return wrap(target.get(rawKey)); else if (target !== rawTarget) // #3602 readonly(reactive(Map)) // ensure that the nested reactive `Map` can do tracking for itself target.get(key); } function $c045fc085b5f16e6$var$has$1(key, isReadonly = false) { const target = this["__v_raw" /* RAW */ ]; const rawTarget = $c045fc085b5f16e6$export$ab18938b9fc5f28e(target); const rawKey = $c045fc085b5f16e6$export$ab18938b9fc5f28e(key); if (key !== rawKey) !isReadonly && $c045fc085b5f16e6$export$6b2a7d5132615086(rawTarget, "has" /* HAS */ , key); !isReadonly && $c045fc085b5f16e6$export$6b2a7d5132615086(rawTarget, "has" /* HAS */ , rawKey); return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function $c045fc085b5f16e6$var$size(target, isReadonly = false) { target = target["__v_raw" /* RAW */ ]; !isReadonly && $c045fc085b5f16e6$export$6b2a7d5132615086($c045fc085b5f16e6$export$ab18938b9fc5f28e(target), "iterate" /* ITERATE */ , $c045fc085b5f16e6$export$3c41b1a4e06acc14); return Reflect.get(target, "size", target); } function $c045fc085b5f16e6$var$add(value) { value = $c045fc085b5f16e6$export$ab18938b9fc5f28e(value); const target = $c045fc085b5f16e6$export$ab18938b9fc5f28e(this); const proto = $c045fc085b5f16e6$var$getProto(target); const hadKey = proto.has.call(target, value); if (!hadKey) { target.add(value); $c045fc085b5f16e6$export$e614dc9140f7ae71(target, "add" /* ADD */ , value, value); } return this; } function $c045fc085b5f16e6$var$set$1(key, value) { value = $c045fc085b5f16e6$export$ab18938b9fc5f28e(value); const target = $c045fc085b5f16e6$export$ab18938b9fc5f28e(this); const { has: has , get: get } = $c045fc085b5f16e6$var$getProto(target); let hadKey = has.call(target, key); if (!hadKey) { key = $c045fc085b5f16e6$export$ab18938b9fc5f28e(key); hadKey = has.call(target, key); } const oldValue = get.call(target, key); target.set(key, value); if (!hadKey) $c045fc085b5f16e6$export$e614dc9140f7ae71(target, "add" /* ADD */ , key, value); else if ((0, $dcd1c8c04a2b6f59$export$f619eb8b89076d23)(value, oldValue)) $c045fc085b5f16e6$export$e614dc9140f7ae71(target, "set" /* SET */ , key, value, oldValue); return this; } function $c045fc085b5f16e6$var$deleteEntry(key) { const target = $c045fc085b5f16e6$export$ab18938b9fc5f28e(this); const { has: has , get: get } = $c045fc085b5f16e6$var$getProto(target); let hadKey = has.call(target, key); if (!hadKey) { key = $c045fc085b5f16e6$export$ab18938b9fc5f28e(key); hadKey = has.call(target, key); } const oldValue = get ? get.call(target, key) : undefined; // forward the operation before queueing reactions const result = target.delete(key); if (hadKey) $c045fc085b5f16e6$export$e614dc9140f7ae71(target, "delete" /* DELETE */ , key, undefined, oldValue); return result; } function $c045fc085b5f16e6$var$clear() { const target = $c045fc085b5f16e6$export$ab18938b9fc5f28e(this); const hadItems = target.size !== 0; const oldTarget = undefined; // forward the operation before queueing reactions const result = target.clear(); if (hadItems) $c045fc085b5f16e6$export$e614dc9140f7ae71(target, "clear" /* CLEAR */ , undefined, undefined, oldTarget); return result; } function $c045fc085b5f16e6$var$createForEach(isReadonly, isShallow) { return function forEach(callback, thisArg) { const observed = this; const target = observed["__v_raw" /* RAW */ ]; const rawTarget = $c045fc085b5f16e6$export$ab18938b9fc5f28e(target); const wrap = isShallow ? $c045fc085b5f16e6$var$toShallow : isReadonly ? $c045fc085b5f16e6$var$toReadonly : $c045fc085b5f16e6$var$toReactive; !isReadonly && $c045fc085b5f16e6$export$6b2a7d5132615086(rawTarget, "iterate" /* ITERATE */ , $c045fc085b5f16e6$export$3c41b1a4e06acc14); return target.forEach((value, key)=>{ // important: make sure the callback is // 1. invoked with the reactive map as `this` and 3rd arg // 2. the value received should be a corresponding reactive/readonly. return callback.call(thisArg, wrap(value), wrap(key), observed); }); }; } function $c045fc085b5f16e6$var$createIterableMethod(method, isReadonly, isShallow) { return function(...args) { const target = this["__v_raw" /* RAW */ ]; const rawTarget = $c045fc085b5f16e6$export$ab18938b9fc5f28e(target); const targetIsMap = (0, $dcd1c8c04a2b6f59$export$5c90113a285f2241)(rawTarget); const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; const isKeyOnly = method === "keys" && targetIsMap; const innerIterator = target[method](...args); const wrap = isShallow ? $c045fc085b5f16e6$var$toShallow : isReadonly ? $c045fc085b5f16e6$var$toReadonly : $c045fc085b5f16e6$var$toReactive; !isReadonly && $c045fc085b5f16e6$export$6b2a7d5132615086(rawTarget, "iterate" /* ITERATE */ , isKeyOnly ? $c045fc085b5f16e6$var$MAP_KEY_ITERATE_KEY : $c045fc085b5f16e6$export$3c41b1a4e06acc14); // return a wrapped iterator which returns observed versions of the // values emitted from the real iterator return { // iterator protocol next () { const { value: value , done: done } = innerIterator.next(); return done ? { value: value, done: done } : { value: isPair ? [ wrap(value[0]), wrap(value[1]) ] : wrap(value), done: done }; }, // iterable protocol [Symbol.iterator] () { return this; } }; }; } function $c045fc085b5f16e6$var$createReadonlyMethod(type) { return function(...args) { return type === "delete" /* DELETE */ ? false : this; }; } function $c045fc085b5f16e6$var$createInstrumentations() { const mutableInstrumentations = { get (key) { return $c045fc085b5f16e6$var$get$1(this, key); }, get size () { return $c045fc085b5f16e6$var$size(this); }, has: $c045fc085b5f16e6$var$has$1, add: $c045fc085b5f16e6$var$add, set: $c045fc085b5f16e6$var$set$1, delete: $c045fc085b5f16e6$var$deleteEntry, clear: $c045fc085b5f16e6$var$clear, forEach: $c045fc085b5f16e6$var$createForEach(false, false) }; const shallowInstrumentations = { get (key) { return $c045fc085b5f16e6$var$get$1(this, key, false, true); }, get size () { return $c045fc085b5f16e6$var$size(this); }, has: $c045fc085b5f16e6$var$has$1, add: $c045fc085b5f16e6$var$add, set: $c045fc085b5f16e6$var$set$1, delete: $c045fc085b5f16e6$var$deleteEntry, clear: $c045fc085b5f16e6$var$clear, forEach: $c045fc085b5f16e6$var$createForEach(false, true) }; const readonlyInstrumentations = { get (key) { return $c045fc085b5f16e6$var$get$1(this, key, true); }, get size () { return $c045fc085b5f16e6$var$size(this, true); }, has (key) { return $c045fc085b5f16e6$var$has$1.call(this, key, true); }, add: $c045fc085b5f16e6$var$createReadonlyMethod("add" /* ADD */ ), set: $c045fc085b5f16e6$var$createReadonlyMethod("set" /* SET */ ), delete: $c045fc085b5f16e6$var$createReadonlyMethod("delete" /* DELETE */ ), clear: $c045fc085b5f16e6$var$createReadonlyMethod("clear" /* CLEAR */ ), forEach: $c045fc085b5f16e6$var$createForEach(true, false) }; const shallowReadonlyInstrumentations = { get (key) { return $c045fc085b5f16e6$var$get$1(this, key, true, true); }, get size () { return $c045fc085b5f16e6$var$size(this, true); }, has (key) { return $c045fc085b5f16e6$var$has$1.call(this, key, true); }, add: $c045fc085b5f16e6$var$createReadonlyMethod("add" /* ADD */ ), set: $c045fc085b5f16e6$var$createReadonlyMethod("set" /* SET */ ), delete: $c045fc085b5f16e6$var$createReadonlyMethod("delete" /* DELETE */ ), clear: $c045fc085b5f16e6$var$createReadonlyMethod("clear" /* CLEAR */ ), forEach: $c045fc085b5f16e6$var$createForEach(true, true) }; const iteratorMethods = [ "keys", "values", "entries", Symbol.iterator ]; iteratorMethods.forEach((method)=>{ mutableInstrumentations[method] = $c045fc085b5f16e6$var$createIterableMethod(method, false, false); readonlyInstrumentations[method] = $c045fc085b5f16e6$var$createIterableMethod(method, true, false); shallowInstrumentations[method] = $c045fc085b5f16e6$var$createIterableMethod(method, false, true); shallowReadonlyInstrumentations[method] = $c045fc085b5f16e6$var$createIterableMethod(method, true, true); }); return [ mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations ]; } const [$c045fc085b5f16e6$var$mutableInstrumentations, $c045fc085b5f16e6$var$readonlyInstrumentations, $c045fc085b5f16e6$var$shallowInstrumentations, $c045fc085b5f16e6$var$shallowReadonlyInstrumentations] = /* #__PURE__*/ $c045fc085b5f16e6$var$createInstrumentations(); function $c045fc085b5f16e6$var$createInstrumentationGetter(isReadonly, shallow) { const instrumentations = shallow ? isReadonly ? $c045fc085b5f16e6$var$shallowReadonlyInstrumentations : $c045fc085b5f16e6$var$shallowInstrumentations : isReadonly ? $c045fc085b5f16e6$var$readonlyInstrumentations : $c045fc085b5f16e6$var$mutableInstrumentations; return (target, key, receiver)=>{ if (key === "__v_isReactive" /* IS_REACTIVE */ ) return !isReadonly; else if (key === "__v_isReadonly" /* IS_READONLY */ ) return isReadonly; else if (key === "__v_raw" /* RAW */ ) return target; return Reflect.get((0, $dcd1c8c04a2b6f59$export$b5a638e9b3fff9f3)(instrumentations, key) && key in target ? instrumentations : target, key, receiver); }; } const $c045fc085b5f16e6$var$mutableCollectionHandlers = { get: /*#__PURE__*/ $c045fc085b5f16e6$var$createInstrumentationGetter(false, false) }; const $c045fc085b5f16e6$var$shallowCollectionHandlers = { get: /*#__PURE__*/ $c045fc085b5f16e6$var$createInstrumentationGetter(false, true) }; const $c045fc085b5f16e6$var$readonlyCollectionHandlers = { get: /*#__PURE__*/ $c045fc085b5f16e6$var$createInstrumentationGetter(true, false) }; const $c045fc085b5f16e6$var$shallowReadonlyCollectionHandlers = { get: /*#__PURE__*/ $c045fc085b5f16e6$var$createInstrumentationGetter(true, true) }; function $c045fc085b5f16e6$var$checkIdentityKeys(target, has, key) { const rawKey = $c045fc085b5f16e6$export$ab18938b9fc5f28e(key); if (rawKey !== key && has.call(target, rawKey)) { const type = (0, $dcd1c8c04a2b6f59$export$5ad0a3c360b8fbb5)(target); console.warn(`Reactive ${type} contains both the raw and reactive ` + `versions of the same object${type === `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.`); } } const $c045fc085b5f16e6$var$reactiveMap = new WeakMap(); const $c045fc085b5f16e6$var$shallowReactiveMap = new WeakMap(); const $c045fc085b5f16e6$var$readonlyMap = new WeakMap(); const $c045fc085b5f16e6$var$shallowReadonlyMap = new WeakMap(); function $c045fc085b5f16e6$var$targetTypeMap(rawType) { switch(rawType){ case "Object": case "Array": return 1 /* COMMON */ ; case "Map": case "Set": case "WeakMap": case "WeakSet": return 2 /* COLLECTION */ ; default: return 0 /* INVALID */ ; } } function $c045fc085b5f16e6$var$getTargetType(value) { return value["__v_skip" /* SKIP */ ] || !Object.isExtensible(value) ? 0 /* INVALID */ : $c045fc085b5f16e6$var$targetTypeMap((0, $dcd1c8c04a2b6f59$export$5ad0a3c360b8fbb5)(value)); } function $c045fc085b5f16e6$export$90a44edba14e47be(target) { // if trying to observe a readonly proxy, return the readonly version. if (target && target["__v_isReadonly" /* IS_READONLY */ ]) return target; return $c045fc085b5f16e6$var$createReactiveObject(target, false, $c045fc085b5f16e6$var$mutableHandlers, $c045fc085b5f16e6$var$mutableCollectionHandlers, $c045fc085b5f16e6$var$reactiveMap); } /** * Return a shallowly-reactive copy of the original object, where only the root * level properties are reactive. It also does not auto-unwrap refs (even at the * root level). */ function $c045fc085b5f16e6$export$8d81cefd22d22260(target) { return $c045fc085b5f16e6$var$createReactiveObject(target, false, $c045fc085b5f16e6$var$shallowReactiveHandlers, $c045fc085b5f16e6$var$shallowCollectionHandlers, $c045fc085b5f16e6$var$shallowReactiveMap); } /** * Creates a readonly copy of the original object. Note the returned copy is not * made reactive, but `readonly` can be called on an already reactive object. */ function $c045fc085b5f16e6$export$6ec456bd5b7b3c51(target) { return $c045fc085b5f16e6$var$createReactiveObject(target, true, $c045fc085b5f16e6$var$readonlyHandlers, $c045fc085b5f16e6$var$readonlyCollectionHandlers, $c045fc085b5f16e6$var$readonlyMap); } /** * Returns a reactive-copy of the original object, where only the root level * properties are readonly, and does NOT unwrap refs nor recursively convert * returned properties. * This is used for creating the props proxy object for stateful components. */ function $c045fc085b5f16e6$export$7c4b5f2b50f09f6b(target) { return $c045fc085b5f16e6$var$createReactiveObject(target, true, $c045fc085b5f16e6$var$shallowReadonlyHandlers, $c045fc085b5f16e6$var$shallowReadonlyCollectionHandlers, $c045fc085b5f16e6$var$shallowReadonlyMap); } function $c045fc085b5f16e6$var$createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { if (!(0, $dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a)(target)) return target; // target is already a Proxy, return it. // exception: calling readonly() on a reactive object if (target["__v_raw" /* RAW */ ] && !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */ ])) return target; // target already has corresponding Proxy const existingProxy = proxyMap.get(target); if (existingProxy) return existingProxy; // only a whitelist of value types can be observed. const targetType = $c045fc085b5f16e6$var$getTargetType(target); if (targetType === 0 /* INVALID */ ) return target; const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); proxyMap.set(target, proxy); return proxy; } function $c045fc085b5f16e6$export$352205f445242f02(value) { if ($c045fc085b5f16e6$export$92d09b48637741e7(value)) return $c045fc085b5f16e6$export$352205f445242f02(value["__v_raw" /* RAW */ ]); return !!(value && value["__v_isReactive" /* IS_REACTIVE */ ]); } function $c045fc085b5f16e6$export$92d09b48637741e7(value) { return !!(value && value["__v_isReadonly" /* IS_READONLY */ ]); } function $c045fc085b5f16e6$export$5f3ca29d057519b3(value) { return $c045fc085b5f16e6$export$352205f445242f02(value) || $c045fc085b5f16e6$export$92d09b48637741e7(value); } function $c045fc085b5f16e6$export$ab18938b9fc5f28e(observed) { return observed && $c045fc085b5f16e6$export$ab18938b9fc5f28e(observed["__v_raw" /* RAW */ ]) || observed; } function $c045fc085b5f16e6$export$995ab8b13ad7a9d0(value) { (0, $dcd1c8c04a2b6f59$export$8afb76124cf08683)(value, "__v_skip" /* SKIP */ , true); return value; } const $c045fc085b5f16e6$var$convert = (val)=>(0, $dcd1c8c04a2b6f59$export$a6cdc56e425d0d0a)(val) ? $c045fc085b5f16e6$export$90a44edba14e47be(val) : val; function $c045fc085b5f16e6$export$4f9f5282de18fc69(r) { return Boolean(r && r.__v_isRef === true); } function $c045fc085b5f16e6$export$eff4d24c3ff7876e(value) { return $c045fc085b5f16e6$var$createRef(value); } function $c045fc085b5f16e6$export$9b7bc5fe3b17c8b3(value) { return $c045fc085b5f16e6$var$createRef(value, true); } class $c045fc085b5f16e6$var$RefImpl { constructor(value, _shallow = false){ this._shallow = _shallow; this.__v_isRef = true; this._rawValue = _shallow ? value : $c045fc085b5f16e6$export$ab18938b9fc5f28e(value); this._value = _shallow ? value : $c045fc085b5f16e6$var$convert(value); } get value() { $c045fc085b5f16e6$export$6b2a7d5132615086($c045fc085b5f16e6$export$ab18938b9fc5f28e(this), "get" /* GET */ , "value"); return this._value; } set value(newVal) { newVal = this._shallow ? newVal : $c045fc085b5f16e6$export$ab18938b9fc5f28e(newVal); if ((0, $dcd1c8c04a2b6f59$export$f619eb8b89076d23)(newVal, this._rawValue)) { this._rawValue = newVal; this._value = this._shallow ? newVal : $c045fc085b5f16e6$var$convert(newVal); $c045fc085b5f16e6$export$e614dc9140f7ae71($c045fc085b5f16e6$export$ab18938b9fc5f28e(this), "set" /* SET */ , "value", newVal); } } } function $c045fc085b5f16e6$var$createRef(rawValue, shallow = false) { if ($c045fc085b5f16e6$export$4f9f5282de18fc69(rawValue)) return rawValue; return new $c045fc085b5f16e6$var$RefImpl(rawValue, shallow); } function $c045fc085b5f16e6$export$f402f86588575ccc(ref) { $c045fc085b5f16e6$export$e614dc9140f7ae71($c045fc085b5f16e6$export$ab18938b9fc5f28e(ref), "set" /* SET */ , "value", void 0); } function $c045fc085b5f16e6$export$a239a76781616204(ref) { return $c045fc085b5f16e6$export$4f9f5282de18fc69(ref) ? ref.value : ref; } const $c045fc085b5f16e6$var$shallowUnwrapHandlers = { get: (target, key, receiver)=>$c045fc085b5f16e6$export$a239a76781616204(Reflect.get(target, key, receiver)), set: (target, key, value, receiver)=>{ const oldValue = target[key]; if ($c045fc085b5f16e6$export$4f9f5282de18fc69(oldValue) && !$c045fc085b5f16e6$export$4f9f5282de18fc69(value)) { oldValue.value = value; return true; } else return Reflect.set(target, key, value, receiver); } }; function $c045fc085b5f16e6$export$f353fd1b97db3fa0(objectWithRefs) { return $c045fc085b5f16e6$export$352205f445242f02(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, $c045fc085b5f16e6$var$shallowUnwrapHandlers); } class $c045fc085b5f16e6$var$CustomRefImpl { constructor(factory){ this.__v_isRef = true; const { get: get , set: set } = factory(()=>$c045fc085b5f16e6$export$6b2a7d5132615086(this, "get" /* GET */ , "value"), ()=>$c045fc085b5f16e6$export$e614dc9140f7ae71(this, "set" /* SET */ , "value")); this._get = get; this._set = set; } get value() { return this._get(); } set value(newVal) { this._set(newVal); } } function $c045fc085b5f16e6$export$a20c2dd6199824cb(factory) { return new $c045fc085b5f16e6$var$CustomRefImpl(factory); } function $c045fc085b5f16e6$export$2e9533675e5e70e0(object) { const ret = (0, $dcd1c8c04a2b6f59$export$43bee75e5e14138e)(object) ? new Array(object.length) : {}; for(const key in object)ret[key] = $c045fc085b5f16e6$export$1f60508e4f47b4b7(object, key); return ret; } class $c045fc085b5f16e6$var$ObjectRefImpl { constructor(_object, _key){ this._object = _object; this._key = _key; this.__v_isRef = true; } get value() { return this._object[this._key]; } set value(newVal) { this._object[this._key] = newVal; } } function $c045fc085b5f16e6$export$1f60508e4f47b4b7(object, key) { return $c045fc085b5f16e6$export$4f9f5282de18fc69(object[key]) ? object[key] : new $c045fc085b5f16e6$var$ObjectRefImpl(object, key); } class $c045fc085b5f16e6$var$ComputedRefImpl { constructor(getter, _setter, isReadonly){ this._setter = _setter; this._dirty = true; this.__v_isRef = true; this.effect = $c045fc085b5f16e6$export$dc573d8a6576cdb3(getter, { lazy: true, scheduler: ()=>{ if (!this._dirty) { this._dirty = true; $c045fc085b5f16e6$export$e614dc9140f7ae71($c045fc085b5f16e6$export$ab18938b9fc5f28e(this), "set" /* SET */ , "value"); } } }); this["__v_isReadonly" /* IS_READONLY */ ] = isReadonly; } get value() { // the computed ref may get wrapped by other proxies e.g. readonly() #3376 const self = $c045fc085b5f16e6$export$ab18938b9fc5f28e(this); if (self._dirty) { self._value = this.effect(); self._dirty = false; } $c045fc085b5f16e6$export$6b2a7d5132615086(self, "get" /* GET */ , "value"); return self._value; } set value(newValue) { this._setter(newValue); } } function $c045fc085b5f16e6$export$2983e091f1a1e8e2(getterOrOptions) { let getter; let setter; if ((0, $dcd1c8c04a2b6f59$export$f6e2535fb5126e54)(getterOrOptions)) { getter = getterOrOptions; setter = (0, $dcd1c8c04a2b6f59$export$5702a91a6f42969f); } else { getter = getterOrOptions.get; setter = getterOrOptions.set; } return new $c045fc085b5f16e6$var$ComputedRefImpl(getter, setter, (0, $dcd1c8c04a2b6f59$export$f6e2535fb5126e54)(getterOrOptions) || !getterOrOptions.set); } var $caa9439642c6336c$var$flushPending = false; var $caa9439642c6336c$var$flushing = false; var $caa9439642c6336c$var$queue = []; var $caa9439642c6336c$var$lastFlushedIndex = -1; function $caa9439642c6336c$var$scheduler(callback) { $caa9439642c6336c$var$queueJob(callback); } function $caa9439642c6336c$var$queueJob(job) { if (!$caa9439642c6336c$var$queue.includes(job)) $caa9439642c6336c$var$queue.push(job); $caa9439642c6336c$var$queueFlush(); } function $caa9439642c6336c$var$dequeueJob(job) { let index = $caa9439642c6336c$var$queue.indexOf(job); if (index !== -1 && index > $caa9439642c6336c$var$lastFlushedIndex) $caa9439642c6336c$var$queue.splice(index, 1); } function $caa9439642c6336c$var$queueFlush() { if (!$caa9439642c6336c$var$flushing && !$caa9439642c6336c$var$flushPending) { $caa9439642c6336c$var$flushPending = true; queueMicrotask($caa9439642c6336c$var$flushJobs); } } function $caa9439642c6336c$var$flushJobs() { $caa9439642c6336c$var$flushPending = false; $caa9439642c6336c$var$flushing = true; for(let i = 0; i < $caa9439642c6336c$var$queue.length; i++){ $caa9439642c6336c$var$queue[i](); $caa9439642c6336c$var$lastFlushedIndex = i; } $caa9439642c6336c$var$queue.length = 0; $caa9439642c6336c$var$lastFlushedIndex = -1; $caa9439642c6336c$var$flushing = false; } // packages/alpinejs/src/reactivity.js var $caa9439642c6336c$var$reactive; var $caa9439642c6336c$var$effect; var $caa9439642c6336c$var$release; var $caa9439642c6336c$var$raw; var $caa9439642c6336c$var$shouldSchedule = true; function $caa9439642c6336c$var$disableEffectScheduling(callback) { $caa9439642c6336c$var$shouldSchedule = false; callback(); $caa9439642c6336c$var$shouldSchedule = true; } function $caa9439642c6336c$var$setReactivityEngine(engine) { $caa9439642c6336c$var$reactive = engine.reactive; $caa9439642c6336c$var$release = engine.release; $caa9439642c6336c$var$effect = (callback)=>engine.effect(callback, { scheduler: (task)=>{ if ($caa9439642c6336c$var$shouldSchedule) $caa9439642c6336c$var$scheduler(task); else task(); } }); $caa9439642c6336c$var$raw = engine.raw; } function $caa9439642c6336c$var$overrideEffect(override) { $caa9439642c6336c$var$effect = override; } function $caa9439642c6336c$var$elementBoundEffect(el) { let cleanup = ()=>{}; let wrappedEffect = (callback)=>{ let effectReference = $caa9439642c6336c$var$effect(callback); if (!el._x_effects) { el._x_effects = /* @__PURE__ */ new Set(); el._x_runEffects = ()=>{ el._x_effects.forEach((i)=>i()); }; } el._x_effects.add(effectReference); cleanup = ()=>{ if (effectReference === void 0) return; el._x_effects.delete(effectReference); $caa9439642c6336c$var$release(effectReference); }; return effectReference; }; return [ wrappedEffect, ()=>{ cleanup(); } ]; } // packages/alpinejs/src/mutation.js var $caa9439642c6336c$var$onAttributeAddeds = []; var $caa9439642c6336c$var$onElRemoveds = []; var $caa9439642c6336c$var$onElAddeds = []; function $caa9439642c6336c$var$onElAdded(callback) { $caa9439642c6336c$var$onElAddeds.push(callback); } function $caa9439642c6336c$var$onElRemoved(el, callback) { if (typeof callback === "function") { if (!el._x_cleanups) el._x_cleanups = []; el._x_cleanups.push(callback); } else { callback = el; $caa9439642c6336c$var$onElRemoveds.push(callback); } } function $caa9439642c6336c$var$onAttributesAdded(callback) { $caa9439642c6336c$var$onAttributeAddeds.push(callback); } function $caa9439642c6336c$var$onAttributeRemoved(el, name, callback) { if (!el._x_attributeCleanups) el._x_attributeCleanups = {}; if (!el._x_attributeCleanups[name]) el._x_attributeCleanups[name] = []; el._x_attributeCleanups[name].push(callback); } function $caa9439642c6336c$var$cleanupAttributes(el, names) { if (!el._x_attributeCleanups) return; Object.entries(el._x_attributeCleanups).forEach(([name, value])=>{ if (names === void 0 || names.includes(name)) { value.forEach((i)=>i()); delete el._x_attributeCleanups[name]; } }); } var $caa9439642c6336c$var$observer = new MutationObserver($caa9439642c6336c$var$onMutate); var $caa9439642c6336c$var$currentlyObserving = false; function $caa9439642c6336c$var$startObservingMutations() { $caa9439642c6336c$var$observer.observe(document, { subtree: true, childList: true, attributes: true, attributeOldValue: true }); $caa9439642c6336c$var$currentlyObserving = true; } function $caa9439642c6336c$var$stopObservingMutations() { $caa9439642c6336c$var$flushObserver(); $caa9439642c6336c$var$observer.disconnect(); $caa9439642c6336c$var$currentlyObserving = false; } var $caa9439642c6336c$var$recordQueue = []; var $caa9439642c6336c$var$willProcessRecordQueue = false; function $caa9439642c6336c$var$flushObserver() { $caa9439642c6336c$var$recordQueue = $caa9439642c6336c$var$recordQueue.concat($caa9439642c6336c$var$observer.takeRecords()); if ($caa9439642c6336c$var$recordQueue.length && !$caa9439642c6336c$var$willProcessRecordQueue) { $caa9439642c6336c$var$willProcessRecordQueue = true; queueMicrotask(()=>{ $caa9439642c6336c$var$processRecordQueue(); $caa9439642c6336c$var$willProcessRecordQueue = false; }); } } function $caa9439642c6336c$var$processRecordQueue() { $caa9439642c6336c$var$onMutate($caa9439642c6336c$var$recordQueue); $caa9439642c6336c$var$recordQueue.length = 0; } function $caa9439642c6336c$var$mutateDom(callback) { if (!$caa9439642c6336c$var$currentlyObserving) return callback(); $caa9439642c6336c$var$stopObservingMutations(); let result = callback(); $caa9439642c6336c$var$startObservingMutations(); return result; } var $caa9439642c6336c$var$isCollecting = false; var $caa9439642c6336c$var$deferredMutations = []; function $caa9439642c6336c$var$deferMutations() { $caa9439642c6336c$var$isCollecting = true; } function $caa9439642c6336c$var$flushAndStopDeferringMutations() { $caa9439642c6336c$var$isCollecting = false; $caa9439642c6336c$var$onMutate($caa9439642c6336c$var$deferredMutations); $caa9439642c6336c$var$deferredMutations = []; } function $caa9439642c6336c$var$onMutate(mutations) { if ($caa9439642c6336c$var$isCollecting) { $caa9439642c6336c$var$deferredMutations = $caa9439642c6336c$var$deferredMutations.concat(mutations); return; } let addedNodes = []; let removedNodes = []; let addedAttributes = /* @__PURE__ */ new Map(); let removedAttributes = /* @__PURE__ */ new Map(); for(let i = 0; i < mutations.length; i++){ if (mutations[i].target._x_ignoreMutationObserver) continue; if (mutations[i].type === "childList") { mutations[i].addedNodes.forEach((node)=>node.nodeType === 1 && addedNodes.push(node)); mutations[i].removedNodes.forEach((node)=>node.nodeType === 1 && removedNodes.push(node)); } if (mutations[i].type === "attributes") { let el = mutations[i].target; let name = mutations[i].attributeName; let oldValue = mutations[i].oldValue; let add = ()=>{ if (!addedAttributes.has(el)) addedAttributes.set(el, []); addedAttributes.get(el).push({ name: name, value: el.getAttribute(name) }); }; let remove = ()=>{ if (!removedAttributes.has(el)) removedAttributes.set(el, []); removedAttributes.get(el).push(name); }; if (el.hasAttribute(name) && oldValue === null) add(); else if (el.hasAttribute(name)) { remove(); add(); } else remove(); } } removedAttributes.forEach((attrs, el)=>{ $caa9439642c6336c$var$cleanupAttributes(el, attrs); }); addedAttributes.forEach((attrs, el)=>{ $caa9439642c6336c$var$onAttributeAddeds.forEach((i)=>i(el, attrs)); }); for (let node of removedNodes){ if (addedNodes.includes(node)) continue; $caa9439642c6336c$var$onElRemoveds.forEach((i)=>i(node)); if (node._x_cleanups) while(node._x_cleanups.length)node._x_cleanups.pop()(); } addedNodes.forEach((node)=>{ node._x_ignoreSelf = true; node._x_ignore = true; }); for (let node of addedNodes){ if (removedNodes.includes(node)) continue; if (!node.isConnected) continue; delete node._x_ignoreSelf; delete node._x_ignore; $caa9439642c6336c$var$onElAddeds.forEach((i)=>i(node)); node._x_ignore = true; node._x_ignoreSelf = true; } addedNodes.forEach((node)=>{ delete node._x_ignoreSelf; delete node._x_ignore; }); addedNodes = null; removedNodes = null; addedAttributes = null; removedAttributes = null; } // packages/alpinejs/src/scope.js function $caa9439642c6336c$var$scope(node) { return $caa9439642c6336c$var$mergeProxies($caa9439642c6336c$var$closestDataStack(node)); } function $caa9439642c6336c$var$addScopeToNode(node, data2, referenceNode) { node._x_dataStack = [ data2, ...$caa9439642c6336c$var$closestDataStack(referenceNode || node) ]; return ()=>{ node._x_dataStack = node._x_dataStack.filter((i)=>i !== data2); }; } function $caa9439642c6336c$var$closestDataStack(node) { if (node._x_dataStack) return node._x_dataStack; if (typeof ShadowRoot === "function" && node instanceof ShadowRoot) return $caa9439642c6336c$var$closestDataStack(node.host); if (!node.parentNode) return []; return $caa9439642c6336c$var$closestDataStack(node.parentNode); } function $caa9439642c6336c$var$mergeProxies(objects) { let thisProxy = new Proxy({}, { ownKeys: ()=>{ return Array.from(new Set(objects.flatMap((i)=>Object.keys(i)))); }, has: (target, name)=>{ return objects.some((obj)=>obj.hasOwnProperty(name)); }, get: (target, name)=>{ return (objects.find((obj)=>{ if (obj.hasOwnProperty(name)) { let descriptor = Object.getOwnPropertyDescriptor(obj, name); if (descriptor.get && descriptor.get._x_alreadyBound || descriptor.set && descriptor.set._x_alreadyBound) return true; if ((descriptor.get || descriptor.set) && descriptor.enumerable) { let getter = descriptor.get; let setter = descriptor.set; let property = descriptor; getter = getter && getter.bind(thisProxy); setter = setter && setter.bind(thisProxy); if (getter) getter._x_alreadyBound = true; if (setter) setter._x_alreadyBound = true; Object.defineProperty(obj, name, { ...property, get: getter, set: setter }); } return true; } return false; }) || {})[name]; }, set: (target, name, value)=>{ let closestObjectWithKey = objects.find((obj)=>obj.hasOwnProperty(name)); if (closestObjectWithKey) closestObjectWithKey[name] = value; else objects[objects.length - 1][name] = value; return true; } }); return thisProxy; } // packages/alpinejs/src/interceptor.js function $caa9439642c6336c$var$initInterceptors(data2) { let isObject = (val)=>typeof val === "object" && !Array.isArray(val) && val !== null; let recurse = (obj, basePath = "")=>{ Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value: value , enumerable: enumerable }])=>{ if (enumerable === false || value === void 0) return; let path = basePath === "" ? key : `${basePath}.${key}`; if (typeof value === "object" && value !== null && value._x_interceptor) obj[key] = value.initialize(data2, path, key); else if (isObject(value) && value !== obj && !(value instanceof Element)) recurse(value, path); }); }; return recurse(data2); } function $caa9439642c6336c$var$interceptor(callback, mutateObj = ()=>{}) { let obj = { initialValue: void 0, _x_interceptor: true, initialize (data2, path, key) { return callback(this.initialValue, ()=>$caa9439642c6336c$var$get(data2, path), (value)=>$caa9439642c6336c$var$set(data2, path, value), path, key); } }; mutateObj(obj); return (initialValue)=>{ if (typeof initialValue === "object" && initialValue !== null && initialValue._x_interceptor) { let initialize = obj.initialize.bind(obj); obj.initialize = (data2, path, key)=>{ let innerValue = initialValue.initialize(data2, path, key); obj.initialValue = innerValue; return initialize(data2, path, key); }; } else obj.initialValue = initialValue; return obj; }; } function $caa9439642c6336c$var$get(obj, path) { return path.split(".").reduce((carry, segment)=>carry[segment], obj); } function $caa9439642c6336c$var$set(obj, path, value) { if (typeof path === "string") path = path.split("."); if (path.length === 1) obj[path[0]] = value; else if (path.length === 0) throw error; else { if (obj[path[0]]) return $caa9439642c6336c$var$set(obj[path[0]], path.slice(1), value); else { obj[path[0]] = {}; return $caa9439642c6336c$var$set(obj[path[0]], path.slice(1), value); } } } // packages/alpinejs/src/magics.js var $caa9439642c6336c$var$magics = {}; function $caa9439642c6336c$var$magic(name, callback) { $caa9439642c6336c$var$magics[name] = callback; } function $caa9439642c6336c$var$injectMagics(obj, el) { Object.entries($caa9439642c6336c$var$magics).forEach(([name, callback])=>{ let memoizedUtilities = null; function getUtilities() { if (memoizedUtilities) return memoizedUtilities; else { let [utilities, cleanup] = $caa9439642c6336c$var$getElementBoundUtilities(el); memoizedUtilities = { interceptor: $caa9439642c6336c$var$interceptor, ...utilities }; $caa9439642c6336c$var$onElRemoved(el, cleanup); return memoizedUtilities; } } Object.defineProperty(obj, `$${name}`, { get () { return callback(el, getUtilities()); }, enumerable: false }); }); return obj; } // packages/alpinejs/src/utils/error.js function $caa9439642c6336c$var$tryCatch(el, expression, callback, ...args) { try { return callback(...args); } catch (e) { $caa9439642c6336c$var$handleError(e, el, expression); } } function $caa9439642c6336c$var$handleError(error2, el, expression) { Object.assign(error2, { el: el, expression: expression }); console.warn(`Alpine Expression Error: ${error2.message} ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); setTimeout(()=>{ throw error2; }, 0); } // packages/alpinejs/src/evaluator.js var $caa9439642c6336c$var$shouldAutoEvaluateFunctions = true; function $caa9439642c6336c$var$dontAutoEvaluateFunctions(callback) { let cache = $caa9439642c6336c$var$shouldAutoEvaluateFunctions; $caa9439642c6336c$var$shouldAutoEvaluateFunctions = false; callback(); $caa9439642c6336c$var$shouldAutoEvaluateFunctions = cache; } function $caa9439642c6336c$var$evaluate(el, expression, extras = {}) { let result; $caa9439642c6336c$var$evaluateLater(el, expression)((value)=>result = value, extras); return result; } function $caa9439642c6336c$var$evaluateLater(...args) { return $caa9439642c6336c$var$theEvaluatorFunction(...args); } var $caa9439642c6336c$var$theEvaluatorFunction = $caa9439642c6336c$var$normalEvaluator; function $caa9439642c6336c$var$setEvaluator(newEvaluator) { $caa9439642c6336c$var$theEvaluatorFunction = newEvaluator; } function $caa9439642c6336c$var$normalEvaluator(el, expression) { let overriddenMagics = {}; $caa9439642c6336c$var$injectMagics(overriddenMagics, el); let dataStack = [ overriddenMagics, ...$caa9439642c6336c$var$closestDataStack(el) ]; let evaluator = typeof expression === "function" ? $caa9439642c6336c$var$generateEvaluatorFromFunction(dataStack, expression) : $caa9439642c6336c$var$generateEvaluatorFromString(dataStack, expression, el); return $caa9439642c6336c$var$tryCatch.bind(null, el, expression, evaluator); } function $caa9439642c6336c$var$generateEvaluatorFromFunction(dataStack, func) { return (receiver = ()=>{}, { scope: scope2 = {} , params: params = [] } = {})=>{ let result = func.apply($caa9439642c6336c$var$mergeProxies([ scope2, ...dataStack ]), params); $caa9439642c6336c$var$runIfTypeOfFunction(receiver, result); }; } var $caa9439642c6336c$var$evaluatorMemo = {}; function $caa9439642c6336c$var$generateFunctionFromString(expression, el) { if ($caa9439642c6336c$var$evaluatorMemo[expression]) return $caa9439642c6336c$var$evaluatorMemo[expression]; let AsyncFunction = Object.getPrototypeOf(async function() {}).constructor; let rightSideSafeExpression = /^[\n\s]*if.*\(.*\)/.test(expression) || /^(let|const)\s/.test(expression) ? `(async()=>{ ${expression} })()` : expression; const safeAsyncFunction = ()=>{ try { return new AsyncFunction([ "__self", "scope" ], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`); } catch (error2) { $caa9439642c6336c$var$handleError(error2, el, expression); return Promise.resolve(); } }; let func = safeAsyncFunction(); $caa9439642c6336c$var$evaluatorMemo[expression] = func; return func; } function $caa9439642c6336c$var$generateEvaluatorFromString(dataStack, expression, el) { let func = $caa9439642c6336c$var$generateFunctionFromString(expression, el); return (receiver = ()=>{}, { scope: scope2 = {} , params: params = [] } = {})=>{ func.result = void 0; func.finished = false; let completeScope = $caa9439642c6336c$var$mergeProxies([ scope2, ...dataStack ]); if (typeof func === "function") { let promise = func(func, completeScope).catch((error2)=>$caa9439642c6336c$var$handleError(error2, el, expression)); if (func.finished) { $caa9439642c6336c$var$runIfTypeOfFunction(receiver, func.result, completeScope, params, el); func.result = void 0; } else promise.then((result)=>{ $caa9439642c6336c$var$runIfTypeOfFunction(receiver, result, completeScope, params, el); }).catch((error2)=>$caa9439642c6336c$var$handleError(error2, el, expression)).finally(()=>func.result = void 0); } }; } function $caa9439642c6336c$var$runIfTypeOfFunction(receiver, value, scope2, params, el) { if ($caa9439642c6336c$var$shouldAutoEvaluateFunctions && typeof value === "function") { let result = value.apply(scope2, params); if (result instanceof Promise) result.then((i)=>$caa9439642c6336c$var$runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2)=>$caa9439642c6336c$var$handleError(error2, el, value)); else receiver(result); } else if (typeof value === "object" && value instanceof Promise) value.then((i)=>receiver(i)); else receiver(value); } // packages/alpinejs/src/directives.js var $caa9439642c6336c$var$prefixAsString = "x-"; function $caa9439642c6336c$var$prefix(subject = "") { return $caa9439642c6336c$var$prefixAsString + subject; } function $caa9439642c6336c$var$setPrefix(newPrefix) { $caa9439642c6336c$var$prefixAsString = newPrefix; } var $caa9439642c6336c$var$directiveHandlers = {}; function $caa9439642c6336c$var$directive(name, callback) { $caa9439642c6336c$var$directiveHandlers[name] = callback; return { before (directive2) { if (!$caa9439642c6336c$var$directiveHandlers[directive2]) { console.warn("Cannot find directive `${directive}`. `${name}` will use the default order of execution"); return; } const pos = $caa9439642c6336c$var$directiveOrder.indexOf(directive2); $caa9439642c6336c$var$directiveOrder.splice(pos >= 0 ? pos : $caa9439642c6336c$var$directiveOrder.indexOf("DEFAULT"), 0, name); } }; } function $caa9439642c6336c$var$directives(el, attributes, originalAttributeOverride) { attributes = Array.from(attributes); if (el._x_virtualDirectives) { let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value])=>({ name: name, value: value })); let staticAttributes = $caa9439642c6336c$var$attributesOnly(vAttributes); vAttributes = vAttributes.map((attribute)=>{ if (staticAttributes.find((attr)=>attr.name === attribute.name)) return { name: `x-bind:${attribute.name}`, value: `"${attribute.value}"` }; return attribute; }); attributes = attributes.concat(vAttributes); } let transformedAttributeMap = {}; let directives2 = attributes.map($caa9439642c6336c$var$toTransformedAttributes((newName, oldName)=>transformedAttributeMap[newName] = oldName)).filter($caa9439642c6336c$var$outNonAlpineAttributes).map($caa9439642c6336c$var$toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort($caa9439642c6336c$var$byPriority); return directives2.map((directive2)=>{ return $caa9439642c6336c$var$getDirectiveHandler(el, directive2); }); } function $caa9439642c6336c$var$attributesOnly(attributes) { return Array.from(attributes).map($caa9439642c6336c$var$toTransformedAttributes()).filter((attr)=>!$caa9439642c6336c$var$outNonAlpineAttributes(attr)); } var $caa9439642c6336c$var$isDeferringHandlers = false; var $caa9439642c6336c$var$directiveHandlerStacks = /* @__PURE__ */ new Map(); var $caa9439642c6336c$var$currentHandlerStackKey = Symbol(); function $caa9439642c6336c$var$deferHandlingDirectives(callback) { $caa9439642c6336c$var$isDeferringHandlers = true; let key = Symbol(); $caa9439642c6336c$var$currentHandlerStackKey = key; $caa9439642c6336c$var$directiveHandlerStacks.set(key, []); let flushHandlers = ()=>{ while($caa9439642c6336c$var$directiveHandlerStacks.get(key).length)$caa9439642c6336c$var$directiveHandlerStacks.get(key).shift()(); $caa9439642c6336c$var$directiveHandlerStacks.delete(key); }; let stopDeferring = ()=>{ $caa9439642c6336c$var$isDeferringHandlers = false; flushHandlers(); }; callback(flushHandlers); stopDeferring(); } function $caa9439642c6336c$var$getElementBoundUtilities(el) { let cleanups = []; let cleanup = (callback)=>cleanups.push(callback); let [effect3, cleanupEffect] = $caa9439642c6336c$var$elementBoundEffect(el); cleanups.push(cleanupEffect); let utilities = { Alpine: $caa9439642c6336c$var$alpine_default, effect: effect3, cleanup: cleanup, evaluateLater: $caa9439642c6336c$var$evaluateLater.bind($caa9439642c6336c$var$evaluateLater, el), evaluate: $caa9439642c6336c$var$evaluate.bind($caa9439642c6336c$var$evaluate, el) }; let doCleanup = ()=>cleanups.forEach((i)=>i()); return [ utilities, doCleanup ]; } function $caa9439642c6336c$var$getDirectiveHandler(el, directive2) { let noop = ()=>{}; let handler3 = $caa9439642c6336c$var$directiveHandlers[directive2.type] || noop; let [utilities, cleanup] = $caa9439642c6336c$var$getElementBoundUtilities(el); $caa9439642c6336c$var$onAttributeRemoved(el, directive2.original, cleanup); let fullHandler = ()=>{ if (el._x_ignore || el._x_ignoreSelf) return; handler3.inline && handler3.inline(el, directive2, utilities); handler3 = handler3.bind(handler3, el, directive2, utilities); $caa9439642c6336c$var$isDeferringHandlers ? $caa9439642c6336c$var$directiveHandlerStacks.get($caa9439642c6336c$var$currentHandlerStackKey).push(handler3) : handler3(); }; fullHandler.runCleanups = cleanup; return fullHandler; } var $caa9439642c6336c$var$startingWith = (subject, replacement)=>({ name: name , value: value })=>{ if (name.startsWith(subject)) name = name.replace(subject, replacement); return { name: name, value: value }; }; var $caa9439642c6336c$var$into = (i)=>i; function $caa9439642c6336c$var$toTransformedAttributes(callback = ()=>{}) { return ({ name: name , value: value })=>{ let { name: newName , value: newValue } = $caa9439642c6336c$var$attributeTransformers.reduce((carry, transform)=>{ return transform(carry); }, { name: name, value: value }); if (newName !== name) callback(newName, name); return { name: newName, value: newValue }; }; } var $caa9439642c6336c$var$attributeTransformers = []; function $caa9439642c6336c$var$mapAttributes(callback) { $caa9439642c6336c$var$attributeTransformers.push(callback); } function $caa9439642c6336c$var$outNonAlpineAttributes({ name: name }) { return $caa9439642c6336c$var$alpineAttributeRegex().test(name); } var $caa9439642c6336c$var$alpineAttributeRegex = ()=>new RegExp(`^${$caa9439642c6336c$var$prefixAsString}([^:^.]+)\\b`); function $caa9439642c6336c$var$toParsedDirectives(transformedAttributeMap, originalAttributeOverride) { return ({ name: name , value: value })=>{ let typeMatch = name.match($caa9439642c6336c$var$alpineAttributeRegex()); let valueMatch = name.match(/:([a-zA-Z0-9\-:]+)/); let modifiers = name.match(/\.[^.\]]+(?=[^\]]*$)/g) || []; let original = originalAttributeOverride || transformedAttributeMap[name] || name; return { type: typeMatch ? typeMatch[1] : null, value: valueMatch ? valueMatch[1] : null, modifiers: modifiers.map((i)=>i.replace(".", "")), expression: value, original: original }; }; } var $caa9439642c6336c$var$DEFAULT = "DEFAULT"; var $caa9439642c6336c$var$directiveOrder = [ "ignore", "ref", "data", "id", "bind", "init", "for", "model", "modelable", "transition", "show", "if", $caa9439642c6336c$var$DEFAULT, "teleport" ]; function $caa9439642c6336c$var$byPriority(a, b) { let typeA = $caa9439642c6336c$var$directiveOrder.indexOf(a.type) === -1 ? $caa9439642c6336c$var$DEFAULT : a.type; let typeB = $caa9439642c6336c$var$directiveOrder.indexOf(b.type) === -1 ? $caa9439642c6336c$var$DEFAULT : b.type; return $caa9439642c6336c$var$directiveOrder.indexOf(typeA) - $caa9439642c6336c$var$directiveOrder.indexOf(typeB); } // packages/alpinejs/src/utils/dispatch.js function $caa9439642c6336c$var$dispatch(el, name, detail = {}) { el.dispatchEvent(new CustomEvent(name, { detail: detail, bubbles: true, // Allows events to pass the shadow DOM barrier. composed: true, cancelable: true })); } // packages/alpinejs/src/utils/walk.js function $caa9439642c6336c$var$walk(el, callback) { if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) { Array.from(el.children).forEach((el2)=>$caa9439642c6336c$var$walk(el2, callback)); return; } let skip = false; callback(el, ()=>skip = true); if (skip) return; let node = el.firstElementChild; while(node){ $caa9439642c6336c$var$walk(node, callback, false); node = node.nextElementSibling; } } // packages/alpinejs/src/utils/warn.js function $caa9439642c6336c$var$warn(message, ...args) { console.warn(`Alpine Warning: ${message}`, ...args); } // packages/alpinejs/src/lifecycle.js var $caa9439642c6336c$var$started = false; function $caa9439642c6336c$var$start() { if ($caa9439642c6336c$var$started) $caa9439642c6336c$var$warn("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."); $caa9439642c6336c$var$started = true; if (!document.body) $caa9439642c6336c$var$warn("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `