Profectus-Demo/assets/index.d5d1e0a2.js

593 lines
637 KiB
JavaScript

const Ay=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}};Ay();const Oy="modulepreload",Sd={},Py="./",sl=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${Py}${r}`,r in Sd)return;Sd[r]=!0;const i=r.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${a}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":Oy,i||(o.as="script",o.crossOrigin=""),o.href=r,document.head.appendChild(o),i)return new Promise((s,l)=>{o.addEventListener("load",s),o.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};function Ml(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}const Fy="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",My=Ml(Fy),Ly="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Uy=Ml(Ly);function Qp(e){return!!e||e===""}function tt(e){if(Ce(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=Vt(r)?Dy(r):tt(r);if(i)for(const a in i)t[a]=i[a]}return t}else{if(Vt(e))return e;if(Wt(e))return e}}const By=/;(?![^(]*\))/g,ky=/:(.+)/;function Dy(e){const t={};return e.split(By).forEach(n=>{if(n){const r=n.split(ky);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ze(e){let t="";if(Vt(e))t=e;else if(Ce(e))for(let n=0;n<e.length;n++){const r=ze(e[n]);r&&(t+=r+" ")}else if(Wt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function qp(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Vt(t)&&(e.class=ze(t)),n&&(e.style=tt(n)),e}function Gy(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=pi(e[r],t[r]);return n}function pi(e,t){if(e===t)return!0;let n=Nd(e),r=Nd(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Oa(e),r=Oa(t),n||r)return e===t;if(n=Ce(e),r=Ce(t),n||r)return n&&r?Gy(e,t):!1;if(n=Wt(e),r=Wt(t),n||r){if(!n||!r)return!1;const i=Object.keys(e).length,a=Object.keys(t).length;if(i!==a)return!1;for(const o in e){const s=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(s&&!l||!s&&l||!pi(e[o],t[o]))return!1}}return String(e)===String(t)}function Ll(e,t){return e.findIndex(n=>pi(n,t))}const Je=e=>Vt(e)?e:e==null?"":Ce(e)||Wt(e)&&(e.toString===tv||!De(e.toString))?JSON.stringify(e,ev,2):String(e),ev=(e,t)=>t&&t.__v_isRef?ev(e,t.value):Io(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:io(t)?{[`Set(${t.size})`]:[...t.values()]}:Wt(t)&&!Ce(t)&&!nv(t)?String(t):t,xt={},Eo=[],ur=()=>{},Vy=()=>!1,$y=/^on[^a-z]/,qa=e=>$y.test(e),af=e=>e.startsWith("onUpdate:"),Xt=Object.assign,sf=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},jy=Object.prototype.hasOwnProperty,dt=(e,t)=>jy.call(e,t),Ce=Array.isArray,Io=e=>es(e)==="[object Map]",io=e=>es(e)==="[object Set]",Nd=e=>es(e)==="[object Date]",De=e=>typeof e=="function",Vt=e=>typeof e=="string",Oa=e=>typeof e=="symbol",Wt=e=>e!==null&&typeof e=="object",lf=e=>Wt(e)&&De(e.then)&&De(e.catch),tv=Object.prototype.toString,es=e=>tv.call(e),Hy=e=>es(e).slice(8,-1),nv=e=>es(e)==="[object Object]",uf=e=>Vt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,pa=Ml(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ul=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},zy=/-(\w)/g,Vn=Ul(e=>e.replace(zy,(t,n)=>n?n.toUpperCase():"")),Xy=/\B([A-Z])/g,wr=Ul(e=>e.replace(Xy,"-$1").toLowerCase()),ts=Ul(e=>e.charAt(0).toUpperCase()+e.slice(1)),va=Ul(e=>e?`on${ts(e)}`:""),Mo=(e,t)=>!Object.is(e,t),So=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},ll=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},vi=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Rd;const Wy=()=>Rd||(Rd=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Fn;class cf{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&Fn&&(this.parent=Fn,this.index=(Fn.scopes||(Fn.scopes=[])).push(this)-1)}run(t){if(this.active){const n=Fn;try{return Fn=this,t()}finally{Fn=n}}}on(){Fn=this}off(){Fn=this.parent}stop(t){if(this.active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.active=!1}}}function Ky(e){return new cf(e)}function rv(e,t=Fn){t&&t.active&&t.effects.push(e)}function Yy(){return Fn}function Zy(e){Fn&&Fn.cleanups.push(e)}const ff=e=>{const t=new Set(e);return t.w=0,t.n=0,t},iv=e=>(e.w&mi)>0,ov=e=>(e.n&mi)>0,Jy=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=mi},Qy=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const i=t[r];iv(i)&&!ov(i)?i.delete(e):t[n++]=i,i.w&=~mi,i.n&=~mi}t.length=n}},nc=new WeakMap;let oa=0,mi=1;const rc=30;let sr;const Zi=Symbol(""),ic=Symbol("");class ns{constructor(t,n=null,r){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,rv(this,r)}run(){if(!this.active)return this.fn();let t=sr,n=fi;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=sr,sr=this,fi=!0,mi=1<<++oa,oa<=rc?Jy(this):Ad(this),this.fn()}finally{oa<=rc&&Qy(this),mi=1<<--oa,sr=this.parent,fi=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){sr===this?this.deferStop=!0:this.active&&(Ad(this),this.onStop&&this.onStop(),this.active=!1)}}function Ad(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}function qy(e,t){e.effect&&(e=e.effect.fn);const n=new ns(e);t&&(Xt(n,t),t.scope&&rv(n,t.scope)),(!t||!t.lazy)&&n.run();const r=n.run.bind(n);return r.effect=n,r}function e0(e){e.effect.stop()}let fi=!0;const av=[];function oo(){av.push(fi),fi=!1}function ao(){const e=av.pop();fi=e===void 0?!0:e}function $n(e,t,n){if(fi&&sr){let r=nc.get(e);r||nc.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=ff()),sv(i)}}function sv(e,t){let n=!1;oa<=rc?ov(e)||(e.n|=mi,n=!iv(e)):n=!e.has(sr),n&&(e.add(sr),sr.deps.push(e))}function Hr(e,t,n,r,i,a){const o=nc.get(e);if(!o)return;let s=[];if(t==="clear")s=[...o.values()];else if(n==="length"&&Ce(e))o.forEach((l,u)=>{(u==="length"||u>=r)&&s.push(l)});else switch(n!==void 0&&s.push(o.get(n)),t){case"add":Ce(e)?uf(n)&&s.push(o.get("length")):(s.push(o.get(Zi)),Io(e)&&s.push(o.get(ic)));break;case"delete":Ce(e)||(s.push(o.get(Zi)),Io(e)&&s.push(o.get(ic)));break;case"set":Io(e)&&s.push(o.get(Zi));break}if(s.length===1)s[0]&&oc(s[0]);else{const l=[];for(const u of s)u&&l.push(...u);oc(ff(l))}}function oc(e,t){const n=Ce(e)?e:[...e];for(const r of n)r.computed&&Od(r);for(const r of n)r.computed||Od(r)}function Od(e,t){(e!==sr||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const t0=Ml("__proto__,__v_isRef,__isVue"),lv=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Oa)),n0=Bl(),r0=Bl(!1,!0),i0=Bl(!0),o0=Bl(!0,!0),Pd=a0();function a0(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ot(this);for(let a=0,o=this.length;a<o;a++)$n(r,"get",a+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(ot)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){oo();const r=ot(this)[t].apply(this,n);return ao(),r}}),e}function Bl(e=!1,t=!1){return function(r,i,a){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&a===(e?t?vv:pv:t?hv:dv).get(r))return r;const o=Ce(r);if(!e&&o&&dt(Pd,i))return Reflect.get(Pd,i,a);const s=Reflect.get(r,i,a);return(Oa(i)?lv.has(i):t0(i))||(e||$n(r,"get",i),t)?s:et(s)?o&&uf(i)?s:s.value:Wt(s)?e?hf(s):Pr(s):s}}const s0=uv(),l0=uv(!0);function uv(e=!1){return function(n,r,i,a){let o=n[r];if(Lo(o)&&et(o)&&!et(i))return!1;if(!e&&!Lo(i)&&(ul(i)||(i=ot(i),o=ot(o)),!Ce(n)&&et(o)&&!et(i)))return o.value=i,!0;const s=Ce(n)&&uf(r)?Number(r)<n.length:dt(n,r),l=Reflect.set(n,r,i,a);return n===ot(a)&&(s?Mo(i,o)&&Hr(n,"set",r,i):Hr(n,"add",r,i)),l}}function u0(e,t){const n=dt(e,t);e[t];const r=Reflect.deleteProperty(e,t);return r&&n&&Hr(e,"delete",t,void 0),r}function c0(e,t){const n=Reflect.has(e,t);return(!Oa(t)||!lv.has(t))&&$n(e,"has",t),n}function f0(e){return $n(e,"iterate",Ce(e)?"length":Zi),Reflect.ownKeys(e)}const cv={get:n0,set:s0,deleteProperty:u0,has:c0,ownKeys:f0},fv={get:i0,set(e,t){return!0},deleteProperty(e,t){return!0}},d0=Xt({},cv,{get:r0,set:l0}),h0=Xt({},fv,{get:o0}),df=e=>e,kl=e=>Reflect.getPrototypeOf(e);function ps(e,t,n=!1,r=!1){e=e.__v_raw;const i=ot(e),a=ot(t);n||(t!==a&&$n(i,"get",t),$n(i,"get",a));const{has:o}=kl(i),s=r?df:n?mf:Pa;if(o.call(i,t))return s(e.get(t));if(o.call(i,a))return s(e.get(a));e!==i&&e.get(t)}function vs(e,t=!1){const n=this.__v_raw,r=ot(n),i=ot(e);return t||(e!==i&&$n(r,"has",e),$n(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function ms(e,t=!1){return e=e.__v_raw,!t&&$n(ot(e),"iterate",Zi),Reflect.get(e,"size",e)}function Fd(e){e=ot(e);const t=ot(this);return kl(t).has.call(t,e)||(t.add(e),Hr(t,"add",e,e)),this}function Md(e,t){t=ot(t);const n=ot(this),{has:r,get:i}=kl(n);let a=r.call(n,e);a||(e=ot(e),a=r.call(n,e));const o=i.call(n,e);return n.set(e,t),a?Mo(t,o)&&Hr(n,"set",e,t):Hr(n,"add",e,t),this}function Ld(e){const t=ot(this),{has:n,get:r}=kl(t);let i=n.call(t,e);i||(e=ot(e),i=n.call(t,e)),r&&r.call(t,e);const a=t.delete(e);return i&&Hr(t,"delete",e,void 0),a}function Ud(){const e=ot(this),t=e.size!==0,n=e.clear();return t&&Hr(e,"clear",void 0,void 0),n}function gs(e,t){return function(r,i){const a=this,o=a.__v_raw,s=ot(o),l=t?df:e?mf:Pa;return!e&&$n(s,"iterate",Zi),o.forEach((u,c)=>r.call(i,l(u),l(c),a))}}function ys(e,t,n){return function(...r){const i=this.__v_raw,a=ot(i),o=Io(a),s=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=i[e](...r),c=n?df:t?mf:Pa;return!t&&$n(a,"iterate",l?ic:Zi),{next(){const{value:f,done:d}=u.next();return d?{value:f,done:d}:{value:s?[c(f[0]),c(f[1])]:c(f),done:d}},[Symbol.iterator](){return this}}}}function Qr(e){return function(...t){return e==="delete"?!1:this}}function p0(){const e={get(a){return ps(this,a)},get size(){return ms(this)},has:vs,add:Fd,set:Md,delete:Ld,clear:Ud,forEach:gs(!1,!1)},t={get(a){return ps(this,a,!1,!0)},get size(){return ms(this)},has:vs,add:Fd,set:Md,delete:Ld,clear:Ud,forEach:gs(!1,!0)},n={get(a){return ps(this,a,!0)},get size(){return ms(this,!0)},has(a){return vs.call(this,a,!0)},add:Qr("add"),set:Qr("set"),delete:Qr("delete"),clear:Qr("clear"),forEach:gs(!0,!1)},r={get(a){return ps(this,a,!0,!0)},get size(){return ms(this,!0)},has(a){return vs.call(this,a,!0)},add:Qr("add"),set:Qr("set"),delete:Qr("delete"),clear:Qr("clear"),forEach:gs(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{e[a]=ys(a,!1,!1),n[a]=ys(a,!0,!1),t[a]=ys(a,!1,!0),r[a]=ys(a,!0,!0)}),[e,n,t,r]}const[v0,m0,g0,y0]=p0();function Dl(e,t){const n=t?e?y0:g0:e?m0:v0;return(r,i,a)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(dt(n,i)&&i in r?n:r,i,a)}const b0={get:Dl(!1,!1)},x0={get:Dl(!1,!0)},_0={get:Dl(!0,!1)},T0={get:Dl(!0,!0)},dv=new WeakMap,hv=new WeakMap,pv=new WeakMap,vv=new WeakMap;function w0(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function C0(e){return e.__v_skip||!Object.isExtensible(e)?0:w0(Hy(e))}function Pr(e){return Lo(e)?e:Gl(e,!1,cv,b0,dv)}function jo(e){return Gl(e,!1,d0,x0,hv)}function hf(e){return Gl(e,!0,fv,_0,pv)}function E0(e){return Gl(e,!0,h0,T0,vv)}function Gl(e,t,n,r,i){if(!Wt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=i.get(e);if(a)return a;const o=C0(e);if(o===0)return e;const s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function di(e){return Lo(e)?di(e.__v_raw):!!(e&&e.__v_isReactive)}function Lo(e){return!!(e&&e.__v_isReadonly)}function ul(e){return!!(e&&e.__v_isShallow)}function pf(e){return di(e)||Lo(e)}function ot(e){const t=e&&e.__v_raw;return t?ot(t):e}function vf(e){return ll(e,"__v_skip",!0),e}const Pa=e=>Wt(e)?Pr(e):e,mf=e=>Wt(e)?hf(e):e;function gf(e){fi&&sr&&(e=ot(e),sv(e.dep||(e.dep=ff())))}function Vl(e,t){e=ot(e),e.dep&&oc(e.dep)}function et(e){return!!(e&&e.__v_isRef===!0)}function Te(e){return mv(e,!1)}function An(e){return mv(e,!0)}function mv(e,t){return et(e)?e:new I0(e,t)}class I0{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ot(t),this._value=n?t:Pa(t)}get value(){return gf(this),this._value}set value(t){t=this.__v_isShallow?t:ot(t),Mo(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:Pa(t),Vl(this))}}function S0(e){Vl(e)}function x(e){return et(e)?e.value:e}const N0={get:(e,t,n)=>x(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return et(i)&&!et(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function yf(e){return di(e)?e:new Proxy(e,N0)}class R0{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>gf(this),()=>Vl(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function A0(e){return new R0(e)}function Et(e){const t=Ce(e)?new Array(e.length):{};for(const n in e)t[n]=Sn(e,n);return t}class O0{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function Sn(e,t,n){const r=e[t];return et(r)?r:new O0(e,t,n)}class P0{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ns(t,()=>{this._dirty||(this._dirty=!0,Vl(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=ot(this);return gf(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function F0(e,t,n=!1){let r,i;const a=De(e);return a?(r=e,i=ur):(r=e.get,i=e.set),new P0(r,i,a||!i,n)}const ma=[];function gv(e,...t){oo();const n=ma.length?ma[ma.length-1].component:null,r=n&&n.appContext.config.warnHandler,i=M0();if(r)Cr(r,n,11,[e+t.join(""),n&&n.proxy,i.map(({vnode:a})=>`at <${um(n,a.type)}>`).join(`
`),i]);else{const a=[`[Vue warn]: ${e}`,...t];i.length&&a.push(`
`,...L0(i)),console.warn(...a)}ao()}function M0(){let e=ma[ma.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}function L0(e){const t=[];return e.forEach((n,r)=>{t.push(...r===0?[]:[`
`],...U0(n))}),t}function U0({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,i=` at <${um(e.component,e.type,r)}`,a=">"+n;return e.props?[i,...B0(e.props),a]:[i+a]}function B0(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(r=>{t.push(...yv(r,e[r]))}),n.length>3&&t.push(" ..."),t}function yv(e,t,n){return Vt(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:et(t)?(t=yv(e,ot(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):De(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ot(t),n?t:[`${e}=`,t])}function Cr(e,t,n,r){let i;try{i=r?e(...r):e()}catch(a){so(a,t,n)}return i}function Gn(e,t,n,r){if(De(e)){const a=Cr(e,t,n,r);return a&&lf(a)&&a.catch(o=>{so(o,t,n)}),a}const i=[];for(let a=0;a<e.length;a++)i.push(Gn(e[a],t,n,r));return i}function so(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let a=t.parent;const o=t.proxy,s=n;for(;a;){const u=a.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,o,s)===!1)return}a=a.parent}const l=t.appContext.config.errorHandler;if(l){Cr(l,null,10,[e,o,s]);return}}k0(e,n,i,r)}function k0(e,t,n,r=!0){console.error(e)}let cl=!1,ac=!1;const Un=[];let Br=0;const ga=[];let aa=null,mo=0;const ya=[];let ni=null,go=0;const bv=Promise.resolve();let bf=null,sc=null;function tn(e){const t=bf||bv;return e?t.then(this?e.bind(this):e):t}function D0(e){let t=Br+1,n=Un.length;for(;t<n;){const r=t+n>>>1;Fa(Un[r])<e?t=r+1:n=r}return t}function xf(e){(!Un.length||!Un.includes(e,cl&&e.allowRecurse?Br+1:Br))&&e!==sc&&(e.id==null?Un.push(e):Un.splice(D0(e.id),0,e),xv())}function xv(){!cl&&!ac&&(ac=!0,bf=bv.then(Tv))}function G0(e){const t=Un.indexOf(e);t>Br&&Un.splice(t,1)}function _v(e,t,n,r){Ce(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?r+1:r))&&n.push(e),xv()}function V0(e){_v(e,aa,ga,mo)}function _f(e){_v(e,ni,ya,go)}function $l(e,t=null){if(ga.length){for(sc=t,aa=[...new Set(ga)],ga.length=0,mo=0;mo<aa.length;mo++)aa[mo]();aa=null,mo=0,sc=null,$l(e,t)}}function fl(e){if($l(),ya.length){const t=[...new Set(ya)];if(ya.length=0,ni){ni.push(...t);return}for(ni=t,ni.sort((n,r)=>Fa(n)-Fa(r)),go=0;go<ni.length;go++)ni[go]();ni=null,go=0}}const Fa=e=>e.id==null?1/0:e.id;function Tv(e){ac=!1,cl=!0,$l(e),Un.sort((n,r)=>Fa(n)-Fa(r));const t=ur;try{for(Br=0;Br<Un.length;Br++){const n=Un[Br];n&&n.active!==!1&&Cr(n,null,14)}}finally{Br=0,Un.length=0,fl(),cl=!1,bf=null,(Un.length||ga.length||ya.length)&&Tv(e)}}let yo,bs=[];function wv(e,t){var n,r;yo=e,yo?(yo.enabled=!0,bs.forEach(({event:i,args:a})=>yo.emit(i,...a)),bs=[]):typeof window!="undefined"&&window.HTMLElement&&!(!((r=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||r===void 0)&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{wv(a,t)}),setTimeout(()=>{yo||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,bs=[])},3e3)):bs=[]}function $0(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||xt;let i=n;const a=t.startsWith("update:"),o=a&&t.slice(7);if(o&&o in r){const c=`${o==="modelValue"?"model":o}Modifiers`,{number:f,trim:d}=r[c]||xt;d&&(i=n.map(h=>h.trim())),f&&(i=n.map(vi))}let s,l=r[s=va(t)]||r[s=va(Vn(t))];!l&&a&&(l=r[s=va(wr(t))]),l&&Gn(l,e,6,i);const u=r[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,Gn(u,e,6,i)}}function Cv(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const a=e.emits;let o={},s=!1;if(!De(e)){const l=u=>{const c=Cv(u,t,!0);c&&(s=!0,Xt(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!a&&!s?(r.set(e,null),null):(Ce(a)?a.forEach(l=>o[l]=null):Xt(o,a),r.set(e,o),o)}function jl(e,t){return!e||!qa(t)?!1:(t=t.slice(2).replace(/Once$/,""),dt(e,t[0].toLowerCase()+t.slice(1))||dt(e,wr(t))||dt(e,t))}let mn=null,Hl=null;function Ma(e){const t=mn;return mn=e,Hl=e&&e.type.__scopeId||null,t}function hr(e){Hl=e}function pr(){Hl=null}const j0=e=>Pe;function Pe(e,t=mn,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&pc(-1);const a=Ma(t),o=e(...i);return Ma(a),r._d&&pc(1),o};return r._n=!0,r._c=!0,r._d=!0,r}function Ys(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:a,propsOptions:[o],slots:s,attrs:l,emit:u,render:c,renderCache:f,data:d,setupState:h,ctx:p,inheritAttrs:v}=e;let g,y;const m=Ma(e);try{if(n.shapeFlag&4){const T=i||r;g=Ln(c.call(T,T,f,a,h,d,p)),y=l}else{const T=t;g=Ln(T.length>1?T(a,{attrs:l,slots:s,emit:u}):T(a,null)),y=t.props?l:z0(l)}}catch(T){xa.length=0,so(T,e,1),g=C(yn)}let b=g;if(y&&v!==!1){const T=Object.keys(y),{shapeFlag:S}=b;T.length&&S&7&&(o&&T.some(af)&&(y=X0(y,o)),b=Ar(b,y))}return n.dirs&&(b=Ar(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),g=b,Ma(m),g}function H0(e){let t;for(let n=0;n<e.length;n++){const r=e[n];if(fr(r)){if(r.type!==yn||r.children==="v-if"){if(t)return;t=r}}else return}return t}const z0=e=>{let t;for(const n in e)(n==="class"||n==="style"||qa(n))&&((t||(t={}))[n]=e[n]);return t},X0=(e,t)=>{const n={};for(const r in e)(!af(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function W0(e,t,n){const{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:l}=t,u=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Bd(r,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const d=c[f];if(o[d]!==r[d]&&!jl(u,d))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?o?Bd(r,o,u):!0:!!o;return!1}function Bd(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const a=r[i];if(t[a]!==e[a]&&!jl(n,a))return!0}return!1}function Tf({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const Ev=e=>e.__isSuspense,K0={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,a,o,s,l,u){e==null?Z0(t,n,r,i,a,o,s,l,u):J0(e,t,n,r,i,o,s,l,u)},hydrate:Q0,create:wf,normalize:q0},Y0=K0;function La(e,t){const n=e.props&&e.props[t];De(n)&&n()}function Z0(e,t,n,r,i,a,o,s,l){const{p:u,o:{createElement:c}}=l,f=c("div"),d=e.suspense=wf(e,i,r,t,f,n,a,o,s,l);u(null,d.pendingBranch=e.ssContent,f,null,r,d,a,o),d.deps>0?(La(e,"onPending"),La(e,"onFallback"),u(null,e.ssFallback,t,n,r,null,a,o),No(d,e.ssFallback)):d.resolve()}function J0(e,t,n,r,i,a,o,s,{p:l,um:u,o:{createElement:c}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const d=t.ssContent,h=t.ssFallback,{activeBranch:p,pendingBranch:v,isInFallback:g,isHydrating:y}=f;if(v)f.pendingBranch=d,yr(d,v)?(l(v,d,f.hiddenContainer,null,i,f,a,o,s),f.deps<=0?f.resolve():g&&(l(p,h,n,r,i,null,a,o,s),No(f,h))):(f.pendingId++,y?(f.isHydrating=!1,f.activeBranch=v):u(v,i,f),f.deps=0,f.effects.length=0,f.hiddenContainer=c("div"),g?(l(null,d,f.hiddenContainer,null,i,f,a,o,s),f.deps<=0?f.resolve():(l(p,h,n,r,i,null,a,o,s),No(f,h))):p&&yr(d,p)?(l(p,d,n,r,i,f,a,o,s),f.resolve(!0)):(l(null,d,f.hiddenContainer,null,i,f,a,o,s),f.deps<=0&&f.resolve()));else if(p&&yr(d,p))l(p,d,n,r,i,f,a,o,s),No(f,d);else if(La(t,"onPending"),f.pendingBranch=d,f.pendingId++,l(null,d,f.hiddenContainer,null,i,f,a,o,s),f.deps<=0)f.resolve();else{const{timeout:m,pendingId:b}=f;m>0?setTimeout(()=>{f.pendingId===b&&f.fallback(h)},m):m===0&&f.fallback(h)}}function wf(e,t,n,r,i,a,o,s,l,u,c=!1){const{p:f,m:d,um:h,n:p,o:{parentNode:v,remove:g}}=u,y=vi(e.props&&e.props.timeout),m={vnode:e,parent:t,parentComponent:n,isSVG:o,container:r,hiddenContainer:i,anchor:a,deps:0,pendingId:0,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:c,isUnmounted:!1,effects:[],resolve(b=!1){const{vnode:T,activeBranch:S,pendingBranch:w,pendingId:N,effects:I,parentComponent:R,container:U}=m;if(m.isHydrating)m.isHydrating=!1;else if(!b){const j=S&&w.transition&&w.transition.mode==="out-in";j&&(S.transition.afterLeave=()=>{N===m.pendingId&&d(w,U,B,0)});let{anchor:B}=m;S&&(B=p(S),h(S,R,m,!0)),j||d(w,U,B,0)}No(m,w),m.pendingBranch=null,m.isInFallback=!1;let $=m.parent,z=!1;for(;$;){if($.pendingBranch){$.effects.push(...I),z=!0;break}$=$.parent}z||_f(I),m.effects=[],La(T,"onResolve")},fallback(b){if(!m.pendingBranch)return;const{vnode:T,activeBranch:S,parentComponent:w,container:N,isSVG:I}=m;La(T,"onFallback");const R=p(S),U=()=>{!m.isInFallback||(f(null,b,N,R,w,null,I,s,l),No(m,b))},$=b.transition&&b.transition.mode==="out-in";$&&(S.transition.afterLeave=U),m.isInFallback=!0,h(S,w,null,!0),$||U()},move(b,T,S){m.activeBranch&&d(m.activeBranch,b,T,S),m.container=b},next(){return m.activeBranch&&p(m.activeBranch)},registerDep(b,T){const S=!!m.pendingBranch;S&&m.deps++;const w=b.vnode.el;b.asyncDep.catch(N=>{so(N,b,0)}).then(N=>{if(b.isUnmounted||m.isUnmounted||m.pendingId!==b.suspenseId)return;b.asyncResolved=!0;const{vnode:I}=b;vc(b,N,!1),w&&(I.el=w);const R=!w&&b.subTree.el;T(b,I,v(w||b.subTree.el),w?null:p(b.subTree),m,o,l),R&&g(R),Tf(b,I.el),S&&--m.deps===0&&m.resolve()})},unmount(b,T){m.isUnmounted=!0,m.activeBranch&&h(m.activeBranch,n,b,T),m.pendingBranch&&h(m.pendingBranch,n,b,T)}};return m}function Q0(e,t,n,r,i,a,o,s,l){const u=t.suspense=wf(t,r,n,e.parentNode,document.createElement("div"),null,i,a,o,s,!0),c=l(e,u.pendingBranch=t.ssContent,n,u,a,o);return u.deps===0&&u.resolve(),c}function q0(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=kd(r?n.default:n),e.ssFallback=r?kd(n.fallback):C(yn)}function kd(e){let t;if(De(e)){const n=no&&e._c;n&&(e._d=!1,M()),e=e(),n&&(e._d=!0,t=Nn,em())}return Ce(e)&&(e=H0(e)),e=Ln(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Iv(e,t){t&&t.pendingBranch?Ce(e)?t.effects.push(...e):t.effects.push(e):_f(e)}function No(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,i=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=i,Tf(r,i))}function Hi(e,t){if(on){let n=on.provides;const r=on.parent&&on.parent.provides;r===n&&(n=on.provides=Object.create(r)),n[e]=t}}function Kn(e,t,n=!1){const r=on||mn;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&De(t)?t.call(r.proxy):t}}function zt(e,t){return rs(e,null,t)}function Sv(e,t){return rs(e,null,{flush:"post"})}function eb(e,t){return rs(e,null,{flush:"sync"})}const Dd={};function Dt(e,t,n){return rs(e,t,n)}function rs(e,t,{immediate:n,deep:r,flush:i,onTrack:a,onTrigger:o}=xt){const s=on;let l,u=!1,c=!1;if(et(e)?(l=()=>e.value,u=ul(e)):di(e)?(l=()=>e,r=!0):Ce(e)?(c=!0,u=e.some(y=>di(y)||ul(y)),l=()=>e.map(y=>{if(et(y))return y.value;if(di(y))return zi(y);if(De(y))return Cr(y,s,2)})):De(e)?t?l=()=>Cr(e,s,2):l=()=>{if(!(s&&s.isUnmounted))return f&&f(),Gn(e,s,3,[d])}:l=ur,t&&r){const y=l;l=()=>zi(y())}let f,d=y=>{f=g.onStop=()=>{Cr(y,s,4)}};if(ko)return d=ur,t?n&&Gn(t,s,3,[l(),c?[]:void 0,d]):l(),ur;let h=c?[]:Dd;const p=()=>{if(!!g.active)if(t){const y=g.run();(r||u||(c?y.some((m,b)=>Mo(m,h[b])):Mo(y,h)))&&(f&&f(),Gn(t,s,3,[y,h===Dd?void 0:h,d]),h=y)}else g.run()};p.allowRecurse=!!t;let v;i==="sync"?v=p:i==="post"?v=()=>fn(p,s&&s.suspense):v=()=>V0(p);const g=new ns(l,v);return t?n?p():h=g.run():i==="post"?fn(g.run.bind(g),s&&s.suspense):g.run(),()=>{g.stop(),s&&s.scope&&sf(s.scope.effects,g)}}function tb(e,t,n){const r=this.proxy,i=Vt(e)?e.includes(".")?Nv(r,e):()=>r[e]:e.bind(r,r);let a;De(t)?a=t:(a=t.handler,n=t);const o=on;gi(this);const s=rs(i,a.bind(r),n);return o?gi(o):hi(),s}function Nv(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function zi(e,t){if(!Wt(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),et(e))zi(e.value,t);else if(Ce(e))for(let n=0;n<e.length;n++)zi(e[n],t);else if(io(e)||Io(e))e.forEach(n=>{zi(n,t)});else if(nv(e))for(const n in e)zi(e[n],t);return e}function Cf(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return vr(()=>{e.isMounted=!0}),as(()=>{e.isUnmounting=!0}),e}const zn=[Function,Array],nb={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:zn,onEnter:zn,onAfterEnter:zn,onEnterCancelled:zn,onBeforeLeave:zn,onLeave:zn,onAfterLeave:zn,onLeaveCancelled:zn,onBeforeAppear:zn,onAppear:zn,onAfterAppear:zn,onAppearCancelled:zn},setup(e,{slots:t}){const n=Fr(),r=Cf();let i;return()=>{const a=t.default&&zl(t.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const v of a)if(v.type!==yn){o=v;break}}const s=ot(e),{mode:l}=s;if(r.isLeaving)return fu(o);const u=Gd(o);if(!u)return fu(o);const c=Uo(u,s,r,n);to(u,c);const f=n.subTree,d=f&&Gd(f);let h=!1;const{getTransitionKey:p}=u.type;if(p){const v=p();i===void 0?i=v:v!==i&&(i=v,h=!0)}if(d&&d.type!==yn&&(!yr(u,d)||h)){const v=Uo(d,s,r,n);if(to(d,v),l==="out-in")return r.isLeaving=!0,v.afterLeave=()=>{r.isLeaving=!1,n.update()},fu(o);l==="in-out"&&u.type!==yn&&(v.delayLeave=(g,y,m)=>{const b=Rv(r,d);b[String(d.key)]=d,g._leaveCb=()=>{y(),g._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=m})}return o}}},Ef=nb;function Rv(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Uo(e,t,n,r){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:s,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:f,onLeave:d,onAfterLeave:h,onLeaveCancelled:p,onBeforeAppear:v,onAppear:g,onAfterAppear:y,onAppearCancelled:m}=t,b=String(e.key),T=Rv(n,e),S=(I,R)=>{I&&Gn(I,r,9,R)},w=(I,R)=>{const U=R[1];S(I,R),Ce(I)?I.every($=>$.length<=1)&&U():I.length<=1&&U()},N={mode:a,persisted:o,beforeEnter(I){let R=s;if(!n.isMounted)if(i)R=v||s;else return;I._leaveCb&&I._leaveCb(!0);const U=T[b];U&&yr(e,U)&&U.el._leaveCb&&U.el._leaveCb(),S(R,[I])},enter(I){let R=l,U=u,$=c;if(!n.isMounted)if(i)R=g||l,U=y||u,$=m||c;else return;let z=!1;const j=I._enterCb=B=>{z||(z=!0,B?S($,[I]):S(U,[I]),N.delayedLeave&&N.delayedLeave(),I._enterCb=void 0)};R?w(R,[I,j]):j()},leave(I,R){const U=String(e.key);if(I._enterCb&&I._enterCb(!0),n.isUnmounting)return R();S(f,[I]);let $=!1;const z=I._leaveCb=j=>{$||($=!0,R(),j?S(p,[I]):S(h,[I]),I._leaveCb=void 0,T[U]===e&&delete T[U])};T[U]=e,d?w(d,[I,z]):z()},clone(I){return Uo(I,t,n,r)}};return N}function fu(e){if(is(e))return e=Ar(e),e.children=null,e}function Gd(e){return is(e)?e.children?e.children[0]:void 0:e}function to(e,t){e.shapeFlag&6&&e.component?to(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function zl(e,t=!1,n){let r=[],i=0;for(let a=0;a<e.length;a++){let o=e[a];const s=n==null?o.key:String(n)+String(o.key!=null?o.key:a);o.type===Oe?(o.patchFlag&128&&i++,r=r.concat(zl(o.children,t,s))):(t||o.type!==yn)&&r.push(s!=null?Ar(o,{key:s}):o)}if(i>1)for(let a=0;a<r.length;a++)r[a].patchFlag=-2;return r}function Ie(e){return De(e)?{setup:e,name:e.name}:e}const Ji=e=>!!e.type.__asyncLoader;function rb(e){De(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,timeout:a,suspensible:o=!0,onError:s}=e;let l=null,u,c=0;const f=()=>(c++,l=null,d()),d=()=>{let h;return l||(h=l=t().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),s)return new Promise((v,g)=>{s(p,()=>v(f()),()=>g(p),c+1)});throw p}).then(p=>h!==l&&l?l:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),u=p,p)))};return Ie({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return u},setup(){const h=on;if(u)return()=>du(u,h);const p=m=>{l=null,so(m,h,13,!r)};if(o&&h.suspense||ko)return d().then(m=>()=>du(m,h)).catch(m=>(p(m),()=>r?C(r,{error:m}):null));const v=Te(!1),g=Te(),y=Te(!!i);return i&&setTimeout(()=>{y.value=!1},i),a!=null&&setTimeout(()=>{if(!v.value&&!g.value){const m=new Error(`Async component timed out after ${a}ms.`);p(m),g.value=m}},a),d().then(()=>{v.value=!0,h.parent&&is(h.parent.vnode)&&xf(h.parent.update)}).catch(m=>{p(m),g.value=m}),()=>{if(v.value&&u)return du(u,h);if(g.value&&r)return C(r,{error:g.value});if(n&&!y.value)return C(n)}}})}function du(e,{vnode:{ref:t,props:n,children:r,shapeFlag:i},parent:a}){const o=C(e,n,r);return o.ref=t,o}const is=e=>e.type.__isKeepAlive,ib={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Fr(),r=n.ctx;if(!r.renderer)return()=>{const m=t.default&&t.default();return m&&m.length===1?m[0]:m};const i=new Map,a=new Set;let o=null;const s=n.suspense,{renderer:{p:l,m:u,um:c,o:{createElement:f}}}=r,d=f("div");r.activate=(m,b,T,S,w)=>{const N=m.component;u(m,b,T,0,s),l(N.vnode,m,b,T,N,s,S,m.slotScopeIds,w),fn(()=>{N.isDeactivated=!1,N.a&&So(N.a);const I=m.props&&m.props.onVnodeMounted;I&&In(I,N.parent,m)},s)},r.deactivate=m=>{const b=m.component;u(m,d,null,1,s),fn(()=>{b.da&&So(b.da);const T=m.props&&m.props.onVnodeUnmounted;T&&In(T,b.parent,m),b.isDeactivated=!0},s)};function h(m){hu(m),c(m,n,s,!0)}function p(m){i.forEach((b,T)=>{const S=ml(b.type);S&&(!m||!m(S))&&v(T)})}function v(m){const b=i.get(m);!o||b.type!==o.type?h(b):o&&hu(o),i.delete(m),a.delete(m)}Dt(()=>[e.include,e.exclude],([m,b])=>{m&&p(T=>sa(m,T)),b&&p(T=>!sa(b,T))},{flush:"post",deep:!0});let g=null;const y=()=>{g!=null&&i.set(g,pu(n.subTree))};return vr(y),os(y),as(()=>{i.forEach(m=>{const{subTree:b,suspense:T}=n,S=pu(b);if(m.type===S.type){hu(S);const w=S.component.da;w&&fn(w,T);return}h(m)})}),()=>{if(g=null,!t.default)return null;const m=t.default(),b=m[0];if(m.length>1)return o=null,m;if(!fr(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return o=null,b;let T=pu(b);const S=T.type,w=ml(Ji(T)?T.type.__asyncResolved||{}:S),{include:N,exclude:I,max:R}=e;if(N&&(!w||!sa(N,w))||I&&w&&sa(I,w))return o=T,b;const U=T.key==null?S:T.key,$=i.get(U);return T.el&&(T=Ar(T),b.shapeFlag&128&&(b.ssContent=T)),g=U,$?(T.el=$.el,T.component=$.component,T.transition&&to(T,T.transition),T.shapeFlag|=512,a.delete(U),a.add(U)):(a.add(U),R&&a.size>parseInt(R,10)&&v(a.values().next().value)),T.shapeFlag|=256,o=T,Ev(b.type)?b:T}}},ob=ib;function sa(e,t){return Ce(e)?e.some(n=>sa(n,t)):Vt(e)?e.split(",").includes(t):e.test?e.test(t):!1}function Av(e,t){Pv(e,"a",t)}function Ov(e,t){Pv(e,"da",t)}function Pv(e,t,n=on){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Xl(t,r,n),n){let i=n.parent;for(;i&&i.parent;)is(i.parent.vnode)&&ab(r,t,n,i),i=i.parent}}function ab(e,t,n,r){const i=Xl(t,e,r,!0);Ho(()=>{sf(r[t],i)},n)}function hu(e){let t=e.shapeFlag;t&256&&(t-=256),t&512&&(t-=512),e.shapeFlag=t}function pu(e){return e.shapeFlag&128?e.ssContent:e}function Xl(e,t,n=on,r=!1){if(n){const i=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;oo(),gi(n);const s=Gn(t,n,e,o);return hi(),ao(),s});return r?i.unshift(a):i.push(a),a}}const Wr=e=>(t,n=on)=>(!ko||e==="sp")&&Xl(e,t,n),Fv=Wr("bm"),vr=Wr("m"),Mv=Wr("bu"),os=Wr("u"),as=Wr("bum"),Ho=Wr("um"),Lv=Wr("sp"),Uv=Wr("rtg"),Bv=Wr("rtc");function kv(e,t=on){Xl("ec",e,t)}function zo(e,t){const n=mn;if(n===null)return e;const r=Kl(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[o,s,l,u=xt]=t[a];De(o)&&(o={mounted:o,updated:o}),o.deep&&zi(s),i.push({dir:o,instance:r,value:s,oldValue:void 0,arg:l,modifiers:u})}return e}function mr(e,t,n,r){const i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){const s=i[o];a&&(s.oldValue=a[o].value);let l=s.dir[r];l&&(oo(),Gn(l,n,8,[e.el,s,e,t]),ao())}}const If="components",sb="directives";function wt(e,t){return Sf(If,e,!0,t)||e}const Dv=Symbol();function gt(e){return Vt(e)?Sf(If,e,!1)||e:e||Dv}function lb(e){return Sf(sb,e)}function Sf(e,t,n=!0,r=!1){const i=mn||on;if(i){const a=i.type;if(e===If){const s=ml(a,!1);if(s&&(s===t||s===Vn(t)||s===ts(Vn(t))))return a}const o=Vd(i[e]||a[e],t)||Vd(i.appContext[e],t);return!o&&r?a:o}}function Vd(e,t){return e&&(e[t]||e[Vn(t)]||e[ts(Vn(t))])}function Rr(e,t,n,r){let i;const a=n&&n[r];if(Ce(e)||Vt(e)){i=new Array(e.length);for(let o=0,s=e.length;o<s;o++)i[o]=t(e[o],o,void 0,a&&a[o])}else if(typeof e=="number"){i=new Array(e);for(let o=0;o<e;o++)i[o]=t(o+1,o,void 0,a&&a[o])}else if(Wt(e))if(e[Symbol.iterator])i=Array.from(e,(o,s)=>t(o,s,void 0,a&&a[s]));else{const o=Object.keys(e);i=new Array(o.length);for(let s=0,l=o.length;s<l;s++){const u=o[s];i[s]=t(e[u],u,s,a&&a[s])}}else i=[];return n&&(n[r]=i),i}function ub(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(Ce(r))for(let i=0;i<r.length;i++)e[r[i].name]=r[i].fn;else r&&(e[r.name]=r.fn)}return e}function Mt(e,t,n={},r,i){if(mn.isCE||mn.parent&&Ji(mn.parent)&&mn.parent.isCE)return C("slot",t==="default"?null:{name:t},r&&r());let a=e[t];a&&a._c&&(a._d=!1),M();const o=a&&Gv(a(n)),s=we(Oe,{key:n.key||`_${t}`},o||(r?r():[]),o&&e._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),a&&a._c&&(a._d=!0),s}function Gv(e){return e.some(t=>fr(t)?!(t.type===yn||t.type===Oe&&!Gv(t.children)):!0)?e:null}function Vv(e){const t={};for(const n in e)t[va(n)]=e[n];return t}const lc=e=>e?om(e)?Kl(e)||e.proxy:lc(e.parent):null,dl=Xt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lc(e.parent),$root:e=>lc(e.root),$emit:e=>e.emit,$options:e=>jv(e),$forceUpdate:e=>e.f||(e.f=()=>xf(e.update)),$nextTick:e=>e.n||(e.n=tn.bind(e.proxy)),$watch:e=>tb.bind(e)}),uc={get({_:e},t){const{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:l}=e;let u;if(t[0]!=="$"){const h=o[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else{if(r!==xt&&dt(r,t))return o[t]=1,r[t];if(i!==xt&&dt(i,t))return o[t]=2,i[t];if((u=e.propsOptions[0])&&dt(u,t))return o[t]=3,a[t];if(n!==xt&&dt(n,t))return o[t]=4,n[t];cc&&(o[t]=0)}}const c=dl[t];let f,d;if(c)return t==="$attrs"&&$n(e,"get",t),c(e);if((f=s.__cssModules)&&(f=f[t]))return f;if(n!==xt&&dt(n,t))return o[t]=4,n[t];if(d=l.config.globalProperties,dt(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:a}=e;return i!==xt&&dt(i,t)?(i[t]=n,!0):r!==xt&&dt(r,t)?(r[t]=n,!0):dt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:a}},o){let s;return!!n[o]||e!==xt&&dt(e,o)||t!==xt&&dt(t,o)||(s=a[0])&&dt(s,o)||dt(r,o)||dt(dl,o)||dt(i.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:dt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},cb=Xt({},uc,{get(e,t){if(t!==Symbol.unscopables)return uc.get(e,t,e)},has(e,t){return t[0]!=="_"&&!My(t)}});let cc=!0;function fb(e){const t=jv(e),n=e.proxy,r=e.ctx;cc=!1,t.beforeCreate&&$d(t.beforeCreate,e,"bc");const{data:i,computed:a,methods:o,watch:s,provide:l,inject:u,created:c,beforeMount:f,mounted:d,beforeUpdate:h,updated:p,activated:v,deactivated:g,beforeDestroy:y,beforeUnmount:m,destroyed:b,unmounted:T,render:S,renderTracked:w,renderTriggered:N,errorCaptured:I,serverPrefetch:R,expose:U,inheritAttrs:$,components:z,directives:j,filters:B}=t;if(u&&db(u,r,null,e.appContext.config.unwrapInjectedRef),o)for(const oe in o){const me=o[oe];De(me)&&(r[oe]=me.bind(n))}if(i){const oe=i.call(n,n);Wt(oe)&&(e.data=Pr(oe))}if(cc=!0,a)for(const oe in a){const me=a[oe],Ke=De(me)?me.bind(n,n):De(me.get)?me.get.bind(n,n):ur,re=!De(me)&&De(me.set)?me.set.bind(n):ur,de=J({get:Ke,set:re});Object.defineProperty(r,oe,{enumerable:!0,configurable:!0,get:()=>de.value,set:ye=>de.value=ye})}if(s)for(const oe in s)$v(s[oe],r,n,oe);if(l){const oe=De(l)?l.call(n):l;Reflect.ownKeys(oe).forEach(me=>{Hi(me,oe[me])})}c&&$d(c,e,"c");function Y(oe,me){Ce(me)?me.forEach(Ke=>oe(Ke.bind(n))):me&&oe(me.bind(n))}if(Y(Fv,f),Y(vr,d),Y(Mv,h),Y(os,p),Y(Av,v),Y(Ov,g),Y(kv,I),Y(Bv,w),Y(Uv,N),Y(as,m),Y(Ho,T),Y(Lv,R),Ce(U))if(U.length){const oe=e.exposed||(e.exposed={});U.forEach(me=>{Object.defineProperty(oe,me,{get:()=>n[me],set:Ke=>n[me]=Ke})})}else e.exposed||(e.exposed={});S&&e.render===ur&&(e.render=S),$!=null&&(e.inheritAttrs=$),z&&(e.components=z),j&&(e.directives=j)}function db(e,t,n=ur,r=!1){Ce(e)&&(e=fc(e));for(const i in e){const a=e[i];let o;Wt(a)?"default"in a?o=Kn(a.from||i,a.default,!0):o=Kn(a.from||i):o=Kn(a),et(o)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):t[i]=o}}function $d(e,t,n){Gn(Ce(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function $v(e,t,n,r){const i=r.includes(".")?Nv(n,r):()=>n[r];if(Vt(e)){const a=t[e];De(a)&&Dt(i,a)}else if(De(e))Dt(i,e.bind(n));else if(Wt(e))if(Ce(e))e.forEach(a=>$v(a,t,n,r));else{const a=De(e.handler)?e.handler.bind(n):t[e.handler];De(a)&&Dt(i,a,e)}}function jv(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t);let l;return s?l=s:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(u=>hl(l,u,o,!0)),hl(l,t,o)),a.set(t,l),l}function hl(e,t,n,r=!1){const{mixins:i,extends:a}=t;a&&hl(e,a,n,!0),i&&i.forEach(o=>hl(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const s=hb[o]||n&&n[o];e[o]=s?s(e[o],t[o]):t[o]}return e}const hb={data:jd,props:Mi,emits:Mi,methods:Mi,computed:Mi,beforeCreate:bn,created:bn,beforeMount:bn,mounted:bn,beforeUpdate:bn,updated:bn,beforeDestroy:bn,beforeUnmount:bn,destroyed:bn,unmounted:bn,activated:bn,deactivated:bn,errorCaptured:bn,serverPrefetch:bn,components:Mi,directives:Mi,watch:vb,provide:jd,inject:pb};function jd(e,t){return t?e?function(){return Xt(De(e)?e.call(this,this):e,De(t)?t.call(this,this):t)}:t:e}function pb(e,t){return Mi(fc(e),fc(t))}function fc(e){if(Ce(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function bn(e,t){return e?[...new Set([].concat(e,t))]:t}function Mi(e,t){return e?Xt(Xt(Object.create(null),e),t):t}function vb(e,t){if(!e)return t;if(!t)return e;const n=Xt(Object.create(null),e);for(const r in t)n[r]=bn(e[r],t[r]);return n}function mb(e,t,n,r=!1){const i={},a={};ll(a,Wl,1),e.propsDefaults=Object.create(null),Hv(e,t,i,a);for(const o in e.propsOptions[0])o in i||(i[o]=void 0);n?e.props=r?i:jo(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function gb(e,t,n,r){const{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=ot(i),[l]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let d=c[f];if(jl(e.emitsOptions,d))continue;const h=t[d];if(l)if(dt(a,d))h!==a[d]&&(a[d]=h,u=!0);else{const p=Vn(d);i[p]=dc(l,s,p,h,e,!1)}else h!==a[d]&&(a[d]=h,u=!0)}}}else{Hv(e,t,i,a)&&(u=!0);let c;for(const f in s)(!t||!dt(t,f)&&((c=wr(f))===f||!dt(t,c)))&&(l?n&&(n[f]!==void 0||n[c]!==void 0)&&(i[f]=dc(l,s,f,void 0,e,!0)):delete i[f]);if(a!==s)for(const f in a)(!t||!dt(t,f)&&!0)&&(delete a[f],u=!0)}u&&Hr(e,"set","$attrs")}function Hv(e,t,n,r){const[i,a]=e.propsOptions;let o=!1,s;if(t)for(let l in t){if(pa(l))continue;const u=t[l];let c;i&&dt(i,c=Vn(l))?!a||!a.includes(c)?n[c]=u:(s||(s={}))[c]=u:jl(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(a){const l=ot(n),u=s||xt;for(let c=0;c<a.length;c++){const f=a[c];n[f]=dc(i,l,f,u[f],e,!dt(u,f))}}return o}function dc(e,t,n,r,i,a){const o=e[n];if(o!=null){const s=dt(o,"default");if(s&&r===void 0){const l=o.default;if(o.type!==Function&&De(l)){const{propsDefaults:u}=i;n in u?r=u[n]:(gi(i),r=u[n]=l.call(null,t),hi())}else r=l}o[0]&&(a&&!s?r=!1:o[1]&&(r===""||r===wr(n))&&(r=!0))}return r}function zv(e,t,n=!1){const r=t.propsCache,i=r.get(e);if(i)return i;const a=e.props,o={},s=[];let l=!1;if(!De(e)){const c=f=>{l=!0;const[d,h]=zv(f,t,!0);Xt(o,d),h&&s.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!a&&!l)return r.set(e,Eo),Eo;if(Ce(a))for(let c=0;c<a.length;c++){const f=Vn(a[c]);Hd(f)&&(o[f]=xt)}else if(a)for(const c in a){const f=Vn(c);if(Hd(f)){const d=a[c],h=o[f]=Ce(d)||De(d)?{type:d}:d;if(h){const p=Wd(Boolean,h.type),v=Wd(String,h.type);h[0]=p>-1,h[1]=v<0||p<v,(p>-1||dt(h,"default"))&&s.push(f)}}}const u=[o,s];return r.set(e,u),u}function Hd(e){return e[0]!=="$"}function zd(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Xd(e,t){return zd(e)===zd(t)}function Wd(e,t){return Ce(t)?t.findIndex(n=>Xd(n,e)):De(t)&&Xd(t,e)?0:-1}const Xv=e=>e[0]==="_"||e==="$stable",Nf=e=>Ce(e)?e.map(Ln):[Ln(e)],yb=(e,t,n)=>{if(t._n)return t;const r=Pe((...i)=>Nf(t(...i)),n);return r._c=!1,r},Wv=(e,t,n)=>{const r=e._ctx;for(const i in e){if(Xv(i))continue;const a=e[i];if(De(a))t[i]=yb(i,a,r);else if(a!=null){const o=Nf(a);t[i]=()=>o}}},Kv=(e,t)=>{const n=Nf(t);e.slots.default=()=>n},bb=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=ot(t),ll(t,"_",n)):Wv(t,e.slots={})}else e.slots={},t&&Kv(e,t);ll(e.slots,Wl,1)},xb=(e,t,n)=>{const{vnode:r,slots:i}=e;let a=!0,o=xt;if(r.shapeFlag&32){const s=t._;s?n&&s===1?a=!1:(Xt(i,t),!n&&s===1&&delete i._):(a=!t.$stable,Wv(t,i)),o=t}else t&&(Kv(e,t),o={default:1});if(a)for(const s in i)!Xv(s)&&!(s in o)&&delete i[s]};function Yv(){return{app:null,config:{isNativeTag:Vy,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let _b=0;function Tb(e,t){return function(r,i=null){De(r)||(r=Object.assign({},r)),i!=null&&!Wt(i)&&(i=null);const a=Yv(),o=new Set;let s=!1;const l=a.app={_uid:_b++,_component:r,_props:i,_container:null,_context:a,_instance:null,version:pm,get config(){return a.config},set config(u){},use(u,...c){return o.has(u)||(u&&De(u.install)?(o.add(u),u.install(l,...c)):De(u)&&(o.add(u),u(l,...c))),l},mixin(u){return a.mixins.includes(u)||a.mixins.push(u),l},component(u,c){return c?(a.components[u]=c,l):a.components[u]},directive(u,c){return c?(a.directives[u]=c,l):a.directives[u]},mount(u,c,f){if(!s){const d=C(r,i);return d.appContext=a,c&&t?t(d,u):e(d,u,f),s=!0,l._container=u,u.__vue_app__=l,Kl(d.component)||d.component.proxy}},unmount(){s&&(e(null,l._container),delete l._container.__vue_app__)},provide(u,c){return a.provides[u]=c,l}};return l}}function pl(e,t,n,r,i=!1){if(Ce(e)){e.forEach((d,h)=>pl(d,t&&(Ce(t)?t[h]:t),n,r,i));return}if(Ji(r)&&!i)return;const a=r.shapeFlag&4?Kl(r.component)||r.component.proxy:r.el,o=i?null:a,{i:s,r:l}=e,u=t&&t.r,c=s.refs===xt?s.refs={}:s.refs,f=s.setupState;if(u!=null&&u!==l&&(Vt(u)?(c[u]=null,dt(f,u)&&(f[u]=null)):et(u)&&(u.value=null)),De(l))Cr(l,s,12,[o,c]);else{const d=Vt(l),h=et(l);if(d||h){const p=()=>{if(e.f){const v=d?c[l]:l.value;i?Ce(v)&&sf(v,a):Ce(v)?v.includes(a)||v.push(a):d?(c[l]=[a],dt(f,l)&&(f[l]=c[l])):(l.value=[a],e.k&&(c[e.k]=l.value))}else d?(c[l]=o,dt(f,l)&&(f[l]=o)):h&&(l.value=o,e.k&&(c[e.k]=o))};o?(p.id=-1,fn(p,n)):p()}}}let qr=!1;const xs=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",_s=e=>e.nodeType===8;function wb(e){const{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:o,remove:s,insert:l,createComment:u}}=e,c=(y,m)=>{if(!m.hasChildNodes()){n(null,y,m),fl(),m._vnode=y;return}qr=!1,f(m.firstChild,y,null,null,null),fl(),m._vnode=y,qr&&console.error("Hydration completed but contains mismatches.")},f=(y,m,b,T,S,w=!1)=>{const N=_s(y)&&y.data==="[",I=()=>v(y,m,b,T,S,N),{type:R,ref:U,shapeFlag:$,patchFlag:z}=m,j=y.nodeType;m.el=y,z===-2&&(w=!1,m.dynamicChildren=null);let B=null;switch(R){case Bo:j!==3?m.children===""?(l(m.el=i(""),o(y),y),B=y):B=I():(y.data!==m.children&&(qr=!0,y.data=m.children),B=a(y));break;case yn:j!==8||N?B=I():B=a(y);break;case Qi:if(j!==1&&j!==3)B=I();else{B=y;const he=!m.children.length;for(let Y=0;Y<m.staticCount;Y++)he&&(m.children+=B.nodeType===1?B.outerHTML:B.data),Y===m.staticCount-1&&(m.anchor=B),B=a(B);return B}break;case Oe:N?B=p(y,m,b,T,S,w):B=I();break;default:if($&1)j!==1||m.type.toLowerCase()!==y.tagName.toLowerCase()?B=I():B=d(y,m,b,T,S,w);else if($&6){m.slotScopeIds=S;const he=o(y);if(t(m,he,null,b,T,xs(he),w),B=N?g(y):a(y),B&&_s(B)&&B.data==="teleport end"&&(B=a(B)),Ji(m)){let Y;N?(Y=C(Oe),Y.anchor=B?B.previousSibling:he.lastChild):Y=y.nodeType===3?le(""):C("div"),Y.el=y,m.component.subTree=Y}}else $&64?j!==8?B=I():B=m.type.hydrate(y,m,b,T,S,w,e,h):$&128&&(B=m.type.hydrate(y,m,b,T,xs(o(y)),S,w,e,f))}return U!=null&&pl(U,null,T,m),B},d=(y,m,b,T,S,w)=>{w=w||!!m.dynamicChildren;const{type:N,props:I,patchFlag:R,shapeFlag:U,dirs:$}=m,z=N==="input"&&$||N==="option";if(z||R!==-1){if($&&mr(m,null,b,"created"),I)if(z||!w||R&48)for(const B in I)(z&&B.endsWith("value")||qa(B)&&!pa(B))&&r(y,B,null,I[B],!1,void 0,b);else I.onClick&&r(y,"onClick",null,I.onClick,!1,void 0,b);let j;if((j=I&&I.onVnodeBeforeMount)&&In(j,b,m),$&&mr(m,null,b,"beforeMount"),((j=I&&I.onVnodeMounted)||$)&&Iv(()=>{j&&In(j,b,m),$&&mr(m,null,b,"mounted")},T),U&16&&!(I&&(I.innerHTML||I.textContent))){let B=h(y.firstChild,m,y,b,T,S,w);for(;B;){qr=!0;const he=B;B=B.nextSibling,s(he)}}else U&8&&y.textContent!==m.children&&(qr=!0,y.textContent=m.children)}return y.nextSibling},h=(y,m,b,T,S,w,N)=>{N=N||!!m.dynamicChildren;const I=m.children,R=I.length;for(let U=0;U<R;U++){const $=N?I[U]:I[U]=Ln(I[U]);if(y)y=f(y,$,T,S,w,N);else{if($.type===Bo&&!$.children)continue;qr=!0,n(null,$,b,null,T,S,xs(b),w)}}return y},p=(y,m,b,T,S,w)=>{const{slotScopeIds:N}=m;N&&(S=S?S.concat(N):N);const I=o(y),R=h(a(y),m,I,b,T,S,w);return R&&_s(R)&&R.data==="]"?a(m.anchor=R):(qr=!0,l(m.anchor=u("]"),I,R),R)},v=(y,m,b,T,S,w)=>{if(qr=!0,m.el=null,w){const R=g(y);for(;;){const U=a(y);if(U&&U!==R)s(U);else break}}const N=a(y),I=o(y);return s(y),n(null,m,I,N,b,T,xs(I),S),N},g=y=>{let m=0;for(;y;)if(y=a(y),y&&_s(y)&&(y.data==="["&&m++,y.data==="]")){if(m===0)return a(y);m--}return y};return[c,f]}const fn=Iv;function Zv(e){return Qv(e)}function Jv(e){return Qv(e,wb)}function Qv(e,t){const n=Wy();n.__VUE__=!0;const{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:d,setScopeId:h=ur,cloneNode:p,insertStaticContent:v}=e,g=(E,A,V,K=null,Z=null,ae=null,pe=!1,ne=null,se=!!A.dynamicChildren)=>{if(E===A)return;E&&!yr(E,A)&&(K=Ve(E),Se(E,Z,ae,!0),E=null),A.patchFlag===-2&&(se=!1,A.dynamicChildren=null);const{type:ee,ref:Ne,shapeFlag:be}=A;switch(ee){case Bo:y(E,A,V,K);break;case yn:m(E,A,V,K);break;case Qi:E==null&&b(A,V,K,pe);break;case Oe:j(E,A,V,K,Z,ae,pe,ne,se);break;default:be&1?w(E,A,V,K,Z,ae,pe,ne,se):be&6?B(E,A,V,K,Z,ae,pe,ne,se):(be&64||be&128)&&ee.process(E,A,V,K,Z,ae,pe,ne,se,Ze)}Ne!=null&&Z&&pl(Ne,E&&E.ref,ae,A||E,!A)},y=(E,A,V,K)=>{if(E==null)r(A.el=s(A.children),V,K);else{const Z=A.el=E.el;A.children!==E.children&&u(Z,A.children)}},m=(E,A,V,K)=>{E==null?r(A.el=l(A.children||""),V,K):A.el=E.el},b=(E,A,V,K)=>{[E.el,E.anchor]=v(E.children,A,V,K,E.el,E.anchor)},T=({el:E,anchor:A},V,K)=>{let Z;for(;E&&E!==A;)Z=d(E),r(E,V,K),E=Z;r(A,V,K)},S=({el:E,anchor:A})=>{let V;for(;E&&E!==A;)V=d(E),i(E),E=V;i(A)},w=(E,A,V,K,Z,ae,pe,ne,se)=>{pe=pe||A.type==="svg",E==null?N(A,V,K,Z,ae,pe,ne,se):U(E,A,Z,ae,pe,ne,se)},N=(E,A,V,K,Z,ae,pe,ne)=>{let se,ee;const{type:Ne,props:be,shapeFlag:Re,transition:Le,patchFlag:qe,dirs:ht}=E;if(E.el&&p!==void 0&&qe===-1)se=E.el=p(E.el);else{if(se=E.el=o(E.type,ae,be&&be.is,be),Re&8?c(se,E.children):Re&16&&R(E.children,se,null,K,Z,ae&&Ne!=="foreignObject",pe,ne),ht&&mr(E,null,K,"created"),be){for(const L in be)L!=="value"&&!pa(L)&&a(se,L,null,be[L],ae,E.children,K,Z,ue);"value"in be&&a(se,"value",null,be.value),(ee=be.onVnodeBeforeMount)&&In(ee,K,E)}I(se,E,E.scopeId,pe,K)}ht&&mr(E,null,K,"beforeMount");const F=(!Z||Z&&!Z.pendingBranch)&&Le&&!Le.persisted;F&&Le.beforeEnter(se),r(se,A,V),((ee=be&&be.onVnodeMounted)||F||ht)&&fn(()=>{ee&&In(ee,K,E),F&&Le.enter(se),ht&&mr(E,null,K,"mounted")},Z)},I=(E,A,V,K,Z)=>{if(V&&h(E,V),K)for(let ae=0;ae<K.length;ae++)h(E,K[ae]);if(Z){let ae=Z.subTree;if(A===ae){const pe=Z.vnode;I(E,pe,pe.scopeId,pe.slotScopeIds,Z.parent)}}},R=(E,A,V,K,Z,ae,pe,ne,se=0)=>{for(let ee=se;ee<E.length;ee++){const Ne=E[ee]=ne?ii(E[ee]):Ln(E[ee]);g(null,Ne,A,V,K,Z,ae,pe,ne)}},U=(E,A,V,K,Z,ae,pe)=>{const ne=A.el=E.el;let{patchFlag:se,dynamicChildren:ee,dirs:Ne}=A;se|=E.patchFlag&16;const be=E.props||xt,Re=A.props||xt;let Le;V&&Ci(V,!1),(Le=Re.onVnodeBeforeUpdate)&&In(Le,V,A,E),Ne&&mr(A,E,V,"beforeUpdate"),V&&Ci(V,!0);const qe=Z&&A.type!=="foreignObject";if(ee?$(E.dynamicChildren,ee,ne,V,K,qe,ae):pe||Ke(E,A,ne,null,V,K,qe,ae,!1),se>0){if(se&16)z(ne,A,be,Re,V,K,Z);else if(se&2&&be.class!==Re.class&&a(ne,"class",null,Re.class,Z),se&4&&a(ne,"style",be.style,Re.style,Z),se&8){const ht=A.dynamicProps;for(let F=0;F<ht.length;F++){const L=ht[F],G=be[L],te=Re[L];(te!==G||L==="value")&&a(ne,L,G,te,Z,E.children,V,K,ue)}}se&1&&E.children!==A.children&&c(ne,A.children)}else!pe&&ee==null&&z(ne,A,be,Re,V,K,Z);((Le=Re.onVnodeUpdated)||Ne)&&fn(()=>{Le&&In(Le,V,A,E),Ne&&mr(A,E,V,"updated")},K)},$=(E,A,V,K,Z,ae,pe)=>{for(let ne=0;ne<A.length;ne++){const se=E[ne],ee=A[ne],Ne=se.el&&(se.type===Oe||!yr(se,ee)||se.shapeFlag&70)?f(se.el):V;g(se,ee,Ne,null,K,Z,ae,pe,!0)}},z=(E,A,V,K,Z,ae,pe)=>{if(V!==K){for(const ne in K){if(pa(ne))continue;const se=K[ne],ee=V[ne];se!==ee&&ne!=="value"&&a(E,ne,ee,se,pe,A.children,Z,ae,ue)}if(V!==xt)for(const ne in V)!pa(ne)&&!(ne in K)&&a(E,ne,V[ne],null,pe,A.children,Z,ae,ue);"value"in K&&a(E,"value",V.value,K.value)}},j=(E,A,V,K,Z,ae,pe,ne,se)=>{const ee=A.el=E?E.el:s(""),Ne=A.anchor=E?E.anchor:s("");let{patchFlag:be,dynamicChildren:Re,slotScopeIds:Le}=A;Le&&(ne=ne?ne.concat(Le):Le),E==null?(r(ee,V,K),r(Ne,V,K),R(A.children,V,Ne,Z,ae,pe,ne,se)):be>0&&be&64&&Re&&E.dynamicChildren?($(E.dynamicChildren,Re,V,Z,ae,pe,ne),(A.key!=null||Z&&A===Z.subTree)&&Rf(E,A,!0)):Ke(E,A,V,Ne,Z,ae,pe,ne,se)},B=(E,A,V,K,Z,ae,pe,ne,se)=>{A.slotScopeIds=ne,E==null?A.shapeFlag&512?Z.ctx.activate(A,V,K,pe,se):he(A,V,K,Z,ae,pe,se):Y(E,A,se)},he=(E,A,V,K,Z,ae,pe)=>{const ne=E.component=im(E,K,Z);if(is(E)&&(ne.ctx.renderer=Ze),am(ne),ne.asyncDep){if(Z&&Z.registerDep(ne,oe),!E.el){const se=ne.subTree=C(yn);m(null,se,A,V)}return}oe(ne,E,A,V,Z,ae,pe)},Y=(E,A,V)=>{const K=A.component=E.component;if(W0(E,A,V))if(K.asyncDep&&!K.asyncResolved){me(K,A,V);return}else K.next=A,G0(K.update),K.update();else A.el=E.el,K.vnode=A},oe=(E,A,V,K,Z,ae,pe)=>{const ne=()=>{if(E.isMounted){let{next:Ne,bu:be,u:Re,parent:Le,vnode:qe}=E,ht=Ne,F;Ci(E,!1),Ne?(Ne.el=qe.el,me(E,Ne,pe)):Ne=qe,be&&So(be),(F=Ne.props&&Ne.props.onVnodeBeforeUpdate)&&In(F,Le,Ne,qe),Ci(E,!0);const L=Ys(E),G=E.subTree;E.subTree=L,g(G,L,f(G.el),Ve(G),E,Z,ae),Ne.el=L.el,ht===null&&Tf(E,L.el),Re&&fn(Re,Z),(F=Ne.props&&Ne.props.onVnodeUpdated)&&fn(()=>In(F,Le,Ne,qe),Z)}else{let Ne;const{el:be,props:Re}=A,{bm:Le,m:qe,parent:ht}=E,F=Ji(A);if(Ci(E,!1),Le&&So(Le),!F&&(Ne=Re&&Re.onVnodeBeforeMount)&&In(Ne,ht,A),Ci(E,!0),be&&ut){const L=()=>{E.subTree=Ys(E),ut(be,E.subTree,E,Z,null)};F?A.type.__asyncLoader().then(()=>!E.isUnmounted&&L()):L()}else{const L=E.subTree=Ys(E);g(null,L,V,K,E,Z,ae),A.el=L.el}if(qe&&fn(qe,Z),!F&&(Ne=Re&&Re.onVnodeMounted)){const L=A;fn(()=>In(Ne,ht,L),Z)}(A.shapeFlag&256||ht&&Ji(ht.vnode)&&ht.vnode.shapeFlag&256)&&E.a&&fn(E.a,Z),E.isMounted=!0,A=V=K=null}},se=E.effect=new ns(ne,()=>xf(ee),E.scope),ee=E.update=()=>se.run();ee.id=E.uid,Ci(E,!0),ee()},me=(E,A,V)=>{A.component=E;const K=E.vnode.props;E.vnode=A,E.next=null,gb(E,A.props,K,V),xb(E,A.children,V),oo(),$l(void 0,E.update),ao()},Ke=(E,A,V,K,Z,ae,pe,ne,se=!1)=>{const ee=E&&E.children,Ne=E?E.shapeFlag:0,be=A.children,{patchFlag:Re,shapeFlag:Le}=A;if(Re>0){if(Re&128){de(ee,be,V,K,Z,ae,pe,ne,se);return}else if(Re&256){re(ee,be,V,K,Z,ae,pe,ne,se);return}}Le&8?(Ne&16&&ue(ee,Z,ae),be!==ee&&c(V,be)):Ne&16?Le&16?de(ee,be,V,K,Z,ae,pe,ne,se):ue(ee,Z,ae,!0):(Ne&8&&c(V,""),Le&16&&R(be,V,K,Z,ae,pe,ne,se))},re=(E,A,V,K,Z,ae,pe,ne,se)=>{E=E||Eo,A=A||Eo;const ee=E.length,Ne=A.length,be=Math.min(ee,Ne);let Re;for(Re=0;Re<be;Re++){const Le=A[Re]=se?ii(A[Re]):Ln(A[Re]);g(E[Re],Le,V,null,Z,ae,pe,ne,se)}ee>Ne?ue(E,Z,ae,!0,!1,be):R(A,V,K,Z,ae,pe,ne,se,be)},de=(E,A,V,K,Z,ae,pe,ne,se)=>{let ee=0;const Ne=A.length;let be=E.length-1,Re=Ne-1;for(;ee<=be&&ee<=Re;){const Le=E[ee],qe=A[ee]=se?ii(A[ee]):Ln(A[ee]);if(yr(Le,qe))g(Le,qe,V,null,Z,ae,pe,ne,se);else break;ee++}for(;ee<=be&&ee<=Re;){const Le=E[be],qe=A[Re]=se?ii(A[Re]):Ln(A[Re]);if(yr(Le,qe))g(Le,qe,V,null,Z,ae,pe,ne,se);else break;be--,Re--}if(ee>be){if(ee<=Re){const Le=Re+1,qe=Le<Ne?A[Le].el:K;for(;ee<=Re;)g(null,A[ee]=se?ii(A[ee]):Ln(A[ee]),V,qe,Z,ae,pe,ne,se),ee++}}else if(ee>Re)for(;ee<=be;)Se(E[ee],Z,ae,!0),ee++;else{const Le=ee,qe=ee,ht=new Map;for(ee=qe;ee<=Re;ee++){const Ge=A[ee]=se?ii(A[ee]):Ln(A[ee]);Ge.key!=null&&ht.set(Ge.key,ee)}let F,L=0;const G=Re-qe+1;let te=!1,_e=0;const Fe=new Array(G);for(ee=0;ee<G;ee++)Fe[ee]=0;for(ee=Le;ee<=be;ee++){const Ge=E[ee];if(L>=G){Se(Ge,Z,ae,!0);continue}let mt;if(Ge.key!=null)mt=ht.get(Ge.key);else for(F=qe;F<=Re;F++)if(Fe[F-qe]===0&&yr(Ge,A[F])){mt=F;break}mt===void 0?Se(Ge,Z,ae,!0):(Fe[mt-qe]=ee+1,mt>=_e?_e=mt:te=!0,g(Ge,A[mt],V,null,Z,ae,pe,ne,se),L++)}const $e=te?Cb(Fe):Eo;for(F=$e.length-1,ee=G-1;ee>=0;ee--){const Ge=qe+ee,mt=A[Ge],Be=Ge+1<Ne?A[Ge+1].el:K;Fe[ee]===0?g(null,mt,V,Be,Z,ae,pe,ne,se):te&&(F<0||ee!==$e[F]?ye(mt,V,Be,2):F--)}}},ye=(E,A,V,K,Z=null)=>{const{el:ae,type:pe,transition:ne,children:se,shapeFlag:ee}=E;if(ee&6){ye(E.component.subTree,A,V,K);return}if(ee&128){E.suspense.move(A,V,K);return}if(ee&64){pe.move(E,A,V,Ze);return}if(pe===Oe){r(ae,A,V);for(let be=0;be<se.length;be++)ye(se[be],A,V,K);r(E.anchor,A,V);return}if(pe===Qi){T(E,A,V);return}if(K!==2&&ee&1&&ne)if(K===0)ne.beforeEnter(ae),r(ae,A,V),fn(()=>ne.enter(ae),Z);else{const{leave:be,delayLeave:Re,afterLeave:Le}=ne,qe=()=>r(ae,A,V),ht=()=>{be(ae,()=>{qe(),Le&&Le()})};Re?Re(ae,qe,ht):ht()}else r(ae,A,V)},Se=(E,A,V,K=!1,Z=!1)=>{const{type:ae,props:pe,ref:ne,children:se,dynamicChildren:ee,shapeFlag:Ne,patchFlag:be,dirs:Re}=E;if(ne!=null&&pl(ne,null,V,E,!0),Ne&256){A.ctx.deactivate(E);return}const Le=Ne&1&&Re,qe=!Ji(E);let ht;if(qe&&(ht=pe&&pe.onVnodeBeforeUnmount)&&In(ht,A,E),Ne&6)ce(E.component,V,K);else{if(Ne&128){E.suspense.unmount(V,K);return}Le&&mr(E,null,A,"beforeUnmount"),Ne&64?E.type.remove(E,A,V,Z,Ze,K):ee&&(ae!==Oe||be>0&&be&64)?ue(ee,A,V,!1,!0):(ae===Oe&&be&384||!Z&&Ne&16)&&ue(se,A,V),K&&k(E)}(qe&&(ht=pe&&pe.onVnodeUnmounted)||Le)&&fn(()=>{ht&&In(ht,A,E),Le&&mr(E,null,A,"unmounted")},V)},k=E=>{const{type:A,el:V,anchor:K,transition:Z}=E;if(A===Oe){X(V,K);return}if(A===Qi){S(E);return}const ae=()=>{i(V),Z&&!Z.persisted&&Z.afterLeave&&Z.afterLeave()};if(E.shapeFlag&1&&Z&&!Z.persisted){const{leave:pe,delayLeave:ne}=Z,se=()=>pe(V,ae);ne?ne(E.el,ae,se):se()}else ae()},X=(E,A)=>{let V;for(;E!==A;)V=d(E),i(E),E=V;i(A)},ce=(E,A,V)=>{const{bum:K,scope:Z,update:ae,subTree:pe,um:ne}=E;K&&So(K),Z.stop(),ae&&(ae.active=!1,Se(pe,E,A,V)),ne&&fn(ne,A),fn(()=>{E.isUnmounted=!0},A),A&&A.pendingBranch&&!A.isUnmounted&&E.asyncDep&&!E.asyncResolved&&E.suspenseId===A.pendingId&&(A.deps--,A.deps===0&&A.resolve())},ue=(E,A,V,K=!1,Z=!1,ae=0)=>{for(let pe=ae;pe<E.length;pe++)Se(E[pe],A,V,K,Z)},Ve=E=>E.shapeFlag&6?Ve(E.component.subTree):E.shapeFlag&128?E.suspense.next():d(E.anchor||E.el),ie=(E,A,V)=>{E==null?A._vnode&&Se(A._vnode,null,null,!0):g(A._vnode||null,E,A,null,null,null,V),fl(),A._vnode=E},Ze={p:g,um:Se,m:ye,r:k,mt:he,mc:R,pc:Ke,pbc:$,n:Ve,o:e};let at,ut;return t&&([at,ut]=t(Ze)),{render:ie,hydrate:at,createApp:Tb(ie,at)}}function Ci({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Rf(e,t,n=!1){const r=e.children,i=t.children;if(Ce(r)&&Ce(i))for(let a=0;a<r.length;a++){const o=r[a];let s=i[a];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[a]=ii(i[a]),s.el=o.el),n||Rf(o,s))}}function Cb(e){const t=e.slice(),n=[0];let r,i,a,o,s;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(i=n[n.length-1],e[i]<u){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<u?a=s+1:o=s;u<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}const Eb=e=>e.__isTeleport,ba=e=>e&&(e.disabled||e.disabled===""),Kd=e=>typeof SVGElement!="undefined"&&e instanceof SVGElement,hc=(e,t)=>{const n=e&&e.to;return Vt(n)?t?t(n):null:n},Ib={__isTeleport:!0,process(e,t,n,r,i,a,o,s,l,u){const{mc:c,pc:f,pbc:d,o:{insert:h,querySelector:p,createText:v,createComment:g}}=u,y=ba(t.props);let{shapeFlag:m,children:b,dynamicChildren:T}=t;if(e==null){const S=t.el=v(""),w=t.anchor=v("");h(S,n,r),h(w,n,r);const N=t.target=hc(t.props,p),I=t.targetAnchor=v("");N&&(h(I,N),o=o||Kd(N));const R=(U,$)=>{m&16&&c(b,U,$,i,a,o,s,l)};y?R(n,w):N&&R(N,I)}else{t.el=e.el;const S=t.anchor=e.anchor,w=t.target=e.target,N=t.targetAnchor=e.targetAnchor,I=ba(e.props),R=I?n:w,U=I?S:N;if(o=o||Kd(w),T?(d(e.dynamicChildren,T,R,i,a,o,s),Rf(e,t,!0)):l||f(e,t,R,U,i,a,o,s,!1),y)I||Ts(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $=t.target=hc(t.props,p);$&&Ts(t,$,null,u,0)}else I&&Ts(t,w,N,u,1)}},remove(e,t,n,r,{um:i,o:{remove:a}},o){const{shapeFlag:s,children:l,anchor:u,targetAnchor:c,target:f,props:d}=e;if(f&&a(c),(o||!ba(d))&&(a(u),s&16))for(let h=0;h<l.length;h++){const p=l[h];i(p,t,n,!0,!!p.dynamicChildren)}},move:Ts,hydrate:Sb};function Ts(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);const{el:o,anchor:s,shapeFlag:l,children:u,props:c}=e,f=a===2;if(f&&r(o,t,n),(!f||ba(c))&&l&16)for(let d=0;d<u.length;d++)i(u[d],t,n,2);f&&r(s,t,n)}function Sb(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:l}},u){const c=t.target=hc(t.props,l);if(c){const f=c._lpa||c.firstChild;if(t.shapeFlag&16)if(ba(t.props))t.anchor=u(o(e),t,s(e),n,r,i,a),t.targetAnchor=f;else{t.anchor=o(e);let d=f;for(;d;)if(d=o(d),d&&d.nodeType===8&&d.data==="teleport anchor"){t.targetAnchor=d,c._lpa=t.targetAnchor&&o(t.targetAnchor);break}u(f,t,c,n,r,i,a)}}return t.anchor&&o(t.anchor)}const qv=Ib,Oe=Symbol(void 0),Bo=Symbol(void 0),yn=Symbol(void 0),Qi=Symbol(void 0),xa=[];let Nn=null;function M(e=!1){xa.push(Nn=e?null:[])}function em(){xa.pop(),Nn=xa[xa.length-1]||null}let no=1;function pc(e){no+=e}function tm(e){return e.dynamicChildren=no>0?Nn||Eo:null,em(),no>0&&Nn&&Nn.push(e),e}function W(e,t,n,r,i,a){return tm(P(e,t,n,r,i,a,!0))}function we(e,t,n,r,i){return tm(C(e,t,n,r,i,!0))}function fr(e){return e?e.__v_isVNode===!0:!1}function yr(e,t){return e.type===t.type&&e.key===t.key}function Nb(e){}const Wl="__vInternal",nm=({key:e})=>e!=null?e:null,Zs=({ref:e,ref_key:t,ref_for:n})=>e!=null?Vt(e)||et(e)||De(e)?{i:mn,r:e,k:t,f:!!n}:e:null;function P(e,t=null,n=null,r=0,i=null,a=e===Oe?0:1,o=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nm(t),ref:t&&Zs(t),scopeId:Hl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null};return s?(Af(l,n),a&128&&e.normalize(l)):n&&(l.shapeFlag|=Vt(n)?8:16),no>0&&!o&&Nn&&(l.patchFlag>0||a&6)&&l.patchFlag!==32&&Nn.push(l),l}const C=Rb;function Rb(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Dv)&&(e=yn),fr(e)){const s=Ar(e,t,!0);return n&&Af(s,n),no>0&&!a&&Nn&&(s.shapeFlag&6?Nn[Nn.indexOf(e)]=s:Nn.push(s)),s.patchFlag|=-2,s}if(Db(e)&&(e=e.__vccOpts),t){t=rm(t);let{class:s,style:l}=t;s&&!Vt(s)&&(t.class=ze(s)),Wt(l)&&(pf(l)&&!Ce(l)&&(l=Xt({},l)),t.style=tt(l))}const o=Vt(e)?1:Ev(e)?128:Eb(e)?64:Wt(e)?4:De(e)?2:0;return P(e,t,n,r,i,o,a,!0)}function rm(e){return e?pf(e)||Wl in e?Xt({},e):e:null}function Ar(e,t,n=!1){const{props:r,ref:i,patchFlag:a,children:o}=e,s=t?un(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&nm(s),ref:t&&t.ref?n&&i?Ce(i)?i.concat(Zs(t)):[i,Zs(t)]:Zs(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Oe?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ar(e.ssContent),ssFallback:e.ssFallback&&Ar(e.ssFallback),el:e.el,anchor:e.anchor}}function le(e=" ",t=0){return C(Bo,null,e,t)}function Ab(e,t){const n=C(Qi,null,e);return n.staticCount=t,n}function ve(e="",t=!1){return t?(M(),we(yn,null,e)):C(yn,null,e)}function Ln(e){return e==null||typeof e=="boolean"?C(yn):Ce(e)?C(Oe,null,e.slice()):typeof e=="object"?ii(e):C(Bo,null,String(e))}function ii(e){return e.el===null||e.memo?e:Ar(e)}function Af(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ce(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Af(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(Wl in t)?t._ctx=mn:i===3&&mn&&(mn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else De(t)?(t={default:t,_ctx:mn},n=32):(t=String(t),r&64?(n=16,t=[le(t)]):n=8);e.children=t,e.shapeFlag|=n}function un(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=ze([t.class,r.class]));else if(i==="style")t.style=tt([t.style,r.style]);else if(qa(i)){const a=t[i],o=r[i];o&&a!==o&&!(Ce(a)&&a.includes(o))&&(t[i]=a?[].concat(a,o):o)}else i!==""&&(t[i]=r[i])}return t}function In(e,t,n,r=null){Gn(e,t,7,[n,r])}const Ob=Yv();let Pb=0;function im(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||Ob,a={uid:Pb++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new cf(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:zv(r,i),emitsOptions:Cv(r,i),emit:null,emitted:null,propsDefaults:xt,inheritAttrs:r.inheritAttrs,ctx:xt,data:xt,props:xt,attrs:xt,slots:xt,refs:xt,setupState:xt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=$0.bind(null,a),e.ce&&e.ce(a),a}let on=null;const Fr=()=>on||mn,gi=e=>{on=e,e.scope.on()},hi=()=>{on&&on.scope.off(),on=null};function om(e){return e.vnode.shapeFlag&4}let ko=!1;function am(e,t=!1){ko=t;const{props:n,children:r}=e.vnode,i=om(e);mb(e,n,i,t),bb(e,r);const a=i?Fb(e,t):void 0;return ko=!1,a}function Fb(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=vf(new Proxy(e.ctx,uc));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?lm(e):null;gi(e),oo();const a=Cr(r,e,0,[e.props,i]);if(ao(),hi(),lf(a)){if(a.then(hi,hi),t)return a.then(o=>{vc(e,o,t)}).catch(o=>{so(o,e,0)});e.asyncDep=a}else vc(e,a,t)}else sm(e,t)}function vc(e,t,n){De(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Wt(t)&&(e.setupState=yf(t)),sm(e,n)}let vl,mc;function Mb(e){vl=e,mc=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,cb))}}const Lb=()=>!vl;function sm(e,t,n){const r=e.type;if(!e.render){if(!t&&vl&&!r.render){const i=r.template;if(i){const{isCustomElement:a,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:l}=r,u=Xt(Xt({isCustomElement:a,delimiters:s},o),l);r.render=vl(i,u)}}e.render=r.render||ur,mc&&mc(e)}gi(e),oo(),fb(e),ao(),hi()}function Ub(e){return new Proxy(e.attrs,{get(t,n){return $n(e,"get","$attrs"),t[n]}})}function lm(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=Ub(e))},slots:e.slots,emit:e.emit,expose:t}}function Kl(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(yf(vf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in dl)return dl[n](e)}}))}const Bb=/(?:^|[-_])(\w)/g,kb=e=>e.replace(Bb,t=>t.toUpperCase()).replace(/[-_]/g,"");function ml(e,t=!0){return De(e)?e.displayName||e.name:e.name||t&&e.__name}function um(e,t,n=!1){let r=ml(t);if(!r&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(r=i[1])}if(!r&&e&&e.parent){const i=a=>{for(const o in a)if(a[o]===t)return o};r=i(e.components||e.parent.type.components)||i(e.appContext.components)}return r?kb(r):n?"App":"Anonymous"}function Db(e){return De(e)&&"__vccOpts"in e}const J=(e,t)=>F0(e,t,ko);function Gb(){return null}function Vb(){return null}function $b(e){}function jb(e,t){return null}function Hb(){return cm().slots}function zb(){return cm().attrs}function cm(){const e=Fr();return e.setupContext||(e.setupContext=lm(e))}function Xb(e,t){const n=Ce(e)?e.reduce((r,i)=>(r[i]={},r),{}):e;for(const r in t){const i=n[r];i?Ce(i)||De(i)?n[r]={type:i,default:t[r]}:i.default=t[r]:i===null&&(n[r]={default:t[r]})}return n}function Wb(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function Kb(e){const t=Fr();let n=e();return hi(),lf(n)&&(n=n.catch(r=>{throw gi(t),r})),[n,()=>gi(t)]}function fm(e,t,n){const r=arguments.length;return r===2?Wt(t)&&!Ce(t)?fr(t)?C(e,null,[t]):C(e,t):C(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&fr(n)&&(n=[n]),C(e,t,n))}const dm=Symbol(""),Yb=()=>{{const e=Kn(dm);return e||gv("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Zb(){}function Jb(e,t,n,r){const i=n[r];if(i&&hm(i,e))return i;const a=t();return a.memo=e.slice(),n[r]=a}function hm(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(Mo(n[r],t[r]))return!1;return no>0&&Nn&&Nn.push(e),!0}const pm="3.2.37",Qb={createComponentInstance:im,setupComponent:am,renderComponentRoot:Ys,setCurrentRenderingInstance:Ma,isVNode:fr,normalizeVNode:Ln},qb=Qb,e1=null,t1=null,n1="http://www.w3.org/2000/svg",Vi=typeof document!="undefined"?document:null,Yd=Vi&&Vi.createElement("template"),r1={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?Vi.createElementNS(n1,e):Vi.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Vi.createTextNode(e),createComment:e=>Vi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Vi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,r,i,a){const o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Yd.innerHTML=r?`<svg>${e}</svg>`:e;const s=Yd.content;if(r){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}t.insertBefore(s,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function i1(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function o1(e,t,n){const r=e.style,i=Vt(n);if(n&&!i){for(const a in n)gc(r,a,n[a]);if(t&&!Vt(t))for(const a in t)n[a]==null&&gc(r,a,"")}else{const a=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=a)}}const Zd=/\s*!important$/;function gc(e,t,n){if(Ce(n))n.forEach(r=>gc(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=a1(e,t);Zd.test(n)?e.setProperty(wr(r),n.replace(Zd,""),"important"):e[r]=n}}const Jd=["Webkit","Moz","ms"],vu={};function a1(e,t){const n=vu[t];if(n)return n;let r=Vn(t);if(r!=="filter"&&r in e)return vu[t]=r;r=ts(r);for(let i=0;i<Jd.length;i++){const a=Jd[i]+r;if(a in e)return vu[t]=a}return t}const Qd="http://www.w3.org/1999/xlink";function s1(e,t,n,r,i){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Qd,t.slice(6,t.length)):e.setAttributeNS(Qd,t,n);else{const a=Uy(t);n==null||a&&!Qp(n)?e.removeAttribute(t):e.setAttribute(t,a?"":n)}}function l1(e,t,n,r,i,a,o){if(t==="innerHTML"||t==="textContent"){r&&o(r,i,a),e[t]=n==null?"":n;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const l=n==null?"":n;(e.value!==l||e.tagName==="OPTION")&&(e.value=l),n==null&&e.removeAttribute(t);return}let s=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Qp(n):n==null&&l==="string"?(n="",s=!0):l==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(t)}const[vm,u1]=(()=>{let e=Date.now,t=!1;if(typeof window!="undefined"){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let yc=0;const c1=Promise.resolve(),f1=()=>{yc=0},d1=()=>yc||(c1.then(f1),yc=vm());function kr(e,t,n,r){e.addEventListener(t,n,r)}function h1(e,t,n,r){e.removeEventListener(t,n,r)}function p1(e,t,n,r,i=null){const a=e._vei||(e._vei={}),o=a[t];if(r&&o)o.value=r;else{const[s,l]=v1(t);if(r){const u=a[t]=m1(r,i);kr(e,s,u,l)}else o&&(h1(e,s,o,l),a[t]=void 0)}}const qd=/(?:Once|Passive|Capture)$/;function v1(e){let t;if(qd.test(e)){t={};let n;for(;n=e.match(qd);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[wr(e.slice(2)),t]}function m1(e,t){const n=r=>{const i=r.timeStamp||vm();(u1||i>=n.attached-1)&&Gn(g1(r,n.value),t,5,[r])};return n.value=e,n.attached=d1(),n}function g1(e,t){if(Ce(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const eh=/^on[a-z]/,y1=(e,t,n,r,i=!1,a,o,s,l)=>{t==="class"?i1(e,r,i):t==="style"?o1(e,n,r):qa(t)?af(t)||p1(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):b1(e,t,r,i))?l1(e,t,r,a,o,s,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),s1(e,t,r,i))};function b1(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&eh.test(t)&&De(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||eh.test(t)&&Vt(n)?!1:t in e}function mm(e,t){const n=Ie(e);class r extends Yl{constructor(a){super(n,a,t)}}return r.def=n,r}const x1=e=>mm(e,Om),_1=typeof HTMLElement!="undefined"?HTMLElement:class{};class Yl extends _1{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,tn(()=>{this._connected||(xc(null,this.shadowRoot),this._instance=null)})}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);new MutationObserver(r=>{for(const i of r)this._setAttr(i.attributeName)}).observe(this,{attributes:!0});const t=r=>{const{props:i,styles:a}=r,o=!Ce(i),s=i?o?Object.keys(i):i:[];let l;if(o)for(const u in this._props){const c=i[u];(c===Number||c&&c.type===Number)&&(this._props[u]=vi(this._props[u]),(l||(l=Object.create(null)))[u]=!0)}this._numberProps=l;for(const u of Object.keys(this))u[0]!=="_"&&this._setProp(u,this[u],!0,!1);for(const u of s.map(Vn))Object.defineProperty(this,u,{get(){return this._getProp(u)},set(c){this._setProp(u,c)}});this._applyStyles(a),this._update()},n=this._def.__asyncLoader;n?n().then(t):t(this._def)}_setAttr(t){let n=this.getAttribute(t);this._numberProps&&this._numberProps[t]&&(n=vi(n)),this._setProp(Vn(t),n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,i=!0){n!==this._props[t]&&(this._props[t]=n,i&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(wr(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(wr(t),n+""):n||this.removeAttribute(wr(t))))}_update(){xc(this._createVNode(),this.shadowRoot)}_createVNode(){const t=C(this._def,Xt({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0,n.emit=(i,...a)=>{this.dispatchEvent(new CustomEvent(i,{detail:a}))};let r=this;for(;r=r&&(r.parentNode||r.host);)if(r instanceof Yl){n.parent=r._instance;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}function T1(e="$style"){{const t=Fr();if(!t)return xt;const n=t.type.__cssModules;if(!n)return xt;const r=n[e];return r||xt}}function w1(e){const t=Fr();if(!t)return;const n=()=>bc(t.subTree,e(t.proxy));Sv(n),vr(()=>{const r=new MutationObserver(n);r.observe(t.subTree.el.parentNode,{childList:!0}),Ho(()=>r.disconnect())})}function bc(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{bc(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)th(e.el,t);else if(e.type===Oe)e.children.forEach(n=>bc(n,t));else if(e.type===Qi){let{el:n,anchor:r}=e;for(;n&&(th(n,t),n!==r);)n=n.nextSibling}}function th(e,t){if(e.nodeType===1){const n=e.style;for(const r in t)n.setProperty(`--${r}`,t[r])}}const ei="transition",Wo="animation",Ti=(e,{slots:t})=>fm(Ef,ym(e),t);Ti.displayName="Transition";const gm={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},C1=Ti.props=Xt({},Ef.props,gm),Ei=(e,t=[])=>{Ce(e)?e.forEach(n=>n(...t)):e&&e(...t)},nh=e=>e?Ce(e)?e.some(t=>t.length>1):e.length>1:!1;function ym(e){const t={};for(const z in e)z in gm||(t[z]=e[z]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:c=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=E1(i),v=p&&p[0],g=p&&p[1],{onBeforeEnter:y,onEnter:m,onEnterCancelled:b,onLeave:T,onLeaveCancelled:S,onBeforeAppear:w=y,onAppear:N=m,onAppearCancelled:I=b}=t,R=(z,j,B)=>{ri(z,j?c:s),ri(z,j?u:o),B&&B()},U=(z,j)=>{z._isLeaving=!1,ri(z,f),ri(z,h),ri(z,d),j&&j()},$=z=>(j,B)=>{const he=z?N:m,Y=()=>R(j,z,B);Ei(he,[j,Y]),rh(()=>{ri(j,z?l:a),Lr(j,z?c:s),nh(he)||ih(j,r,v,Y)})};return Xt(t,{onBeforeEnter(z){Ei(y,[z]),Lr(z,a),Lr(z,o)},onBeforeAppear(z){Ei(w,[z]),Lr(z,l),Lr(z,u)},onEnter:$(!1),onAppear:$(!0),onLeave(z,j){z._isLeaving=!0;const B=()=>U(z,j);Lr(z,f),xm(),Lr(z,d),rh(()=>{!z._isLeaving||(ri(z,f),Lr(z,h),nh(T)||ih(z,r,g,B))}),Ei(T,[z,B])},onEnterCancelled(z){R(z,!1),Ei(b,[z])},onAppearCancelled(z){R(z,!0),Ei(I,[z])},onLeaveCancelled(z){U(z),Ei(S,[z])}})}function E1(e){if(e==null)return null;if(Wt(e))return[mu(e.enter),mu(e.leave)];{const t=mu(e);return[t,t]}}function mu(e){return vi(e)}function Lr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function ri(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function rh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let I1=0;function ih(e,t,n,r){const i=e._endId=++I1,a=()=>{i===e._endId&&r()};if(n)return setTimeout(a,n);const{type:o,timeout:s,propCount:l}=bm(e,t);if(!o)return r();const u=o+"end";let c=0;const f=()=>{e.removeEventListener(u,d),a()},d=h=>{h.target===e&&++c>=l&&f()};setTimeout(()=>{c<l&&f()},s+1),e.addEventListener(u,d)}function bm(e,t){const n=window.getComputedStyle(e),r=p=>(n[p]||"").split(", "),i=r(ei+"Delay"),a=r(ei+"Duration"),o=oh(i,a),s=r(Wo+"Delay"),l=r(Wo+"Duration"),u=oh(s,l);let c=null,f=0,d=0;t===ei?o>0&&(c=ei,f=o,d=a.length):t===Wo?u>0&&(c=Wo,f=u,d=l.length):(f=Math.max(o,u),c=f>0?o>u?ei:Wo:null,d=c?c===ei?a.length:l.length:0);const h=c===ei&&/\b(transform|all)(,|$)/.test(n[ei+"Property"]);return{type:c,timeout:f,propCount:d,hasTransform:h}}function oh(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>ah(n)+ah(e[r])))}function ah(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function xm(){return document.body.offsetHeight}const _m=new WeakMap,Tm=new WeakMap,S1={name:"TransitionGroup",props:Xt({},C1,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Fr(),r=Cf();let i,a;return os(()=>{if(!i.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!O1(i[0].el,n.vnode.el,o))return;i.forEach(N1),i.forEach(R1);const s=i.filter(A1);xm(),s.forEach(l=>{const u=l.el,c=u.style;Lr(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const f=u._moveCb=d=>{d&&d.target!==u||(!d||/transform$/.test(d.propertyName))&&(u.removeEventListener("transitionend",f),u._moveCb=null,ri(u,o))};u.addEventListener("transitionend",f)})}),()=>{const o=ot(e),s=ym(o);let l=o.tag||Oe;i=a,a=t.default?zl(t.default()):[];for(let u=0;u<a.length;u++){const c=a[u];c.key!=null&&to(c,Uo(c,s,r,n))}if(i)for(let u=0;u<i.length;u++){const c=i[u];to(c,Uo(c,s,r,n)),_m.set(c,c.el.getBoundingClientRect())}return C(l,null,a)}}},wm=S1;function N1(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function R1(e){Tm.set(e,e.el.getBoundingClientRect())}function A1(e){const t=_m.get(e),n=Tm.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const a=e.el.style;return a.transform=a.webkitTransform=`translate(${r}px,${i}px)`,a.transitionDuration="0s",e}}function O1(e,t,n){const r=e.cloneNode();e._vtc&&e._vtc.forEach(o=>{o.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),n.split(/\s+/).forEach(o=>o&&r.classList.add(o)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:a}=bm(r);return i.removeChild(r),a}const yi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ce(t)?n=>So(t,n):t};function P1(e){e.target.composing=!0}function sh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Do={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=yi(i);const a=r||i.props&&i.props.type==="number";kr(e,t?"change":"input",o=>{if(o.target.composing)return;let s=e.value;n&&(s=s.trim()),a&&(s=vi(s)),e._assign(s)}),n&&kr(e,"change",()=>{e.value=e.value.trim()}),t||(kr(e,"compositionstart",P1),kr(e,"compositionend",sh),kr(e,"change",sh))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},a){if(e._assign=yi(a),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&vi(e.value)===t))return;const o=t==null?"":t;e.value!==o&&(e.value=o)}},Zl={deep:!0,created(e,t,n){e._assign=yi(n),kr(e,"change",()=>{const r=e._modelValue,i=Go(e),a=e.checked,o=e._assign;if(Ce(r)){const s=Ll(r,i),l=s!==-1;if(a&&!l)o(r.concat(i));else if(!a&&l){const u=[...r];u.splice(s,1),o(u)}}else if(io(r)){const s=new Set(r);a?s.add(i):s.delete(i),o(s)}else o(Em(e,a))})},mounted:lh,beforeUpdate(e,t,n){e._assign=yi(n),lh(e,t,n)}};function lh(e,{value:t,oldValue:n},r){e._modelValue=t,Ce(t)?e.checked=Ll(t,r.props.value)>-1:io(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=pi(t,Em(e,!0)))}const Of={created(e,{value:t},n){e.checked=pi(t,n.props.value),e._assign=yi(n),kr(e,"change",()=>{e._assign(Go(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=yi(r),t!==n&&(e.checked=pi(t,r.props.value))}},Cm={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=io(t);kr(e,"change",()=>{const a=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?vi(Go(o)):Go(o));e._assign(e.multiple?i?new Set(a):a:a[0])}),e._assign=yi(r)},mounted(e,{value:t}){uh(e,t)},beforeUpdate(e,t,n){e._assign=yi(n)},updated(e,{value:t}){uh(e,t)}};function uh(e,t){const n=e.multiple;if(!(n&&!Ce(t)&&!io(t))){for(let r=0,i=e.options.length;r<i;r++){const a=e.options[r],o=Go(a);if(n)Ce(t)?a.selected=Ll(t,o)>-1:a.selected=t.has(o);else if(pi(Go(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Go(e){return"_value"in e?e._value:e.value}function Em(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Im={created(e,t,n){ws(e,t,n,null,"created")},mounted(e,t,n){ws(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){ws(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){ws(e,t,n,r,"updated")}};function Sm(e,t){switch(e){case"SELECT":return Cm;case"TEXTAREA":return Do;default:switch(t){case"checkbox":return Zl;case"radio":return Of;default:return Do}}}function ws(e,t,n,r,i){const o=Sm(e.tagName,n.props&&n.props.type)[i];o&&o(e,t,n,r)}function F1(){Do.getSSRProps=({value:e})=>({value:e}),Of.getSSRProps=({value:e},t)=>{if(t.props&&pi(t.props.value,e))return{checked:!0}},Zl.getSSRProps=({value:e},t)=>{if(Ce(e)){if(t.props&&Ll(e,t.props.value)>-1)return{checked:!0}}else if(io(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Im.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=Sm(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const M1=["ctrl","shift","alt","meta"],L1={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>M1.some(n=>e[`${n}Key`]&&!t.includes(n))},ln=(e,t)=>(n,...r)=>{for(let i=0;i<t.length;i++){const a=L1[t[i]];if(a&&a(n,t))return}return e(n,...r)},U1={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$i=(e,t)=>n=>{if(!("key"in n))return;const r=wr(n.key);if(t.some(i=>i===r||U1[i]===r))return e(n)},Jl={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ko(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ko(e,!0),r.enter(e)):r.leave(e,()=>{Ko(e,!1)}):Ko(e,t))},beforeUnmount(e,{value:t}){Ko(e,t)}};function Ko(e,t){e.style.display=t?e._vod:"none"}function B1(){Jl.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Nm=Xt({patchProp:y1},r1);let _a,ch=!1;function Rm(){return _a||(_a=Zv(Nm))}function Am(){return _a=ch?_a:Jv(Nm),ch=!0,_a}const xc=(...e)=>{Rm().render(...e)},Om=(...e)=>{Am().hydrate(...e)},Pf=(...e)=>{const t=Rm().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=Pm(r);if(!i)return;const a=t._component;!De(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const o=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t},k1=(...e)=>{const t=Am().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=Pm(r);if(i)return n(i,!0,i instanceof SVGElement)},t};function Pm(e){return Vt(e)?document.querySelector(e):e}let fh=!1;const D1=()=>{fh||(fh=!0,F1(),B1())},G1=()=>{};var V1=Object.freeze(Object.defineProperty({__proto__:null,compile:G1,EffectScope:cf,ReactiveEffect:ns,customRef:A0,effect:qy,effectScope:Ky,getCurrentScope:Yy,isProxy:pf,isReactive:di,isReadonly:Lo,isRef:et,isShallow:ul,markRaw:vf,onScopeDispose:Zy,proxyRefs:yf,reactive:Pr,readonly:hf,ref:Te,shallowReactive:jo,shallowReadonly:E0,shallowRef:An,stop:e0,toRaw:ot,toRef:Sn,toRefs:Et,triggerRef:S0,unref:x,camelize:Vn,capitalize:ts,normalizeClass:ze,normalizeProps:qp,normalizeStyle:tt,toDisplayString:Je,toHandlerKey:va,BaseTransition:Ef,Comment:yn,Fragment:Oe,KeepAlive:ob,Static:Qi,Suspense:Y0,Teleport:qv,Text:Bo,callWithAsyncErrorHandling:Gn,callWithErrorHandling:Cr,cloneVNode:Ar,compatUtils:t1,computed:J,createBlock:we,createCommentVNode:ve,createElementBlock:W,createElementVNode:P,createHydrationRenderer:Jv,createPropsRestProxy:Wb,createRenderer:Zv,createSlots:ub,createStaticVNode:Ab,createTextVNode:le,createVNode:C,defineAsyncComponent:rb,defineComponent:Ie,defineEmits:Vb,defineExpose:$b,defineProps:Gb,get devtools(){return yo},getCurrentInstance:Fr,getTransitionRawChildren:zl,guardReactiveProps:rm,h:fm,handleError:so,initCustomFormatter:Zb,inject:Kn,isMemoSame:hm,isRuntimeOnly:Lb,isVNode:fr,mergeDefaults:Xb,mergeProps:un,nextTick:tn,onActivated:Av,onBeforeMount:Fv,onBeforeUnmount:as,onBeforeUpdate:Mv,onDeactivated:Ov,onErrorCaptured:kv,onMounted:vr,onRenderTracked:Bv,onRenderTriggered:Uv,onServerPrefetch:Lv,onUnmounted:Ho,onUpdated:os,openBlock:M,popScopeId:pr,provide:Hi,pushScopeId:hr,queuePostFlushCb:_f,registerRuntimeCompiler:Mb,renderList:Rr,renderSlot:Mt,resolveComponent:wt,resolveDirective:lb,resolveDynamicComponent:gt,resolveFilter:e1,resolveTransitionHooks:Uo,setBlockTracking:pc,setDevtoolsHook:wv,setTransitionHooks:to,ssrContextKey:dm,ssrUtils:qb,toHandlers:Vv,transformVNodeArgs:Nb,useAttrs:zb,useSSRContext:Yb,useSlots:Hb,useTransitionState:Cf,version:pm,warn:gv,watch:Dt,watchEffect:zt,watchPostEffect:Sv,watchSyncEffect:eb,withAsyncContext:Kb,withCtx:Pe,withDefaults:jb,withDirectives:zo,withMemo:Jb,withScopeId:j0,Transition:Ti,TransitionGroup:wm,VueElement:Yl,createApp:Pf,createSSRApp:k1,defineCustomElement:mm,defineSSRCustomElement:x1,hydrate:Om,initDirectivesForSSR:D1,render:xc,useCssModule:T1,useCssVars:w1,vModelCheckbox:Zl,vModelDynamic:Im,vModelRadio:Of,vModelSelect:Cm,vModelText:Do,vShow:Jl,withKeys:$i,withModifiers:ln},Symbol.toStringTag,{value:"Module"}));const $1="Profectus Demo",j1="A demo project made in Profectus",H1="profectus-demo",z1="",X1="",W1="",K1="0.0",Y1="Initial Commit",Z1=!0,J1=!1,Q1=2,q1=!0,ex=null,tx="Logo.png",nx=["main","c"],rx=3600,ix=1,ox=!0,ax="base64";var _t={title:$1,description:j1,id:H1,author:z1,discordName:X1,discordLink:W1,versionNumber:K1,versionTitle:Y1,allowGoBack:Z1,defaultShowSmall:J1,defaultDecimalsShown:Q1,useHeader:q1,banner:ex,logo:tx,initialTabs:nx,maxTickLength:rx,offlineLimit:ix,enablePausing:ox,exportEncoding:ax};const gu=17,sx=9e15,lx=Math.log10(9e15),ux=1/9e15,cx=308,fx=-324,dh=5,dx=function(){const e=[];for(let n=fx+1;n<=cx;n++)e.push(Number("1e"+n));const t=323;return function(n){return e[n+t]}}(),Ii=[2,Math.E,3,4,5,6,7,8,9,10],hx=[[1,1.0891168053867777,1.1789745164521264,1.2701428397304229,1.3632066654400328,1.4587804913784246,1.557523817412741,1.660158301473385,1.767487542936873,1.8804205225512542,2],[1,1.1121114330934,1.23103892493161,1.35838369631113,1.49605193039935,1.64635423375119,1.81213853570186,1.99697132461829,2.20538955455724,2.44325744833852,Math.E],[1,1.1187738849693603,1.2464963939368214,1.38527004705667,1.5376664685821402,1.7068895236551784,1.897001227148399,2.1132403089001035,2.362480153784171,2.6539010333870774,3],[1,1.1367350847096405,1.2889510672956703,1.4606478703324786,1.6570295196661111,1.8850062585672889,2.1539465047453485,2.476829779693097,2.872061932789197,3.3664204535587183,4],[1,1.1494592900767588,1.319708228183931,1.5166291280087583,1.748171114438024,2.0253263297298045,2.3636668498288547,2.7858359149579424,3.3257226212448145,4.035730287722532,5],[1,1.159225940787673,1.343712473580932,1.5611293155111927,1.8221199554561318,2.14183924486326,2.542468319282638,3.0574682501653316,3.7390572020926873,4.6719550537360774,6],[1,1.1670905356972596,1.3632807444991446,1.5979222279405536,1.8842640123816674,2.2416069644878687,2.69893426559423,3.3012632110403577,4.121250340630164,5.281493033448316,7],[1,1.1736630594087796,1.379783782386201,1.6292821855668218,1.9378971836180754,2.3289975651071977,2.8384347394720835,3.5232708454565906,4.478242031114584,5.868592169644505,8],[1,1.1793017514670474,1.394054150657457,1.65664127441059,1.985170999970283,2.4069682290577457,2.9647310119960752,3.7278665320924946,4.814462547283592,6.436522247411611,9],[1,1.18422737399915,1.4066113788546144,1.680911177655277,2.027492094355525,2.4775152854601967,3.080455730250329,3.918234505962507,5.1332705696484595,6.9878696918072905,10]],px=[[-1,-.9194161097107025,-.8335625019330468,-.7425599821143978,-.6466611521029437,-.5462617907227869,-.4419033816638769,-.3342645487554494,-.224140440909962,-.11241087890006762,0],[-1,-.90603157029014,-.80786507256596,-.7064666939634,-.60294836853664,-.49849837513117,-.39430303318768,-.29147201034755,-.19097820800866,-.09361896280296,0],[-1,-.9021579584316141,-.8005762598234203,-.6964780623319391,-.5911906810998454,-.486050182576545,-.3823089430815083,-.28106046722897615,-.1831906535795894,-.08935809204418144,0],[-1,-.8917227442365535,-.781258746326964,-.6705130326902455,-.5612813129406509,-.4551067709033134,-.35319256652135966,-.2563741554088552,-.1651412821106526,-.0796919581982668,0],[-1,-.8843387974366064,-.7678744063886243,-.6529563724510552,-.5415870994657841,-.4352842206588936,-.33504449124791424,-.24138853420685147,-.15445285440944467,-.07409659641336663,0],[-1,-.8786709358426346,-.7577735191184886,-.6399546189952064,-.527284921869926,-.4211627631006314,-.3223479611761232,-.23107655627789858,-.1472057700818259,-.07035171210706326,0],[-1,-.8740862815291583,-.7497032990976209,-.6297119746181752,-.5161838335958787,-.41036238255751956,-.31277212146489963,-.2233976621705518,-.1418697367979619,-.06762117662323441,0],[-1,-.8702632331800649,-.7430366914122081,-.6213373075161548,-.5072025698095242,-.40171437727184167,-.30517930701410456,-.21736343968190863,-.137710238299109,-.06550774483471955,0],[-1,-.8670016295947213,-.7373984232432306,-.6143173985094293,-.49973884395492807,-.394584953527678,-.2989649949848695,-.21245647317021688,-.13434688362382652,-.0638072667348083,0],[-1,-.8641642839543857,-.732534623168535,-.6083127477059322,-.4934049257184696,-.3885773075899922,-.29376029055315767,-.2083678561173622,-.13155653399373268,-.062401588652553186,0]],D=function(t){return O.fromValue_noAlloc(t)},Xe=function(e,t,n){return O.fromComponents(e,t,n)},st=function(t,n,r){return O.fromComponents_noNormalize(t,n,r)},ti=function(t,n){const r=n+1,i=Math.ceil(Math.log10(Math.abs(t))),a=Math.round(t*Math.pow(10,r-i))*Math.pow(10,i-r);return parseFloat(a.toFixed(Math.max(r-i,0)))},yu=function(e){return Math.sign(e)*Math.log10(Math.abs(e))},vx=function(e){if(!isFinite(e))return e;if(e<-50)return e===Math.trunc(e)?Number.NEGATIVE_INFINITY:0;let t=1;for(;e<10;)t=t*e,++e;e-=1;let n=.9189385332046727;n=n+(e+.5)*Math.log(e),n=n-e;const r=e*e;let i=e;return n=n+1/(12*i),i=i*r,n=n+1/(360*i),i=i*r,n=n+1/(1260*i),i=i*r,n=n+1/(1680*i),i=i*r,n=n+1/(1188*i),i=i*r,n=n+691/(360360*i),i=i*r,n=n+7/(1092*i),i=i*r,n=n+3617/(122400*i),Math.exp(n)/t},Fm=.5671432904097838,hh=function(e,t=1e-10){let n,r;if(!Number.isFinite(e)||e===0)return e;if(e===1)return Fm;e<10?n=0:n=Math.log(e)-Math.log(Math.log(e));for(let i=0;i<100;++i){if(r=(e*Math.exp(-n)+n*n)/(n+1),Math.abs(r-n)<t*Math.abs(r))return r;n=r}throw Error(`Iteration failed to converge: ${e.toString()}`)};function ph(e,t=1e-10){let n,r,i,a;if(!Number.isFinite(e.mag)||e===O.dZero)return e;if(e===O.dOne)return D(Fm);O.abs(e),n=O.ln(e);for(let o=0;o<100;++o){if(r=O.exp(-n),i=n.sub(e.mul(r)),a=n.sub(i.div(n.add(1).sub(n.add(2).mul(i).div(O.mul(2,n).add(2))))),O.abs(a.sub(n)).lt(O.abs(a).mul(t)))return a;n=a}throw Error(`Iteration failed to converge: ${e.toString()}`)}const Q=class{constructor(e){this.sign=Number.NaN,this.mag=Number.NaN,this.layer=Number.NaN,e instanceof Q||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0)}get m(){if(this.sign===0)return 0;if(this.layer===0){const e=Math.floor(Math.log10(this.mag));let t;return this.mag===5e-324?t=5:t=this.mag/dx(e),this.sign*t}else if(this.layer===1){const e=this.mag-Math.floor(this.mag);return this.sign*Math.pow(10,e)}else return this.sign}set m(e){this.layer<=2?this.fromMantissaExponent(e,this.e):(this.sign=Math.sign(e),this.sign===0&&(this.layer,this.exponent))}get e(){return this.sign===0?0:this.layer===0?Math.floor(Math.log10(this.mag)):this.layer===1?Math.floor(this.mag):this.layer===2?Math.floor(Math.sign(this.mag)*Math.pow(10,Math.abs(this.mag))):this.mag*Number.POSITIVE_INFINITY}set e(e){this.fromMantissaExponent(this.m,e)}get s(){return this.sign}set s(e){e===0?(this.sign=0,this.layer=0,this.mag=0):this.sign=e}get mantissa(){return this.m}set mantissa(e){this.m=e}get exponent(){return this.e}set exponent(e){this.e=e}static fromComponents(e,t,n){return new Q().fromComponents(e,t,n)}static fromComponents_noNormalize(e,t,n){return new Q().fromComponents_noNormalize(e,t,n)}static fromMantissaExponent(e,t){return new Q().fromMantissaExponent(e,t)}static fromMantissaExponent_noNormalize(e,t){return new Q().fromMantissaExponent_noNormalize(e,t)}static fromDecimal(e){return new Q().fromDecimal(e)}static fromNumber(e){return new Q().fromNumber(e)}static fromString(e){return new Q().fromString(e)}static fromValue(e){return new Q().fromValue(e)}static fromValue_noAlloc(e){return e instanceof Q?e:new Q(e)}static abs(e){return D(e).abs()}static neg(e){return D(e).neg()}static negate(e){return D(e).neg()}static negated(e){return D(e).neg()}static sign(e){return D(e).sign}static sgn(e){return D(e).sign}static round(e){return D(e).round()}static floor(e){return D(e).floor()}static ceil(e){return D(e).ceil()}static trunc(e){return D(e).trunc()}static add(e,t){return D(e).add(t)}static plus(e,t){return D(e).add(t)}static sub(e,t){return D(e).sub(t)}static subtract(e,t){return D(e).sub(t)}static minus(e,t){return D(e).sub(t)}static mul(e,t){return D(e).mul(t)}static multiply(e,t){return D(e).mul(t)}static times(e,t){return D(e).mul(t)}static div(e,t){return D(e).div(t)}static divide(e,t){return D(e).div(t)}static recip(e){return D(e).recip()}static reciprocal(e){return D(e).recip()}static reciprocate(e){return D(e).reciprocate()}static cmp(e,t){return D(e).cmp(t)}static cmpabs(e,t){return D(e).cmpabs(t)}static compare(e,t){return D(e).cmp(t)}static isNaN(e){return e=D(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag)}static isFinite(e){return e=D(e),isFinite(e.sign)&&isFinite(e.layer)&&isFinite(e.mag)}static eq(e,t){return D(e).eq(t)}static equals(e,t){return D(e).eq(t)}static neq(e,t){return D(e).neq(t)}static notEquals(e,t){return D(e).notEquals(t)}static lt(e,t){return D(e).lt(t)}static lte(e,t){return D(e).lte(t)}static gt(e,t){return D(e).gt(t)}static gte(e,t){return D(e).gte(t)}static max(e,t){return D(e).max(t)}static min(e,t){return D(e).min(t)}static minabs(e,t){return D(e).minabs(t)}static maxabs(e,t){return D(e).maxabs(t)}static clamp(e,t,n){return D(e).clamp(t,n)}static clampMin(e,t){return D(e).clampMin(t)}static clampMax(e,t){return D(e).clampMax(t)}static cmp_tolerance(e,t,n){return D(e).cmp_tolerance(t,n)}static compare_tolerance(e,t,n){return D(e).cmp_tolerance(t,n)}static eq_tolerance(e,t,n){return D(e).eq_tolerance(t,n)}static equals_tolerance(e,t,n){return D(e).eq_tolerance(t,n)}static neq_tolerance(e,t,n){return D(e).neq_tolerance(t,n)}static notEquals_tolerance(e,t,n){return D(e).notEquals_tolerance(t,n)}static lt_tolerance(e,t,n){return D(e).lt_tolerance(t,n)}static lte_tolerance(e,t,n){return D(e).lte_tolerance(t,n)}static gt_tolerance(e,t,n){return D(e).gt_tolerance(t,n)}static gte_tolerance(e,t,n){return D(e).gte_tolerance(t,n)}static pLog10(e){return D(e).pLog10()}static absLog10(e){return D(e).absLog10()}static log10(e){return D(e).log10()}static log(e,t){return D(e).log(t)}static log2(e){return D(e).log2()}static ln(e){return D(e).ln()}static logarithm(e,t){return D(e).logarithm(t)}static pow(e,t){return D(e).pow(t)}static pow10(e){return D(e).pow10()}static root(e,t){return D(e).root(t)}static factorial(e,t){return D(e).factorial()}static gamma(e,t){return D(e).gamma()}static lngamma(e,t){return D(e).lngamma()}static exp(e){return D(e).exp()}static sqr(e){return D(e).sqr()}static sqrt(e){return D(e).sqrt()}static cube(e){return D(e).cube()}static cbrt(e){return D(e).cbrt()}static tetrate(e,t=2,n=st(1,0,1)){return D(e).tetrate(t,n)}static iteratedexp(e,t=2,n=st(1,0,1)){return D(e).iteratedexp(t,n)}static iteratedlog(e,t=10,n=1){return D(e).iteratedlog(t,n)}static layeradd10(e,t){return D(e).layeradd10(t)}static layeradd(e,t,n=10){return D(e).layeradd(t,n)}static slog(e,t=10){return D(e).slog(t)}static lambertw(e){return D(e).lambertw()}static ssqrt(e){return D(e).ssqrt()}static pentate(e,t=2,n=st(1,0,1)){return D(e).pentate(t,n)}static affordGeometricSeries(e,t,n,r){return this.affordGeometricSeries_core(D(e),D(t),D(n),r)}static sumGeometricSeries(e,t,n,r){return this.sumGeometricSeries_core(e,D(t),D(n),r)}static affordArithmeticSeries(e,t,n,r){return this.affordArithmeticSeries_core(D(e),D(t),D(n),D(r))}static sumArithmeticSeries(e,t,n,r){return this.sumArithmeticSeries_core(D(e),D(t),D(n),D(r))}static efficiencyOfPurchase(e,t,n){return this.efficiencyOfPurchase_core(D(e),D(t),D(n))}static randomDecimalForTesting(e){if(Math.random()*20<1)return st(0,0,0);const t=Math.random()>.5?1:-1;if(Math.random()*20<1)return st(t,0,1);const n=Math.floor(Math.random()*(e+1));let r=n===0?Math.random()*616-308:Math.random()*16;Math.random()>.9&&(r=Math.trunc(r));let i=Math.pow(10,r);return Math.random()>.9&&(i=Math.trunc(i)),Xe(t,n,i)}static affordGeometricSeries_core(e,t,n,r){const i=t.mul(n.pow(r));return Q.floor(e.div(i).mul(n.sub(1)).add(1).log10().div(n.log10()))}static sumGeometricSeries_core(e,t,n,r){return t.mul(n.pow(r)).mul(Q.sub(1,n.pow(e))).div(Q.sub(1,n))}static affordArithmeticSeries_core(e,t,n,r){const a=t.add(r.mul(n)).sub(n.div(2)),o=a.pow(2);return a.neg().add(o.add(n.mul(e).mul(2)).sqrt()).div(n).floor()}static sumArithmeticSeries_core(e,t,n,r){const i=t.add(r.mul(n));return e.div(2).mul(i.mul(2).plus(e.sub(1).mul(n)))}static efficiencyOfPurchase_core(e,t,n){return e.div(t).add(e.div(n))}normalize(){if(this.sign===0||this.mag===0&&this.layer===0)return this.sign=0,this.mag=0,this.layer=0,this;if(this.layer===0&&this.mag<0&&(this.mag=-this.mag,this.sign=-this.sign),this.layer===0&&this.mag<ux)return this.layer+=1,this.mag=Math.log10(this.mag),this;let e=Math.abs(this.mag),t=Math.sign(this.mag);if(e>=sx)return this.layer+=1,this.mag=t*Math.log10(e),this;for(;e<lx&&this.layer>0;)this.layer-=1,this.layer===0?this.mag=Math.pow(10,this.mag):(this.mag=t*Math.pow(10,e),e=Math.abs(this.mag),t=Math.sign(this.mag));return this.layer===0&&(this.mag<0?(this.mag=-this.mag,this.sign=-this.sign):this.mag===0&&(this.sign=0)),this}fromComponents(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this.normalize(),this}fromComponents_noNormalize(e,t,n){return this.sign=e,this.layer=t,this.mag=n,this}fromMantissaExponent(e,t){return this.layer=1,this.sign=Math.sign(e),e=Math.abs(e),this.mag=t+Math.log10(e),this.normalize(),this}fromMantissaExponent_noNormalize(e,t){return this.fromMantissaExponent(e,t),this}fromDecimal(e){return this.sign=e.sign,this.layer=e.layer,this.mag=e.mag,this}fromNumber(e){return this.mag=Math.abs(e),this.sign=Math.sign(e),this.layer=0,this.normalize(),this}fromString(e){e=e.replace(",","");const t=e.split("^^^");if(t.length===2){const d=parseFloat(t[0]),h=parseFloat(t[1]),p=t[1].split(";");let v=1;if(p.length===2&&(v=parseFloat(p[1]),isFinite(v)||(v=1)),isFinite(d)&&isFinite(h)){const g=Q.pentate(d,h,v);return this.sign=g.sign,this.layer=g.layer,this.mag=g.mag,this}}const n=e.split("^^");if(n.length===2){const d=parseFloat(n[0]),h=parseFloat(n[1]),p=n[1].split(";");let v=1;if(p.length===2&&(v=parseFloat(p[1]),isFinite(v)||(v=1)),isFinite(d)&&isFinite(h)){const g=Q.tetrate(d,h,v);return this.sign=g.sign,this.layer=g.layer,this.mag=g.mag,this}}const r=e.split("^");if(r.length===2){const d=parseFloat(r[0]),h=parseFloat(r[1]);if(isFinite(d)&&isFinite(h)){const p=Q.pow(d,h);return this.sign=p.sign,this.layer=p.layer,this.mag=p.mag,this}}e=e.trim().toLowerCase();let i,a,o=e.split("pt");if(o.length===2){i=10,a=parseFloat(o[0]),o[1]=o[1].replace("(",""),o[1]=o[1].replace(")","");let d=parseFloat(o[1]);if(isFinite(d)||(d=1),isFinite(i)&&isFinite(a)){const h=Q.tetrate(i,a,d);return this.sign=h.sign,this.layer=h.layer,this.mag=h.mag,this}}if(o=e.split("p"),o.length===2){i=10,a=parseFloat(o[0]),o[1]=o[1].replace("(",""),o[1]=o[1].replace(")","");let d=parseFloat(o[1]);if(isFinite(d)||(d=1),isFinite(i)&&isFinite(a)){const h=Q.tetrate(i,a,d);return this.sign=h.sign,this.layer=h.layer,this.mag=h.mag,this}}const s=e.split("e"),l=s.length-1;if(l===0){const d=parseFloat(e);if(isFinite(d))return this.fromNumber(d)}else if(l===1){const d=parseFloat(e);if(isFinite(d)&&d!==0)return this.fromNumber(d)}const u=e.split("e^");if(u.length===2){this.sign=1,u[0].charAt(0)=="-"&&(this.sign=-1);let d="";for(let h=0;h<u[1].length;++h){const p=u[1].charCodeAt(h);if(p>=43&&p<=57||p===101)d+=u[1].charAt(h);else return this.layer=parseFloat(d),this.mag=parseFloat(u[1].substr(h+1)),this.normalize(),this}}if(l<1)return this.sign=0,this.layer=0,this.mag=0,this;const c=parseFloat(s[0]);if(c===0)return this.sign=0,this.layer=0,this.mag=0,this;let f=parseFloat(s[s.length-1]);if(l>=2){const d=parseFloat(s[s.length-2]);isFinite(d)&&(f*=Math.sign(d),f+=yu(d))}if(!isFinite(c))this.sign=s[0]==="-"?-1:1,this.layer=l,this.mag=f;else if(l===1)this.sign=Math.sign(c),this.layer=1,this.mag=f+Math.log10(Math.abs(c));else if(this.sign=Math.sign(c),this.layer=l,l===2){const d=Q.mul(Xe(1,2,f),D(c));return this.sign=d.sign,this.layer=d.layer,this.mag=d.mag,this}else this.mag=f;return this.normalize(),this}fromValue(e){return e instanceof Q||e!=null&&typeof e=="object"&&"sign"in e&&"mag"in e&&"layer"in e?this.fromDecimal(e):typeof e=="number"?this.fromNumber(e):typeof e=="string"?this.fromString(e):(this.sign=0,this.layer=0,this.mag=0,this)}toNumber(){return Number.isFinite(this.layer)?this.layer===0?this.sign*this.mag:this.layer===1?this.sign*Math.pow(10,this.mag):this.mag>0?this.sign>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:0:Number.NaN}mantissaWithDecimalPlaces(e){return isNaN(this.m)?Number.NaN:this.m===0?0:ti(this.m,e)}magnitudeWithDecimalPlaces(e){return isNaN(this.mag)?Number.NaN:this.mag===0?0:ti(this.mag,e)}toString(){return isNaN(this.layer)||isNaN(this.sign)||isNaN(this.mag)?"NaN":this.mag===Number.POSITIVE_INFINITY||this.layer===Number.POSITIVE_INFINITY?this.sign===1?"Infinity":"-Infinity":this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toString():this.m+"e"+this.e:this.layer===1?this.m+"e"+this.e:this.layer<=dh?(this.sign===-1?"-":"")+"e".repeat(this.layer)+this.mag:(this.sign===-1?"-":"")+"(e^"+this.layer+")"+this.mag}toExponential(e){return this.layer===0?(this.sign*this.mag).toExponential(e):this.toStringWithDecimalPlaces(e)}toFixed(e){return this.layer===0?(this.sign*this.mag).toFixed(e):this.toStringWithDecimalPlaces(e)}toPrecision(e){return this.e<=-7?this.toExponential(e-1):e>this.e?this.toFixed(e-this.exponent-1):this.toExponential(e-1)}valueOf(){return this.toString()}toJSON(){return this.toString()}toStringWithDecimalPlaces(e){return this.layer===0?this.mag<1e21&&this.mag>1e-7||this.mag===0?(this.sign*this.mag).toFixed(e):ti(this.m,e)+"e"+ti(this.e,e):this.layer===1?ti(this.m,e)+"e"+ti(this.e,e):this.layer<=dh?(this.sign===-1?"-":"")+"e".repeat(this.layer)+ti(this.mag,e):(this.sign===-1?"-":"")+"(e^"+this.layer+")"+ti(this.mag,e)}abs(){return st(this.sign===0?0:1,this.layer,this.mag)}neg(){return st(-this.sign,this.layer,this.mag)}negate(){return this.neg()}negated(){return this.neg()}sgn(){return this.sign}round(){return this.mag<0?Q.dZero:this.layer===0?Xe(this.sign,0,Math.round(this.mag)):this}floor(){return this.mag<0?Q.dZero:this.layer===0?Xe(this.sign,0,Math.floor(this.mag)):this}ceil(){return this.mag<0?Q.dZero:this.layer===0?Xe(this.sign,0,Math.ceil(this.mag)):this}trunc(){return this.mag<0?Q.dZero:this.layer===0?Xe(this.sign,0,Math.trunc(this.mag)):this}add(e){const t=D(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer)||this.sign===0)return t;if(t.sign===0)return this;if(this.sign===-t.sign&&this.layer===t.layer&&this.mag===t.mag)return st(0,0,0);let n,r;if(this.layer>=2||t.layer>=2)return this.maxabs(t);if(Q.cmpabs(this,t)>0?(n=this,r=t):(n=t,r=this),n.layer===0&&r.layer===0)return D(n.sign*n.mag+r.sign*r.mag);const i=n.layer*Math.sign(n.mag),a=r.layer*Math.sign(r.mag);if(i-a>=2)return n;if(i===0&&a===-1){if(Math.abs(r.mag-Math.log10(n.mag))>gu)return n;{const o=Math.pow(10,Math.log10(n.mag)-r.mag),s=r.sign+n.sign*o;return Xe(Math.sign(s),1,r.mag+Math.log10(Math.abs(s)))}}if(i===1&&a===0){if(Math.abs(n.mag-Math.log10(r.mag))>gu)return n;{const o=Math.pow(10,n.mag-Math.log10(r.mag)),s=r.sign+n.sign*o;return Xe(Math.sign(s),1,Math.log10(r.mag)+Math.log10(Math.abs(s)))}}if(Math.abs(n.mag-r.mag)>gu)return n;{const o=Math.pow(10,n.mag-r.mag),s=r.sign+n.sign*o;return Xe(Math.sign(s),1,r.mag+Math.log10(Math.abs(s)))}}plus(e){return this.add(e)}sub(e){return this.add(D(e).neg())}subtract(e){return this.sub(e)}minus(e){return this.sub(e)}mul(e){const t=D(e);if(!Number.isFinite(this.layer))return this;if(!Number.isFinite(t.layer))return t;if(this.sign===0||t.sign===0)return st(0,0,0);if(this.layer===t.layer&&this.mag===-t.mag)return st(this.sign*t.sign,0,1);let n,r;if(this.layer>t.layer||this.layer==t.layer&&Math.abs(this.mag)>Math.abs(t.mag)?(n=this,r=t):(n=t,r=this),n.layer===0&&r.layer===0)return D(n.sign*r.sign*n.mag*r.mag);if(n.layer>=3||n.layer-r.layer>=2)return Xe(n.sign*r.sign,n.layer,n.mag);if(n.layer===1&&r.layer===0)return Xe(n.sign*r.sign,1,n.mag+Math.log10(r.mag));if(n.layer===1&&r.layer===1)return Xe(n.sign*r.sign,1,n.mag+r.mag);if(n.layer===2&&r.layer===1){const i=Xe(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(Xe(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return Xe(n.sign*r.sign,i.layer+1,i.sign*i.mag)}if(n.layer===2&&r.layer===2){const i=Xe(Math.sign(n.mag),n.layer-1,Math.abs(n.mag)).add(Xe(Math.sign(r.mag),r.layer-1,Math.abs(r.mag)));return Xe(n.sign*r.sign,i.layer+1,i.sign*i.mag)}throw Error("Bad arguments to mul: "+this+", "+e)}multiply(e){return this.mul(e)}times(e){return this.mul(e)}div(e){const t=D(e);return this.mul(t.recip())}divide(e){return this.div(e)}divideBy(e){return this.div(e)}dividedBy(e){return this.div(e)}recip(){return this.mag===0?Q.dNaN:this.layer===0?Xe(this.sign,0,1/this.mag):Xe(this.sign,this.layer,-this.mag)}reciprocal(){return this.recip()}reciprocate(){return this.recip()}cmp(e){const t=D(e);return this.sign>t.sign?1:this.sign<t.sign?-1:this.sign*this.cmpabs(e)}cmpabs(e){const t=D(e),n=this.mag>0?this.layer:-this.layer,r=t.mag>0?t.layer:-t.layer;return n>r?1:n<r?-1:this.mag>t.mag?1:this.mag<t.mag?-1:0}compare(e){return this.cmp(e)}isNan(){return isNaN(this.sign)||isNaN(this.layer)||isNaN(this.mag)}isFinite(){return isFinite(this.sign)&&isFinite(this.layer)&&isFinite(this.mag)}eq(e){const t=D(e);return this.sign===t.sign&&this.layer===t.layer&&this.mag===t.mag}equals(e){return this.eq(e)}neq(e){return!this.eq(e)}notEquals(e){return this.neq(e)}lt(e){return this.cmp(e)===-1}lte(e){return!this.gt(e)}gt(e){return this.cmp(e)===1}gte(e){return!this.lt(e)}max(e){const t=D(e);return this.lt(t)?t:this}min(e){const t=D(e);return this.gt(t)?t:this}maxabs(e){const t=D(e);return this.cmpabs(t)<0?t:this}minabs(e){const t=D(e);return this.cmpabs(t)>0?t:this}clamp(e,t){return this.max(e).min(t)}clampMin(e){return this.max(e)}clampMax(e){return this.min(e)}cmp_tolerance(e,t){const n=D(e);return this.eq_tolerance(n,t)?0:this.cmp(n)}compare_tolerance(e,t){return this.cmp_tolerance(e,t)}eq_tolerance(e,t){const n=D(e);if(t==null&&(t=1e-7),this.sign!==n.sign||Math.abs(this.layer-n.layer)>1)return!1;let r=this.mag,i=n.mag;return this.layer>n.layer&&(i=yu(i)),this.layer<n.layer&&(r=yu(r)),Math.abs(r-i)<=t*Math.max(Math.abs(r),Math.abs(i))}equals_tolerance(e,t){return this.eq_tolerance(e,t)}neq_tolerance(e,t){return!this.eq_tolerance(e,t)}notEquals_tolerance(e,t){return this.neq_tolerance(e,t)}lt_tolerance(e,t){const n=D(e);return!this.eq_tolerance(n,t)&&this.lt(n)}lte_tolerance(e,t){const n=D(e);return this.eq_tolerance(n,t)||this.lt(n)}gt_tolerance(e,t){const n=D(e);return!this.eq_tolerance(n,t)&&this.gt(n)}gte_tolerance(e,t){const n=D(e);return this.eq_tolerance(n,t)||this.gt(n)}pLog10(){return this.lt(Q.dZero)?Q.dZero:this.log10()}absLog10(){return this.sign===0?Q.dNaN:this.layer>0?Xe(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):Xe(1,0,Math.log10(this.mag))}log10(){return this.sign<=0?Q.dNaN:this.layer>0?Xe(Math.sign(this.mag),this.layer-1,Math.abs(this.mag)):Xe(this.sign,0,Math.log10(this.mag))}log(e){return e=D(e),this.sign<=0||e.sign<=0||e.sign===1&&e.layer===0&&e.mag===1?Q.dNaN:this.layer===0&&e.layer===0?Xe(this.sign,0,Math.log(this.mag)/Math.log(e.mag)):Q.div(this.log10(),e.log10())}log2(){return this.sign<=0?Q.dNaN:this.layer===0?Xe(this.sign,0,Math.log2(this.mag)):this.layer===1?Xe(Math.sign(this.mag),0,Math.abs(this.mag)*3.321928094887362):this.layer===2?Xe(Math.sign(this.mag),1,Math.abs(this.mag)+.5213902276543247):Xe(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}ln(){return this.sign<=0?Q.dNaN:this.layer===0?Xe(this.sign,0,Math.log(this.mag)):this.layer===1?Xe(Math.sign(this.mag),0,Math.abs(this.mag)*2.302585092994046):this.layer===2?Xe(Math.sign(this.mag),1,Math.abs(this.mag)+.36221568869946325):Xe(Math.sign(this.mag),this.layer-1,Math.abs(this.mag))}logarithm(e){return this.log(e)}pow(e){const t=D(e),n=this,r=t;if(n.sign===0)return r.eq(0)?st(1,0,1):n;if(n.sign===1&&n.layer===0&&n.mag===1)return n;if(r.sign===0)return st(1,0,1);if(r.sign===1&&r.layer===0&&r.mag===1)return n;const i=n.absLog10().mul(r).pow10();return this.sign===-1?Math.abs(r.toNumber()%2)%2===1?i.neg():Math.abs(r.toNumber()%2)%2===0?i:Q.dNaN:i}pow10(){if(!Number.isFinite(this.layer)||!Number.isFinite(this.mag))return Q.dNaN;let e=this;if(e.layer===0){const t=Math.pow(10,e.sign*e.mag);if(Number.isFinite(t)&&Math.abs(t)>=.1)return Xe(1,0,t);if(e.sign===0)return Q.dOne;e=st(e.sign,e.layer+1,Math.log10(e.mag))}return e.sign>0&&e.mag>=0?Xe(e.sign,e.layer+1,e.mag):e.sign<0&&e.mag>=0?Xe(-e.sign,e.layer+1,-e.mag):Q.dOne}pow_base(e){return D(e).pow(this)}root(e){const t=D(e);return this.pow(t.recip())}factorial(){return this.mag<0?this.add(1).gamma():this.layer===0?this.add(1).gamma():this.layer===1?Q.exp(Q.mul(this,Q.ln(this).sub(1))):Q.exp(this)}gamma(){if(this.mag<0)return this.recip();if(this.layer===0){if(this.lt(st(1,0,24)))return D(vx(this.sign*this.mag));const e=this.mag-1;let t=.9189385332046727;t=t+(e+.5)*Math.log(e),t=t-e;const n=e*e;let r=e,i=12*r,a=1/i,o=t+a;if(o===t||(t=o,r=r*n,i=360*r,a=1/i,o=t-a,o===t))return Q.exp(t);t=o,r=r*n,i=1260*r;let s=1/i;return t=t+s,r=r*n,i=1680*r,s=1/i,t=t-s,Q.exp(t)}else return this.layer===1?Q.exp(Q.mul(this,Q.ln(this).sub(1))):Q.exp(this)}lngamma(){return this.gamma().ln()}exp(){return this.mag<0?Q.dOne:this.layer===0&&this.mag<=709.7?D(Math.exp(this.sign*this.mag)):this.layer===0?Xe(1,1,this.sign*Math.log10(Math.E)*this.mag):this.layer===1?Xe(1,2,this.sign*(Math.log10(.4342944819032518)+this.mag)):Xe(1,this.layer+1,this.sign*this.mag)}sqr(){return this.pow(2)}sqrt(){if(this.layer===0)return D(Math.sqrt(this.sign*this.mag));if(this.layer===1)return Xe(1,2,Math.log10(this.mag)-.3010299956639812);{const e=Q.div(st(this.sign,this.layer-1,this.mag),st(1,0,2));return e.layer+=1,e.normalize(),e}}cube(){return this.pow(3)}cbrt(){return this.pow(1/3)}tetrate(e=2,t=st(1,0,1)){if(e===1)return Q.pow(this,t);if(e===0)return new Q(t);if(this.eq(Q.dOne))return Q.dOne;if(this.eq(-1))return Q.pow(this,t);if(e===Number.POSITIVE_INFINITY){const i=this.toNumber();if(i<=1.444667861009766&&i>=.06598803584531254){if(i>1.444667861009099)return new Q(Math.E);const a=Q.ln(this).neg();return a.lambertw().div(a)}else return i>1.444667861009766?new Q(Number.POSITIVE_INFINITY):Q.dNaN}if(this.eq(Q.dZero)){let i=Math.abs((e+1)%2);return i>1&&(i=2-i),new Q(i)}if(e<0)return Q.iteratedlog(t,this,-e);t=D(t);const n=e;e=Math.trunc(e);const r=n-e;if(this.gt(Q.dZero)&&this.lte(1.444667861009766)){e=Math.min(1e4,e);for(let i=0;i<e;++i){const a=t;if(t=this.pow(t),a.eq(t))return t}if(r!=0){const i=this.pow(t);return t.mul(1-r).add(i.mul(r))}return t}r!==0&&(t.eq(Q.dOne)?this.gt(10)?t=this.pow(r):(t=D(Q.tetrate_critical(this.toNumber(),r)),this.lt(2)&&(t=t.sub(1).mul(this.minus(1)).plus(1))):this.eq(10)?t=t.layeradd10(r):t=t.layeradd(r,this));for(let i=0;i<e;++i){if(t=this.pow(t),!isFinite(t.layer)||!isFinite(t.mag))return t.normalize();if(t.layer-this.layer>3)return st(t.sign,t.layer+(e-i-1),t.mag);if(i>1e4)return t}return t}iteratedexp(e=2,t=st(1,0,1)){return this.tetrate(e,t)}iteratedlog(e=10,t=1){if(t<0)return Q.tetrate(e,-t,this);e=D(e);let n=D(this);const r=t;t=Math.trunc(t);const i=r-t;if(n.layer-e.layer>3){const a=Math.min(t,n.layer-e.layer-3);t-=a,n.layer-=a}for(let a=0;a<t;++a){if(n=n.log(e),!isFinite(n.layer)||!isFinite(n.mag))return n.normalize();if(a>1e4)return n}return i>0&&i<1&&(e.eq(10)?n=n.layeradd10(-i):n=n.layeradd(-i,e)),n}slog(e=10){if(e=D(e),e.lte(Q.dZero)||e.eq(Q.dOne))return Q.dNaN;if(e.lt(Q.dOne))return this.eq(Q.dOne)?Q.dZero:this.eq(Q.dZero)?Q.dNegOne:Q.dNaN;if(this.mag<0||this.eq(Q.dZero))return Q.dNegOne;let t=0,n=D(this);if(n.layer-e.layer>3){const r=n.layer-e.layer-3;t+=r,n.layer-=r}for(let r=0;r<100;++r)if(n.lt(Q.dZero))n=Q.pow(e,n),t-=1;else{if(n.lte(Q.dOne))return D(t+Q.slog_critical(e.toNumber(),n.toNumber()));t+=1,n=Q.log(n,e)}return D(t)}static slog_critical(e,t){return e>10?t-1:Q.critical_section(e,t,px)}static tetrate_critical(e,t){return Q.critical_section(e,t,hx)}static critical_section(e,t,n){t*=10,t<0&&(t=0),t>10&&(t=10),e<2&&(e=2),e>10&&(e=10);let r=0,i=0;for(let s=0;s<Ii.length;++s)if(Ii[s]==e){r=n[s][Math.floor(t)],i=n[s][Math.ceil(t)];break}else if(Ii[s]<e&&Ii[s+1]>e){const l=(e-Ii[s])/(Ii[s+1]-Ii[s]);r=n[s][Math.floor(t)]*(1-l)+n[s+1][Math.floor(t)]*l,i=n[s][Math.ceil(t)]*(1-l)+n[s+1][Math.ceil(t)]*l;break}const a=t-Math.floor(t);return r*(1-a)+i*a}layeradd10(e){e=Q.fromValue_noAlloc(e).toNumber();const t=D(this);if(e>=1){t.mag<0&&t.layer>0?(t.sign=0,t.mag=0,t.layer=0):t.sign===-1&&t.layer==0&&(t.sign=1,t.mag=-t.mag);const n=Math.trunc(e);e-=n,t.layer+=n}if(e<=-1){const n=Math.trunc(e);if(e-=n,t.layer+=n,t.layer<0)for(let r=0;r<100;++r){if(t.layer++,t.mag=Math.log10(t.mag),!isFinite(t.mag))return t.sign===0&&(t.sign=1),t.layer<0&&(t.layer=0),t.normalize();if(t.layer>=0)break}}for(;t.layer<0;)t.layer++,t.mag=Math.log10(t.mag);return t.sign===0&&(t.sign=1,t.mag===0&&t.layer>=1&&(t.layer-=1,t.mag=1)),t.normalize(),e!==0?t.layeradd(e,10):t}layeradd(e,t){const r=this.slog(t).toNumber()+e;return r>=0?Q.tetrate(t,r):Number.isFinite(r)?r>=-1?Q.log(Q.tetrate(t,r+1),t):Q.log(Q.log(Q.tetrate(t,r+2),t),t):Q.dNaN}lambertw(){if(this.lt(-.3678794411710499))throw Error("lambertw is unimplemented for results less than -1, sorry!");if(this.mag<0)return D(hh(this.toNumber()));if(this.layer===0)return D(hh(this.sign*this.mag));if(this.layer===1)return ph(this);if(this.layer===2)return ph(this);if(this.layer>=3)return st(this.sign,this.layer-1,this.mag);throw"Unhandled behavior in lambertw()"}ssqrt(){if(this.sign==1&&this.layer>=3)return st(this.sign,this.layer-1,this.mag);const e=this.ln();return e.div(e.lambertw())}pentate(e=2,t=st(1,0,1)){t=D(t);const n=e;e=Math.trunc(e);const r=n-e;r!==0&&(t.eq(Q.dOne)?(++e,t=new Q(r)):this.eq(10)?t=t.layeradd10(r):t=t.layeradd(r,this));for(let i=0;i<e;++i){if(t=this.tetrate(t.toNumber()),!isFinite(t.layer)||!isFinite(t.mag))return t.normalize();if(i>10)return t}return t}sin(){return this.mag<0?this:this.layer===0?D(Math.sin(this.sign*this.mag)):st(0,0,0)}cos(){return this.mag<0?Q.dOne:this.layer===0?D(Math.cos(this.sign*this.mag)):st(0,0,0)}tan(){return this.mag<0?this:this.layer===0?D(Math.tan(this.sign*this.mag)):st(0,0,0)}asin(){return this.mag<0?this:this.layer===0?D(Math.asin(this.sign*this.mag)):st(Number.NaN,Number.NaN,Number.NaN)}acos(){return this.mag<0?D(Math.acos(this.toNumber())):this.layer===0?D(Math.acos(this.sign*this.mag)):st(Number.NaN,Number.NaN,Number.NaN)}atan(){return this.mag<0?this:this.layer===0?D(Math.atan(this.sign*this.mag)):D(Math.atan(this.sign*(1/0)))}sinh(){return this.exp().sub(this.negate().exp()).div(2)}cosh(){return this.exp().add(this.negate().exp()).div(2)}tanh(){return this.sinh().div(this.cosh())}asinh(){return Q.ln(this.add(this.sqr().add(1).sqrt()))}acosh(){return Q.ln(this.add(this.sqr().sub(1).sqrt()))}atanh(){return this.abs().gte(1)?st(Number.NaN,Number.NaN,Number.NaN):Q.ln(this.add(1).div(D(1).sub(this))).div(2)}ascensionPenalty(e){return e===0?this:this.root(Q.pow(10,e))}egg(){return this.add(9)}lessThanOrEqualTo(e){return this.cmp(e)<1}lessThan(e){return this.cmp(e)<0}greaterThanOrEqualTo(e){return this.cmp(e)>-1}greaterThan(e){return this.cmp(e)>0}};let O=Q;O.dZero=st(0,0,0);O.dOne=st(1,0,1);O.dNegOne=st(-1,0,1);O.dTwo=st(1,0,2);O.dTen=st(1,0,10);O.dNaN=st(Number.NaN,Number.NaN,Number.NaN);O.dInf=st(1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY);O.dNegInf=st(-1,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY);O.dNumberMax=Xe(1,0,Number.MAX_VALUE);O.dNumberMin=Xe(1,0,Number.MIN_VALUE);const mx=new O(1);function la(e,t,n=!0){let r=O.log10(e).floor(),i=O.div(e,O.pow(10,r));i.toStringWithDecimalPlaces(t)==="10"&&(i=mx,r=r.add(1));const a=r.gte(1e9)?Yn(r,Math.max(Math.max(t,3),_t.defaultDecimalsShown)):r.gte(1e4)?gl(r,0):r.toStringWithDecimalPlaces(0);return n?i.toStringWithDecimalPlaces(t)+"e"+a:"e"+a}function gl(e,t){if(e==null)return"NaN";if(e=new O(e),e.mag<.001)return 0 .toFixed(t);const r=e.toStringWithDecimalPlaces(t).split(".");return r[0]=r[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,"),r.length==1?r[0]:r[0]+"."+r[1]}function Mm(e,t){return e==null?"NaN":(e=new O(e),e.mag<1e-4?0 .toFixed(t):(e.mag<.1&&t!==0&&(t=Math.max(Math.max(t,e.log10().negate().ceil().toNumber()),_t.defaultDecimalsShown)),e.toStringWithDecimalPlaces(t)))}const gx=new O("eeee1000"),yx=new O("e100000"),vh=new O("e1000"),Lm=new O(1e9),bx=new O(1e6),xx=new O(1e3),_x=new O(.98),Tx=new O(.001),Um=new O(0);function Yn(e,t,n){if(t==null&&(t=_t.defaultDecimalsShown),n=n!=null?n:_t.defaultShowSmall,e=new O(e),isNaN(e.sign)||isNaN(e.layer)||isNaN(e.mag))return"NaN";if(e.sign<0)return"-"+Yn(e.neg(),t);if(e.mag===Number.POSITIVE_INFINITY)return"Infinity";if(e.gte(gx)){const r=e.slog();return r.gte(bx)?"F"+Yn(r.floor()):O.pow(10,r.sub(r.floor())).toStringWithDecimalPlaces(3)+"F"+gl(r.floor(),0)}else{if(e.gte(yx))return la(e,0,!1);if(e.gte(vh))return la(e,0);if(e.gte(Lm))return la(e,t);if(e.gte(xx))return gl(e,0);if(e.gte(Tx)||!n)return Mm(e,t);if(e.eq(Um))return 0 .toFixed(t)}return e=km(e),e.lt(vh)?la(e,t).replace(/([^(?:e|F)]*)$/,"-$1"):Yn(e,t)+"\u207B\xB9"}function Wn(e){return e=new O(e),e.sign<0?"-"+Wn(e.neg()):e.gte(Lm)||e.lte(_x)&&!e.eq(Um)?Yn(e):Yn(e,0)}function Bm(e){return O.lt(e,0)?"-"+Bm(O.neg(e)):O.gt(e,2**51)?Yn(O.div(e,31536e3))+"y":(e=new O(e).toNumber(),e<60?Yn(e)+"s":e<3600?Wn(Math.floor(e/60))+"m "+Yn(e%60)+"s":e<86400?Wn(Math.floor(e/3600))+"h "+Wn(Math.floor(e/60)%60)+"m "+Wn(e%60)+"s":e<31536e3?Wn(Math.floor(e/84600)%365)+"d "+Wn(Math.floor(e/3600)%24)+"h "+Wn(Math.floor(e/60)%60)+"m":Wn(Math.floor(e/31536e3))+"y "+Wn(Math.floor(e/84600)%365)+"d "+Wn(Math.floor(e/3600)%24)+"h")}function wx(e,t,n){e=new O(e);let r=e.toStringWithDecimalPlaces(t);return new O(r).gte(n)&&(r=O.sub(n,Math.pow(.1,t)).toStringWithDecimalPlaces(t)),r}function Cx(e,t){return Yn(e,t,!0)}function km(e){let t=O.log10(e).ceil();const n=O.div(e,O.pow(10,t));return t=t.neg(),e=new O(10).pow(t).times(n),e}var Ex=Object.freeze(Object.defineProperty({__proto__:null,default:O,exponentialFormat:la,commaFormat:gl,regularFormat:Mm,format:Yn,formatWhole:Wn,formatTime:Bm,toPlaces:wx,formatSmall:Cx,invertOOM:km},Symbol.toStringTag,{value:"Module"}));const{exponentialFormat:Ix,commaFormat:Sx,regularFormat:Nx,format:kt,formatWhole:gn,formatTime:Ql,toPlaces:Rx,formatSmall:Ax,invertOOM:Ox}=Ex;window.Decimal=O;window.exponentialFormat=Ix;window.commaFormat=Sx;window.regularFormat=Nx;window.format=kt;window.formatWhole=gn;window.formatTime=Ql;window.toPlaces=Rx;window.formatSmall=Ax;window.invertOOM=Ox;function Dm(e){let t=e.replace(/([A-Z])/g," $1");return t=t.charAt(0).toUpperCase()+t.slice(1),t}function Xi(e){return typeof e=="function"}var Ct=(e=>(e.Up="Up",e.Down="Down",e.Left="Left",e.Right="Right",e.Default="Up",e))(Ct||{});const Ua=Symbol("DoNotCache");function H(e,t){const n=e[t];Xi(n)&&n.length===0&&!n[Ua]?e[t]=J(n.bind(e)):Xi(n)&&(e[t]=n.bind(e),e[t][Ua]=!0)}function Zn(e){return Xi(e)&&!e[Ua]&&(e=J(e)),e}const Jt=Symbol("Component"),nn=Symbol("GatherProps");let Px=0;function _n(e="feature-"){return e+Px++}var nt=(e=>(e[e.Visible=0]="Visible",e[e.Hidden=1]="Hidden",e[e.None=2]="None",e))(nt||{});function it(e){return e[Ua]=!0,e}function Yo(e,t=2){return e?0:t}function ft(e,t,n){e[t]===void 0&&n!=null&&(e[t]=n)}function Gm(e,...t){const n=[],r=i=>{Object.keys(i).forEach(a=>{const o=i[a];o&&typeof o=="object"&&(t.includes(o.type)?n.push(o):!(o instanceof O)&&!et(o)&&r(o))})};return r(e),n}const Si={variables:{"--foreground":"#dfdfdf","--background":"#0f0f0f","--feature-foreground":"#0f0f0f","--tooltip-background":"rgba(0, 0, 0, 0.75)","--raised-background":"#0f0f0f","--points":"#ffffff","--locked":"#bf8f8f","--highlighted":"#333","--bought":"#77bf5f","--danger":"rgb(220, 53, 69)","--link":"#02f2f2","--outline":"#dfdfdf","--accent1":"#627a82","--accent2":"#658262","--accent3":"#7c6282","--border-radius":"15px","--modal-border":"solid 2px var(--color)","--feature-margin":"0px"},floatingTabs:!0,mergeAdjacent:!0,showPin:!0};var Ff=(e=>(e.Classic="classic",e.Paper="paper",e.Nordic="nordic",e.Aqua="aqua",e))(Ff||{}),Kr={classic:Si,paper:{...Si,variables:{...Si.variables,"--background":"#2a323d","--feature-foreground":"#000","--raised-background":"#333c4a","--locked":"#3a3e45","--bought":"#5C8A58","--outline":"#333c4a","--border-radius":"4px","--modal-border":"","--feature-margin":"5px"},floatingTabs:!1},nordic:{...Si,variables:{...Si.variables,"--foreground":"#D8DEE9","--background":"#2E3440","--feature-foreground":"#000","--raised-background":"#3B4252","--points":"#E5E9F0","--locked":"#4c566a","--highlighted":"#434c5e","--bought":"#8FBCBB","--danger":"#D08770","--link":"#88C0D0","--outline":"#3B4252","--accent1":"#B48EAD","--accent2":"#A3BE8C","--accent3":"#EBCB8B","--border-radius":"4px","--modal-border":"solid 2px #3B4252","--feature-margin":"5px"},floatingTabs:!1},aqua:{...Si,variables:{...Si.variables,"--foreground":"#bfdfff","--background":"#001f3f","--tooltip-background":"rgba(0, 15, 31, 0.75)","--raised-background":"#001f3f","--points":"#dfefff","--locked":"#c4a7b3","--outline":"#bfdfff"}}};/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function mh(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fx(e){var t,n;return mh(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(mh(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}const qt=Symbol("ProxyState"),bo=Symbol("ProxyPath");function an(e,t={}){const n=t;let r=!1;function i(){return r||(Object.assign(n,e(n)),r=!0),n}return new Proxy(n,{get(a,o){return o===qt?i():i()[o]},set(a,o,s){return i()[o]=s,!0},has(a,o){return o===qt?!0:Reflect.has(i(),o)},ownKeys(){return Reflect.ownKeys(i())},getOwnPropertyDescriptor(a,o){return r||(Object.assign(n,e(n)),r=!0),Object.getOwnPropertyDescriptor(a,o)}})}var Rt=window.state=jo({lastTenTicks:[],hasNaN:!1,NaNPath:[]});const Vm=Pr({id:"",devSpeed:null,name:"",tabs:[],time:-1,autosave:!0,offlineProd:!0,offlineTime:null,timePlayed:0,keepGoing:!1,modID:"",modVersion:"",layers:{}});function $m(e){return JSON.stringify(e,(t,n)=>x(n))}const jm={get(e,t){var r;if(t===qt||t===bo)return e[t];const n=e[qt][t];if(t!=="value"&&(Fx(n)||Array.isArray(n))){if(n!==((r=e[t])==null?void 0:r[qt])){const i=[...e[bo],t];e[t]=new Proxy({[qt]:n,[bo]:i},jm)}return e[t]}return n},set(e,t,n,r){if(!Rt.hasNaN&&(typeof n=="number"&&isNaN(n)||n instanceof O&&(isNaN(n.sign)||isNaN(n.layer)||isNaN(n.mag)))){const i=e[qt][t];if(!(typeof i=="number"&&isNaN(i)||i instanceof O&&(isNaN(i.sign)||isNaN(i.layer)||isNaN(i.mag))))throw Vm.autosave=!1,Rt.hasNaN=!0,Rt.NaNPath=[...e[bo],t],Rt.NaNReceiver=r,console.error("Attempted to set NaN value",[...e[bo],t],e[qt]),"Attempted to set NaN value. See above for details"}return e[qt][t]=n,!0},ownKeys(e){return Reflect.ownKeys(e[qt])},has(e,t){return Reflect.has(e[qt],t)},getOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e[qt],t)}};var xe=window.player=new Proxy({[qt]:Vm,[bo]:["player"]},jm);let Hm=()=>({events:{},emit(e,...t){(this.events[e]||[]).forEach(n=>n(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(n=>n!==t)}});const sn=Hm();let xo=null,Ta=null;function yl(){const e=Date.now();let t=(e-xe.time)/1e3;xe.time=e;const n=t;if(Rt.lastTenTicks.push(n),Rt.lastTenTicks.length>10&&(Rt.lastTenTicks=Rt.lastTenTicks.slice(1)),!((Ta==null?void 0:Ta.value)&&!xe.keepGoing)&&!Rt.hasNaN&&(t=Math.max(t,0),xe.devSpeed!==0)){if(xe.offlineTime!=null){if(O.gt(xe.offlineTime,_t.offlineLimit*3600)&&(xe.offlineTime=_t.offlineLimit*3600),O.gt(xe.offlineTime,0)&&xe.devSpeed!==0){const r=Math.max(xe.offlineTime/10,t);xe.offlineTime=xe.offlineTime-r,t+=r}else xe.devSpeed===0&&(xe.offlineTime+=t);(!xe.offlineProd||O.lt(xe.offlineTime,0))&&(xe.offlineTime=null)}t=Math.min(t,_t.maxTickLength),xe.devSpeed!=null&&(t*=xe.devSpeed),Number.isFinite(t)||(t=1e308),!O.eq(t,0)&&(xe.timePlayed+=t,Number.isFinite(xe.timePlayed)||(xe.timePlayed=1e308),sn.emit("update",t,n),bt.unthrottled?(requestAnimationFrame(yl),xo!=null&&(clearInterval(xo),xo=null)):xo==null&&(xo=setInterval(yl,50)))}}async function Mx(){Ta=(await sl(()=>Promise.resolve().then(function(){return Ny}),void 0)).hasWon,Dt(Ta,e=>{e&&sn.emit("gameWon")}),bt.unthrottled?requestAnimationFrame(yl):xo=setInterval(yl,50)}var Lx=Object.freeze(Object.defineProperty({__proto__:null,globalBus:sn,startGameLoop:Mx},Symbol.toStringTag,{value:"Module"})),Js=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ux(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zm(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t}var Xm={exports:{}};(function(e){var t=function(){var n=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",a={};function o(l,u){if(!a[l]){a[l]={};for(var c=0;c<l.length;c++)a[l][l.charAt(c)]=c}return a[l][u]}var s={compressToBase64:function(l){if(l==null)return"";var u=s._compress(l,6,function(c){return r.charAt(c)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(l){return l==null?"":l==""?null:s._decompress(l.length,32,function(u){return o(r,l.charAt(u))})},compressToUTF16:function(l){return l==null?"":s._compress(l,15,function(u){return n(u+32)})+" "},decompressFromUTF16:function(l){return l==null?"":l==""?null:s._decompress(l.length,16384,function(u){return l.charCodeAt(u)-32})},compressToUint8Array:function(l){for(var u=s.compress(l),c=new Uint8Array(u.length*2),f=0,d=u.length;f<d;f++){var h=u.charCodeAt(f);c[f*2]=h>>>8,c[f*2+1]=h%256}return c},decompressFromUint8Array:function(l){if(l==null)return s.decompress(l);for(var u=new Array(l.length/2),c=0,f=u.length;c<f;c++)u[c]=l[c*2]*256+l[c*2+1];var d=[];return u.forEach(function(h){d.push(n(h))}),s.decompress(d.join(""))},compressToEncodedURIComponent:function(l){return l==null?"":s._compress(l,6,function(u){return i.charAt(u)})},decompressFromEncodedURIComponent:function(l){return l==null?"":l==""?null:(l=l.replace(/ /g,"+"),s._decompress(l.length,32,function(u){return o(i,l.charAt(u))}))},compress:function(l){return s._compress(l,16,function(u){return n(u)})},_compress:function(l,u,c){if(l==null)return"";var f,d,h={},p={},v="",g="",y="",m=2,b=3,T=2,S=[],w=0,N=0,I;for(I=0;I<l.length;I+=1)if(v=l.charAt(I),Object.prototype.hasOwnProperty.call(h,v)||(h[v]=b++,p[v]=!0),g=y+v,Object.prototype.hasOwnProperty.call(h,g))y=g;else{if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(f=0;f<T;f++)w=w<<1,N==u-1?(N=0,S.push(c(w)),w=0):N++;for(d=y.charCodeAt(0),f=0;f<8;f++)w=w<<1|d&1,N==u-1?(N=0,S.push(c(w)),w=0):N++,d=d>>1}else{for(d=1,f=0;f<T;f++)w=w<<1|d,N==u-1?(N=0,S.push(c(w)),w=0):N++,d=0;for(d=y.charCodeAt(0),f=0;f<16;f++)w=w<<1|d&1,N==u-1?(N=0,S.push(c(w)),w=0):N++,d=d>>1}m--,m==0&&(m=Math.pow(2,T),T++),delete p[y]}else for(d=h[y],f=0;f<T;f++)w=w<<1|d&1,N==u-1?(N=0,S.push(c(w)),w=0):N++,d=d>>1;m--,m==0&&(m=Math.pow(2,T),T++),h[g]=b++,y=String(v)}if(y!==""){if(Object.prototype.hasOwnProperty.call(p,y)){if(y.charCodeAt(0)<256){for(f=0;f<T;f++)w=w<<1,N==u-1?(N=0,S.push(c(w)),w=0):N++;for(d=y.charCodeAt(0),f=0;f<8;f++)w=w<<1|d&1,N==u-1?(N=0,S.push(c(w)),w=0):N++,d=d>>1}else{for(d=1,f=0;f<T;f++)w=w<<1|d,N==u-1?(N=0,S.push(c(w)),w=0):N++,d=0;for(d=y.charCodeAt(0),f=0;f<16;f++)w=w<<1|d&1,N==u-1?(N=0,S.push(c(w)),w=0):N++,d=d>>1}m--,m==0&&(m=Math.pow(2,T),T++),delete p[y]}else for(d=h[y],f=0;f<T;f++)w=w<<1|d&1,N==u-1?(N=0,S.push(c(w)),w=0):N++,d=d>>1;m--,m==0&&(m=Math.pow(2,T),T++)}for(d=2,f=0;f<T;f++)w=w<<1|d&1,N==u-1?(N=0,S.push(c(w)),w=0):N++,d=d>>1;for(;;)if(w=w<<1,N==u-1){S.push(c(w));break}else N++;return S.join("")},decompress:function(l){return l==null?"":l==""?null:s._decompress(l.length,32768,function(u){return l.charCodeAt(u)})},_decompress:function(l,u,c){var f=[],d=4,h=4,p=3,v="",g=[],y,m,b,T,S,w,N,I={val:c(0),position:u,index:1};for(y=0;y<3;y+=1)f[y]=y;for(b=0,S=Math.pow(2,2),w=1;w!=S;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*w,w<<=1;switch(b){case 0:for(b=0,S=Math.pow(2,8),w=1;w!=S;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*w,w<<=1;N=n(b);break;case 1:for(b=0,S=Math.pow(2,16),w=1;w!=S;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*w,w<<=1;N=n(b);break;case 2:return""}for(f[3]=N,m=N,g.push(N);;){if(I.index>l)return"";for(b=0,S=Math.pow(2,p),w=1;w!=S;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*w,w<<=1;switch(N=b){case 0:for(b=0,S=Math.pow(2,8),w=1;w!=S;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*w,w<<=1;f[h++]=n(b),N=h-1,d--;break;case 1:for(b=0,S=Math.pow(2,16),w=1;w!=S;)T=I.val&I.position,I.position>>=1,I.position==0&&(I.position=u,I.val=c(I.index++)),b|=(T>0?1:0)*w,w<<=1;f[h++]=n(b),N=h-1,d--;break;case 2:return g.join("")}if(d==0&&(d=Math.pow(2,p),p++),f[N])v=f[N];else if(N===h)v=m+m.charAt(0);else return null;g.push(v),f[h++]=m+v.charAt(0),d--,m=v,d==0&&(d=Math.pow(2,p),p++)}}};return s}();e!=null&&(e.exports=t)})(Xm);var li=Xm.exports;function Wm(e={}){return Object.assign({id:`${_t.id}-0`,name:"Default Save",tabs:_t.initialTabs.slice(),time:Date.now(),autosave:!0,offlineProd:!0,offlineTime:0,timePlayed:0,keepGoing:!1,modID:_t.id,modVersion:_t.versionNumber,layers:{}},e)}function rr(e){const t=li.compressToUTF16($m(e!=null?e:xe[qt]));return localStorage.setItem((e!=null?e:xe[qt]).id,t),t}async function Bx(){Dx();try{let e=localStorage.getItem(bt.active);if(e==null){await Wi(Ro());return}if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=li.decompressFromUTF16(e);else throw"Unable to determine save encoding";const t=JSON.parse(e);if(t.modID!==_t.id){await Wi(Ro());return}t.id=bt.active,await Wi(t)}catch(e){console.error(`Failed to load save. Falling back to new save.
`,e),await Wi(Ro())}}function Ro(){const e=Qs(),t=Wm({id:e});return rr(t),bt.saves.push(e),t}function Qs(){let e,t=0;do e=`${_t.id}-${t++}`;while(localStorage.getItem(e));return e}async function Wi(e){console.info("Loading save",e);const{layers:t,removeLayer:n,addLayer:r}=await sl(()=>Promise.resolve().then(function(){return o_}),void 0),{fixOldSave:i,getInitialLayers:a}=await sl(()=>Promise.resolve().then(function(){return Ny}),void 0);for(const o in t){const s=t[o];s&&n(s)}a(e).forEach(o=>r(o,e)),e=Wm(e),e.offlineProd&&e.time&&(e.offlineTime==null&&(e.offlineTime=0),e.offlineTime+=(Date.now()-e.time)/1e3),e.time=Date.now(),e.modVersion!==_t.versionNumber&&i(e.modVersion,e),Object.assign(xe,e),bt.active=xe.id}setInterval(()=>{xe.autosave&&rr()},1e3);window.onbeforeunload=()=>{xe.autosave&&rr()};window.save=rr;const kx=window.hardReset=async()=>{await Wi(Ro())},Ba=Pr({active:"",saves:[],showTPS:!0,theme:Ff.Nordic,unthrottled:!1});Dt(Ba,e=>{const t=li.compressToUTF16(JSON.stringify(e));localStorage.setItem(_t.id,t)},{deep:!0});var bt=window.settings=Ba;window.hardResetSettings=()=>{const e={active:"",saves:[],showTPS:!0,theme:Ff.Nordic};sn.emit("loadSettings",e),Object.assign(Ba,e),kx()};function Dx(){try{let e=localStorage.getItem(_t.id);if(e!=null&&e!==""){if(e[0]!=="{")if(e[0]==="e")e=decodeURIComponent(escape(atob(e)));else if(e[0]==="\u1BE1")e=li.decompressFromUTF16(e);else{console.warn("Unable to determine settings encoding",e);return}const t=JSON.parse(e);typeof t=="object"&&Object.assign(Ba,t)}sn.emit("loadSettings",Ba)}catch{}}const Km=Pr([]);function Ym(e){Km.push(e)}const Zm=Pr([]);function Gx(e){Zm.push(e)}const Vx=Pr([]),$x={class:"table"},qs=Ie({__name:"Column",setup(e){const t=J(()=>Kr[bt.theme].mergeAdjacent);return(n,r)=>(M(),W("div",$x,[P("div",{class:ze(["col",{mergeAdjacent:x(t)}])},[Mt(n.$slots,"default")],2)]))}}),jx={class:"table"},wa=Ie({__name:"Row",setup(e){const t=J(()=>Kr[bt.theme].mergeAdjacent);return(n,r)=>(M(),W("div",jx,[P("div",{class:ze(["row",{mergeAdjacent:x(t)}])},[Mt(n.$slots,"default")],2)]))}});function Jm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!fr(e)}function Ye(e,t="span"){return typeof e=="function"?Ie({render:e}):typeof e=="string"?e.length>0?(e=e.trim(),e.charAt(0)!=="<"&&(e=`<${t}>${e}</${t}>`),Ie({template:e})):Ie({render:()=>({})}):e}function Bt(e){if(Jn(e))return typeof e=="function"?e():Ye(e);const t=e[Jt];return C(t,e[nn](),null)}function tr(...e){let t;return C(wa,null,Jm(t=e.map(Bt))?t:{default:()=>[t]})}function Hx(...e){let t;return C(qs,null,Jm(t=e.map(Bt))?t:{default:()=>[t]})}function Er(e){if(Jn(e))return typeof e=="function"?e():typeof e=="string"?C(Oe,null,[e]):C(e,null,null);const t=e[Jt];return C(t,e[nn](),null)}function Jn(e){return typeof e=="string"?!0:typeof e=="object"?e==null?!1:"render"in e||"component"in e:typeof e=="function"&&e[Ua]===!0}function Mf(e,t){const n=Te(null),r=Te(void 0);function i(s){n.value||(n.value=setInterval(o,250)),r.value=s}function a(){n.value&&(clearInterval(n.value),n.value=null)}function o(){t&&t.value?t.value():e&&e.value&&e.value(r.value)}return Ho(a),{start:i,stop:a,handleHolding:o}}function Vo(e,t="div"){const n=An();return zt(()=>{n.value=Ye(Ot(e),t)}),n}function lo(e,t="div"){const n=An(null);return zt(()=>{const r=Ot(e);n.value=r==null?null:Ye(r,t)}),n}function zx(e){return J(()=>Ot(e))}function Ot(e){return x(x(e))}function q(...e){return e.includes(Object)||e.push(Object),e}var Qe=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};const Xx=Ie({__name:"Context",emits:["updateNodes"],setup(e,{emit:t}){var c;const n=Te({}),r=new ResizeObserver(s),i=Te(null);vr(()=>{const f=i.value;f!=null&&r.observe(f)});let a=!0,o=Te((c=i.value)==null?void 0:c.getBoundingClientRect());function s(){i.value!=null&&a&&(a=!1,tn(()=>{var f;o.value=(f=i.value)==null?void 0:f.getBoundingClientRect(),Object.values(n.value).filter(d=>d).forEach(d=>d.rect=d.element.getBoundingClientRect()),t("updateNodes",n.value),a=!0}))}document.fonts.ready.then(s);const l={attributes:!1,childList:!0,subtree:!1};Hi(Lf,(f,d)=>{const h=new MutationObserver(()=>u(f));h.observe(d,l),n.value[f]={element:d,observer:h,rect:d.getBoundingClientRect()},t("updateNodes",n.value),tn(()=>u(f))}),Hi(Uf,f=>{var d;(d=n.value[f])==null||d.observer.disconnect(),n.value[f]=void 0,t("updateNodes",n.value)}),Hi(Bf,n),Hi(kf,o);function u(f){const d=n.value[f];d!=null&&(d.rect=d.element.getBoundingClientRect(),t("updateNodes",n.value))}return(f,d)=>(M(),W(Oe,null,[Mt(f.$slots,"default",{},void 0,!0),P("div",{ref_key:"resizeListener",ref:i,class:"resize-listener"},null,512)],64))}});var Qm=Qe(Xx,[["__scopeId","data-v-6a08ac80"]]);const Wx=["onPointerdown"],Kx={class:"modal-wrapper"},Yx={class:"modal-container"},Zx={class:"modal-header"},Jx=le(" default header "),Qx={class:"modal-body"},qx=le(" default body "),e_={class:"modal-footer"},t_=P("div",{class:"modal-default-flex-grow"},null,-1),wi=Ie({__name:"Modal",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=Et(e),a=J(()=>i.modelValue||s.value);function o(){n("update:modelValue",!1)}const s=Te(!1),l=Te(null),u=J(()=>{var c,f;return(f=(c=l.value)==null?void 0:c.nodes)!=null?f:null});return t({isOpen:a,nodes:u}),(c,f)=>(M(),we(qv,{to:"#modal-root"},[C(Ti,{name:"modal",onBeforeEnter:f[0]||(f[0]=d=>s.value=!0),onAfterLeave:f[1]||(f[1]=d=>s.value=!1)},{default:Pe(()=>[zo(P("div",un({class:"modal-mask",onPointerdown:ln(o,["self"])},c.$attrs),[P("div",Kx,[P("div",Yx,[P("div",Zx,[Mt(c.$slots,"header",{shown:x(a)},()=>[Jx])]),P("div",Qx,[C(Qm,{ref_key:"contextRef",ref:l},{default:Pe(()=>[Mt(c.$slots,"body",{shown:x(a)},()=>[qx])]),_:3},512)]),P("div",e_,[Mt(c.$slots,"footer",{shown:x(a)},()=>[P("div",{class:"modal-default-footer"},[t_,P("button",{class:"button modal-default-button",onClick:o}," Close ")])])])])])],16,Wx),[[Jl,e.modelValue]])]),_:3})]))}}),ka=Symbol("PersistentState"),Da=Symbol("DefaultValue"),bl=Symbol("StackTrace"),qm=Symbol("Deleted");function n_(){var e;return((e=new Error().stack)==null?void 0:e.split(`
`).slice(3,5).map(t=>t.trim()).join(`
`))||""}function Kt(e){const t=et(e)?e:Te(e);return t[ka]=t,t[Da]=et(e)?e.value:e,t[bl]=n_(),t[qm]=!1,ir.length===0?console.warn("Creating a persistent ref outside of a layer. This is not officially supported",t,`
Created at:
`+t[bl]):Ao[ir[ir.length-1]].add(t),t}sn.on("addLayer",(e,t)=>{const n=[],r=(i,a=[])=>{let o=!1;return Object.keys(i).forEach(s=>{const l=i[s];if(l&&typeof l=="object")if(ka in l){if(o=!0,l[qm]){console.warn("Deleted persistent ref present in returned object. Ignoring...",l,`
Created at:
`+l[bl]);return}Ao[e.id].delete(qt in l?l[qt]:l);const u=a.reduce((f,d)=>(d in f||(f[d]={}),f[d]),t),c=u[s];u[s]=l[ka],di(u)?c!=null?u[s]=c:u[s]=l[Da]:c!=null?u[s].value=c:u[s].value=l[Da]}else!(l instanceof O)&&!et(l)&&!n.includes(l)&&(typeof l.type=="symbol"&&n.push(l),r(l,[...a,s])&&(Ce(l)&&!Ce(i)?console.warn("Found array that contains persistent values when adding layer. Keep in mind changing the order of elements in the array will mess with existing player saves.",qt in i?i[qt]:i,s):o=!0))}),o};r(e),Ao[e.id].forEach(i=>{console.error(`Created persistent ref in ${e.id} without registering it to the layer! Make sure to include everything persistent in the returned object`,i,`
Created at:
`+i[bl])}),Ao[e.id].clear()});const Lf=Symbol("RegisterNode"),Uf=Symbol("UnregisterNode"),Bf=Symbol("Nodes"),kf=Symbol("Bounds"),Rn=jo({});window.layers=Rn;const Ao={},ir=[];function ss(e,t){return an(()=>{const n={},r=n.emitter=Hm();if(n.on=r.on.bind(r),n.emit=r.emit.bind(r),n.nodes=Te({}),n.id=e,ir.push(e),Ao[e]=new Set,n.minimized=Kt(!1),Object.assign(n,t.call(n)),ir[ir.length-1]==null||ir[ir.length-1]!==e)throw`Adding layers stack in invalid state. This should not happen
Stack: ${ir}
Trying to pop ${n.id}`;return ir.pop(),H(n,"color"),H(n,"display"),H(n,"name"),ft(n,"name",n.id),H(n,"minWidth"),ft(n,"minWidth",600),H(n,"minimizable"),ft(n,"minimizable",!0),n})}function eg(e,t){if(console.info("Adding layer",e.id),Rn[e.id]){console.error("Attempted to add layer with same ID as existing layer",e.id,Rn[e.id]);return}ft(t,"layers",{}),t.layers[e.id]==null&&(t.layers[e.id]={}),Rn[e.id]=e,sn.emit("addLayer",e,t.layers[e.id])}function r_(e){return Rn[e]}function tg(e){console.info("Removing layer",e.id),sn.emit("removeLayer",e),Rn[e.id]=void 0}function i_(e){tg(e),eg(e,xe)}function ng(e){const t=Te(!1);return{openModal:()=>t.value=!0,modal:it(()=>C(wi,{modelValue:t.value,"onUpdate:modelValue":n=>t.value=n},{header:()=>C("h2",null,[x(e.name)]),body:x(e.display)}))}}sn.on("update",function(t){Object.values(Rn).forEach(n=>{n==null||n.emit("preUpdate",t)}),Object.values(Rn).forEach(n=>{n==null||n.emit("update",t)}),Object.values(Rn).forEach(n=>{n==null||n.emit("postUpdate",t)})});var o_=Object.freeze(Object.defineProperty({__proto__:null,RegisterNodeInjectionKey:Lf,UnregisterNodeInjectionKey:Uf,NodesInjectionKey:Bf,BoundsInjectionKey:kf,layers:Rn,persistentRefs:Ao,addingLayers:ir,createLayer:ss,addLayer:eg,getLayer:r_,removeLayer:tg,reloadLayer:i_,setupLayerModal:ng},Symbol.toStringTag,{value:"Module"}));const a_=Ie({components:{Context:Qm},props:{index:{type:Number,required:!0},tab:{type:Function,required:!0},display:{type:q(Object,String,Function),required:!0},minimized:{type:Object,required:!0},minWidth:{type:q(Number,String),required:!0},name:{type:q(String),required:!0},color:q(String),minimizable:q(Boolean),nodes:{type:Object,required:!0}},setup(e){const{display:t,index:n,minimized:r,minWidth:i,tab:a}=Et(e),o=Vo(t),s=J(()=>_t.allowGoBack&&n.value>0&&!r.value);function l(){xe.tabs.splice(x(e.index),1/0)}tn(()=>c(r.value,x(i.value))),Dt([r,zx(i)],([f,d])=>c(f,d));function u(f){e.nodes.value=f}function c(f,d){const h=typeof d=="number"||Number.isNaN(parseInt(d))?d+"px":d,p=a.value();p!=null&&(f?(p.style.flexGrow="0",p.style.flexShrink="0",p.style.width="60px",p.style.minWidth=p.style.flexBasis="",p.style.margin="0"):(p.style.flexGrow="",p.style.flexShrink="",p.style.width="",p.style.minWidth=p.style.flexBasis=h,p.style.margin=""))}return{component:o,showGoBack:s,updateNodes:u,unref:x,goBack:l}}});function s_(e,t,n,r,i,a){const o=wt("Context");return M(),W("div",{class:"layer-container",style:tt({"--layer-color":e.unref(e.color)})},[e.showGoBack?(M(),W("button",{key:0,class:"goBack",onClick:t[0]||(t[0]=(...s)=>e.goBack&&e.goBack(...s))},"\u2190")):ve("",!0),e.minimized.value?(M(),W("button",{key:1,class:"layer-tab minimized",onClick:t[1]||(t[1]=s=>e.minimized.value=!1)},[P("div",null,Je(e.unref(e.name)),1)])):(M(),W("div",{key:2,class:ze(["layer-tab",{showGoBack:e.showGoBack}])},[C(o,{onUpdateNodes:e.updateNodes},{default:Pe(()=>[(M(),we(gt(e.component)))]),_:1},8,["onUpdateNodes"])],2)),e.unref(e.minimizable)?(M(),W("button",{key:3,class:"minimize",onClick:t[2]||(t[2]=s=>e.minimized.value=!0)}," \u25BC ")):ve("",!0)],4)}var l_=Qe(a_,[["render",s_],["__scopeId","data-v-34c9d881"]]);const rg=e=>(hr("data-v-4b4bda40"),e=e(),pr(),e),u_=rg(()=>P("h2",null,"Changelog",-1)),c_=rg(()=>P("details",{open:""},[P("summary",null,[le("v0.0 Initial Commit - "),P("time",null,"2021-09-04")]),le(" This is the first release :D "),P("ul",null,[P("li",{class:"feature"},"Did everything"),P("li",{class:"fix"},"Had some fun"),P("li",{class:"breaking"},"Removed everything"),P("li",{class:"balancing"},"Created some bugs to fix later")])],-1)),f_=Ie({__name:"Changelog",setup(e,{expose:t}){const n=Te(!1);return t({open(){n.value=!0}}),(r,i)=>(M(),we(wi,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=a=>n.value=a)},{header:Pe(()=>[u_]),body:Pe(()=>[c_]),_:1},8,["modelValue"]))}});var d_=Qe(f_,[["__scopeId","data-v-4b4bda40"]]),h_=Ie({props:{element:Object,display:{type:q(Object,String,Function),required:!0},style:q(Object,String,Array),classes:q(Object),direction:q(String),xoffset:q(String),yoffset:q(String),pinned:Object},setup(e){const{element:t,display:n,pinned:r}=Et(e),i=Te(!1),a=J(()=>(Ot(r)||i.value)&&o.value),o=lo(n),s=An(Ye(it(()=>{const c=Ot(t);return c==null?"":Er(c)})));function l(c){const f=r;c.shiftKey&&f&&(f.value=!f.value,c.stopPropagation(),c.preventDefault())}const u=J(()=>Ot(r)&&Kr[bt.theme].showPin);return{Direction:Ct,isHovered:i,isShown:a,comp:o,elementComp:s,unref:x,togglePinned:l,showPin:u}}});const p_={key:0,class:"material-icons pinned"};function v_(e,t,n,r,i,a){return M(),W("div",{class:ze(["tooltip-container",{shown:e.isShown}]),onMouseenter:t[0]||(t[0]=o=>e.isHovered=!0),onMouseleave:t[1]||(t[1]=o=>e.isHovered=!1),onClickCapture:t[2]||(t[2]=(...o)=>e.togglePinned&&e.togglePinned(...o))},[Mt(e.$slots,"default",{},void 0,!0),e.elementComp?(M(),we(gt(e.elementComp),{key:0})):ve("",!0),C(Ti,{name:"fade"},{default:Pe(()=>{var o;return[e.isShown?(M(),W("div",{key:0,class:ze(["tooltip",{top:e.unref(e.direction)===e.Direction.Up,left:e.unref(e.direction)===e.Direction.Left,right:e.unref(e.direction)===e.Direction.Right,bottom:e.unref(e.direction)===e.Direction.Down,...e.unref(e.classes)}]),style:tt([{"--xoffset":e.unref(e.xoffset)||"0px","--yoffset":e.unref(e.yoffset)||"0px"},(o=e.unref(e.style))!=null?o:{}])},[e.showPin?(M(),W("span",p_,"push_pin")):ve("",!0),e.comp?(M(),we(gt(e.comp),{key:1})):ve("",!0)],6)):ve("",!0)]}),_:1})],34)}var At=Qe(h_,[["render",v_],["__scopeId","data-v-6102fa3a"]]);const uo=e=>(hr("data-v-7dec2dec"),e=e(),pr(),e),m_={class:"info-modal-header"},g_=["src","alt"],y_={class:"info-modal-title"},b_={key:0},x_={key:0},__={key:0},T_=uo(()=>P("div",null," Made in Profectus, by thepaperpilot with inspiration from Acameada and Jacorb ",-1)),w_=uo(()=>P("br",null,null,-1)),C_=uo(()=>P("br",null,null,-1)),E_=["href"],I_=uo(()=>P("span",{class:"material-icons info-modal-discord"},"discord",-1)),S_=uo(()=>P("div",null,[P("a",{href:"https://discord.gg/WzejVAx",class:"info-modal-discord-link"},[P("span",{class:"material-icons info-modal-discord"},"discord"),le(" The Paper Pilot Community ")])],-1)),N_=uo(()=>P("div",null,[P("a",{href:"https://discord.gg/F3xveHV",class:"info-modal-discord-link"},[P("span",{class:"material-icons info-modal-discord"},"discord"),le(" The Modding Tree ")])],-1)),R_=uo(()=>P("br",null,null,-1));var A_=Ie({__name:"Info",props:{changelog:null},setup(e,{expose:t}){const n=e,{title:r,logo:i,author:a,discordName:o,discordLink:s,versionNumber:l,versionTitle:u}=_t,c=Et(n),f=Te(!1),d=J(()=>Ql(xe.timePlayed)),h=J(()=>Ye(it(()=>C(Oe,null,[Zm.map(Bt)]))));t({open(){f.value=!0}});function p(){var v;(v=x(c.changelog))==null||v.open()}return(v,g)=>(M(),we(wi,{modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=y=>f.value=y)},{header:Pe(()=>[P("div",m_,[x(i)?(M(),W("img",{key:0,class:"info-modal-logo",src:x(i),alt:x(r)},null,8,g_)):ve("",!0),P("div",y_,[P("h2",null,Je(x(r)),1),P("h4",null,[le(" v"+Je(x(l)),1),x(u)?(M(),W("span",b_,": "+Je(x(u)),1)):ve("",!0)])])])]),body:Pe(({shown:y})=>[y?(M(),W("div",x_,[x(a)?(M(),W("div",__,"By "+Je(x(a)),1)):ve("",!0),T_,w_,P("div",{class:"link",onClick:p},"Changelog"),C_,P("div",null,[x(s)?(M(),W("a",{key:0,href:x(s),class:"info-modal-discord-link"},[I_,le(" "+Je(x(o)),1)],8,E_)):ve("",!0)]),S_,N_,R_,P("div",null,"Time Played: "+Je(x(d)),1),(M(),we(gt(x(h))))])):ve("",!0)]),_:1},8,["modelValue"]))}});var O_=Qe(A_,[["__scopeId","data-v-7dec2dec"]]);function Df(e){return(Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function gh(e){return function(t){if(Array.isArray(t))return _c(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||ig(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ig(e,t){if(e){if(typeof e=="string")return _c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_c(e,t):void 0}}function _c(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ji(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ig(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}var Tc={inheritAttrs:!1,name:"vue-input",props:{autocomplete:{required:!1,type:String},modelValue:{required:!0,type:String},placeholder:{required:!0,type:String},disabled:{required:!0,type:Boolean},tabindex:{required:!0,type:Number},autofocus:{required:!0,type:Boolean},comboboxUid:{required:!0,type:Number}},emits:["update:modelValue","input","change","focus","blur","escape"],setup:function(e,t){var n=Te(null);return vr(function(){e.autofocus&&n.value.focus()}),os(function(){e.autofocus&&n.value.focus()}),{handleInput:function(r){t.emit("input",r),t.emit("update:modelValue",r.target.value)},handleChange:function(r){t.emit("change",r),t.emit("update:modelValue",r.target.value)},handleFocus:function(r){t.emit("focus",r)},handleBlur:function(r){t.emit("blur",r)},input:n,handleEscape:function(r){n.value.blur(),t.emit("escape",r)}}}},P_={class:"vue-input"},F_=["autocomplete","modelValue","placeholder","disabled","tabindex","autofocus","aria-controls","aria-labelledby"];Tc.render=function(e,t,n,r,i,a){return M(),W("div",P_,[Mt(e.$slots,"prepend"),P("input",{ref:"input",autocomplete:n.autocomplete,modelValue:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,onInput:t[0]||(t[0]=function(){return r.handleInput&&r.handleInput.apply(r,arguments)}),onChange:t[1]||(t[1]=function(){return r.handleChange&&r.handleChange.apply(r,arguments)}),onFocus:t[2]||(t[2]=function(){return r.handleFocus&&r.handleFocus.apply(r,arguments)}),onBlur:t[3]||(t[3]=function(){return r.handleBlur&&r.handleBlur.apply(r,arguments)}),onKeyup:t[4]||(t[4]=$i(ln(function(){return r.handleEscape&&r.handleEscape.apply(r,arguments)},["exact"]),["esc"])),tabindex:n.tabindex,autofocus:n.autofocus,"aria-autocomplete":"list","aria-controls":"vs".concat(n.comboboxUid,"-listbox"),"aria-labelledby":"vs".concat(n.comboboxUid,"-combobox")},null,40,F_),Mt(e.$slots,"append")])},Tc.__file="src/components/input.vue";var wc={inheritAttrs:!1,name:"vue-tags",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return Df(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},collapseTags:{type:Boolean}},emits:["click"],setup:function(e,t){return{dataAttrs:Kn("dataAttrs"),handleClick:function(n){t.emit("click",n)}}}};wc.render=function(e,t,n,r,i,a){return M(),W("ul",un({class:["vue-tags",{collapsed:n.collapseTags}],onMousedown:t[0]||(t[0]=ln(function(){},["prevent"])),tabindex:"-1",onClick:t[1]||(t[1]=function(){return r.handleClick&&r.handleClick.apply(r,arguments)})},r.dataAttrs),[(M(!0),W(Oe,null,Rr(n.modelValue,function(o){return M(),W(Oe,{key:o.key},[o.group?ve("v-if",!0):(M(),W("li",{key:0,class:ze(["vue-tag",{selected:o.selected}])},[Mt(e.$slots,"default",{option:o},function(){return[P("span",null,Je(o.label),1)]})],2))],64)}),128))],16)},wc.__file="src/components/tags.vue";var Cc={inheritAttrs:!1,name:"vue-dropdown",props:{modelValue:{required:!0,type:Array,validator:function(e){return e.every(function(t){return Df(t.key)!==void 0&&t.label!==void 0&&typeof t.selected=="boolean"})}},comboboxUid:{required:!0,type:Number},maxHeight:{required:!0},highlightedOriginalIndex:{required:!0}},emits:["click-item","mouseenter"],setup:function(e,t){return{dataAttrs:Kn("dataAttrs"),handleClickItem:function(n,r){r.disabled||t.emit("click-item",n,r)},handleMouseenter:function(n,r){t.emit("mouseenter",n,r)}}}},M_=["id","aria-multiselectable","aria-busy","aria-disabled"],L_=["onClick","onMouseenter","id","aria-selected","aria-disabled"];Cc.render=function(e,t,n,r,i,a){return M(),W("ul",un({class:"vue-dropdown",style:{maxHeight:n.maxHeight+"px"},onMousedown:t[0]||(t[0]=ln(function(){},["prevent"]))},r.dataAttrs,{role:"listbox",id:"vs".concat(n.comboboxUid,"-listbox"),"aria-multiselectable":r.dataAttrs["data-multiple"],"aria-busy":r.dataAttrs["data-loading"],"aria-disabled":r.dataAttrs["data-disabled"]}),[(M(!0),W(Oe,null,Rr(n.modelValue,function(o,s){return M(),W(Oe,{key:o.key},[o.visible&&o.hidden===!1?(M(),W("li",{key:0,onClick:function(l){return r.handleClickItem(l,o)},class:ze(["vue-dropdown-item",{selected:o.selected,disabled:o.disabled,highlighted:o.originalIndex===n.highlightedOriginalIndex,group:o.group}]),onMouseenter:function(l){return r.handleMouseenter(l,o)},role:"option",id:"vs".concat(n.comboboxUid,"-option-").concat(s),"aria-selected":!!o.selected||!!o.disabled&&void 0,"aria-disabled":o.disabled},[Mt(e.$slots,"default",{option:o},function(){return[P("span",null,Je(o.label),1)]})],42,L_)):ve("v-if",!0)],64)}),128))],16,M_)},Cc.__file="src/components/dropdown.vue";var og=function(e,t,n){var r=n.valueBy;return r(e)===r(t)},To=function(e,t,n){var r=n.valueBy;return e.some(function(i){return og(i,t,{valueBy:r})})},Ni=function(e,t,n){var r=n.valueBy;return e.find(function(i){return r(i)===t})},bu=function(e,t,n){var r=n.max,i=n.valueBy;return To(e,t,{valueBy:i})||e.length>=r?e:e.concat(t)},xu=function(e,t,n){var r=n.min,i=n.valueBy;return To(e,t,{valueBy:i})===!1||e.length<=r?e:e.filter(function(a){return og(a,t,{valueBy:i})===!1})},Cs=function(e){return J(function(){return typeof e.value=="function"?e.value:typeof e.value=="string"?function(t){return e.value.split(".").reduce(function(n,r){return n[r]},t)}:function(t){return t}})},U_=function(e,t){var n=J(function(){return e.value.reduce(function(o,s){return Object.assign(o,(l={},u=s.originalIndex,c=s,u in l?Object.defineProperty(l,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):l[u]=c,l));var l,u,c},{})}),r=function(o){var s=n.value[o];return s!==void 0&&i(s)!==!1&&(t.value=o,!0)},i=function(o){return!o.disabled&&!o.hidden&&o.visible},a=J(function(){return e.value.some(function(o){return i(o)})});return zt(function(){if(a.value===!1&&(t.value=null),t.value!==null&&e.value.length<=t.value){var o,s=ji(e.value.reverse());try{for(s.s();!(o=s.n()).done;){var l=o.value;if(r(l.originalIndex))break}}catch(d){s.e(d)}finally{s.f()}}if(t.value===null||i(e.value[t.value])===!1){var u,c=ji(e.value);try{for(c.s();!(u=c.n()).done;){var f=u.value;if(r(f.originalIndex))break}}catch(d){c.e(d)}finally{c.f()}}}),{pointerForward:function(){if(a.value!==!1&&t.value!==null)for(var o=t.value+1,s=0;o!==t.value&&s++<e.value.length&&(e.value.length<=o&&(o=0),!r(o));)++o},pointerBackward:function(){if(a.value!==!1&&t.value!==null)for(var o=t.value-1,s=0;o!==t.value&&s++<e.value.length&&(o<0&&(o=e.value.length-1),!r(o));)--o},pointerSet:r}},xl=Ie({name:"vue-select",inheritAttrs:!1,props:{modelValue:{required:!0},emptyModelValue:{},options:{required:!0,type:Array},labelBy:{type:[String,Function]},valueBy:{type:[String,Function]},disabledBy:{default:"disabled",type:[String,Function]},groupBy:{default:"group",type:[String,Function]},visibleOptions:{type:Array,default:null},multiple:{default:!1,type:Boolean},min:{default:0,type:Number},max:{default:1/0,type:Number},searchable:{default:!1,type:Boolean},searchPlaceholder:{default:"Type to search",type:String},clearOnSelect:{default:!1,type:Boolean},clearOnClose:{default:!1,type:Boolean},taggable:{default:!1,type:Boolean},collapseTags:{default:!1,type:Boolean},autocomplete:{default:"off",type:String},disabled:{default:!1,type:Boolean},loading:{default:!1,type:Boolean},closeOnSelect:{default:!1,type:Boolean},hideSelected:{default:!1,type:Boolean},placeholder:{default:"Select option",type:String},tabindex:{default:0,type:Number},autofocus:{default:!1,type:Boolean},maxHeight:{default:300,type:Number},openDirection:{type:String,validator:function(e){return["top","bottom"].includes(e)}}},emits:["selected","removed","update:modelValue","focus","blur","toggle","opened","closed","search:input","search:change","search:focus","search:blur"],setup:function(e,t){var n=function(k){var X=Pr({}),ce=Cs(Sn(k,"labelBy"));zt(function(){return X.labelBy=ce.value});var ue=Cs(Sn(k,"valueBy"));zt(function(){return X.valueBy=ue.value});var Ve=Cs(Sn(k,"disabledBy"));zt(function(){return X.disabledBy=Ve.value});var ie=Cs(Sn(k,"groupBy"));zt(function(){return X.groupBy=ie.value});var Ze=J(function(){return k.multiple?k.min:Math.min(1,k.min)});zt(function(){return X.min=Ze.value});var at=J(function(){return k.multiple?k.max:1});return zt(function(){return X.max=at.value}),zt(function(){return X.options=k.options}),X}(e),r=J(function(){var k;return(k=e.emptyModelValue)!==null&&k!==void 0?k:null}),i=Fr(),a=Te(),o=Te(),s=Te(),l=J(function(){var k;return(k=s.value)===null||k===void 0?void 0:k._.refs.input}),u=Te(!1);Dt(function(){return u.value},function(){var k,X;u.value?(t.emit("opened"),t.emit("focus"),e.searchable?(l.value!==document.activeElement&&l.value.focus(),t.emit("search:focus")):(k=a.value)===null||k===void 0||k.focus()):(e.searchable?(l.value===document.activeElement&&l.value.blur(),e.clearOnClose&&N(),t.emit("search:blur")):(X=a.value)===null||X===void 0||X.blur(),t.emit("closed"),t.emit("blur")),t.emit("toggle")});var c=function(){e.disabled||(u.value=!0)},f=function(k){var X;!((X=a.value)===null||X===void 0)&&X.contains(k==null?void 0:k.relatedTarget)?setTimeout(function(){var ce;(ce=a.value)===null||ce===void 0||ce.focus()}):u.value=!1};Dt(function(){return e.disabled},function(){return f()});var d=Te(""),h=J(function(){return new RegExp(d.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i")}),p=J(function(){return d.value?n.options.filter(function(k){return h.value.test(n.labelBy(k))}):void 0}),v=Te([]),g=J(function(){return new Set(v.value.map(function(k){return n.valueBy(k)}))}),y=function(){if(e.multiple){if(Array.isArray(e.modelValue)===!1||v.value.length!==e.modelValue.length||Object.keys(v.value).some(function(k){return v.value[k]!==Ni(n.options,e.modelValue[k],{valueBy:n.valueBy})}))return!1}else if(v.value.length===0&&e.modelValue!==r.value||v.value.length===1&&e.modelValue===r.value||v.value[0]!==Ni(n.options,e.modelValue,{valueBy:n.valueBy}))return!1;return!0},m=function(){if(!y()){v.value=[];var k,X=ji(e.multiple?e.modelValue:e.modelValue===r.value?[]:[e.modelValue]);try{for(X.s();!(k=X.n()).done;){var ce=k.value,ue=Ni(n.options,ce,{valueBy:n.valueBy});To(n.options,ue,{valueBy:n.valueBy})!==!1&&(v.value=bu(v.value,ue,{max:1/0,valueBy:n.valueBy}))}}catch(Ve){X.e(Ve)}finally{X.f()}}};m(),Dt(function(){return e.modelValue},function(){return m()},{deep:!0}),Dt(function(){return n.options},function(){v.value=n.options.filter(function(k){return g.value.has(n.valueBy(k))})},{deep:!0});var b,T=function(k,X){(X=X.originalOption).value.every(function(ce){var ue=Ni(n.options,ce,{valueBy:n.valueBy});return To(v.value,ue,{valueBy:n.valueBy})})?X.value.forEach(function(ce){var ue=Ni(n.options,ce,{valueBy:n.valueBy});v.value=xu(v.value,ue,{min:n.min,valueBy:n.valueBy}),t.emit("removed",ue)}):X.value.forEach(function(ce){var ue=Ni(n.options,ce,{valueBy:n.valueBy});To(v.value,ue,{valueBy:n.valueBy})||(v.value=bu(v.value,ue,{max:n.max,valueBy:n.valueBy}),t.emit("selected",ue))})},S=function(k,X){if(X=X.originalOption,To(v.value,X,{valueBy:n.valueBy}))v.value=xu(v.value,X,{min:n.min,valueBy:n.valueBy}),t.emit("removed",X);else{if(!e.multiple&&v.value.length===1){var ce=v.value[0];v.value=xu(v.value,v.value[0],{min:0,valueBy:n.valueBy}),t.emit("removed",ce)}v.value=bu(v.value,X,{max:n.max,valueBy:n.valueBy}),t.emit("selected",X)}},w=function(){if(!y()){var k=v.value.map(function(X){return n.valueBy(X)});e.multiple?t.emit("update:modelValue",k):k.length?t.emit("update:modelValue",k[0]):t.emit("update:modelValue",r.value)}},N=function(){l.value.value="",l.value.dispatchEvent(new Event("input")),l.value.dispatchEvent(new Event("change"))},I=J(function(){var k,X;return(X=(k=e.visibleOptions)!==null&&k!==void 0?k:p.value)!==null&&X!==void 0?X:n.options}),R=Te(0),U=J(function(){var k,X=new Set(I.value.map(function(ie){return n.valueBy(ie)})),ce=n.options.map(function(ie,Ze){var at,ut={key:n.valueBy(ie),label:n.labelBy(ie),group:(at=n.groupBy(ie))!==null&&at!==void 0&&at,originalIndex:Ze,originalOption:ie};return ut.selected=ut.group?ie.value.every(function(E){return g.value.has(E)}):g.value.has(n.valueBy(ie)),ut.disabled=ut.group?n.disabledBy(ie)||ie.value.every(function(E){var A=Ni(n.options,E,{valueBy:n.valueBy});return n.disabledBy(A)}):n.disabledBy(ie),ut.visible=ut.group?ie.value.some(function(E){return X.has(E)}):X.has(n.valueBy(ie)),ut.hidden=!!e.hideSelected&&(ut.group?ie.value.every(function(E){return g.value.has(E)}):g.value.has(n.valueBy(ie))),ut}),ue=ji(ce);try{for(ue.s();!(k=ue.n()).done;){var Ve=k.value;Ve.group!==!1&&Ve.disabled&&function(){var ie=new Set(Ve.originalOption.value);ce.filter(function(Ze){return ie.has(n.valueBy(Ze.originalOption))}).forEach(function(Ze){return Ze.disabled=!0})}()}}catch(ie){ue.e(ie)}finally{ue.f()}return ce}),$=U_(U,R),z=$.pointerForward,j=$.pointerBackward,B=$.pointerSet,he="",Y=/^[\w]$/,oe=J(function(){var k=gh(n.options.keys());return k.slice(R.value).concat(k.slice(0,R.value))}),me=function(){var k,X=(k=a.value)===null||k===void 0?void 0:k.querySelector(".highlighted");if(X&&o.value){var ce,ue=getComputedStyle(X);for(ce=0;X.offsetTop+parseFloat(ue.height)+parseFloat(ue.paddingTop)+parseFloat(ue.paddingBottom)>o.value.$el.clientHeight+o.value.$el.scrollTop&&ce++<U.value.length;)o.value.$el.scrollTop=o.value.$el.scrollTop+parseFloat(ue.height)+parseFloat(ue.paddingTop)+parseFloat(ue.paddingBottom);for(ce=0;X.offsetTop<o.value.$el.scrollTop&&ce++<U.value.length;)o.value.$el.scrollTop=o.value.$el.scrollTop-parseFloat(ue.height)-parseFloat(ue.paddingTop)-parseFloat(ue.paddingBottom)}};Dt(function(){return[u.value,n.options,g.value]},function(k,X){(X==null?void 0:X[0])!==!0&&u.value!==!1&&v.value.length!==0&&(B(n.options.findIndex(function(ce){return g.value.has(n.valueBy(ce))})),tn(me))},{deep:!0,immediate:!0});var Ke=J(function(){return{"data-is-focusing":u.value,"data-visible-length":U.value.filter(function(k){return k.visible&&k.hidden===!1}).length,"data-not-selected-length":n.options.length-U.value.filter(function(k){return k.selected}).length,"data-selected-length":U.value.filter(function(k){return k.selected}).length,"data-addable":U.value.filter(function(k){return k.selected}).length<n.max,"data-removable":U.value.filter(function(k){return k.selected}).length>n.min,"data-total-length":n.options.length,"data-multiple":e.multiple,"data-loading":e.loading,"data-disabled":e.disabled}});Hi("dataAttrs",Ke);var re=J(function(){return U.value.filter(function(k){return k.selected}).filter(function(k){return!k.group})}),de=J(function(){return e.multiple?re.value.length===0?e.placeholder:re.value.length===1?"1 option selected":re.value.length+" options selected":re.value.length===0?e.placeholder:re.value[0].label+""}),ye=J(function(){var k=re.value.map(function(X){return X.originalOption});return e.multiple?k:k[0]||r.value}),Se=Te();return Dt(function(){return[e.openDirection,u.value]},function(){var k,X;Se.value=(X=(k=e.openDirection)!==null&&k!==void 0?k:function(){if(a.value!==void 0&&window!==void 0)return window.innerHeight-a.value.getBoundingClientRect().bottom>=e.maxHeight?"bottom":"top"}())!==null&&X!==void 0?X:"bottom"},{immediate:!0}),{instance:i,isFocusing:u,wrapper:a,dropdown:o,input:s,focus:c,blur:f,toggle:function(){u.value?f():c()},searchingInputValue:d,handleInputForInput:function(k){t.emit("search:input",k)},handleChangeForInput:function(k){t.emit("search:change",k)},handleFocusForInput:function(k){c()},handleBlurForInput:function(k){f()},optionsWithInfo:U,addOrRemoveOption:function(k,X){e.disabled||(X.group&&e.multiple?T(k,X):S(k,X),w(),e.closeOnSelect===!0&&(u.value=!1),e.clearOnSelect===!0&&d.value&&N())},dataAttrs:Ke,innerPlaceholder:de,selected:ye,highlightedOriginalIndex:R,pointerForward:function(){z(),tn(me)},pointerBackward:function(){j(),tn(me)},pointerFirst:function(){var k,X=ji(n.options.keys());try{for(X.s();!(k=X.n()).done;){var ce=k.value;if(B(ce))break}}catch(ue){X.e(ue)}finally{X.f()}tn(me)},pointerLast:function(){var k,X=ji(gh(n.options.keys()).reverse());try{for(X.s();!(k=X.n()).done;){var ce=k.value;if(B(ce))break}}catch(ue){X.e(ue)}finally{X.f()}tn(me)},typeAhead:function(k){var X,ce;if(!e.searchable){var ue=!1;if(Y.test(k.key)?(he+=k.key.toLowerCase(),ue=!0):k.code==="Space"&&(he+=" "),ue){var Ve,ie=ji(oe.value);try{for(ie.s();!(Ve=ie.n()).done;){var Ze=Ve.value;if(((ce=(X=n.labelBy(n.options[Ze]))===null||X===void 0?void 0:X.toLowerCase())===null||ce===void 0?void 0:ce.startsWith(he))===!0&&B(Ze))break}}catch(at){ie.e(at)}finally{ie.f()}clearTimeout(b),b=setTimeout(function(){he=""},500)}}},pointerSet:B,direction:Se}},components:{VInput:Tc,VTags:wc,VDropdown:Cc}});xl.__VERSION__="2.10.4";var B_=["tabindex","id","role","aria-expanded","aria-owns","aria-activedescendant","aria-busy","aria-disabled"],k_={class:"vue-select-header"},D_={key:0,class:"vue-input"},G_=["placeholder","autocomplete"],V_=["onClick"],$_=P("span",{class:"icon loading"},[P("div"),P("div"),P("div")],-1),j_={key:0,class:"vue-select-input-wrapper"},H_=P("span",{class:"icon loading"},[P("div"),P("div"),P("div")],-1);xl.render=function(e,t,n,r,i,a){var o=wt("v-tags"),s=wt("v-input"),l=wt("v-dropdown");return M(),W("div",un({ref:"wrapper",class:["vue-select",["direction-".concat(e.direction)]],tabindex:e.isFocusing?-1:e.tabindex,onFocus:t[9]||(t[9]=function(){return e.focus&&e.focus.apply(e,arguments)}),onBlur:t[10]||(t[10]=function(u){return!e.searchable&&e.blur(u)})},Object.assign({},e.dataAttrs,e.$attrs),{onKeypress:t[11]||(t[11]=$i(ln(function(){return e.highlightedOriginalIndex!==null&&e.addOrRemoveOption(e.$event,e.optionsWithInfo[e.highlightedOriginalIndex])},["prevent","exact"]),["enter"])),onKeydown:[t[12]||(t[12]=$i(ln(function(){return e.pointerForward&&e.pointerForward.apply(e,arguments)},["prevent","exact"]),["down"])),t[13]||(t[13]=$i(ln(function(){return e.pointerBackward&&e.pointerBackward.apply(e,arguments)},["prevent","exact"]),["up"])),t[14]||(t[14]=$i(ln(function(){return e.pointerFirst&&e.pointerFirst.apply(e,arguments)},["prevent","exact"]),["home"])),t[15]||(t[15]=$i(ln(function(){return e.pointerLast&&e.pointerLast.apply(e,arguments)},["prevent","exact"]),["end"])),t[16]||(t[16]=function(){return e.typeAhead&&e.typeAhead.apply(e,arguments)})],id:"vs".concat(e.instance.uid,"-combobox"),role:e.searchable?"combobox":null,"aria-expanded":e.isFocusing,"aria-haspopup":"listbox","aria-owns":"vs".concat(e.instance.uid,"-listbox"),"aria-activedescendant":e.highlightedOriginalIndex===null?null:"vs".concat(e.instance.uid,"-option-").concat(e.highlightedOriginalIndex),"aria-busy":e.loading,"aria-disabled":e.disabled}),[P("div",k_,[e.multiple&&e.taggable&&e.modelValue.length===0||e.searchable===!1&&e.taggable===!1?(M(),W("div",D_,[Mt(e.$slots,"label",{selected:e.selected},function(){return[P("input",{placeholder:e.innerPlaceholder,autocomplete:e.autocomplete,readonly:"",onClick:t[0]||(t[0]=function(){return e.focus&&e.focus.apply(e,arguments)})},null,8,G_)]})])):ve("v-if",!0),e.multiple&&e.taggable?(M(),W(Oe,{key:1},[C(o,{modelValue:e.optionsWithInfo,"collapse-tags":e.collapseTags,tabindex:"-1",onClick:e.focus},{default:Pe(function(u){var c=u.option;return[Mt(e.$slots,"tag",{option:c.originalOption,remove:function(){return e.addOrRemoveOption(e.$event,c)}},function(){return[P("span",null,Je(c.label),1),P("img",{src:"data:image/svg+xml;base64,PHN2ZyBpZD0iZGVsZXRlIiBkYXRhLW5hbWU9ImRlbGV0ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHRpdGxlPmRlbGV0ZTwvdGl0bGU+PHBhdGggZD0iTTI1NiwyNEMzODMuOSwyNCw0ODgsMTI4LjEsNDg4LDI1NlMzODMuOSw0ODgsMjU2LDQ4OCwyNC4wNiwzODMuOSwyNC4wNiwyNTYsMTI4LjEsMjQsMjU2LDI0Wk0wLDI1NkMwLDM5Ny4xNiwxMTQuODQsNTEyLDI1Niw1MTJTNTEyLDM5Ny4xNiw1MTIsMjU2LDM5Ny4xNiwwLDI1NiwwLDAsMTE0Ljg0LDAsMjU2WiIgZmlsbD0iIzViNWI1ZiIvPjxwb2x5Z29uIHBvaW50cz0iMzgyIDE3Mi43MiAzMzkuMjkgMTMwLjAxIDI1NiAyMTMuMjkgMTcyLjcyIDEzMC4wMSAxMzAuMDEgMTcyLjcyIDIxMy4yOSAyNTYgMTMwLjAxIDMzOS4yOCAxNzIuNzIgMzgyIDI1NiAyOTguNzEgMzM5LjI5IDM4MS45OSAzODIgMzM5LjI4IDI5OC43MSAyNTYgMzgyIDE3Mi43MiIgZmlsbD0iIzViNWI1ZiIvPjwvc3ZnPg==",alt:"delete tag",class:"icon delete",onClick:ln(function(){return e.addOrRemoveOption(e.$event,c)},["prevent","stop"])},null,8,V_)]})]}),_:3},8,["modelValue","collapse-tags","onClick"]),Mt(e.$slots,"toggle",{isFocusing:e.isFocusing,toggle:e.toggle},function(){return[P("span",{class:ze(["icon arrow-downward",{active:e.isFocusing}]),onClick:t[1]||(t[1]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),onMousedown:t[2]||(t[2]=ln(function(){},["prevent","stop"]))},null,34)]})],64)):(M(),W(Oe,{key:2},[e.searchable?(M(),we(s,{key:0,ref:"input",modelValue:e.searchingInputValue,"onUpdate:modelValue":t[3]||(t[3]=function(u){return e.searchingInputValue=u}),disabled:e.disabled,autocomplete:e.autocomplete,placeholder:e.isFocusing?e.searchPlaceholder:e.innerPlaceholder,onInput:e.handleInputForInput,onChange:e.handleChangeForInput,onFocus:e.handleFocusForInput,onBlur:e.handleBlurForInput,onEscape:e.blur,autofocus:e.autofocus||e.taggable&&e.searchable,tabindex:e.tabindex,comboboxUid:e.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"])):ve("v-if",!0),e.loading?Mt(e.$slots,"loading",{key:1},function(){return[$_]}):Mt(e.$slots,"toggle",{key:2,isFocusing:e.isFocusing,toggle:e.toggle},function(){return[P("span",{class:ze(["icon arrow-downward",{active:e.isFocusing}]),onClick:t[4]||(t[4]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),onMousedown:t[5]||(t[5]=ln(function(){},["prevent","stop"]))},null,34)]})],64))]),e.multiple&&e.taggable&&e.searchable?(M(),W("div",j_,[zo(C(s,{ref:"input",modelValue:e.searchingInputValue,"onUpdate:modelValue":t[6]||(t[6]=function(u){return e.searchingInputValue=u}),disabled:e.disabled,autocomplete:e.autocomplete,placeholder:e.isFocusing?e.searchPlaceholder:e.innerPlaceholder,onInput:e.handleInputForInput,onChange:e.handleChangeForInput,onFocus:e.handleFocusForInput,onBlur:e.handleBlurForInput,onEscape:e.blur,autofocus:e.autofocus||e.taggable&&e.searchable,tabindex:e.tabindex,comboboxUid:e.instance.uid},null,8,["modelValue","disabled","autocomplete","placeholder","onInput","onChange","onFocus","onBlur","onEscape","autofocus","tabindex","comboboxUid"]),[[Jl,e.isFocusing]]),e.loading?Mt(e.$slots,"loading",{key:0},function(){return[H_]}):ve("v-if",!0)])):ve("v-if",!0),C(l,{ref:"dropdown",modelValue:e.optionsWithInfo,"onUpdate:modelValue":t[7]||(t[7]=function(u){return e.optionsWithInfo=u}),onClickItem:e.addOrRemoveOption,onMouseenter:t[8]||(t[8]=function(u,c){return e.pointerSet(c.originalIndex)}),comboboxUid:e.instance.uid,maxHeight:e.maxHeight,highlightedOriginalIndex:e.highlightedOriginalIndex},{default:Pe(function(u){var c=u.option;return[Mt(e.$slots,"dropdown-item",{option:c.originalOption},function(){return[P("span",null,Je(c.label),1)]})]}),_:3},8,["modelValue","onClickItem","comboboxUid","maxHeight","highlightedOriginalIndex"])],16,B_)},xl.__file="src/index.vue";const z_={class:"field"},X_={key:0,class:"field-title"},Gf=Ie({__name:"Select",props:{title:null,modelValue:null,options:null,placeholder:null,closeOnSelect:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){var o;const n=e,r=lo(Sn(n,"title"),"span"),i=Te((o=n.options.find(s=>s.value===n.modelValue))!=null?o:null);Dt(Sn(n,"modelValue"),s=>{var l;Ot(i)!==s&&(i.value=(l=n.options.find(u=>u.value===s))!=null?l:null)});function a(s){t("update:modelValue",s.value)}return(s,l)=>(M(),W("div",z_,[x(r)?(M(),W("span",X_,[(M(),we(gt(x(r))))])):ve("",!0),C(x(xl),{options:e.options,modelValue:i.value,"onUpdate:modelValue":[l[0]||(l[0]=u=>i.value=u),a],min:1,"label-by":"label",placeholder:e.placeholder,"close-on-select":e.closeOnSelect},null,8,["options","modelValue","placeholder","close-on-select"])]))}});const W_={class:"field"},K_=Ie({__name:"Toggle",props:{title:null,modelValue:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=J(()=>Ye(x(n.title)||"<span></span>","span")),i=J({get(){return!!n.modelValue},set(a){t("update:modelValue",a)}});return(a,o)=>(M(),W("label",W_,[zo(P("input",{type:"checkbox",class:"toggle","onUpdate:modelValue":o[0]||(o[0]=s=>et(i)?i.value=s:null)},null,512),[[Zl,x(i)]]),(M(),we(gt(x(r))))]))}});var Bn=Qe(K_,[["__scopeId","data-v-2b109500"]]);const ag=e=>(hr("data-v-bc13791c"),e=e(),pr(),e),Y_=ag(()=>P("div",{class:"header"},[P("h2",null,"Options")],-1)),Z_=ag(()=>P("hr",null,null,-1));var J_=Ie({__name:"Options",setup(e,{expose:t}){const n=Te(!1);t({open(){n.value=!0}});const r=Object.keys(Kr).map(p=>({label:Dm(p),value:p})),i=J(()=>Ye(it(()=>C(Oe,null,[Km.map(Bt)])))),{showTPS:a,theme:o,unthrottled:s}=Et(bt),{autosave:l,offlineProd:u}=Et(xe),c=J({get(){return xe.devSpeed===0},set(p){xe.devSpeed=p?0:null}}),f=it(()=>C("span",null,[le("Offline Production"),C(At,{display:"Save-specific"},{default:()=>[le("*")]})])),d=it(()=>C("span",null,[le("Autosave"),C(At,{display:"Save-specific"},{default:()=>[le("*")]})])),h=it(()=>C("span",null,[le("Pause game"),C(At,{display:"Save-specific"},{default:()=>[le("*")]})]));return(p,v)=>(M(),we(wi,{modelValue:n.value,"onUpdate:modelValue":v[6]||(v[6]=g=>n.value=g)},{header:Pe(()=>[Y_]),body:Pe(()=>[C(Gf,{title:"Theme",options:x(r),modelValue:x(o),"onUpdate:modelValue":v[0]||(v[0]=g=>et(o)?o.value=g:null)},null,8,["options","modelValue"]),(M(),we(gt(x(i)))),C(Bn,{title:"Show TPS",modelValue:x(a),"onUpdate:modelValue":v[1]||(v[1]=g=>et(a)?a.value=g:null)},null,8,["modelValue"]),Z_,C(Bn,{title:"Unthrottled",modelValue:x(s),"onUpdate:modelValue":v[2]||(v[2]=g=>et(s)?s.value=g:null)},null,8,["modelValue"]),C(Bn,{title:x(f),modelValue:x(u),"onUpdate:modelValue":v[3]||(v[3]=g=>et(u)?u.value=g:null)},null,8,["title","modelValue"]),C(Bn,{title:x(d),modelValue:x(l),"onUpdate:modelValue":v[4]||(v[4]=g=>et(l)?l.value=g:null)},null,8,["title","modelValue"]),x(_t).enablePausing?(M(),we(Bn,{key:0,title:x(h),modelValue:x(c),"onUpdate:modelValue":v[5]||(v[5]=g=>et(c)?c.value=g:null)},null,8,["title","modelValue"])):ve("",!0)]),_:1},8,["modelValue"]))}});var Q_=Qe(J_,[["__scopeId","data-v-bc13791c"]]),sg={exports:{}},q_=zm(V1);/**!
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/function yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yh(Object(n),!0).forEach(function(r){eT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function el(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?el=function(t){return typeof t}:el=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(e)}function eT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qn(){return Qn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qn.apply(this,arguments)}function tT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function nT(e,t){if(e==null)return{};var n=tT(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function rT(e){return iT(e)||oT(e)||aT(e)||sT()}function iT(e){if(Array.isArray(e))return Ec(e)}function oT(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aT(e,t){if(!!e){if(typeof e=="string")return Ec(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ec(e,t)}}function Ec(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var lT="1.14.0";function Vr(e){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(e)}var Yr=Vr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ls=Vr(/Edge/i),bh=Vr(/firefox/i),Ca=Vr(/safari/i)&&!Vr(/chrome/i)&&!Vr(/android/i),lg=Vr(/iP(ad|od|hone)/i),uT=Vr(/chrome/i)&&Vr(/android/i),ug={capture:!1,passive:!1};function lt(e,t,n){e.addEventListener(t,n,!Yr&&ug)}function rt(e,t,n){e.removeEventListener(t,n,!Yr&&ug)}function _l(e,t){if(!!t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function cT(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function or(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&_l(e,t):_l(e,t))||r&&e===n)return e;if(e===n)break}while(e=cT(e))}return null}var xh=/\s+/g;function Ut(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(xh," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(xh," ")}}function Ee(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function qi(e,t){var n="";if(typeof e=="string")n=e;else do{var r=Ee(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function cg(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function Ir(){var e=document.scrollingElement;return e||document.documentElement}function Ft(e,t,n,r,i){if(!(!e.getBoundingClientRect&&e!==window)){var a,o,s,l,u,c,f;if(e!==window&&e.parentNode&&e!==Ir()?(a=e.getBoundingClientRect(),o=a.top,s=a.left,l=a.bottom,u=a.right,c=a.height,f=a.width):(o=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!Yr))do if(i&&i.getBoundingClientRect&&(Ee(i,"transform")!=="none"||n&&Ee(i,"position")!=="static")){var d=i.getBoundingClientRect();o-=d.top+parseInt(Ee(i,"border-top-width")),s-=d.left+parseInt(Ee(i,"border-left-width")),l=o+a.height,u=s+a.width;break}while(i=i.parentNode);if(r&&e!==window){var h=qi(i||e),p=h&&h.a,v=h&&h.d;h&&(o/=v,s/=p,f/=p,c/=v,l=o+c,u=s+f)}return{top:o,left:s,bottom:l,right:u,width:f,height:c}}}function _h(e,t,n){for(var r=ui(e,!0),i=Ft(e)[t];r;){var a=Ft(r)[n],o=void 0;if(n==="top"||n==="left"?o=i>=a:o=i<=a,!o)return r;if(r===Ir())break;r=ui(r,!1)}return!1}function $o(e,t,n,r){for(var i=0,a=0,o=e.children;a<o.length;){if(o[a].style.display!=="none"&&o[a]!==ke.ghost&&(r||o[a]!==ke.dragged)&&or(o[a],n.draggable,e,!1)){if(i===t)return o[a];i++}a++}return null}function Vf(e,t){for(var n=e.lastElementChild;n&&(n===ke.ghost||Ee(n,"display")==="none"||t&&!_l(n,t));)n=n.previousElementSibling;return n||null}function Ht(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==ke.clone&&(!t||_l(e,t))&&n++;return n}function Th(e){var t=0,n=0,r=Ir();if(e)do{var i=qi(e),a=i.a,o=i.d;t+=e.scrollLeft*a,n+=e.scrollTop*o}while(e!==r&&(e=e.parentNode));return[t,n]}function fT(e,t){for(var n in e)if(!!e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function ui(e,t){if(!e||!e.getBoundingClientRect)return Ir();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=Ee(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Ir();if(r||t)return n;r=!0}}while(n=n.parentNode);return Ir()}function dT(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function _u(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var Ea;function fg(e,t){return function(){if(!Ea){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),Ea=setTimeout(function(){Ea=void 0},t)}}}function hT(){clearTimeout(Ea),Ea=void 0}function dg(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function $f(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function wh(e,t){Ee(e,"position","absolute"),Ee(e,"top",t.top),Ee(e,"left",t.left),Ee(e,"width",t.width),Ee(e,"height",t.height)}function Tu(e){Ee(e,"position",""),Ee(e,"top",""),Ee(e,"left",""),Ee(e,"width",""),Ee(e,"height","")}var vn="Sortable"+new Date().getTime();function pT(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(Ee(i,"display")==="none"||i===ke.ghost)){e.push({target:i,rect:Ft(i)});var a=Or({},e[e.length-1].rect);if(i.thisAnimationDuration){var o=qi(i,!0);o&&(a.top-=o.f,a.left-=o.e)}i.fromRect=a}})}},addAnimationState:function(r){e.push(r)},removeAnimationState:function(r){e.splice(fT(e,{target:r}),1)},animateAll:function(r){var i=this;if(!this.options.animation){clearTimeout(t),typeof r=="function"&&r();return}var a=!1,o=0;e.forEach(function(s){var l=0,u=s.target,c=u.fromRect,f=Ft(u),d=u.prevFromRect,h=u.prevToRect,p=s.rect,v=qi(u,!0);v&&(f.top-=v.f,f.left-=v.e),u.toRect=f,u.thisAnimationDuration&&_u(d,f)&&!_u(c,f)&&(p.top-f.top)/(p.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(l=mT(p,d,h,i.options)),_u(f,c)||(u.prevFromRect=c,u.prevToRect=f,l||(l=i.options.animation),i.animate(u,p,f,l)),l&&(a=!0,o=Math.max(o,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),a?t=setTimeout(function(){typeof r=="function"&&r()},o):typeof r=="function"&&r(),e=[]},animate:function(r,i,a,o){if(o){Ee(r,"transition",""),Ee(r,"transform","");var s=qi(this.el),l=s&&s.a,u=s&&s.d,c=(i.left-a.left)/(l||1),f=(i.top-a.top)/(u||1);r.animatingX=!!c,r.animatingY=!!f,Ee(r,"transform","translate3d("+c+"px,"+f+"px,0)"),this.forRepaintDummy=vT(r),Ee(r,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Ee(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){Ee(r,"transition",""),Ee(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},o)}}}}function vT(e){return e.offsetWidth}function mT(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var co=[],wu={initializeByDefault:!0},us={mount:function(t){for(var n in wu)wu.hasOwnProperty(n)&&!(n in t)&&(t[n]=wu[n]);co.forEach(function(r){if(r.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),co.push(t)},pluginEvent:function(t,n,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var a=t+"Global";co.forEach(function(o){!n[o.pluginName]||(n[o.pluginName][a]&&n[o.pluginName][a](Or({sortable:n},r)),n.options[o.pluginName]&&n[o.pluginName][t]&&n[o.pluginName][t](Or({sortable:n},r)))})},initializePlugins:function(t,n,r,i){co.forEach(function(s){var l=s.pluginName;if(!(!t.options[l]&&!s.initializeByDefault)){var u=new s(t,n,t.options);u.sortable=t,u.options=t.options,t[l]=u,Qn(r,u.defaults)}});for(var a in t.options)if(!!t.options.hasOwnProperty(a)){var o=this.modifyOption(t,a,t.options[a]);typeof o!="undefined"&&(t.options[a]=o)}},getEventProperties:function(t,n){var r={};return co.forEach(function(i){typeof i.eventProperties=="function"&&Qn(r,i.eventProperties.call(n[i.pluginName],t))}),r},modifyOption:function(t,n,r){var i;return co.forEach(function(a){!t[a.pluginName]||a.optionListeners&&typeof a.optionListeners[n]=="function"&&(i=a.optionListeners[n].call(t[a.pluginName],r))}),i}};function ua(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,a=e.cloneEl,o=e.toEl,s=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,f=e.newDraggableIndex,d=e.originalEvent,h=e.putSortable,p=e.extraEventProperties;if(t=t||n&&n[vn],!!t){var v,g=t.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Yr&&!ls?v=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(r,!0,!0)),v.to=o||n,v.from=s||n,v.item=i||n,v.clone=a,v.oldIndex=l,v.newIndex=u,v.oldDraggableIndex=c,v.newDraggableIndex=f,v.originalEvent=d,v.pullMode=h?h.lastPutMode:void 0;var m=Or(Or({},p),us.getEventProperties(r,t));for(var b in m)v[b]=m[b];n&&n.dispatchEvent(v),g[y]&&g[y].call(t,v)}}var gT=["evt"],wn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,a=nT(r,gT);us.pluginEvent.bind(ke)(t,n,Or({dragEl:fe,parentEl:$t,ghostEl:We,rootEl:Pt,nextEl:Li,lastDownEl:tl,cloneEl:jt,cloneHidden:si,dragStarted:ca,putSortable:cn,activeSortable:ke.active,originalEvent:i,oldIndex:wo,oldDraggableIndex:Ia,newIndex:Pn,newDraggableIndex:oi,hideGhostForTarget:mg,unhideGhostForTarget:gg,cloneNowHidden:function(){si=!0},cloneNowShown:function(){si=!1},dispatchSortableEvent:function(s){xn({sortable:n,name:s,originalEvent:i})}},a))};function xn(e){ua(Or({putSortable:cn,cloneEl:jt,targetEl:fe,rootEl:Pt,oldIndex:wo,oldDraggableIndex:Ia,newIndex:Pn,newDraggableIndex:oi},e))}var fe,$t,We,Pt,Li,tl,jt,si,wo,Pn,Ia,oi,Es,cn,_o=!1,Tl=!1,wl=[],Ri,qn,Cu,Eu,Ch,Eh,ca,fo,Sa,Na=!1,Is=!1,nl,dn,Iu=[],Ic=!1,Cl=[],ql=typeof document!="undefined",Ss=lg,Ih=ls||Yr?"cssFloat":"float",yT=ql&&!uT&&!lg&&"draggable"in document.createElement("div"),hg=function(){if(!!ql){if(Yr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),pg=function(t,n){var r=Ee(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=$o(t,0,n),o=$o(t,1,n),s=a&&Ee(a),l=o&&Ee(o),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Ft(a).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Ft(o).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return o&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=i&&r[Ih]==="none"||o&&r[Ih]==="none"&&u+c>i)?"vertical":"horizontal"},bT=function(t,n,r){var i=r?t.left:t.top,a=r?t.right:t.bottom,o=r?t.width:t.height,s=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return i===s||a===l||i+o/2===s+u/2},xT=function(t,n){var r;return wl.some(function(i){var a=i[vn].options.emptyInsertThreshold;if(!(!a||Vf(i))){var o=Ft(i),s=t>=o.left-a&&t<=o.right+a,l=n>=o.top-a&&n<=o.bottom+a;if(s&&l)return r=i}}),r},vg=function(t){function n(a,o){return function(s,l,u,c){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(a==null&&(o||f))return!0;if(a==null||a===!1)return!1;if(o&&a==="clone")return a;if(typeof a=="function")return n(a(s,l,u,c),o)(s,l,u,c);var d=(o?s:l).options.group.name;return a===!0||typeof a=="string"&&a===d||a.join&&a.indexOf(d)>-1}}var r={},i=t.group;(!i||el(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,t.group=r},mg=function(){!hg&&We&&Ee(We,"display","none")},gg=function(){!hg&&We&&Ee(We,"display","")};ql&&document.addEventListener("click",function(e){if(Tl)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Tl=!1,!1},!0);var Ai=function(t){if(fe){t=t.touches?t.touches[0]:t;var n=xT(t.clientX,t.clientY);if(n){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[vn]._onDragOver(r)}}},_T=function(t){fe&&fe.parentNode[vn]._isOutsideThisEl(t.target)};function ke(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Qn({},t),e[vn]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return pg(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,s){o.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ke.supportPointer!==!1&&"PointerEvent"in window&&!Ca,emptyInsertThreshold:5};us.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);vg(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:yT,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?lt(e,"pointerdown",this._onTapStart):(lt(e,"mousedown",this._onTapStart),lt(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(lt(e,"dragover",this),lt(e,"dragenter",this)),wl.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Qn(this,pT())}ke.prototype={constructor:ke,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(fo=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,fe):this.options.direction},_onTapStart:function(t){if(!!t.cancelable){var n=this,r=this.el,i=this.options,a=i.preventOnFilter,o=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=i.filter;if(RT(r),!fe&&!(/mousedown|pointerdown/.test(o)&&t.button!==0||i.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Ca&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=or(l,i.draggable,r,!1),!(l&&l.animated)&&tl!==l)){if(wo=Ht(l),Ia=Ht(l,i.draggable),typeof c=="function"){if(c.call(this,t,l,this)){xn({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),wn("filter",n,{evt:t}),a&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=or(u,f.trim(),r,!1),f)return xn({sortable:n,rootEl:f,name:"filter",targetEl:l,fromEl:r,toEl:r}),wn("filter",n,{evt:t}),!0}),c)){a&&t.cancelable&&t.preventDefault();return}i.handle&&!or(u,i.handle,r,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,n,r){var i=this,a=i.el,o=i.options,s=a.ownerDocument,l;if(r&&!fe&&r.parentNode===a){var u=Ft(r);if(Pt=a,fe=r,$t=fe.parentNode,Li=fe.nextSibling,tl=r,Es=o.group,ke.dragged=fe,Ri={target:fe,clientX:(n||t).clientX,clientY:(n||t).clientY},Ch=Ri.clientX-u.left,Eh=Ri.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,fe.style["will-change"]="all",l=function(){if(wn("delayEnded",i,{evt:t}),ke.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!bh&&i.nativeDraggable&&(fe.draggable=!0),i._triggerDragStart(t,n),xn({sortable:i,name:"choose",originalEvent:t}),Ut(fe,o.chosenClass,!0)},o.ignore.split(",").forEach(function(c){cg(fe,c.trim(),Su)}),lt(s,"dragover",Ai),lt(s,"mousemove",Ai),lt(s,"touchmove",Ai),lt(s,"mouseup",i._onDrop),lt(s,"touchend",i._onDrop),lt(s,"touchcancel",i._onDrop),bh&&this.nativeDraggable&&(this.options.touchStartThreshold=4,fe.draggable=!0),wn("delayStart",this,{evt:t}),o.delay&&(!o.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(ls||Yr))){if(ke.eventCanceled){this._onDrop();return}lt(s,"mouseup",i._disableDelayedDrag),lt(s,"touchend",i._disableDelayedDrag),lt(s,"touchcancel",i._disableDelayedDrag),lt(s,"mousemove",i._delayedDragTouchMoveHandler),lt(s,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&lt(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,o.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){fe&&Su(fe),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;rt(t,"mouseup",this._disableDelayedDrag),rt(t,"touchend",this._disableDelayedDrag),rt(t,"touchcancel",this._disableDelayedDrag),rt(t,"mousemove",this._delayedDragTouchMoveHandler),rt(t,"touchmove",this._delayedDragTouchMoveHandler),rt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?lt(document,"pointermove",this._onTouchMove):n?lt(document,"touchmove",this._onTouchMove):lt(document,"mousemove",this._onTouchMove):(lt(fe,"dragend",this),lt(Pt,"dragstart",this._onDragStart));try{document.selection?rl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(_o=!1,Pt&&fe){wn("dragStarted",this,{evt:n}),this.nativeDraggable&&lt(document,"dragover",_T);var r=this.options;!t&&Ut(fe,r.dragClass,!1),Ut(fe,r.ghostClass,!0),ke.active=this,t&&this._appendGhost(),xn({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(qn){this._lastX=qn.clientX,this._lastY=qn.clientY,mg();for(var t=document.elementFromPoint(qn.clientX,qn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(qn.clientX,qn.clientY),t!==n);)n=t;if(fe.parentNode[vn]._isOutsideThisEl(t),n)do{if(n[vn]){var r=void 0;if(r=n[vn]._onDragOver({clientX:qn.clientX,clientY:qn.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);gg()}},_onTouchMove:function(t){if(Ri){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,a=t.touches?t.touches[0]:t,o=We&&qi(We,!0),s=We&&o&&o.a,l=We&&o&&o.d,u=Ss&&dn&&Th(dn),c=(a.clientX-Ri.clientX+i.x)/(s||1)+(u?u[0]-Iu[0]:0)/(s||1),f=(a.clientY-Ri.clientY+i.y)/(l||1)+(u?u[1]-Iu[1]:0)/(l||1);if(!ke.active&&!_o){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(We){o?(o.e+=c-(Cu||0),o.f+=f-(Eu||0)):o={a:1,b:0,c:0,d:1,e:c,f};var d="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");Ee(We,"webkitTransform",d),Ee(We,"mozTransform",d),Ee(We,"msTransform",d),Ee(We,"transform",d),Cu=c,Eu=f,qn=a}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!We){var t=this.options.fallbackOnBody?document.body:Pt,n=Ft(fe,!0,Ss,!0,t),r=this.options;if(Ss){for(dn=t;Ee(dn,"position")==="static"&&Ee(dn,"transform")==="none"&&dn!==document;)dn=dn.parentNode;dn!==document.body&&dn!==document.documentElement?(dn===document&&(dn=Ir()),n.top+=dn.scrollTop,n.left+=dn.scrollLeft):dn=Ir(),Iu=Th(dn)}We=fe.cloneNode(!0),Ut(We,r.ghostClass,!1),Ut(We,r.fallbackClass,!0),Ut(We,r.dragClass,!0),Ee(We,"transition",""),Ee(We,"transform",""),Ee(We,"box-sizing","border-box"),Ee(We,"margin",0),Ee(We,"top",n.top),Ee(We,"left",n.left),Ee(We,"width",n.width),Ee(We,"height",n.height),Ee(We,"opacity","0.8"),Ee(We,"position",Ss?"absolute":"fixed"),Ee(We,"zIndex","100000"),Ee(We,"pointerEvents","none"),ke.ghost=We,t.appendChild(We),Ee(We,"transform-origin",Ch/parseInt(We.style.width)*100+"% "+Eh/parseInt(We.style.height)*100+"%")}},_onDragStart:function(t,n){var r=this,i=t.dataTransfer,a=r.options;if(wn("dragStart",this,{evt:t}),ke.eventCanceled){this._onDrop();return}wn("setupClone",this),ke.eventCanceled||(jt=$f(fe),jt.draggable=!1,jt.style["will-change"]="",this._hideClone(),Ut(jt,this.options.chosenClass,!1),ke.clone=jt),r.cloneId=rl(function(){wn("clone",r),!ke.eventCanceled&&(r.options.removeCloneOnHide||Pt.insertBefore(jt,fe),r._hideClone(),xn({sortable:r,name:"clone"}))}),!n&&Ut(fe,a.dragClass,!0),n?(Tl=!0,r._loopId=setInterval(r._emulateDragOver,50)):(rt(document,"mouseup",r._onDrop),rt(document,"touchend",r._onDrop),rt(document,"touchcancel",r._onDrop),i&&(i.effectAllowed="move",a.setData&&a.setData.call(r,i,fe)),lt(document,"drop",r),Ee(fe,"transform","translateZ(0)")),_o=!0,r._dragStartId=rl(r._dragStarted.bind(r,n,t)),lt(document,"selectstart",r),ca=!0,Ca&&Ee(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,r=t.target,i,a,o,s=this.options,l=s.group,u=ke.active,c=Es===l,f=s.sort,d=cn||u,h,p=this,v=!1;if(Ic)return;function g(me,Ke){wn(me,p,Or({evt:t,isOwner:c,axis:h?"vertical":"horizontal",revert:o,dragRect:i,targetRect:a,canSort:f,fromSortable:d,target:r,completed:m,onMove:function(de,ye){return Ns(Pt,n,fe,i,de,Ft(de),t,ye)},changed:b},Ke))}function y(){g("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function m(me){return g("dragOverCompleted",{insertion:me}),me&&(c?u._hideClone():u._showClone(p),p!==d&&(Ut(fe,cn?cn.options.ghostClass:u.options.ghostClass,!1),Ut(fe,s.ghostClass,!0)),cn!==p&&p!==ke.active?cn=p:p===ke.active&&cn&&(cn=null),d===p&&(p._ignoreWhileAnimating=r),p.animateAll(function(){g("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(r===fe&&!fe.animated||r===n&&!r.animated)&&(fo=null),!s.dragoverBubble&&!t.rootEl&&r!==document&&(fe.parentNode[vn]._isOutsideThisEl(t.target),!me&&Ai(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),v=!0}function b(){Pn=Ht(fe),oi=Ht(fe,s.draggable),xn({sortable:p,name:"change",toEl:n,newIndex:Pn,newDraggableIndex:oi,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),r=or(r,s.draggable,n,!0),g("dragOver"),ke.eventCanceled)return v;if(fe.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||p._ignoreWhileAnimating===r)return m(!1);if(Tl=!1,u&&!s.disabled&&(c?f||(o=$t!==Pt):cn===this||(this.lastPutMode=Es.checkPull(this,u,fe,t))&&l.checkPut(this,u,fe,t))){if(h=this._getDirection(t,r)==="vertical",i=Ft(fe),g("dragOverValid"),ke.eventCanceled)return v;if(o)return $t=Pt,y(),this._hideClone(),g("revert"),ke.eventCanceled||(Li?Pt.insertBefore(fe,Li):Pt.appendChild(fe)),m(!0);var T=Vf(n,s.draggable);if(!T||ET(t,h,this)&&!T.animated){if(T===fe)return m(!1);if(T&&n===t.target&&(r=T),r&&(a=Ft(r)),Ns(Pt,n,fe,i,r,a,t,!!r)!==!1)return y(),n.appendChild(fe),$t=n,b(),m(!0)}else if(T&&CT(t,h,this)){var S=$o(n,0,s,!0);if(S===fe)return m(!1);if(r=S,a=Ft(r),Ns(Pt,n,fe,i,r,a,t,!1)!==!1)return y(),n.insertBefore(fe,S),$t=n,b(),m(!0)}else if(r.parentNode===n){a=Ft(r);var w=0,N,I=fe.parentNode!==n,R=!bT(fe.animated&&fe.toRect||i,r.animated&&r.toRect||a,h),U=h?"top":"left",$=_h(r,"top","top")||_h(fe,"top","top"),z=$?$.scrollTop:void 0;fo!==r&&(N=a[U],Na=!1,Is=!R&&s.invertSwap||I),w=IT(t,r,a,h,R?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Is,fo===r);var j;if(w!==0){var B=Ht(fe);do B-=w,j=$t.children[B];while(j&&(Ee(j,"display")==="none"||j===We))}if(w===0||j===r)return m(!1);fo=r,Sa=w;var he=r.nextElementSibling,Y=!1;Y=w===1;var oe=Ns(Pt,n,fe,i,r,a,t,Y);if(oe!==!1)return(oe===1||oe===-1)&&(Y=oe===1),Ic=!0,setTimeout(wT,30),y(),Y&&!he?n.appendChild(fe):r.parentNode.insertBefore(fe,Y?he:r),$&&dg($,0,z-$.scrollTop),$t=fe.parentNode,N!==void 0&&!Is&&(nl=Math.abs(N-Ft(r)[U])),b(),m(!0)}if(n.contains(fe))return m(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){rt(document,"mousemove",this._onTouchMove),rt(document,"touchmove",this._onTouchMove),rt(document,"pointermove",this._onTouchMove),rt(document,"dragover",Ai),rt(document,"mousemove",Ai),rt(document,"touchmove",Ai)},_offUpEvents:function(){var t=this.el.ownerDocument;rt(t,"mouseup",this._onDrop),rt(t,"touchend",this._onDrop),rt(t,"pointerup",this._onDrop),rt(t,"touchcancel",this._onDrop),rt(document,"selectstart",this)},_onDrop:function(t){var n=this.el,r=this.options;if(Pn=Ht(fe),oi=Ht(fe,r.draggable),wn("drop",this,{evt:t}),$t=fe&&fe.parentNode,Pn=Ht(fe),oi=Ht(fe,r.draggable),ke.eventCanceled){this._nulling();return}_o=!1,Is=!1,Na=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Sc(this.cloneId),Sc(this._dragStartId),this.nativeDraggable&&(rt(document,"drop",this),rt(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ca&&Ee(document.body,"user-select",""),Ee(fe,"transform",""),t&&(ca&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),We&&We.parentNode&&We.parentNode.removeChild(We),(Pt===$t||cn&&cn.lastPutMode!=="clone")&&jt&&jt.parentNode&&jt.parentNode.removeChild(jt),fe&&(this.nativeDraggable&&rt(fe,"dragend",this),Su(fe),fe.style["will-change"]="",ca&&!_o&&Ut(fe,cn?cn.options.ghostClass:this.options.ghostClass,!1),Ut(fe,this.options.chosenClass,!1),xn({sortable:this,name:"unchoose",toEl:$t,newIndex:null,newDraggableIndex:null,originalEvent:t}),Pt!==$t?(Pn>=0&&(xn({rootEl:$t,name:"add",toEl:$t,fromEl:Pt,originalEvent:t}),xn({sortable:this,name:"remove",toEl:$t,originalEvent:t}),xn({rootEl:$t,name:"sort",toEl:$t,fromEl:Pt,originalEvent:t}),xn({sortable:this,name:"sort",toEl:$t,originalEvent:t})),cn&&cn.save()):Pn!==wo&&Pn>=0&&(xn({sortable:this,name:"update",toEl:$t,originalEvent:t}),xn({sortable:this,name:"sort",toEl:$t,originalEvent:t})),ke.active&&((Pn==null||Pn===-1)&&(Pn=wo,oi=Ia),xn({sortable:this,name:"end",toEl:$t,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){wn("nulling",this),Pt=fe=$t=We=Li=jt=tl=si=Ri=qn=ca=Pn=oi=wo=Ia=fo=Sa=cn=Es=ke.dragged=ke.ghost=ke.clone=ke.active=null,Cl.forEach(function(t){t.checked=!0}),Cl.length=Cu=Eu=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":fe&&(this._onDragOver(t),TT(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,i=0,a=r.length,o=this.options;i<a;i++)n=r[i],or(n,o.draggable,this.el,!1)&&t.push(n.getAttribute(o.dataIdAttr)||NT(n));return t},sort:function(t,n){var r={},i=this.el;this.toArray().forEach(function(a,o){var s=i.children[o];or(s,this.options.draggable,i,!1)&&(r[a]=s)},this),n&&this.captureAnimationState(),t.forEach(function(a){r[a]&&(i.removeChild(r[a]),i.appendChild(r[a]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return or(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var r=this.options;if(n===void 0)return r[t];var i=us.modifyOption(this,t,n);typeof i!="undefined"?r[t]=i:r[t]=n,t==="group"&&vg(r)},destroy:function(){wn("destroy",this);var t=this.el;t[vn]=null,rt(t,"mousedown",this._onTapStart),rt(t,"touchstart",this._onTapStart),rt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(rt(t,"dragover",this),rt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),wl.splice(wl.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!si){if(wn("hideClone",this),ke.eventCanceled)return;Ee(jt,"display","none"),this.options.removeCloneOnHide&&jt.parentNode&&jt.parentNode.removeChild(jt),si=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(si){if(wn("showClone",this),ke.eventCanceled)return;fe.parentNode==Pt&&!this.options.group.revertClone?Pt.insertBefore(jt,fe):Li?Pt.insertBefore(jt,Li):Pt.appendChild(jt),this.options.group.revertClone&&this.animate(fe,jt),Ee(jt,"display",""),si=!1}}};function TT(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Ns(e,t,n,r,i,a,o,s){var l,u=e[vn],c=u.options.onMove,f;return window.CustomEvent&&!Yr&&!ls?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=i||t,l.relatedRect=a||Ft(t),l.willInsertAfter=s,l.originalEvent=o,e.dispatchEvent(l),c&&(f=c.call(u,l,o)),f}function Su(e){e.draggable=!1}function wT(){Ic=!1}function CT(e,t,n){var r=Ft($o(n.el,0,n.options,!0)),i=10;return t?e.clientX<r.left-i||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-i||e.clientY<r.bottom&&e.clientX<r.left}function ET(e,t,n){var r=Ft(Vf(n.el,n.options.draggable)),i=10;return t?e.clientX>r.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}function IT(e,t,n,r,i,a,o,s){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!o){if(s&&nl<u*i){if(!Na&&(Sa===1?l>c+u*a/2:l<f-u*a/2)&&(Na=!0),Na)d=!0;else if(Sa===1?l<c+nl:l>f-nl)return-Sa}else if(l>c+u*(1-i)/2&&l<f-u*(1-i)/2)return ST(t)}return d=d||o,d&&(l<c+u*a/2||l>f-u*a/2)?l>c+u/2?1:-1:0}function ST(e){return Ht(fe)<Ht(e)?1:-1}function NT(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function RT(e){Cl.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Cl.push(r)}}function rl(e){return setTimeout(e,0)}function Sc(e){return clearTimeout(e)}ql&&lt(document,"touchmove",function(e){(ke.active||_o)&&e.cancelable&&e.preventDefault()});ke.utils={on:lt,off:rt,css:Ee,find:cg,is:function(t,n){return!!or(t,n,t,!1)},extend:dT,throttle:fg,closest:or,toggleClass:Ut,clone:$f,index:Ht,nextTick:rl,cancelNextTick:Sc,detectDirection:pg,getChild:$o};ke.get=function(e){return e[vn]};ke.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(ke.utils=Or(Or({},ke.utils),r.utils)),us.mount(r)})};ke.create=function(e,t){return new ke(e,t)};ke.version=lT;var Qt=[],fa,Nc,Rc=!1,Nu,Ru,El,da;function AT(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?lt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?lt(document,"pointermove",this._handleFallbackAutoScroll):r.touches?lt(document,"touchmove",this._handleFallbackAutoScroll):lt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?rt(document,"dragover",this._handleAutoScroll):(rt(document,"pointermove",this._handleFallbackAutoScroll),rt(document,"touchmove",this._handleFallbackAutoScroll),rt(document,"mousemove",this._handleFallbackAutoScroll)),Sh(),il(),hT()},nulling:function(){El=Nc=fa=Rc=da=Nu=Ru=null,Qt.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var i=this,a=(n.touches?n.touches[0]:n).clientX,o=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(a,o);if(El=n,r||this.options.forceAutoScrollFallback||ls||Yr||Ca){Au(n,this.options,s,r);var l=ui(s,!0);Rc&&(!da||a!==Nu||o!==Ru)&&(da&&Sh(),da=setInterval(function(){var u=ui(document.elementFromPoint(a,o),!0);u!==l&&(l=u,il()),Au(n,i.options,u,r)},10),Nu=a,Ru=o)}else{if(!this.options.bubbleScroll||ui(s,!0)===Ir()){il();return}Au(n,this.options,ui(s,!1),!1)}}},Qn(e,{pluginName:"scroll",initializeByDefault:!0})}function il(){Qt.forEach(function(e){clearInterval(e.pid)}),Qt=[]}function Sh(){clearInterval(da)}var Au=fg(function(e,t,n,r){if(!!t.scroll){var i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,o=t.scrollSensitivity,s=t.scrollSpeed,l=Ir(),u=!1,c;Nc!==n&&(Nc=n,il(),fa=t.scroll,c=t.scrollFn,fa===!0&&(fa=ui(n,!0)));var f=0,d=fa;do{var h=d,p=Ft(h),v=p.top,g=p.bottom,y=p.left,m=p.right,b=p.width,T=p.height,S=void 0,w=void 0,N=h.scrollWidth,I=h.scrollHeight,R=Ee(h),U=h.scrollLeft,$=h.scrollTop;h===l?(S=b<N&&(R.overflowX==="auto"||R.overflowX==="scroll"||R.overflowX==="visible"),w=T<I&&(R.overflowY==="auto"||R.overflowY==="scroll"||R.overflowY==="visible")):(S=b<N&&(R.overflowX==="auto"||R.overflowX==="scroll"),w=T<I&&(R.overflowY==="auto"||R.overflowY==="scroll"));var z=S&&(Math.abs(m-i)<=o&&U+b<N)-(Math.abs(y-i)<=o&&!!U),j=w&&(Math.abs(g-a)<=o&&$+T<I)-(Math.abs(v-a)<=o&&!!$);if(!Qt[f])for(var B=0;B<=f;B++)Qt[B]||(Qt[B]={});(Qt[f].vx!=z||Qt[f].vy!=j||Qt[f].el!==h)&&(Qt[f].el=h,Qt[f].vx=z,Qt[f].vy=j,clearInterval(Qt[f].pid),(z!=0||j!=0)&&(u=!0,Qt[f].pid=setInterval(function(){r&&this.layer===0&&ke.active._onTouchMove(El);var he=Qt[this.layer].vy?Qt[this.layer].vy*s:0,Y=Qt[this.layer].vx?Qt[this.layer].vx*s:0;typeof c=="function"&&c.call(ke.dragged.parentNode[vn],Y,he,e,El,Qt[this.layer].el)!=="continue"||dg(Qt[this.layer].el,Y,he)}.bind({layer:f}),24))),f++}while(t.bubbleScroll&&d!==l&&(d=ui(d,!1)));Rc=u}},30),yg=function(t){var n=t.originalEvent,r=t.putSortable,i=t.dragEl,a=t.activeSortable,o=t.dispatchSortableEvent,s=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(!!n){var u=r||a;s();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(f)&&(o("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function jf(){}jf.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,r=t.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var i=$o(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:yg};Qn(jf,{pluginName:"revertOnSpill"});function Hf(){}Hf.prototype={onSpill:function(t){var n=t.dragEl,r=t.putSortable,i=r||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:yg};Qn(Hf,{pluginName:"removeOnSpill"});var Xn;function OT(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(n){var r=n.dragEl;Xn=r},dragOverValid:function(n){var r=n.completed,i=n.target,a=n.onMove,o=n.activeSortable,s=n.changed,l=n.cancel;if(!!o.options.swap){var u=this.sortable.el,c=this.options;if(i&&i!==u){var f=Xn;a(i)!==!1?(Ut(i,c.swapClass,!0),Xn=i):Xn=null,f&&f!==Xn&&Ut(f,c.swapClass,!1)}s(),r(!0),l()}},drop:function(n){var r=n.activeSortable,i=n.putSortable,a=n.dragEl,o=i||this.sortable,s=this.options;Xn&&Ut(Xn,s.swapClass,!1),Xn&&(s.swap||i&&i.options.swap)&&a!==Xn&&(o.captureAnimationState(),o!==r&&r.captureAnimationState(),PT(a,Xn),o.animateAll(),o!==r&&r.animateAll())},nulling:function(){Xn=null}},Qn(e,{pluginName:"swap",eventProperties:function(){return{swapItem:Xn}}})}function PT(e,t){var n=e.parentNode,r=t.parentNode,i,a;!n||!r||n.isEqualNode(t)||r.isEqualNode(e)||(i=Ht(e),a=Ht(t),n.isEqualNode(r)&&i<a&&a++,n.insertBefore(t,n.children[i]),r.insertBefore(e,r.children[a]))}var je=[],On=[],Zo,er,Jo=!1,Cn=!1,ho=!1,It,Qo,Rs;function FT(){function e(t){for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));t.options.supportPointer?lt(document,"pointerup",this._deselectMultiDrag):(lt(document,"mouseup",this._deselectMultiDrag),lt(document,"touchend",this._deselectMultiDrag)),lt(document,"keydown",this._checkKeyDown),lt(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(i,a){var o="";je.length&&er===t?je.forEach(function(s,l){o+=(l?", ":"")+s.textContent}):o=a.textContent,i.setData("Text",o)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(n){var r=n.dragEl;It=r},delayEnded:function(){this.isMultiDrag=~je.indexOf(It)},setupClone:function(n){var r=n.sortable,i=n.cancel;if(!!this.isMultiDrag){for(var a=0;a<je.length;a++)On.push($f(je[a])),On[a].sortableIndex=je[a].sortableIndex,On[a].draggable=!1,On[a].style["will-change"]="",Ut(On[a],this.options.selectedClass,!1),je[a]===It&&Ut(On[a],this.options.chosenClass,!1);r._hideClone(),i()}},clone:function(n){var r=n.sortable,i=n.rootEl,a=n.dispatchSortableEvent,o=n.cancel;!this.isMultiDrag||this.options.removeCloneOnHide||je.length&&er===r&&(Nh(!0,i),a("clone"),o())},showClone:function(n){var r=n.cloneNowShown,i=n.rootEl,a=n.cancel;!this.isMultiDrag||(Nh(!1,i),On.forEach(function(o){Ee(o,"display","")}),r(),Rs=!1,a())},hideClone:function(n){var r=this;n.sortable;var i=n.cloneNowHidden,a=n.cancel;!this.isMultiDrag||(On.forEach(function(o){Ee(o,"display","none"),r.options.removeCloneOnHide&&o.parentNode&&o.parentNode.removeChild(o)}),i(),Rs=!0,a())},dragStartGlobal:function(n){n.sortable,!this.isMultiDrag&&er&&er.multiDrag._deselectMultiDrag(),je.forEach(function(r){r.sortableIndex=Ht(r)}),je=je.sort(function(r,i){return r.sortableIndex-i.sortableIndex}),ho=!0},dragStarted:function(n){var r=this,i=n.sortable;if(!!this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){je.forEach(function(o){o!==It&&Ee(o,"position","absolute")});var a=Ft(It,!1,!0,!0);je.forEach(function(o){o!==It&&wh(o,a)}),Cn=!0,Jo=!0}i.animateAll(function(){Cn=!1,Jo=!1,r.options.animation&&je.forEach(function(o){Tu(o)}),r.options.sort&&As()})}},dragOver:function(n){var r=n.target,i=n.completed,a=n.cancel;Cn&&~je.indexOf(r)&&(i(!1),a())},revert:function(n){var r=n.fromSortable,i=n.rootEl,a=n.sortable,o=n.dragRect;je.length>1&&(je.forEach(function(s){a.addAnimationState({target:s,rect:Cn?Ft(s):o}),Tu(s),s.fromRect=o,r.removeAnimationState(s)}),Cn=!1,MT(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(n){var r=n.sortable,i=n.isOwner,a=n.insertion,o=n.activeSortable,s=n.parentEl,l=n.putSortable,u=this.options;if(a){if(i&&o._hideClone(),Jo=!1,u.animation&&je.length>1&&(Cn||!i&&!o.options.sort&&!l)){var c=Ft(It,!1,!0,!0);je.forEach(function(d){d!==It&&(wh(d,c),s.appendChild(d))}),Cn=!0}if(!i)if(Cn||As(),je.length>1){var f=Rs;o._showClone(r),o.options.animation&&!Rs&&f&&On.forEach(function(d){o.addAnimationState({target:d,rect:Qo}),d.fromRect=Qo,d.thisAnimationDuration=null})}else o._showClone(r)}},dragOverAnimationCapture:function(n){var r=n.dragRect,i=n.isOwner,a=n.activeSortable;if(je.forEach(function(s){s.thisAnimationDuration=null}),a.options.animation&&!i&&a.multiDrag.isMultiDrag){Qo=Qn({},r);var o=qi(It,!0);Qo.top-=o.f,Qo.left-=o.e}},dragOverAnimationComplete:function(){Cn&&(Cn=!1,As())},drop:function(n){var r=n.originalEvent,i=n.rootEl,a=n.parentEl,o=n.sortable,s=n.dispatchSortableEvent,l=n.oldIndex,u=n.putSortable,c=u||this.sortable;if(!!r){var f=this.options,d=a.children;if(!ho)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ut(It,f.selectedClass,!~je.indexOf(It)),~je.indexOf(It))je.splice(je.indexOf(It),1),Zo=null,ua({sortable:o,rootEl:i,name:"deselect",targetEl:It,originalEvt:r});else{if(je.push(It),ua({sortable:o,rootEl:i,name:"select",targetEl:It,originalEvt:r}),r.shiftKey&&Zo&&o.el.contains(Zo)){var h=Ht(Zo),p=Ht(It);if(~h&&~p&&h!==p){var v,g;for(p>h?(g=h,v=p):(g=p,v=h+1);g<v;g++)~je.indexOf(d[g])||(Ut(d[g],f.selectedClass,!0),je.push(d[g]),ua({sortable:o,rootEl:i,name:"select",targetEl:d[g],originalEvt:r}))}}else Zo=It;er=c}if(ho&&this.isMultiDrag){if(Cn=!1,(a[vn].options.sort||a!==i)&&je.length>1){var y=Ft(It),m=Ht(It,":not(."+this.options.selectedClass+")");if(!Jo&&f.animation&&(It.thisAnimationDuration=null),c.captureAnimationState(),!Jo&&(f.animation&&(It.fromRect=y,je.forEach(function(T){if(T.thisAnimationDuration=null,T!==It){var S=Cn?Ft(T):y;T.fromRect=S,c.addAnimationState({target:T,rect:S})}})),As(),je.forEach(function(T){d[m]?a.insertBefore(T,d[m]):a.appendChild(T),m++}),l===Ht(It))){var b=!1;je.forEach(function(T){if(T.sortableIndex!==Ht(T)){b=!0;return}}),b&&s("update")}je.forEach(function(T){Tu(T)}),c.animateAll()}er=c}(i===a||u&&u.lastPutMode!=="clone")&&On.forEach(function(T){T.parentNode&&T.parentNode.removeChild(T)})}},nullingGlobal:function(){this.isMultiDrag=ho=!1,On.length=0},destroyGlobal:function(){this._deselectMultiDrag(),rt(document,"pointerup",this._deselectMultiDrag),rt(document,"mouseup",this._deselectMultiDrag),rt(document,"touchend",this._deselectMultiDrag),rt(document,"keydown",this._checkKeyDown),rt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof ho!="undefined"&&ho)&&er===this.sortable&&!(n&&or(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;je.length;){var r=je[0];Ut(r,this.options.selectedClass,!1),je.shift(),ua({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Qn(e,{pluginName:"multiDrag",utils:{select:function(n){var r=n.parentNode[vn];!r||!r.options.multiDrag||~je.indexOf(n)||(er&&er!==r&&(er.multiDrag._deselectMultiDrag(),er=r),Ut(n,r.options.selectedClass,!0),je.push(n))},deselect:function(n){var r=n.parentNode[vn],i=je.indexOf(n);!r||!r.options.multiDrag||!~i||(Ut(n,r.options.selectedClass,!1),je.splice(i,1))}},eventProperties:function(){var n=this,r=[],i=[];return je.forEach(function(a){r.push({multiDragElement:a,index:a.sortableIndex});var o;Cn&&a!==It?o=-1:Cn?o=Ht(a,":not(."+n.options.selectedClass+")"):o=Ht(a),i.push({multiDragElement:a,index:o})}),{items:rT(je),clones:[].concat(On),oldIndicies:r,newIndicies:i}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function MT(e,t){je.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function Nh(e,t){On.forEach(function(n,r){var i=t.children[n.sortableIndex+(e?Number(r):0)];i?t.insertBefore(n,i):t.appendChild(n)})}function As(){je.forEach(function(e){e!==It&&e.parentNode&&e.parentNode.removeChild(e)})}ke.mount(new AT);ke.mount(Hf,jf);var LT=Object.freeze(Object.defineProperty({__proto__:null,default:ke,MultiDrag:FT,Sortable:ke,Swap:OT},Symbol.toStringTag,{value:"Module"})),UT=zm(LT);(function(e,t){(function(r,i){e.exports=i(q_,UT)})(typeof self!="undefined"?self:Js,function(n,r){return function(i){var a={};function o(s){if(a[s])return a[s].exports;var l=a[s]={i:s,l:!1,exports:{}};return i[s].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=i,o.c=a,o.d=function(s,l,u){o.o(s,l)||Object.defineProperty(s,l,{enumerable:!0,get:u})},o.r=function(s){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},o.t=function(s,l){if(l&1&&(s=o(s)),l&8||l&4&&typeof s=="object"&&s&&s.__esModule)return s;var u=Object.create(null);if(o.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:s}),l&2&&typeof s!="string")for(var c in s)o.d(u,c,function(f){return s[f]}.bind(null,c));return u},o.n=function(s){var l=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(l,"a",l),l},o.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},o.p="",o(o.s="fb15")}({"00ee":function(i,a,o){var s=o("b622"),l=s("toStringTag"),u={};u[l]="z",i.exports=String(u)==="[object z]"},"0366":function(i,a,o){var s=o("1c0b");i.exports=function(l,u,c){if(s(l),u===void 0)return l;switch(c){case 0:return function(){return l.call(u)};case 1:return function(f){return l.call(u,f)};case 2:return function(f,d){return l.call(u,f,d)};case 3:return function(f,d,h){return l.call(u,f,d,h)}}return function(){return l.apply(u,arguments)}}},"057f":function(i,a,o){var s=o("fc6a"),l=o("241c").f,u={}.toString,c=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(d){try{return l(d)}catch{return c.slice()}};i.exports.f=function(h){return c&&u.call(h)=="[object Window]"?f(h):l(s(h))}},"06cf":function(i,a,o){var s=o("83ab"),l=o("d1e7"),u=o("5c6c"),c=o("fc6a"),f=o("c04e"),d=o("5135"),h=o("0cfb"),p=Object.getOwnPropertyDescriptor;a.f=s?p:function(g,y){if(g=c(g),y=f(y,!0),h)try{return p(g,y)}catch{}if(d(g,y))return u(!l.f.call(g,y),g[y])}},"0cfb":function(i,a,o){var s=o("83ab"),l=o("d039"),u=o("cc12");i.exports=!s&&!l(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(i,a,o){var s=o("23e7"),l=o("d58f").left,u=o("a640"),c=o("ae40"),f=u("reduce"),d=c("reduce",{1:0});s({target:"Array",proto:!0,forced:!f||!d},{reduce:function(p){return l(this,p,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(i,a,o){var s=o("c6b6"),l=o("9263");i.exports=function(u,c){var f=u.exec;if(typeof f=="function"){var d=f.call(u,c);if(typeof d!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return d}if(s(u)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(u,c)}},"159b":function(i,a,o){var s=o("da84"),l=o("fdbc"),u=o("17c2"),c=o("9112");for(var f in l){var d=s[f],h=d&&d.prototype;if(h&&h.forEach!==u)try{c(h,"forEach",u)}catch{h.forEach=u}}},"17c2":function(i,a,o){var s=o("b727").forEach,l=o("a640"),u=o("ae40"),c=l("forEach"),f=u("forEach");i.exports=!c||!f?function(h){return s(this,h,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(i,a,o){var s=o("d066");i.exports=s("document","documentElement")},"1c0b":function(i,a){i.exports=function(o){if(typeof o!="function")throw TypeError(String(o)+" is not a function");return o}},"1c7e":function(i,a,o){var s=o("b622"),l=s("iterator"),u=!1;try{var c=0,f={next:function(){return{done:!!c++}},return:function(){u=!0}};f[l]=function(){return this},Array.from(f,function(){throw 2})}catch{}i.exports=function(d,h){if(!h&&!u)return!1;var p=!1;try{var v={};v[l]=function(){return{next:function(){return{done:p=!0}}}},d(v)}catch{}return p}},"1d80":function(i,a){i.exports=function(o){if(o==null)throw TypeError("Can't call method on "+o);return o}},"1dde":function(i,a,o){var s=o("d039"),l=o("b622"),u=o("2d00"),c=l("species");i.exports=function(f){return u>=51||!s(function(){var d=[],h=d.constructor={};return h[c]=function(){return{foo:1}},d[f](Boolean).foo!==1})}},"23cb":function(i,a,o){var s=o("a691"),l=Math.max,u=Math.min;i.exports=function(c,f){var d=s(c);return d<0?l(d+f,0):u(d,f)}},"23e7":function(i,a,o){var s=o("da84"),l=o("06cf").f,u=o("9112"),c=o("6eeb"),f=o("ce4e"),d=o("e893"),h=o("94ca");i.exports=function(p,v){var g=p.target,y=p.global,m=p.stat,b,T,S,w,N,I;if(y?T=s:m?T=s[g]||f(g,{}):T=(s[g]||{}).prototype,T)for(S in v){if(N=v[S],p.noTargetGet?(I=l(T,S),w=I&&I.value):w=T[S],b=h(y?S:g+(m?".":"#")+S,p.forced),!b&&w!==void 0){if(typeof N==typeof w)continue;d(N,w)}(p.sham||w&&w.sham)&&u(N,"sham",!0),c(T,S,N,p)}}},"241c":function(i,a,o){var s=o("ca84"),l=o("7839"),u=l.concat("length","prototype");a.f=Object.getOwnPropertyNames||function(f){return s(f,u)}},"25f0":function(i,a,o){var s=o("6eeb"),l=o("825a"),u=o("d039"),c=o("ad6d"),f="toString",d=RegExp.prototype,h=d[f],p=u(function(){return h.call({source:"a",flags:"b"})!="/a/b"}),v=h.name!=f;(p||v)&&s(RegExp.prototype,f,function(){var y=l(this),m=String(y.source),b=y.flags,T=String(b===void 0&&y instanceof RegExp&&!("flags"in d)?c.call(y):b);return"/"+m+"/"+T},{unsafe:!0})},"2ca0":function(i,a,o){var s=o("23e7"),l=o("06cf").f,u=o("50c4"),c=o("5a34"),f=o("1d80"),d=o("ab13"),h=o("c430"),p="".startsWith,v=Math.min,g=d("startsWith"),y=!h&&!g&&!!function(){var m=l(String.prototype,"startsWith");return m&&!m.writable}();s({target:"String",proto:!0,forced:!y&&!g},{startsWith:function(b){var T=String(f(this));c(b);var S=u(v(arguments.length>1?arguments[1]:void 0,T.length)),w=String(b);return p?p.call(T,w,S):T.slice(S,S+w.length)===w}})},"2d00":function(i,a,o){var s=o("da84"),l=o("342f"),u=s.process,c=u&&u.versions,f=c&&c.v8,d,h;f?(d=f.split("."),h=d[0]+d[1]):l&&(d=l.match(/Edge\/(\d+)/),(!d||d[1]>=74)&&(d=l.match(/Chrome\/(\d+)/),d&&(h=d[1]))),i.exports=h&&+h},"342f":function(i,a,o){var s=o("d066");i.exports=s("navigator","userAgent")||""},"35a1":function(i,a,o){var s=o("f5df"),l=o("3f8c"),u=o("b622"),c=u("iterator");i.exports=function(f){if(f!=null)return f[c]||f["@@iterator"]||l[s(f)]}},"37e8":function(i,a,o){var s=o("83ab"),l=o("9bf2"),u=o("825a"),c=o("df75");i.exports=s?Object.defineProperties:function(d,h){u(d);for(var p=c(h),v=p.length,g=0,y;v>g;)l.f(d,y=p[g++],h[y]);return d}},"3bbe":function(i,a,o){var s=o("861d");i.exports=function(l){if(!s(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}},"3ca3":function(i,a,o){var s=o("6547").charAt,l=o("69f3"),u=o("7dd0"),c="String Iterator",f=l.set,d=l.getterFor(c);u(String,"String",function(h){f(this,{type:c,string:String(h),index:0})},function(){var p=d(this),v=p.string,g=p.index,y;return g>=v.length?{value:void 0,done:!0}:(y=s(v,g),p.index+=y.length,{value:y,done:!1})})},"3f8c":function(i,a){i.exports={}},4160:function(i,a,o){var s=o("23e7"),l=o("17c2");s({target:"Array",proto:!0,forced:[].forEach!=l},{forEach:l})},"428f":function(i,a,o){var s=o("da84");i.exports=s},"44ad":function(i,a,o){var s=o("d039"),l=o("c6b6"),u="".split;i.exports=s(function(){return!Object("z").propertyIsEnumerable(0)})?function(c){return l(c)=="String"?u.call(c,""):Object(c)}:Object},"44d2":function(i,a,o){var s=o("b622"),l=o("7c73"),u=o("9bf2"),c=s("unscopables"),f=Array.prototype;f[c]==null&&u.f(f,c,{configurable:!0,value:l(null)}),i.exports=function(d){f[c][d]=!0}},"44e7":function(i,a,o){var s=o("861d"),l=o("c6b6"),u=o("b622"),c=u("match");i.exports=function(f){var d;return s(f)&&((d=f[c])!==void 0?!!d:l(f)=="RegExp")}},4930:function(i,a,o){var s=o("d039");i.exports=!!Object.getOwnPropertySymbols&&!s(function(){return!String(Symbol())})},"4d64":function(i,a,o){var s=o("fc6a"),l=o("50c4"),u=o("23cb"),c=function(f){return function(d,h,p){var v=s(d),g=l(v.length),y=u(p,g),m;if(f&&h!=h){for(;g>y;)if(m=v[y++],m!=m)return!0}else for(;g>y;y++)if((f||y in v)&&v[y]===h)return f||y||0;return!f&&-1}};i.exports={includes:c(!0),indexOf:c(!1)}},"4de4":function(i,a,o){var s=o("23e7"),l=o("b727").filter,u=o("1dde"),c=o("ae40"),f=u("filter"),d=c("filter");s({target:"Array",proto:!0,forced:!f||!d},{filter:function(p){return l(this,p,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(i,a,o){var s=o("0366"),l=o("7b0b"),u=o("9bdd"),c=o("e95a"),f=o("50c4"),d=o("8418"),h=o("35a1");i.exports=function(v){var g=l(v),y=typeof this=="function"?this:Array,m=arguments.length,b=m>1?arguments[1]:void 0,T=b!==void 0,S=h(g),w=0,N,I,R,U,$,z;if(T&&(b=s(b,m>2?arguments[2]:void 0,2)),S!=null&&!(y==Array&&c(S)))for(U=S.call(g),$=U.next,I=new y;!(R=$.call(U)).done;w++)z=T?u(U,b,[R.value,w],!0):R.value,d(I,w,z);else for(N=f(g.length),I=new y(N);N>w;w++)z=T?b(g[w],w):g[w],d(I,w,z);return I.length=w,I}},"4fad":function(i,a,o){var s=o("23e7"),l=o("6f53").entries;s({target:"Object",stat:!0},{entries:function(c){return l(c)}})},"50c4":function(i,a,o){var s=o("a691"),l=Math.min;i.exports=function(u){return u>0?l(s(u),9007199254740991):0}},5135:function(i,a){var o={}.hasOwnProperty;i.exports=function(s,l){return o.call(s,l)}},5319:function(i,a,o){var s=o("d784"),l=o("825a"),u=o("7b0b"),c=o("50c4"),f=o("a691"),d=o("1d80"),h=o("8aa5"),p=o("14c3"),v=Math.max,g=Math.min,y=Math.floor,m=/\$([$&'`]|\d\d?|<[^>]*>)/g,b=/\$([$&'`]|\d\d?)/g,T=function(S){return S===void 0?S:String(S)};s("replace",2,function(S,w,N,I){var R=I.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,U=I.REPLACE_KEEPS_$0,$=R?"$":"$0";return[function(B,he){var Y=d(this),oe=B==null?void 0:B[S];return oe!==void 0?oe.call(B,Y,he):w.call(String(Y),B,he)},function(j,B){if(!R&&U||typeof B=="string"&&B.indexOf($)===-1){var he=N(w,j,this,B);if(he.done)return he.value}var Y=l(j),oe=String(this),me=typeof B=="function";me||(B=String(B));var Ke=Y.global;if(Ke){var re=Y.unicode;Y.lastIndex=0}for(var de=[];;){var ye=p(Y,oe);if(ye===null||(de.push(ye),!Ke))break;var Se=String(ye[0]);Se===""&&(Y.lastIndex=h(oe,c(Y.lastIndex),re))}for(var k="",X=0,ce=0;ce<de.length;ce++){ye=de[ce];for(var ue=String(ye[0]),Ve=v(g(f(ye.index),oe.length),0),ie=[],Ze=1;Ze<ye.length;Ze++)ie.push(T(ye[Ze]));var at=ye.groups;if(me){var ut=[ue].concat(ie,Ve,oe);at!==void 0&&ut.push(at);var E=String(B.apply(void 0,ut))}else E=z(ue,oe,Ve,ie,at,B);Ve>=X&&(k+=oe.slice(X,Ve)+E,X=Ve+ue.length)}return k+oe.slice(X)}];function z(j,B,he,Y,oe,me){var Ke=he+j.length,re=Y.length,de=b;return oe!==void 0&&(oe=u(oe),de=m),w.call(me,de,function(ye,Se){var k;switch(Se.charAt(0)){case"$":return"$";case"&":return j;case"`":return B.slice(0,he);case"'":return B.slice(Ke);case"<":k=oe[Se.slice(1,-1)];break;default:var X=+Se;if(X===0)return ye;if(X>re){var ce=y(X/10);return ce===0?ye:ce<=re?Y[ce-1]===void 0?Se.charAt(1):Y[ce-1]+Se.charAt(1):ye}k=Y[X-1]}return k===void 0?"":k})}})},5692:function(i,a,o){var s=o("c430"),l=o("c6cd");(i.exports=function(u,c){return l[u]||(l[u]=c!==void 0?c:{})})("versions",[]).push({version:"3.6.5",mode:s?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(i,a,o){var s=o("d066"),l=o("241c"),u=o("7418"),c=o("825a");i.exports=s("Reflect","ownKeys")||function(d){var h=l.f(c(d)),p=u.f;return p?h.concat(p(d)):h}},"5a34":function(i,a,o){var s=o("44e7");i.exports=function(l){if(s(l))throw TypeError("The method doesn't accept regular expressions");return l}},"5c6c":function(i,a){i.exports=function(o,s){return{enumerable:!(o&1),configurable:!(o&2),writable:!(o&4),value:s}}},"5db7":function(i,a,o){var s=o("23e7"),l=o("a2bf"),u=o("7b0b"),c=o("50c4"),f=o("1c0b"),d=o("65f0");s({target:"Array",proto:!0},{flatMap:function(p){var v=u(this),g=c(v.length),y;return f(p),y=d(v,0),y.length=l(y,v,v,g,0,1,p,arguments.length>1?arguments[1]:void 0),y}})},6547:function(i,a,o){var s=o("a691"),l=o("1d80"),u=function(c){return function(f,d){var h=String(l(f)),p=s(d),v=h.length,g,y;return p<0||p>=v?c?"":void 0:(g=h.charCodeAt(p),g<55296||g>56319||p+1===v||(y=h.charCodeAt(p+1))<56320||y>57343?c?h.charAt(p):g:c?h.slice(p,p+2):(g-55296<<10)+(y-56320)+65536)}};i.exports={codeAt:u(!1),charAt:u(!0)}},"65f0":function(i,a,o){var s=o("861d"),l=o("e8b5"),u=o("b622"),c=u("species");i.exports=function(f,d){var h;return l(f)&&(h=f.constructor,typeof h=="function"&&(h===Array||l(h.prototype))?h=void 0:s(h)&&(h=h[c],h===null&&(h=void 0))),new(h===void 0?Array:h)(d===0?0:d)}},"69f3":function(i,a,o){var s=o("7f9a"),l=o("da84"),u=o("861d"),c=o("9112"),f=o("5135"),d=o("f772"),h=o("d012"),p=l.WeakMap,v,g,y,m=function(R){return y(R)?g(R):v(R,{})},b=function(R){return function(U){var $;if(!u(U)||($=g(U)).type!==R)throw TypeError("Incompatible receiver, "+R+" required");return $}};if(s){var T=new p,S=T.get,w=T.has,N=T.set;v=function(R,U){return N.call(T,R,U),U},g=function(R){return S.call(T,R)||{}},y=function(R){return w.call(T,R)}}else{var I=d("state");h[I]=!0,v=function(R,U){return c(R,I,U),U},g=function(R){return f(R,I)?R[I]:{}},y=function(R){return f(R,I)}}i.exports={set:v,get:g,has:y,enforce:m,getterFor:b}},"6eeb":function(i,a,o){var s=o("da84"),l=o("9112"),u=o("5135"),c=o("ce4e"),f=o("8925"),d=o("69f3"),h=d.get,p=d.enforce,v=String(String).split("String");(i.exports=function(g,y,m,b){var T=b?!!b.unsafe:!1,S=b?!!b.enumerable:!1,w=b?!!b.noTargetGet:!1;if(typeof m=="function"&&(typeof y=="string"&&!u(m,"name")&&l(m,"name",y),p(m).source=v.join(typeof y=="string"?y:"")),g===s){S?g[y]=m:c(y,m);return}else T?!w&&g[y]&&(S=!0):delete g[y];S?g[y]=m:l(g,y,m)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||f(this)})},"6f53":function(i,a,o){var s=o("83ab"),l=o("df75"),u=o("fc6a"),c=o("d1e7").f,f=function(d){return function(h){for(var p=u(h),v=l(p),g=v.length,y=0,m=[],b;g>y;)b=v[y++],(!s||c.call(p,b))&&m.push(d?[b,p[b]]:p[b]);return m}};i.exports={entries:f(!0),values:f(!1)}},"73d9":function(i,a,o){var s=o("44d2");s("flatMap")},7418:function(i,a){a.f=Object.getOwnPropertySymbols},"746f":function(i,a,o){var s=o("428f"),l=o("5135"),u=o("e538"),c=o("9bf2").f;i.exports=function(f){var d=s.Symbol||(s.Symbol={});l(d,f)||c(d,f,{value:u.f(f)})}},7839:function(i,a){i.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(i,a,o){var s=o("1d80");i.exports=function(l){return Object(s(l))}},"7c73":function(i,a,o){var s=o("825a"),l=o("37e8"),u=o("7839"),c=o("d012"),f=o("1be4"),d=o("cc12"),h=o("f772"),p=">",v="<",g="prototype",y="script",m=h("IE_PROTO"),b=function(){},T=function(R){return v+y+p+R+v+"/"+y+p},S=function(R){R.write(T("")),R.close();var U=R.parentWindow.Object;return R=null,U},w=function(){var R=d("iframe"),U="java"+y+":",$;return R.style.display="none",f.appendChild(R),R.src=String(U),$=R.contentWindow.document,$.open(),$.write(T("document.F=Object")),$.close(),$.F},N,I=function(){try{N=document.domain&&new ActiveXObject("htmlfile")}catch{}I=N?S(N):w();for(var R=u.length;R--;)delete I[g][u[R]];return I()};c[m]=!0,i.exports=Object.create||function(U,$){var z;return U!==null?(b[g]=s(U),z=new b,b[g]=null,z[m]=U):z=I(),$===void 0?z:l(z,$)}},"7dd0":function(i,a,o){var s=o("23e7"),l=o("9ed3"),u=o("e163"),c=o("d2bb"),f=o("d44e"),d=o("9112"),h=o("6eeb"),p=o("b622"),v=o("c430"),g=o("3f8c"),y=o("ae93"),m=y.IteratorPrototype,b=y.BUGGY_SAFARI_ITERATORS,T=p("iterator"),S="keys",w="values",N="entries",I=function(){return this};i.exports=function(R,U,$,z,j,B,he){l($,U,z);var Y=function(ce){if(ce===j&&de)return de;if(!b&&ce in Ke)return Ke[ce];switch(ce){case S:return function(){return new $(this,ce)};case w:return function(){return new $(this,ce)};case N:return function(){return new $(this,ce)}}return function(){return new $(this)}},oe=U+" Iterator",me=!1,Ke=R.prototype,re=Ke[T]||Ke["@@iterator"]||j&&Ke[j],de=!b&&re||Y(j),ye=U=="Array"&&Ke.entries||re,Se,k,X;if(ye&&(Se=u(ye.call(new R)),m!==Object.prototype&&Se.next&&(!v&&u(Se)!==m&&(c?c(Se,m):typeof Se[T]!="function"&&d(Se,T,I)),f(Se,oe,!0,!0),v&&(g[oe]=I))),j==w&&re&&re.name!==w&&(me=!0,de=function(){return re.call(this)}),(!v||he)&&Ke[T]!==de&&d(Ke,T,de),g[U]=de,j)if(k={values:Y(w),keys:B?de:Y(S),entries:Y(N)},he)for(X in k)(b||me||!(X in Ke))&&h(Ke,X,k[X]);else s({target:U,proto:!0,forced:b||me},k);return k}},"7f9a":function(i,a,o){var s=o("da84"),l=o("8925"),u=s.WeakMap;i.exports=typeof u=="function"&&/native code/.test(l(u))},"825a":function(i,a,o){var s=o("861d");i.exports=function(l){if(!s(l))throw TypeError(String(l)+" is not an object");return l}},"83ab":function(i,a,o){var s=o("d039");i.exports=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(i,a,o){var s=o("c04e"),l=o("9bf2"),u=o("5c6c");i.exports=function(c,f,d){var h=s(f);h in c?l.f(c,h,u(0,d)):c[h]=d}},"861d":function(i,a){i.exports=function(o){return typeof o=="object"?o!==null:typeof o=="function"}},8875:function(i,a,o){var s,l,u;(function(c,f){l=[],s=f,u=typeof s=="function"?s.apply(a,l):s,u!==void 0&&(i.exports=u)})(typeof self!="undefined"?self:this,function(){function c(){var f=Object.getOwnPropertyDescriptor(document,"currentScript");if(!f&&"currentScript"in document&&document.currentScript||f&&f.get!==c&&document.currentScript)return document.currentScript;try{throw new Error}catch(N){var d=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,h=/@([^@]*):(\d+):(\d+)\s*$/ig,p=d.exec(N.stack)||h.exec(N.stack),v=p&&p[1]||!1,g=p&&p[2]||!1,y=document.location.href.replace(document.location.hash,""),m,b,T,S=document.getElementsByTagName("script");v===y&&(m=document.documentElement.outerHTML,b=new RegExp("(?:[^\\n]+?\\n){0,"+(g-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),T=m.replace(b,"$1").trim());for(var w=0;w<S.length;w++)if(S[w].readyState==="interactive"||S[w].src===v||v===y&&S[w].innerHTML&&S[w].innerHTML.trim()===T)return S[w];return null}}return c})},8925:function(i,a,o){var s=o("c6cd"),l=Function.toString;typeof s.inspectSource!="function"&&(s.inspectSource=function(u){return l.call(u)}),i.exports=s.inspectSource},"8aa5":function(i,a,o){var s=o("6547").charAt;i.exports=function(l,u,c){return u+(c?s(l,u).length:1)}},"8bbf":function(i,a){i.exports=n},"90e3":function(i,a){var o=0,s=Math.random();i.exports=function(l){return"Symbol("+String(l===void 0?"":l)+")_"+(++o+s).toString(36)}},9112:function(i,a,o){var s=o("83ab"),l=o("9bf2"),u=o("5c6c");i.exports=s?function(c,f,d){return l.f(c,f,u(1,d))}:function(c,f,d){return c[f]=d,c}},9263:function(i,a,o){var s=o("ad6d"),l=o("9f7f"),u=RegExp.prototype.exec,c=String.prototype.replace,f=u,d=function(){var g=/a/,y=/b*/g;return u.call(g,"a"),u.call(y,"a"),g.lastIndex!==0||y.lastIndex!==0}(),h=l.UNSUPPORTED_Y||l.BROKEN_CARET,p=/()??/.exec("")[1]!==void 0,v=d||p||h;v&&(f=function(y){var m=this,b,T,S,w,N=h&&m.sticky,I=s.call(m),R=m.source,U=0,$=y;return N&&(I=I.replace("y",""),I.indexOf("g")===-1&&(I+="g"),$=String(y).slice(m.lastIndex),m.lastIndex>0&&(!m.multiline||m.multiline&&y[m.lastIndex-1]!==`
`)&&(R="(?: "+R+")",$=" "+$,U++),T=new RegExp("^(?:"+R+")",I)),p&&(T=new RegExp("^"+R+"$(?!\\s)",I)),d&&(b=m.lastIndex),S=u.call(N?T:m,$),N?S?(S.input=S.input.slice(U),S[0]=S[0].slice(U),S.index=m.lastIndex,m.lastIndex+=S[0].length):m.lastIndex=0:d&&S&&(m.lastIndex=m.global?S.index+S[0].length:b),p&&S&&S.length>1&&c.call(S[0],T,function(){for(w=1;w<arguments.length-2;w++)arguments[w]===void 0&&(S[w]=void 0)}),S}),i.exports=f},"94ca":function(i,a,o){var s=o("d039"),l=/#|\.prototype\./,u=function(p,v){var g=f[c(p)];return g==h?!0:g==d?!1:typeof v=="function"?s(v):!!v},c=u.normalize=function(p){return String(p).replace(l,".").toLowerCase()},f=u.data={},d=u.NATIVE="N",h=u.POLYFILL="P";i.exports=u},"99af":function(i,a,o){var s=o("23e7"),l=o("d039"),u=o("e8b5"),c=o("861d"),f=o("7b0b"),d=o("50c4"),h=o("8418"),p=o("65f0"),v=o("1dde"),g=o("b622"),y=o("2d00"),m=g("isConcatSpreadable"),b=9007199254740991,T="Maximum allowed index exceeded",S=y>=51||!l(function(){var R=[];return R[m]=!1,R.concat()[0]!==R}),w=v("concat"),N=function(R){if(!c(R))return!1;var U=R[m];return U!==void 0?!!U:u(R)},I=!S||!w;s({target:"Array",proto:!0,forced:I},{concat:function(U){var $=f(this),z=p($,0),j=0,B,he,Y,oe,me;for(B=-1,Y=arguments.length;B<Y;B++)if(me=B===-1?$:arguments[B],N(me)){if(oe=d(me.length),j+oe>b)throw TypeError(T);for(he=0;he<oe;he++,j++)he in me&&h(z,j,me[he])}else{if(j>=b)throw TypeError(T);h(z,j++,me)}return z.length=j,z}})},"9bdd":function(i,a,o){var s=o("825a");i.exports=function(l,u,c,f){try{return f?u(s(c)[0],c[1]):u(c)}catch(h){var d=l.return;throw d!==void 0&&s(d.call(l)),h}}},"9bf2":function(i,a,o){var s=o("83ab"),l=o("0cfb"),u=o("825a"),c=o("c04e"),f=Object.defineProperty;a.f=s?f:function(h,p,v){if(u(h),p=c(p,!0),u(v),l)try{return f(h,p,v)}catch{}if("get"in v||"set"in v)throw TypeError("Accessors not supported");return"value"in v&&(h[p]=v.value),h}},"9ed3":function(i,a,o){var s=o("ae93").IteratorPrototype,l=o("7c73"),u=o("5c6c"),c=o("d44e"),f=o("3f8c"),d=function(){return this};i.exports=function(h,p,v){var g=p+" Iterator";return h.prototype=l(s,{next:u(1,v)}),c(h,g,!1,!0),f[g]=d,h}},"9f7f":function(i,a,o){var s=o("d039");function l(u,c){return RegExp(u,c)}a.UNSUPPORTED_Y=s(function(){var u=l("a","y");return u.lastIndex=2,u.exec("abcd")!=null}),a.BROKEN_CARET=s(function(){var u=l("^r","gy");return u.lastIndex=2,u.exec("str")!=null})},a2bf:function(i,a,o){var s=o("e8b5"),l=o("50c4"),u=o("0366"),c=function(f,d,h,p,v,g,y,m){for(var b=v,T=0,S=y?u(y,m,3):!1,w;T<p;){if(T in h){if(w=S?S(h[T],T,d):h[T],g>0&&s(w))b=c(f,d,w,l(w.length),b,g-1)-1;else{if(b>=9007199254740991)throw TypeError("Exceed the acceptable array length");f[b]=w}b++}T++}return b};i.exports=c},a352:function(i,a){i.exports=r},a434:function(i,a,o){var s=o("23e7"),l=o("23cb"),u=o("a691"),c=o("50c4"),f=o("7b0b"),d=o("65f0"),h=o("8418"),p=o("1dde"),v=o("ae40"),g=p("splice"),y=v("splice",{ACCESSORS:!0,0:0,1:2}),m=Math.max,b=Math.min,T=9007199254740991,S="Maximum allowed length exceeded";s({target:"Array",proto:!0,forced:!g||!y},{splice:function(N,I){var R=f(this),U=c(R.length),$=l(N,U),z=arguments.length,j,B,he,Y,oe,me;if(z===0?j=B=0:z===1?(j=0,B=U-$):(j=z-2,B=b(m(u(I),0),U-$)),U+j-B>T)throw TypeError(S);for(he=d(R,B),Y=0;Y<B;Y++)oe=$+Y,oe in R&&h(he,Y,R[oe]);if(he.length=B,j<B){for(Y=$;Y<U-B;Y++)oe=Y+B,me=Y+j,oe in R?R[me]=R[oe]:delete R[me];for(Y=U;Y>U-B+j;Y--)delete R[Y-1]}else if(j>B)for(Y=U-B;Y>$;Y--)oe=Y+B-1,me=Y+j-1,oe in R?R[me]=R[oe]:delete R[me];for(Y=0;Y<j;Y++)R[Y+$]=arguments[Y+2];return R.length=U-B+j,he}})},a4d3:function(i,a,o){var s=o("23e7"),l=o("da84"),u=o("d066"),c=o("c430"),f=o("83ab"),d=o("4930"),h=o("fdbf"),p=o("d039"),v=o("5135"),g=o("e8b5"),y=o("861d"),m=o("825a"),b=o("7b0b"),T=o("fc6a"),S=o("c04e"),w=o("5c6c"),N=o("7c73"),I=o("df75"),R=o("241c"),U=o("057f"),$=o("7418"),z=o("06cf"),j=o("9bf2"),B=o("d1e7"),he=o("9112"),Y=o("6eeb"),oe=o("5692"),me=o("f772"),Ke=o("d012"),re=o("90e3"),de=o("b622"),ye=o("e538"),Se=o("746f"),k=o("d44e"),X=o("69f3"),ce=o("b727").forEach,ue=me("hidden"),Ve="Symbol",ie="prototype",Ze=de("toPrimitive"),at=X.set,ut=X.getterFor(Ve),E=Object[ie],A=l.Symbol,V=u("JSON","stringify"),K=z.f,Z=j.f,ae=U.f,pe=B.f,ne=oe("symbols"),se=oe("op-symbols"),ee=oe("string-to-symbol-registry"),Ne=oe("symbol-to-string-registry"),be=oe("wks"),Re=l.QObject,Le=!Re||!Re[ie]||!Re[ie].findChild,qe=f&&p(function(){return N(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a!=7})?function(Be,Ae,Ue){var ct=K(E,Ae);ct&&delete E[Ae],Z(Be,Ae,Ue),ct&&Be!==E&&Z(E,Ae,ct)}:Z,ht=function(Be,Ae){var Ue=ne[Be]=N(A[ie]);return at(Ue,{type:Ve,tag:Be,description:Ae}),f||(Ue.description=Ae),Ue},F=h?function(Be){return typeof Be=="symbol"}:function(Be){return Object(Be)instanceof A},L=function(Ae,Ue,ct){Ae===E&&L(se,Ue,ct),m(Ae);var pt=S(Ue,!0);return m(ct),v(ne,pt)?(ct.enumerable?(v(Ae,ue)&&Ae[ue][pt]&&(Ae[ue][pt]=!1),ct=N(ct,{enumerable:w(0,!1)})):(v(Ae,ue)||Z(Ae,ue,w(1,{})),Ae[ue][pt]=!0),qe(Ae,pt,ct)):Z(Ae,pt,ct)},G=function(Ae,Ue){m(Ae);var ct=T(Ue),pt=I(ct).concat(Ge(ct));return ce(pt,function(Tn){(!f||_e.call(ct,Tn))&&L(Ae,Tn,ct[Tn])}),Ae},te=function(Ae,Ue){return Ue===void 0?N(Ae):G(N(Ae),Ue)},_e=function(Ae){var Ue=S(Ae,!0),ct=pe.call(this,Ue);return this===E&&v(ne,Ue)&&!v(se,Ue)?!1:ct||!v(this,Ue)||!v(ne,Ue)||v(this,ue)&&this[ue][Ue]?ct:!0},Fe=function(Ae,Ue){var ct=T(Ae),pt=S(Ue,!0);if(!(ct===E&&v(ne,pt)&&!v(se,pt))){var Tn=K(ct,pt);return Tn&&v(ne,pt)&&!(v(ct,ue)&&ct[ue][pt])&&(Tn.enumerable=!0),Tn}},$e=function(Ae){var Ue=ae(T(Ae)),ct=[];return ce(Ue,function(pt){!v(ne,pt)&&!v(Ke,pt)&&ct.push(pt)}),ct},Ge=function(Ae){var Ue=Ae===E,ct=ae(Ue?se:T(Ae)),pt=[];return ce(ct,function(Tn){v(ne,Tn)&&(!Ue||v(E,Tn))&&pt.push(ne[Tn])}),pt};if(d||(A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor");var Ae=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),Ue=re(Ae),ct=function(pt){this===E&&ct.call(se,pt),v(this,ue)&&v(this[ue],Ue)&&(this[ue][Ue]=!1),qe(this,Ue,w(1,pt))};return f&&Le&&qe(E,Ue,{configurable:!0,set:ct}),ht(Ue,Ae)},Y(A[ie],"toString",function(){return ut(this).tag}),Y(A,"withoutSetter",function(Be){return ht(re(Be),Be)}),B.f=_e,j.f=L,z.f=Fe,R.f=U.f=$e,$.f=Ge,ye.f=function(Be){return ht(de(Be),Be)},f&&(Z(A[ie],"description",{configurable:!0,get:function(){return ut(this).description}}),c||Y(E,"propertyIsEnumerable",_e,{unsafe:!0}))),s({global:!0,wrap:!0,forced:!d,sham:!d},{Symbol:A}),ce(I(be),function(Be){Se(Be)}),s({target:Ve,stat:!0,forced:!d},{for:function(Be){var Ae=String(Be);if(v(ee,Ae))return ee[Ae];var Ue=A(Ae);return ee[Ae]=Ue,Ne[Ue]=Ae,Ue},keyFor:function(Ae){if(!F(Ae))throw TypeError(Ae+" is not a symbol");if(v(Ne,Ae))return Ne[Ae]},useSetter:function(){Le=!0},useSimple:function(){Le=!1}}),s({target:"Object",stat:!0,forced:!d,sham:!f},{create:te,defineProperty:L,defineProperties:G,getOwnPropertyDescriptor:Fe}),s({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:$e,getOwnPropertySymbols:Ge}),s({target:"Object",stat:!0,forced:p(function(){$.f(1)})},{getOwnPropertySymbols:function(Ae){return $.f(b(Ae))}}),V){var mt=!d||p(function(){var Be=A();return V([Be])!="[null]"||V({a:Be})!="{}"||V(Object(Be))!="{}"});s({target:"JSON",stat:!0,forced:mt},{stringify:function(Ae,Ue,ct){for(var pt=[Ae],Tn=1,cu;arguments.length>Tn;)pt.push(arguments[Tn++]);if(cu=Ue,!(!y(Ue)&&Ae===void 0||F(Ae)))return g(Ue)||(Ue=function(Ry,hs){if(typeof cu=="function"&&(hs=cu.call(this,Ry,hs)),!F(hs))return hs}),pt[1]=Ue,V.apply(null,pt)}})}A[ie][Ze]||he(A[ie],Ze,A[ie].valueOf),k(A,Ve),Ke[ue]=!0},a630:function(i,a,o){var s=o("23e7"),l=o("4df4"),u=o("1c7e"),c=!u(function(f){Array.from(f)});s({target:"Array",stat:!0,forced:c},{from:l})},a640:function(i,a,o){var s=o("d039");i.exports=function(l,u){var c=[][l];return!!c&&s(function(){c.call(null,u||function(){throw 1},1)})}},a691:function(i,a){var o=Math.ceil,s=Math.floor;i.exports=function(l){return isNaN(l=+l)?0:(l>0?s:o)(l)}},ab13:function(i,a,o){var s=o("b622"),l=s("match");i.exports=function(u){var c=/./;try{"/./"[u](c)}catch{try{return c[l]=!1,"/./"[u](c)}catch{}}return!1}},ac1f:function(i,a,o){var s=o("23e7"),l=o("9263");s({target:"RegExp",proto:!0,forced:/./.exec!==l},{exec:l})},ad6d:function(i,a,o){var s=o("825a");i.exports=function(){var l=s(this),u="";return l.global&&(u+="g"),l.ignoreCase&&(u+="i"),l.multiline&&(u+="m"),l.dotAll&&(u+="s"),l.unicode&&(u+="u"),l.sticky&&(u+="y"),u}},ae40:function(i,a,o){var s=o("83ab"),l=o("d039"),u=o("5135"),c=Object.defineProperty,f={},d=function(h){throw h};i.exports=function(h,p){if(u(f,h))return f[h];p||(p={});var v=[][h],g=u(p,"ACCESSORS")?p.ACCESSORS:!1,y=u(p,0)?p[0]:d,m=u(p,1)?p[1]:void 0;return f[h]=!!v&&!l(function(){if(g&&!s)return!0;var b={length:-1};g?c(b,1,{enumerable:!0,get:d}):b[1]=1,v.call(b,y,m)})}},ae93:function(i,a,o){var s=o("e163"),l=o("9112"),u=o("5135"),c=o("b622"),f=o("c430"),d=c("iterator"),h=!1,p=function(){return this},v,g,y;[].keys&&(y=[].keys(),"next"in y?(g=s(s(y)),g!==Object.prototype&&(v=g)):h=!0),v==null&&(v={}),!f&&!u(v,d)&&l(v,d,p),i.exports={IteratorPrototype:v,BUGGY_SAFARI_ITERATORS:h}},b041:function(i,a,o){var s=o("00ee"),l=o("f5df");i.exports=s?{}.toString:function(){return"[object "+l(this)+"]"}},b0c0:function(i,a,o){var s=o("83ab"),l=o("9bf2").f,u=Function.prototype,c=u.toString,f=/^\s*function ([^ (]*)/,d="name";s&&!(d in u)&&l(u,d,{configurable:!0,get:function(){try{return c.call(this).match(f)[1]}catch{return""}}})},b622:function(i,a,o){var s=o("da84"),l=o("5692"),u=o("5135"),c=o("90e3"),f=o("4930"),d=o("fdbf"),h=l("wks"),p=s.Symbol,v=d?p:p&&p.withoutSetter||c;i.exports=function(g){return u(h,g)||(f&&u(p,g)?h[g]=p[g]:h[g]=v("Symbol."+g)),h[g]}},b64b:function(i,a,o){var s=o("23e7"),l=o("7b0b"),u=o("df75"),c=o("d039"),f=c(function(){u(1)});s({target:"Object",stat:!0,forced:f},{keys:function(h){return u(l(h))}})},b727:function(i,a,o){var s=o("0366"),l=o("44ad"),u=o("7b0b"),c=o("50c4"),f=o("65f0"),d=[].push,h=function(p){var v=p==1,g=p==2,y=p==3,m=p==4,b=p==6,T=p==5||b;return function(S,w,N,I){for(var R=u(S),U=l(R),$=s(w,N,3),z=c(U.length),j=0,B=I||f,he=v?B(S,z):g?B(S,0):void 0,Y,oe;z>j;j++)if((T||j in U)&&(Y=U[j],oe=$(Y,j,R),p)){if(v)he[j]=oe;else if(oe)switch(p){case 3:return!0;case 5:return Y;case 6:return j;case 2:d.call(he,Y)}else if(m)return!1}return b?-1:y||m?m:he}};i.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6)}},c04e:function(i,a,o){var s=o("861d");i.exports=function(l,u){if(!s(l))return l;var c,f;if(u&&typeof(c=l.toString)=="function"&&!s(f=c.call(l))||typeof(c=l.valueOf)=="function"&&!s(f=c.call(l))||!u&&typeof(c=l.toString)=="function"&&!s(f=c.call(l)))return f;throw TypeError("Can't convert object to primitive value")}},c430:function(i,a){i.exports=!1},c6b6:function(i,a){var o={}.toString;i.exports=function(s){return o.call(s).slice(8,-1)}},c6cd:function(i,a,o){var s=o("da84"),l=o("ce4e"),u="__core-js_shared__",c=s[u]||l(u,{});i.exports=c},c740:function(i,a,o){var s=o("23e7"),l=o("b727").findIndex,u=o("44d2"),c=o("ae40"),f="findIndex",d=!0,h=c(f);f in[]&&Array(1)[f](function(){d=!1}),s({target:"Array",proto:!0,forced:d||!h},{findIndex:function(v){return l(this,v,arguments.length>1?arguments[1]:void 0)}}),u(f)},c8ba:function(i,a){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch{typeof window=="object"&&(o=window)}i.exports=o},c975:function(i,a,o){var s=o("23e7"),l=o("4d64").indexOf,u=o("a640"),c=o("ae40"),f=[].indexOf,d=!!f&&1/[1].indexOf(1,-0)<0,h=u("indexOf"),p=c("indexOf",{ACCESSORS:!0,1:0});s({target:"Array",proto:!0,forced:d||!h||!p},{indexOf:function(g){return d?f.apply(this,arguments)||0:l(this,g,arguments.length>1?arguments[1]:void 0)}})},ca84:function(i,a,o){var s=o("5135"),l=o("fc6a"),u=o("4d64").indexOf,c=o("d012");i.exports=function(f,d){var h=l(f),p=0,v=[],g;for(g in h)!s(c,g)&&s(h,g)&&v.push(g);for(;d.length>p;)s(h,g=d[p++])&&(~u(v,g)||v.push(g));return v}},caad:function(i,a,o){var s=o("23e7"),l=o("4d64").includes,u=o("44d2"),c=o("ae40"),f=c("indexOf",{ACCESSORS:!0,1:0});s({target:"Array",proto:!0,forced:!f},{includes:function(h){return l(this,h,arguments.length>1?arguments[1]:void 0)}}),u("includes")},cc12:function(i,a,o){var s=o("da84"),l=o("861d"),u=s.document,c=l(u)&&l(u.createElement);i.exports=function(f){return c?u.createElement(f):{}}},ce4e:function(i,a,o){var s=o("da84"),l=o("9112");i.exports=function(u,c){try{l(s,u,c)}catch{s[u]=c}return c}},d012:function(i,a){i.exports={}},d039:function(i,a){i.exports=function(o){try{return!!o()}catch{return!0}}},d066:function(i,a,o){var s=o("428f"),l=o("da84"),u=function(c){return typeof c=="function"?c:void 0};i.exports=function(c,f){return arguments.length<2?u(s[c])||u(l[c]):s[c]&&s[c][f]||l[c]&&l[c][f]}},d1e7:function(i,a,o){var s={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,u=l&&!s.call({1:2},1);a.f=u?function(f){var d=l(this,f);return!!d&&d.enumerable}:s},d28b:function(i,a,o){var s=o("746f");s("iterator")},d2bb:function(i,a,o){var s=o("825a"),l=o("3bbe");i.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var u=!1,c={},f;try{f=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,f.call(c,[]),u=c instanceof Array}catch{}return function(h,p){return s(h),l(p),u?f.call(h,p):h.__proto__=p,h}}():void 0)},d3b7:function(i,a,o){var s=o("00ee"),l=o("6eeb"),u=o("b041");s||l(Object.prototype,"toString",u,{unsafe:!0})},d44e:function(i,a,o){var s=o("9bf2").f,l=o("5135"),u=o("b622"),c=u("toStringTag");i.exports=function(f,d,h){f&&!l(f=h?f:f.prototype,c)&&s(f,c,{configurable:!0,value:d})}},d58f:function(i,a,o){var s=o("1c0b"),l=o("7b0b"),u=o("44ad"),c=o("50c4"),f=function(d){return function(h,p,v,g){s(p);var y=l(h),m=u(y),b=c(y.length),T=d?b-1:0,S=d?-1:1;if(v<2)for(;;){if(T in m){g=m[T],T+=S;break}if(T+=S,d?T<0:b<=T)throw TypeError("Reduce of empty array with no initial value")}for(;d?T>=0:b>T;T+=S)T in m&&(g=p(g,m[T],T,y));return g}};i.exports={left:f(!1),right:f(!0)}},d784:function(i,a,o){o("ac1f");var s=o("6eeb"),l=o("d039"),u=o("b622"),c=o("9263"),f=o("9112"),d=u("species"),h=!l(function(){var m=/./;return m.exec=function(){var b=[];return b.groups={a:"7"},b},"".replace(m,"$<a>")!=="7"}),p=function(){return"a".replace(/./,"$0")==="$0"}(),v=u("replace"),g=function(){return/./[v]?/./[v]("a","$0")==="":!1}(),y=!l(function(){var m=/(?:)/,b=m.exec;m.exec=function(){return b.apply(this,arguments)};var T="ab".split(m);return T.length!==2||T[0]!=="a"||T[1]!=="b"});i.exports=function(m,b,T,S){var w=u(m),N=!l(function(){var j={};return j[w]=function(){return 7},""[m](j)!=7}),I=N&&!l(function(){var j=!1,B=/a/;return m==="split"&&(B={},B.constructor={},B.constructor[d]=function(){return B},B.flags="",B[w]=/./[w]),B.exec=function(){return j=!0,null},B[w](""),!j});if(!N||!I||m==="replace"&&!(h&&p&&!g)||m==="split"&&!y){var R=/./[w],U=T(w,""[m],function(j,B,he,Y,oe){return B.exec===c?N&&!oe?{done:!0,value:R.call(B,he,Y)}:{done:!0,value:j.call(he,B,Y)}:{done:!1}},{REPLACE_KEEPS_$0:p,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:g}),$=U[0],z=U[1];s(String.prototype,m,$),s(RegExp.prototype,w,b==2?function(j,B){return z.call(j,this,B)}:function(j){return z.call(j,this)})}S&&f(RegExp.prototype[w],"sham",!0)}},d81d:function(i,a,o){var s=o("23e7"),l=o("b727").map,u=o("1dde"),c=o("ae40"),f=u("map"),d=c("map");s({target:"Array",proto:!0,forced:!f||!d},{map:function(p){return l(this,p,arguments.length>1?arguments[1]:void 0)}})},da84:function(i,a,o){(function(s){var l=function(u){return u&&u.Math==Math&&u};i.exports=l(typeof globalThis=="object"&&globalThis)||l(typeof window=="object"&&window)||l(typeof self=="object"&&self)||l(typeof s=="object"&&s)||Function("return this")()}).call(this,o("c8ba"))},dbb4:function(i,a,o){var s=o("23e7"),l=o("83ab"),u=o("56ef"),c=o("fc6a"),f=o("06cf"),d=o("8418");s({target:"Object",stat:!0,sham:!l},{getOwnPropertyDescriptors:function(p){for(var v=c(p),g=f.f,y=u(v),m={},b=0,T,S;y.length>b;)S=g(v,T=y[b++]),S!==void 0&&d(m,T,S);return m}})},dbf1:function(i,a,o){(function(s){o.d(a,"a",function(){return u});function l(){return typeof window!="undefined"?window.console:s.console}var u=l()}).call(this,o("c8ba"))},ddb0:function(i,a,o){var s=o("da84"),l=o("fdbc"),u=o("e260"),c=o("9112"),f=o("b622"),d=f("iterator"),h=f("toStringTag"),p=u.values;for(var v in l){var g=s[v],y=g&&g.prototype;if(y){if(y[d]!==p)try{c(y,d,p)}catch{y[d]=p}if(y[h]||c(y,h,v),l[v]){for(var m in u)if(y[m]!==u[m])try{c(y,m,u[m])}catch{y[m]=u[m]}}}}},df75:function(i,a,o){var s=o("ca84"),l=o("7839");i.exports=Object.keys||function(c){return s(c,l)}},e01a:function(i,a,o){var s=o("23e7"),l=o("83ab"),u=o("da84"),c=o("5135"),f=o("861d"),d=o("9bf2").f,h=o("e893"),p=u.Symbol;if(l&&typeof p=="function"&&(!("description"in p.prototype)||p().description!==void 0)){var v={},g=function(){var w=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),N=this instanceof g?new p(w):w===void 0?p():p(w);return w===""&&(v[N]=!0),N};h(g,p);var y=g.prototype=p.prototype;y.constructor=g;var m=y.toString,b=String(p("test"))=="Symbol(test)",T=/^Symbol\((.*)\)[^)]+$/;d(y,"description",{configurable:!0,get:function(){var w=f(this)?this.valueOf():this,N=m.call(w);if(c(v,w))return"";var I=b?N.slice(7,-1):N.replace(T,"$1");return I===""?void 0:I}}),s({global:!0,forced:!0},{Symbol:g})}},e163:function(i,a,o){var s=o("5135"),l=o("7b0b"),u=o("f772"),c=o("e177"),f=u("IE_PROTO"),d=Object.prototype;i.exports=c?Object.getPrototypeOf:function(h){return h=l(h),s(h,f)?h[f]:typeof h.constructor=="function"&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?d:null}},e177:function(i,a,o){var s=o("d039");i.exports=!s(function(){function l(){}return l.prototype.constructor=null,Object.getPrototypeOf(new l)!==l.prototype})},e260:function(i,a,o){var s=o("fc6a"),l=o("44d2"),u=o("3f8c"),c=o("69f3"),f=o("7dd0"),d="Array Iterator",h=c.set,p=c.getterFor(d);i.exports=f(Array,"Array",function(v,g){h(this,{type:d,target:s(v),index:0,kind:g})},function(){var v=p(this),g=v.target,y=v.kind,m=v.index++;return!g||m>=g.length?(v.target=void 0,{value:void 0,done:!0}):y=="keys"?{value:m,done:!1}:y=="values"?{value:g[m],done:!1}:{value:[m,g[m]],done:!1}},"values"),u.Arguments=u.Array,l("keys"),l("values"),l("entries")},e439:function(i,a,o){var s=o("23e7"),l=o("d039"),u=o("fc6a"),c=o("06cf").f,f=o("83ab"),d=l(function(){c(1)}),h=!f||d;s({target:"Object",stat:!0,forced:h,sham:!f},{getOwnPropertyDescriptor:function(v,g){return c(u(v),g)}})},e538:function(i,a,o){var s=o("b622");a.f=s},e893:function(i,a,o){var s=o("5135"),l=o("56ef"),u=o("06cf"),c=o("9bf2");i.exports=function(f,d){for(var h=l(d),p=c.f,v=u.f,g=0;g<h.length;g++){var y=h[g];s(f,y)||p(f,y,v(d,y))}}},e8b5:function(i,a,o){var s=o("c6b6");i.exports=Array.isArray||function(u){return s(u)=="Array"}},e95a:function(i,a,o){var s=o("b622"),l=o("3f8c"),u=s("iterator"),c=Array.prototype;i.exports=function(f){return f!==void 0&&(l.Array===f||c[u]===f)}},f5df:function(i,a,o){var s=o("00ee"),l=o("c6b6"),u=o("b622"),c=u("toStringTag"),f=l(function(){return arguments}())=="Arguments",d=function(h,p){try{return h[p]}catch{}};i.exports=s?l:function(h){var p,v,g;return h===void 0?"Undefined":h===null?"Null":typeof(v=d(p=Object(h),c))=="string"?v:f?l(p):(g=l(p))=="Object"&&typeof p.callee=="function"?"Arguments":g}},f772:function(i,a,o){var s=o("5692"),l=o("90e3"),u=s("keys");i.exports=function(c){return u[c]||(u[c]=l(c))}},fb15:function(i,a,o){if(o.r(a),typeof window!="undefined"){var s=window.document.currentScript;{var l=o("8875");s=l(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:l})}var u=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);u&&(o.p=u[1])}o("99af"),o("4de4"),o("4160"),o("c975"),o("d81d"),o("a434"),o("159b"),o("a4d3"),o("e439"),o("dbb4"),o("b64b");function c(F,L,G){return L in F?Object.defineProperty(F,L,{value:G,enumerable:!0,configurable:!0,writable:!0}):F[L]=G,F}function f(F,L){var G=Object.keys(F);if(Object.getOwnPropertySymbols){var te=Object.getOwnPropertySymbols(F);L&&(te=te.filter(function(_e){return Object.getOwnPropertyDescriptor(F,_e).enumerable})),G.push.apply(G,te)}return G}function d(F){for(var L=1;L<arguments.length;L++){var G=arguments[L]!=null?arguments[L]:{};L%2?f(Object(G),!0).forEach(function(te){c(F,te,G[te])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(G)):f(Object(G)).forEach(function(te){Object.defineProperty(F,te,Object.getOwnPropertyDescriptor(G,te))})}return F}function h(F){if(Array.isArray(F))return F}o("e01a"),o("d28b"),o("e260"),o("d3b7"),o("3ca3"),o("ddb0");function p(F,L){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(F)))){var G=[],te=!0,_e=!1,Fe=void 0;try{for(var $e=F[Symbol.iterator](),Ge;!(te=(Ge=$e.next()).done)&&(G.push(Ge.value),!(L&&G.length===L));te=!0);}catch(mt){_e=!0,Fe=mt}finally{try{!te&&$e.return!=null&&$e.return()}finally{if(_e)throw Fe}}return G}}o("a630"),o("fb6a"),o("b0c0"),o("25f0");function v(F,L){(L==null||L>F.length)&&(L=F.length);for(var G=0,te=new Array(L);G<L;G++)te[G]=F[G];return te}function g(F,L){if(!!F){if(typeof F=="string")return v(F,L);var G=Object.prototype.toString.call(F).slice(8,-1);if(G==="Object"&&F.constructor&&(G=F.constructor.name),G==="Map"||G==="Set")return Array.from(F);if(G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G))return v(F,L)}}function y(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(F,L){return h(F)||p(F,L)||g(F,L)||y()}function b(F){if(Array.isArray(F))return v(F)}function T(F){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(F))return Array.from(F)}function S(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w(F){return b(F)||T(F)||g(F)||S()}var N=o("a352"),I=o.n(N);function R(F){F.parentElement!==null&&F.parentElement.removeChild(F)}function U(F,L,G){var te=G===0?F.children[0]:F.children[G-1].nextSibling;F.insertBefore(L,te)}var $=o("dbf1");o("13d5"),o("4fad"),o("ac1f"),o("5319");function z(F){var L=Object.create(null);return function(te){var _e=L[te];return _e||(L[te]=F(te))}}var j=/-(\w)/g,B=z(function(F){return F.replace(j,function(L,G){return G.toUpperCase()})});o("5db7"),o("73d9");var he=["Start","Add","Remove","Update","End"],Y=["Choose","Unchoose","Sort","Filter","Clone"],oe=["Move"],me=[oe,he,Y].flatMap(function(F){return F}).map(function(F){return"on".concat(F)}),Ke={manage:oe,manageAndEmit:he,emit:Y};function re(F){return me.indexOf(F)!==-1}o("caad"),o("2ca0");var de=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function ye(F){return de.includes(F)}function Se(F){return["transition-group","TransitionGroup"].includes(F)}function k(F){return["id","class","role","style"].includes(F)||F.startsWith("data-")||F.startsWith("aria-")||F.startsWith("on")}function X(F){return F.reduce(function(L,G){var te=m(G,2),_e=te[0],Fe=te[1];return L[_e]=Fe,L},{})}function ce(F){var L=F.$attrs,G=F.componentData,te=G===void 0?{}:G,_e=X(Object.entries(L).filter(function(Fe){var $e=m(Fe,2),Ge=$e[0];return $e[1],k(Ge)}));return d(d({},_e),te)}function ue(F){var L=F.$attrs,G=F.callBackBuilder,te=X(Ve(L));Object.entries(G).forEach(function(Fe){var $e=m(Fe,2),Ge=$e[0],mt=$e[1];Ke[Ge].forEach(function(Be){te["on".concat(Be)]=mt(Be)})});var _e="[data-draggable]".concat(te.draggable||"");return d(d({},te),{},{draggable:_e})}function Ve(F){return Object.entries(F).filter(function(L){var G=m(L,2),te=G[0];return G[1],!k(te)}).map(function(L){var G=m(L,2),te=G[0],_e=G[1];return[B(te),_e]}).filter(function(L){var G=m(L,2),te=G[0];return G[1],!re(te)})}o("c740");function ie(F,L){if(!(F instanceof L))throw new TypeError("Cannot call a class as a function")}function Ze(F,L){for(var G=0;G<L.length;G++){var te=L[G];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(F,te.key,te)}}function at(F,L,G){return L&&Ze(F.prototype,L),G&&Ze(F,G),F}var ut=function(L){var G=L.el;return G},E=function(L,G){return L.__draggable_context=G},A=function(L){return L.__draggable_context},V=function(){function F(L){var G=L.nodes,te=G.header,_e=G.default,Fe=G.footer,$e=L.root,Ge=L.realList;ie(this,F),this.defaultNodes=_e,this.children=[].concat(w(te),w(_e),w(Fe)),this.externalComponent=$e.externalComponent,this.rootTransition=$e.transition,this.tag=$e.tag,this.realList=Ge}return at(F,[{key:"render",value:function(G,te){var _e=this.tag,Fe=this.children,$e=this._isRootComponent,Ge=$e?{default:function(){return Fe}}:Fe;return G(_e,te,Ge)}},{key:"updated",value:function(){var G=this.defaultNodes,te=this.realList;G.forEach(function(_e,Fe){E(ut(_e),{element:te[Fe],index:Fe})})}},{key:"getUnderlyingVm",value:function(G){return A(G)}},{key:"getVmIndexFromDomIndex",value:function(G,te){var _e=this.defaultNodes,Fe=_e.length,$e=te.children,Ge=$e.item(G);if(Ge===null)return Fe;var mt=A(Ge);if(mt)return mt.index;if(Fe===0)return 0;var Be=ut(_e[0]),Ae=w($e).findIndex(function(Ue){return Ue===Be});return G<Ae?0:Fe}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),F}(),K=o("8bbf");function Z(F,L){var G=F[L];return G?G():[]}function ae(F){var L=F.$slots,G=F.realList,te=F.getKey,_e=G||[],Fe=["header","footer"].map(function(Ue){return Z(L,Ue)}),$e=m(Fe,2),Ge=$e[0],mt=$e[1],Be=L.item;if(!Be)throw new Error("draggable element must have an item slot");var Ae=_e.flatMap(function(Ue,ct){return Be({element:Ue,index:ct}).map(function(pt){return pt.key=te(Ue),pt.props=d(d({},pt.props||{}),{},{"data-draggable":!0}),pt})});if(Ae.length!==_e.length)throw new Error("Item slot must have only one child");return{header:Ge,footer:mt,default:Ae}}function pe(F){var L=Se(F),G=!ye(F)&&!L;return{transition:L,externalComponent:G,tag:G?Object(K.resolveComponent)(F):L?K.TransitionGroup:F}}function ne(F){var L=F.$slots,G=F.tag,te=F.realList,_e=F.getKey,Fe=ae({$slots:L,realList:te,getKey:_e}),$e=pe(G);return new V({nodes:Fe,root:$e,realList:te})}function se(F,L){var G=this;Object(K.nextTick)(function(){return G.$emit(F.toLowerCase(),L)})}function ee(F){var L=this;return function(G,te){if(L.realList!==null)return L["onDrag".concat(F)](G,te)}}function Ne(F){var L=this,G=ee.call(this,F);return function(te,_e){G.call(L,te,_e),se.call(L,F,te)}}var be=null,Re={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(L){return L}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Le=["update:modelValue","change"].concat(w([].concat(w(Ke.manageAndEmit),w(Ke.emit)).map(function(F){return F.toLowerCase()}))),qe=Object(K.defineComponent)({name:"draggable",inheritAttrs:!1,props:Re,emits:Le,data:function(){return{error:!1}},render:function(){try{this.error=!1;var L=this.$slots,G=this.$attrs,te=this.tag,_e=this.componentData,Fe=this.realList,$e=this.getKey,Ge=ne({$slots:L,tag:te,realList:Fe,getKey:$e});this.componentStructure=Ge;var mt=ce({$attrs:G,componentData:_e});return Ge.render(K.h,mt)}catch(Be){return this.error=!0,Object(K.h)("pre",{style:{color:"red"}},Be.stack)}},created:function(){this.list!==null&&this.modelValue!==null&&$.a.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted:function(){var L=this;if(!this.error){var G=this.$attrs,te=this.$el,_e=this.componentStructure;_e.updated();var Fe=ue({$attrs:G,callBackBuilder:{manageAndEmit:function(mt){return Ne.call(L,mt)},emit:function(mt){return se.bind(L,mt)},manage:function(mt){return ee.call(L,mt)}}}),$e=te.nodeType===1?te:te.parentElement;this._sortable=new I.a($e,Fe),this.targetDomElement=$e,$e.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList:function(){var L=this.list;return L||this.modelValue},getKey:function(){var L=this.itemKey;return typeof L=="function"?L:function(G){return G[L]}}},watch:{$attrs:{handler:function(L){var G=this._sortable;!G||Ve(L).forEach(function(te){var _e=m(te,2),Fe=_e[0],$e=_e[1];G.option(Fe,$e)})},deep:!0}},methods:{getUnderlyingVm:function(L){return this.componentStructure.getUnderlyingVm(L)||null},getUnderlyingPotencialDraggableComponent:function(L){return L.__draggable_component__},emitChanges:function(L){var G=this;Object(K.nextTick)(function(){return G.$emit("change",L)})},alterList:function(L){if(this.list){L(this.list);return}var G=w(this.modelValue);L(G),this.$emit("update:modelValue",G)},spliceList:function(){var L=arguments,G=function(_e){return _e.splice.apply(_e,w(L))};this.alterList(G)},updatePosition:function(L,G){var te=function(Fe){return Fe.splice(G,0,Fe.splice(L,1)[0])};this.alterList(te)},getRelatedContextFromMoveEvent:function(L){var G=L.to,te=L.related,_e=this.getUnderlyingPotencialDraggableComponent(G);if(!_e)return{component:_e};var Fe=_e.realList,$e={list:Fe,component:_e};if(G!==te&&Fe){var Ge=_e.getUnderlyingVm(te)||{};return d(d({},Ge),$e)}return $e},getVmIndexFromDomIndex:function(L){return this.componentStructure.getVmIndexFromDomIndex(L,this.targetDomElement)},onDragStart:function(L){this.context=this.getUnderlyingVm(L.item),L.item._underlying_vm_=this.clone(this.context.element),be=L.item},onDragAdd:function(L){var G=L.item._underlying_vm_;if(G!==void 0){R(L.item);var te=this.getVmIndexFromDomIndex(L.newIndex);this.spliceList(te,0,G);var _e={element:G,newIndex:te};this.emitChanges({added:_e})}},onDragRemove:function(L){if(U(this.$el,L.item,L.oldIndex),L.pullMode==="clone"){R(L.clone);return}var G=this.context,te=G.index,_e=G.element;this.spliceList(te,1);var Fe={element:_e,oldIndex:te};this.emitChanges({removed:Fe})},onDragUpdate:function(L){R(L.item),U(L.from,L.item,L.oldIndex);var G=this.context.index,te=this.getVmIndexFromDomIndex(L.newIndex);this.updatePosition(G,te);var _e={element:this.context.element,oldIndex:G,newIndex:te};this.emitChanges({moved:_e})},computeFutureIndex:function(L,G){if(!L.element)return 0;var te=w(G.to.children).filter(function(Ge){return Ge.style.display!=="none"}),_e=te.indexOf(G.related),Fe=L.component.getVmIndexFromDomIndex(_e),$e=te.indexOf(be)!==-1;return $e||!G.willInsertAfter?Fe:Fe+1},onDragMove:function(L,G){var te=this.move,_e=this.realList;if(!te||!_e)return!0;var Fe=this.getRelatedContextFromMoveEvent(L),$e=this.computeFutureIndex(Fe,L),Ge=d(d({},this.context),{},{futureIndex:$e}),mt=d(d({},L),{},{relatedContext:Fe,draggedContext:Ge});return te(mt,G)},onDragEnd:function(){be=null}}}),ht=qe;a.default=ht},fb6a:function(i,a,o){var s=o("23e7"),l=o("861d"),u=o("e8b5"),c=o("23cb"),f=o("50c4"),d=o("fc6a"),h=o("8418"),p=o("b622"),v=o("1dde"),g=o("ae40"),y=v("slice"),m=g("slice",{ACCESSORS:!0,0:0,1:2}),b=p("species"),T=[].slice,S=Math.max;s({target:"Array",proto:!0,forced:!y||!m},{slice:function(N,I){var R=d(this),U=f(R.length),$=c(N,U),z=c(I===void 0?U:I,U),j,B,he;if(u(R)&&(j=R.constructor,typeof j=="function"&&(j===Array||u(j.prototype))?j=void 0:l(j)&&(j=j[b],j===null&&(j=void 0)),j===Array||j===void 0))return T.call(R,$,z);for(B=new(j===void 0?Array:j)(S(z-$,0)),he=0;$<z;$++,he++)$ in R&&h(B,he,R[$]);return B.length=he,B}})},fc6a:function(i,a,o){var s=o("44ad"),l=o("1d80");i.exports=function(u){return s(l(u))}},fdbc:function(i,a){i.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(i,a,o){var s=o("4930");i.exports=s&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}}).default})})(sg);var BT=Ux(sg.exports);/*!
* vue-textarea-autosize v1.1.1
* (c) 2019 Saymon
* Released under the MIT License.
*/var kT={name:"TextareaAutosize",props:{value:{type:[String,Number],default:""},autosize:{type:Boolean,default:!0},minHeight:{type:[Number],default:null},maxHeight:{type:[Number],default:null},important:{type:[Boolean,Array],default:!1}},data:function(){return{val:null,maxHeightScroll:!1,height:"auto"}},computed:{computedStyles:function(){return this.autosize?{resize:this.isResizeImportant?"none !important":"none",height:this.height,overflow:this.maxHeightScroll?"auto":this.isOverflowImportant?"hidden !important":"hidden"}:{}},isResizeImportant:function(){var t=this.important;return t===!0||Array.isArray(t)&&t.includes("resize")},isOverflowImportant:function(){var t=this.important;return t===!0||Array.isArray(t)&&t.includes("overflow")},isHeightImportant:function(){var t=this.important;return t===!0||Array.isArray(t)&&t.includes("height")}},watch:{value:function(t){this.val=t},val:function(t){this.$nextTick(this.resize),this.$emit("input",t)},minHeight:function(){this.$nextTick(this.resize)},maxHeight:function(){this.$nextTick(this.resize)},autosize:function(t){t&&this.resize()}},methods:{resize:function(){var t=this,n=this.isHeightImportant?"important":"";return this.height="auto".concat(n?" !important":""),this.$nextTick(function(){var r=t.$el.scrollHeight+1;t.minHeight&&(r=r<t.minHeight?t.minHeight:r),t.maxHeight&&(r>t.maxHeight?(r=t.maxHeight,t.maxHeightScroll=!0):t.maxHeightScroll=!1);var i=r+"px";t.height="".concat(i).concat(n?" !important":"")}),this}},created:function(){this.val=this.value},mounted:function(){this.resize()}};function DT(e,t,n,r,i,a,o,s,l,u){typeof o!="boolean"&&(l=s,s=o,o=!1);var c=typeof n=="function"?n.options:n;e&&e.render&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0,i&&(c.functional=!0)),r&&(c._scopeId=r);var f;if(a?(f=function(v){v=v||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!v&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(v=__VUE_SSR_CONTEXT__),t&&t.call(this,l(v)),v&&v._registeredComponents&&v._registeredComponents.add(a)},c._ssrRegister=f):t&&(f=o?function(){t.call(this,u(this.$root.$options.shadowRoot))}:function(p){t.call(this,s(p))}),f)if(c.functional){var d=c.render;c.render=function(v,g){return f.call(g),d(v,g)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,f):[f]}return n}var GT=DT;const VT=kT;var $T=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.val,expression:"val"}],style:e.computedStyles,domProps:{value:e.val},on:{focus:e.resize,input:function(r){r.target.composing||(e.val=r.target.value)}}})},jT=[];const HT=void 0,zT=void 0,XT=void 0,WT=!1;var KT=GT({render:$T,staticRenderFns:jT},HT,VT,zT,WT,XT,void 0,void 0),YT="1.1.1",ZT=function(t){t.component("TextareaAutosize",KT)},bg={install:ZT,version:YT};typeof window!="undefined"&&window.Vue&&window.Vue.use(bg);const JT=["onSubmit"],QT={class:"field"},qT={key:0,class:"field-title"},ew=["placeholder"],tw=Ie({__name:"Text",props:{title:null,modelValue:null,textArea:{type:Boolean},placeholder:null,maxHeight:null},emits:["update:modelValue","submit"],setup(e,{emit:t}){const r=Et(e),i=J(()=>{var l;return((l=r.title)==null?void 0:l.value)&&Ye(x(r.title.value),"span")}),a=Te(null);vr(()=>{var l;(l=a.value)==null||l.focus()});const o=J({get(){return x(r.modelValue)||""},set(l){t("update:modelValue",l)}});function s(){t("submit")}return(l,u)=>(M(),W("form",{onSubmit:ln(s,["prevent"])},[P("div",QT,[x(i)?(M(),W("span",qT,[(M(),we(gt(x(i))))])):ve("",!0),e.textArea?(M(),we(x(bg),{key:1,modelValue:x(o),"onUpdate:modelValue":u[0]||(u[0]=c=>et(o)?o.value=c:null),placeholder:e.placeholder,maxHeight:e.maxHeight,onBlur:s,ref_key:"field",ref:a},null,8,["modelValue","placeholder","maxHeight"])):zo((M(),W("input",{key:2,type:"text","onUpdate:modelValue":u[1]||(u[1]=c=>et(o)?o.value=c:null),placeholder:e.placeholder,class:ze({fullWidth:!e.title}),onBlur:s,ref_key:"field",ref:a},null,42,ew)),[[Do,x(o)]])])],40,JT))}});var zf=Qe(tw,[["__scopeId","data-v-d74adb0a"]]);const nw={key:0},rw=["onClick","disabled"],iw={key:0},ow=["onClick"],aw=Ie({__name:"DangerButton",props:{disabled:{type:Boolean},skipConfirm:{type:Boolean}},emits:["click","confirmingChanged"],setup(e,{emit:t}){const r=Et(e),i=Te(!1);Dt(i,s=>{t("confirmingChanged",s)});function a(){if(x(r.skipConfirm)){t("click");return}i.value&&t("click"),i.value=!i.value}function o(){i.value=!1}return(s,l)=>(M(),W("span",{class:ze(["container",{confirming:i.value}])},[i.value?(M(),W("span",nw,"Are you sure?")):ve("",!0),P("button",{onClick:ln(a,["stop"]),class:"button danger",disabled:e.disabled},[i.value?(M(),W("span",iw,"Yes")):Mt(s.$slots,"default",{key:1},void 0,!0)],8,rw),i.value?(M(),W("button",{key:1,class:"button",onClick:ln(o,["stop"])},"No",8,ow)):ve("",!0)],2))}});var sw=Qe(aw,[["__scopeId","data-v-2f8ef34c"]]);const lw=["onClick"],uw=Ie({__name:"FeedbackButton",props:{left:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=Te(!1),r=Te(null);function i(){t("click"),r.value&&clearTimeout(r.value),n.value=!1,tn(()=>{n.value=!0,r.value=setTimeout(()=>n.value=!1,500)})}return(a,o)=>(M(),W("button",{onClick:ln(i,["stop"]),class:ze(["feedback",{activated:n.value,left:e.left}])},[Mt(a.$slots,"default",{},void 0,!0)],10,lw))}});var cw=Qe(uw,[["__scopeId","data-v-01a1b95c"]]);const Zr=e=>(hr("data-v-0136bef4"),e=e(),pr(),e),fw=Zr(()=>P("div",{class:"handle material-icons"},"drag_handle",-1)),dw={key:0,class:"actions"},hw=Zr(()=>P("span",{class:"material-icons"},"content_paste",-1)),pw=Zr(()=>P("span",{class:"material-icons"},"content_copy",-1)),vw=Zr(()=>P("span",{class:"material-icons"},"edit",-1)),mw=Zr(()=>P("span",{class:"material-icons",style:{margin:"-2px"}},"delete",-1)),gw={key:1,class:"actions"},yw=Zr(()=>P("span",{class:"material-icons"},"check",-1)),bw=Zr(()=>P("span",{class:"material-icons"},"close",-1)),xw={key:2,class:"details"},_w={class:"save-version"},Tw=Zr(()=>P("br",null,null,-1)),ww={key:0},Cw={key:3,class:"details"},Ew={key:4,class:"details error"},Iw=Zr(()=>P("br",null,null,-1)),Sw=Ie({__name:"Save",props:{save:null},emits:["export","open","duplicate","delete","editName"],setup(e,{emit:t}){const n=e,{save:r}=Et(n),i=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),a=Te(!1),o=Te(!1),s=Te("");Dt(a,()=>s.value=r.value.name||"");const l=J(()=>r.value&&r.value.id===xe.id),u=J(()=>l.value?xe.time:r.value&&r.value.time||0);function c(){t("editName",s.value),a.value=!1}return(f,d)=>(M(),W("div",{class:ze(["save",{active:x(l)}])},[fw,a.value?(M(),W("div",gw,[P("button",{onClick:c,class:"button"},[C(At,{display:"Save",direction:x(Ct).Left,class:"info"},{default:Pe(()=>[yw]),_:1},8,["direction"])]),P("button",{onClick:d[5]||(d[5]=h=>a.value=!a.value),class:"button"},[C(At,{display:"Cancel",direction:x(Ct).Left,class:"info"},{default:Pe(()=>[bw]),_:1},8,["direction"])])])):(M(),W("div",dw,[x(r).error==null&&!o.value?(M(),we(cw,{key:0,onClick:d[0]||(d[0]=h=>t("export")),class:"button",left:""},{default:Pe(()=>[C(At,{display:"Export",direction:x(Ct).Left,class:"info"},{default:Pe(()=>[hw]),_:1},8,["direction"])]),_:1})):ve("",!0),x(r).error==null&&!o.value?(M(),W("button",{key:1,onClick:d[1]||(d[1]=h=>t("duplicate")),class:"button"},[C(At,{display:"Duplicate",direction:x(Ct).Left,class:"info"},{default:Pe(()=>[pw]),_:1},8,["direction"])])):ve("",!0),x(r).error==null&&!o.value?(M(),W("button",{key:2,onClick:d[2]||(d[2]=h=>a.value=!a.value),class:"button"},[C(At,{display:"Edit Name",direction:x(Ct).Left,class:"info"},{default:Pe(()=>[vw]),_:1},8,["direction"])])):ve("",!0),C(sw,{disabled:x(l),onClick:d[3]||(d[3]=h=>t("delete")),onConfirmingChanged:d[4]||(d[4]=h=>o.value=h)},{default:Pe(()=>[C(At,{display:"Delete",direction:x(Ct).Left,class:"info"},{default:Pe(()=>[mw]),_:1},8,["direction"])]),_:1},8,["disabled"])])),x(r).error==null&&!a.value?(M(),W("div",xw,[P("button",{class:"button open",onClick:d[6]||(d[6]=h=>t("open"))},[P("h3",null,Je(x(r).name),1)]),P("span",_w,"v"+Je(x(r).modVersion),1),Tw,x(u)?(M(),W("div",ww,"Last played "+Je(x(i).format(x(u))),1)):ve("",!0)])):x(r).error==null&&a.value?(M(),W("div",Cw,[C(zf,{modelValue:s.value,"onUpdate:modelValue":d[7]||(d[7]=h=>s.value=h),class:"editname",onSubmit:c},null,8,["modelValue"])])):(M(),W("div",Ew,[le(" Error: Failed to load save with id "+Je(x(r).id),1),Iw,le(Je(x(r).error),1)]))],2))}});var Nw=Qe(Sw,[["__scopeId","data-v-0136bef4"]]);const Xf=e=>(hr("data-v-3b9991aa"),e=e(),pr(),e),Rw=Xf(()=>P("h2",null,"Saves Manager",-1)),Aw={class:"modal-footer"},Ow={class:"field"},Pw=Xf(()=>P("span",{class:"field-title"},"Create Save",-1)),Fw={class:"field-buttons"},Mw={class:"footer"},Lw=Xf(()=>P("div",{style:{"flex-grow":"1"}},null,-1)),Uw=Ie({__name:"SavesManager",setup(e,{expose:t}){const n=Te(!1),r=Te(null);t({open(){n.value=!0}});const i=Te(!1),a=Te(""),o=Te(null);Dt(a,m=>{m?tn(()=>{try{if(m[0]!=="{")if(m[0]==="e")m=decodeURIComponent(escape(atob(m)));else if(m[0]==="\u1BE1")m=li.decompressFromUTF16(m);else{console.warn("Unable to determine preset encoding",m),i.value=!0;return}const b=JSON.parse(m);if(typeof b!="object"){i.value=!0;return}const T=Qs();b.id=T,rr(b),a.value="",i.value=!1,bt.saves.push(T)}catch{i.value=!0}}):i.value=!1});let s={},l=Te(Object.keys(s).reduce((m,b)=>(m.push({label:b.split("/").slice(-1)[0].slice(0,-4),value:s[b]}),m),[]));const u=jo({});function c(m){if(u[m]==null){let b=localStorage.getItem(m);if(b==null)u[m]={error:"Save doesn't exist in localStorage",id:m};else if(b==="dW5kZWZpbmVk")u[m]={error:"Save is undefined",id:m};else try{if(b[0]!=="{")if(b[0]==="e")b=decodeURIComponent(escape(atob(b)));else if(b[0]==="\u1BE1")b=li.decompressFromUTF16(b);else return console.warn("Unable to determine preset encoding",b),i.value=!0,u[m]={error:"Unable to determine preset encoding",id:m},u[m];u[m]={...JSON.parse(b),id:m}}catch(T){u[m]={error:T,id:m},console.warn(`SavesManager: Failed to load info about save with id ${m}:
${T}
${b}`)}}return u[m]}Dt(n,m=>{m&&Object.keys(u).forEach(b=>delete u[b])});const f=J(()=>bt.saves.reduce((m,b)=>(m[b]=c(b),m),{}));function d(m){let b;switch(xe.id===m?b=$m(xe[qt]):b=JSON.stringify(f.value[m]),_t.exportEncoding){default:console.warn(`Unknown save encoding: ${_t.exportEncoding}. Defaulting to lz`);case"lz":b=li.compressToUTF16(b);break;case"base64":b=btoa(unescape(encodeURIComponent(b)));break;case"plain":break}const T=document.createElement("textarea");T.value=b,document.body.appendChild(T),T.select(),T.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(T)}function h(m){xe.id===m&&rr();const b={...f.value[m],id:Qs()};rr(b),bt.saves.push(b.id)}function p(m){bt.saves=bt.saves.filter(b=>b!==m),localStorage.removeItem(m),u[m]=void 0}function v(m){f.value[xe.id].time=xe.time,rr(),u[xe.id]=void 0,Wi(f.value[m]),u[m]=void 0}function g(m){if(o.value=m,tn(()=>{o.value=null}),m[0]!=="{")if(m[0]==="e")m=decodeURIComponent(escape(atob(m)));else if(m[0]==="\u1BE1")m=li.decompressFromUTF16(m);else{console.warn("Unable to determine preset encoding",m);return}const b=JSON.parse(m);b.id=Qs(),rr(b),bt.saves.push(b.id),v(b.id)}function y(m,b){const T=f.value[m];T&&(T.name=b,xe.id===m?(xe.name=b,rr()):(rr(T),u[m]=void 0))}return(m,b)=>(M(),we(wi,{modelValue:n.value,"onUpdate:modelValue":b[4]||(b[4]=T=>n.value=T),ref_key:"modal",ref:r},{header:Pe(()=>[Rw]),body:Pe(({shown:T})=>[T?(M(),we(x(BT),{key:0,list:x(bt).saves,handle:".handle",itemKey:S=>S},{item:Pe(({element:S})=>[C(Nw,{save:x(f)[S],onOpen:w=>v(S),onExport:w=>d(S),onEditName:w=>y(S,w),onDuplicate:w=>h(S),onDelete:w=>p(S)},null,8,["save","onOpen","onExport","onEditName","onDuplicate","onDelete"])]),_:1},8,["list","itemKey"])):ve("",!0)]),footer:Pe(()=>[P("div",Aw,[C(zf,{modelValue:a.value,"onUpdate:modelValue":b[0]||(b[0]=T=>a.value=T),title:"Import Save",placeholder:"Paste your save here!",class:ze({importingFailed:i.value})},null,8,["modelValue","class"]),P("div",Ow,[Pw,P("div",Fw,[P("button",{class:"button",onClick:b[1]||(b[1]=T=>v(x(Ro)().id))},"New Game"),Object.keys(x(l)).length>0?(M(),we(Gf,{key:0,options:x(l),modelValue:o.value,"onUpdate:modelValue":b[2]||(b[2]=T=>g(T)),closeOnSelect:"",placeholder:"Select preset",class:"presets"},null,8,["options","modelValue"])):ve("",!0)])]),P("div",Mw,[Lw,P("button",{class:"button modal-default-button",onClick:b[3]||(b[3]=T=>n.value=!1)}," Close ")])])]),_:1},8,["modelValue"]))}});var xg=Qe(Uw,[["__scopeId","data-v-3b9991aa"]]);const Hn=e=>(hr("data-v-4a3f8425"),e=e(),pr(),e),Bw=["src","alt"],kw={key:1,class:"title"},Dw=Hn(()=>P("div",{style:{"flex-grow":"1",cursor:"unset"}},null,-1)),Gw={class:"discord"},Vw={class:"discord-links"},$w={key:0},jw=["href"],Hw=Hn(()=>P("li",null,[P("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),zw=Hn(()=>P("li",null,[P("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),Xw={href:"https://forums.moddingtree.com/",target:"_blank"},Ww=Hn(()=>P("span",{class:"material-icons"},"forum",-1)),Kw=Hn(()=>P("span",{class:"material-icons"},"info",-1)),Yw=Hn(()=>P("span",{class:"material-icons"},"library_books",-1)),Zw=Hn(()=>P("span",{class:"material-icons"},"settings",-1)),Jw=Hn(()=>P("span",{class:"material-icons"},"library_books",-1)),Qw=Hn(()=>P("span",{class:"material-icons"},"settings",-1)),qw=Hn(()=>P("span",{class:"material-icons"},"info",-1)),e2={href:"https://forums.moddingtree.com/",target:"_blank"},t2=Hn(()=>P("span",{class:"material-icons"},"forum",-1)),n2={class:"discord"},r2={class:"discord-links"},i2={key:0},o2=["href"],a2=Hn(()=>P("li",null,[P("a",{href:"https://discord.gg/WzejVAx",target:"_blank"},"The Paper Pilot Community")],-1)),s2=Hn(()=>P("li",null,[P("a",{href:"https://discord.gg/F3xveHV",target:"_blank"},"The Modding Tree")],-1)),l2=Ie({__name:"Nav",setup(e){const t=Te(null),n=Te(null),r=Te(null),i=Te(null),{useHeader:a,banner:o,title:s,discordName:l,discordLink:u,versionNumber:c}=_t;function f(){window.open(u,"mywindow")}return(d,h)=>(M(),W(Oe,null,[x(a)?(M(),W("div",un({key:0,class:"nav"},d.$attrs),[x(o)?(M(),W("img",{key:0,src:x(o),class:"banner",alt:x(s)},null,8,Bw)):(M(),W("div",kw,Je(x(s)),1)),P("div",{onClick:h[0]||(h[0]=p=>{var v;return(v=i.value)==null?void 0:v.open()}),class:"version-container"},[C(At,{display:"Changelog",direction:x(Ct).Down,class:"version"},{default:Pe(()=>[P("span",null,"v"+Je(x(c)),1)]),_:1},8,["direction"])]),Dw,P("div",Gw,[P("span",{onClick:f,class:"material-icons"},"discord"),P("ul",Vw,[x(u)?(M(),W("li",$w,[P("a",{href:x(u),target:"_blank"},Je(x(l)),9,jw)])):ve("",!0),Hw,zw])]),P("div",null,[P("a",Xw,[C(At,{display:"Forums",direction:x(Ct).Down,yoffset:"5px"},{default:Pe(()=>[Ww]),_:1},8,["direction"])])]),P("div",{onClick:h[1]||(h[1]=p=>{var v;return(v=t.value)==null?void 0:v.open()})},[C(At,{display:"Info",direction:x(Ct).Down,class:"info"},{default:Pe(()=>[Kw]),_:1},8,["direction"])]),P("div",{onClick:h[2]||(h[2]=p=>{var v;return(v=n.value)==null?void 0:v.open()})},[C(At,{display:"Saves",direction:x(Ct).Down,xoffset:"-20px"},{default:Pe(()=>[Yw]),_:1},8,["direction"])]),P("div",{onClick:h[3]||(h[3]=p=>{var v;return(v=r.value)==null?void 0:v.open()})},[C(At,{display:"Options",direction:x(Ct).Down,xoffset:"-66px"},{default:Pe(()=>[Zw]),_:1},8,["direction"])])],16)):(M(),W("div",un({key:1,class:"overlay-nav"},d.$attrs),[P("div",{onClick:h[4]||(h[4]=p=>{var v;return(v=i.value)==null?void 0:v.open()}),class:"version-container"},[C(At,{display:"Changelog",direction:x(Ct).Right,xoffset:"25%",class:"version"},{default:Pe(()=>[P("span",null,"v"+Je(x(c)),1)]),_:1},8,["direction"])]),P("div",{onClick:h[5]||(h[5]=p=>{var v;return(v=n.value)==null?void 0:v.open()})},[C(At,{display:"Saves",direction:x(Ct).Right},{default:Pe(()=>[Jw]),_:1},8,["direction"])]),P("div",{onClick:h[6]||(h[6]=p=>{var v;return(v=r.value)==null?void 0:v.open()})},[C(At,{display:"Options",direction:x(Ct).Right},{default:Pe(()=>[Qw]),_:1},8,["direction"])]),P("div",{onClick:h[7]||(h[7]=p=>{var v;return(v=t.value)==null?void 0:v.open()})},[C(At,{display:"Info",direction:x(Ct).Right},{default:Pe(()=>[qw]),_:1},8,["direction"])]),P("div",null,[P("a",e2,[C(At,{display:"Forums",direction:x(Ct).Right,xoffset:"7px"},{default:Pe(()=>[t2]),_:1},8,["direction"])])]),P("div",n2,[P("span",{onClick:f,class:"material-icons"},"discord"),P("ul",r2,[x(u)?(M(),W("li",i2,[P("a",{href:x(u),target:"_blank"},Je(x(l)),9,o2)])):ve("",!0),a2,s2])])],16)),C(O_,{ref_key:"info",ref:t,changelog:i.value},null,8,["changelog"]),C(xg,{ref_key:"savesManager",ref:n},null,512),C(Q_,{ref_key:"options",ref:r},null,512),C(d_,{ref_key:"changelog",ref:i},null,512)],64))}});var _g=Qe(l2,[["__scopeId","data-v-4a3f8425"]]);const u2={class:"inner-tab"},c2=Ie({__name:"Game",setup(e){const t=Sn(xe,"tabs"),n=J(()=>Object.keys(Rn)),r=_t.useHeader;function i(a){const{display:o,minimized:s,minWidth:l,name:u,color:c,minimizable:f,nodes:d}=a;return{display:o,minimized:s,minWidth:l,name:u,color:c,minimizable:f,nodes:d}}return(a,o)=>(M(),W("div",{class:ze(["tabs-container",{useHeader:x(r)}])},[(M(!0),W(Oe,null,Rr(x(t),(s,l)=>{var u,c;return M(),W("div",{key:l,class:ze(["tab",x((u=x(Rn)[s])==null?void 0:u.classes)]),ref_for:!0,ref:`tab-${l}`,style:tt(x((c=x(Rn)[s])==null?void 0:c.style))},[l===0&&!x(r)?(M(),we(_g,{key:0})):ve("",!0),P("div",u2,[x(n).includes(s)?(M(),we(l_,un({key:0},i(x(Rn)[s]),{index:l,tab:()=>{var f;return(f=a.$refs[`tab-${l}`])==null?void 0:f[0]}}),null,16,["index","tab"])):(M(),we(gt(s),{key:1,index:l},null,8,["index"]))])],6)}),128))],2))}});var f2=Qe(c2,[["__scopeId","data-v-4cb9ce0f"]]);const d2={},h2=e=>(hr("data-v-89b4b00a"),e=e(),pr(),e),p2=h2(()=>P("svg",{id:"eaRe02fYmMp1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 228 521","shape-rendering":"geometricPrecision","text-rendering":"geometricPrecision"},[P("g",{id:"P"},[P("path",{d:"m 101,512.877 c -17.547386,-5.3519 -50.794681,-10.26296 -80,0 10.737201,-217.43031 5.7244,-300.999 0,-464.9995 0,0 46.6144,-37.1164 80,-42.00002 33.386,-4.883633 86.025,10.45942 120,50.00002 5,30 -4.353,106.6565 -44,156.0005 -34.149,42.5 -130,38.48 -130,92.999 0,102 54,208 54,208 z",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"10","stroke-linecap":"round","stroke-miterlimit":"16"},id:"trunk",class:"svg-elem-1"}),P("path",{d:"M 221,55.8775 C 209.023,126.453 185.39,166.835 158.997,191.5 93.783098,252.444 11.718998,217.436 46.999998,304.877",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine2",class:"svg-elem-2"}),P("path",{d:"m 194.5,188 c -11.225,4.447 -19.066,5.134 -35.503,3.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine4",class:"svg-elem-3"}),P("path",{d:"M 73.499996,246.5 C 111.145,245.626 127.011,238.775 156.5,228",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine3",class:"svg-elem-4"}),P("path",{d:"M 221,55.8775 C 169.5,17.8262 86.0943,44.9468 47,107 c -4.743,7.528 -7.1041,15.373 -8.326,24 -3.5282,24.91 2.4426,56.34 -12.0011,105.5",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"vine1",class:"svg-elem-5"}),P("path",{d:"M 21,47.8775 38.674,131",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine2",class:"svg-elem-6"}),P("path",{d:"m 3,326.5 c 13.1783,22.208 16.4863,42.834 21.6997,81",style:{display:"inline",fill:"none",stroke:"rgb(163, 190, 140)","stroke-width":"5","stroke-linecap":"round","stroke-miterlimit":"16"},id:"short_vine1",class:"svg-elem-7"})])],-1));function v2(e,t){return M(),we(Ti,{appear:""},{default:Pe(()=>[p2]),_:1})}var m2=Qe(d2,[["render",v2],["__scopeId","data-v-89b4b00a"]]);const En=Ie({__name:"Spacer",props:{width:{default:"8px"},height:{default:"17px"}},setup(e){return(t,n)=>(M(),W("div",{style:tt({width:e.width,height:e.height})},null,4))}});function Ga(e,t="points",n=0,r=void 0){const i=et(e)?e:Kt(e);return i.displayName=t,i.precision=n,i.small=r,i}function Tg(e){const t=Kt(e.value);return Dt(e,n=>{O.gt(n,t.value)&&(t.value=n)}),t}function g2(e){const t=Kt(e.value);return Dt(e,(n,r)=>{O.gt(n,r)&&(t.value=O.add(t.value,O.sub(n,r)))}),t}const y2=new O("10^^8"),b2=new O("1e100");function x2(e,t){const n=Te(0),r=Te(0),i=Te(0);return sn.on("update",o=>{if(r.value=0,O.lte(e.value,b2)){i.value=e.value;return}let s=e.value,l=i.value;if(i.value=s,O.gt(s,l))if(O.gte(s,y2))s=O.slog(s,1e10),l=O.slog(l,1e10),n.value=s.sub(l).div(o),r.value=-1;else for(;O.div(s,l).log(10).div(o).gte("100")&&r.value<=5&&O.gt(l,0);)s=O.log10(s),l=O.log10(l),n.value=s.sub(l).div(o),r.value++}),J(()=>r.value===0?t?kt(t.value,e.precision,e.small)+" "+e.displayName+"/s":"":kt(n.value)+" OOM"+(r.value<0?"^OOM":"^"+r.value)+"s/sec")}function zr(e,t){const n=t!=null?t:e.value;return O.eq(e.precision,0)?gn(n):kt(n,e.precision,e.small)}const _2=["x1","y1","x2","y2"],T2=Ie({__name:"Link",props:{link:null,startNode:null,endNode:null,boundingRect:null},setup(e){const n=Et(e),r=J(()=>{const a=n.startNode.value.rect,o=n.boundingRect.value,s=o?{x:a.x+a.width/2-o.x,y:a.y+a.height/2-o.y}:{x:0,y:0};return n.link.value.offsetStart&&(s.x+=n.link.value.offsetStart.x,s.y+=n.link.value.offsetStart.y),s}),i=J(()=>{const a=n.endNode.value.rect,o=n.boundingRect.value,s=o?{x:a.x+a.width/2-o.x,y:a.y+a.height/2-o.y}:{x:0,y:0};return n.link.value.offsetEnd&&(s.x+=n.link.value.offsetEnd.x,s.y+=n.link.value.offsetEnd.y),s});return(a,o)=>(M(),W("line",un({"stroke-width":"15px",stroke:"white"},e.link,{x1:x(r).x,y1:x(r).y,x2:x(i).x,y2:x(i).y}),null,16,_2))}});const w2=Ie({__name:"Links",props:{links:null},setup(e){var l;const n=Sn(e,"links"),r=Te(null),i=Kn(Bf,Te({})),a=Kn(kf,Te(void 0)),o=Te((l=r.value)==null?void 0:l.getBoundingClientRect());Dt(a,()=>{var u;return o.value=(u=r.value)==null?void 0:u.getBoundingClientRect()}),vr(()=>{var u;return o.value=(u=r.value)==null?void 0:u.getBoundingClientRect()});const s=J(()=>{var c,f;const u=i.value;return(f=(c=n.value)==null?void 0:c.filter(d=>{var h,p;return((h=u[d.startNode.id])==null?void 0:h.rect)&&((p=u[d.startNode.id])==null?void 0:p.rect)}))!=null?f:[]});return(u,c)=>(M(),W(Oe,null,[x(s)?(M(),W("svg",qp(un({key:0},u.$attrs)),[(M(!0),W(Oe,null,Rr(x(s),(f,d)=>(M(),we(T2,{key:d,link:f,boundingRect:o.value,startNode:x(i)[f.startNode.id],endNode:x(i)[f.endNode.id]},null,8,["link","boundingRect","startNode","endNode"]))),128))],16)):ve("",!0),P("div",{ref_key:"resizeListener",ref:r,class:"resize-listener"},null,512)],64))}});var wg=Qe(w2,[["__scopeId","data-v-c139d80e"]]),C2=Ie({props:{nodes:{type:q(Array),required:!0},leftSideNodes:q(Array),rightSideNodes:q(Array),branches:q(Array)},components:{Links:wg},setup(e){const{nodes:t,leftSideNodes:n,rightSideNodes:r}=Et(e),i=An();zt(()=>{const s=Ot(t);i.value=Ye(it(()=>C(Oe,null,[s.map(l=>C("span",{class:"row tree-row",style:"margin: 50px auto;"},[l.map(Er)]))])))});const a=An();zt(()=>{const s=Ot(n);a.value=s?Ye(it(()=>C("span",{class:"left-side-nodes small"},[s.map(Er)]))):""});const o=An();return zt(()=>{const s=Ot(r);o.value=s?Ye(it(()=>C("span",{class:"side-nodes small"},[s.map(Er)]))):""}),{unref:x,nodesComp:i,leftNodesComp:a,rightNodesComp:o}}});function E2(e,t,n,r,i,a){const o=wt("Links");return M(),W(Oe,null,[(M(),we(gt(e.nodesComp))),e.leftNodesComp?(M(),we(gt(e.leftNodesComp),{key:0})):ve("",!0),e.rightNodesComp?(M(),we(gt(e.rightNodesComp),{key:1})):ve("",!0),e.branches?(M(),we(o,{key:2,links:e.unref(e.branches)},null,8,["links"])):ve("",!0)],64)}var I2=Qe(C2,[["render",E2],["__scopeId","data-v-39ca96d0"]]);const S2={key:0},N2={key:0,class:"mark star"},R2=["src"],A2=Ie({__name:"MarkNode",props:{mark:{type:[Boolean,String]}},setup(e){return(t,n)=>e.mark?(M(),W("div",S2,[e.mark===!0?(M(),W("div",N2)):(M(),W("img",{key:1,class:"mark",src:e.mark},null,8,R2))])):ve("",!0)}});var Xo=Qe(A2,[["__scopeId","data-v-2207999f"]]);const O2=Ie({__name:"Node",props:{id:null},setup(e){const n=Et(e),r=Kn(Lf,()=>{}),i=Kn(Uf,()=>{}),a=Te(null),o=J(()=>a.value&&a.value.parentElement);return Dt([o,n.id],([s,l],[u,c])=>{u&&i(x(c)),s&&r(l,s)}),Ho(()=>i(x(n.id))),(s,l)=>(M(),W("div",{class:"node",ref_key:"node",ref:a},null,512))}});var Jr=Qe(O2,[["__scopeId","data-v-2cb1bb79"]]);const P2=Ie({props:{display:q(Object,String,Function),visibility:{type:q(Number),required:!0},style:q(String,Object,Array),classes:q(Object),onClick:Function,onHold:Function,color:q(String),glowColor:q(String),canClick:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Xo,Node:Jr},setup(e){const{onClick:t,onHold:n,display:r}=Et(e),i=lo(r),{start:a,stop:o}=Mf(t,n);return{start:a,stop:o,comp:i,unref:x,Visibility:nt,isCoercableComponent:Jn}}});function F2(e,t,n,r,i,a){var l;const o=wt("MarkNode"),s=wt("Node");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("div",{key:0,style:tt({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:ze({treeNode:!0,can:e.unref(e.canClick),...e.unref(e.classes)}),onClick:t[0]||(t[0]=(...u)=>e.onClick&&e.onClick(...u)),onMousedown:t[1]||(t[1]=(...u)=>e.start&&e.start(...u)),onMouseleave:t[2]||(t[2]=(...u)=>e.stop&&e.stop(...u)),onMouseup:t[3]||(t[3]=(...u)=>e.stop&&e.stop(...u)),onTouchstartPassive:t[4]||(t[4]=(...u)=>e.start&&e.start(...u)),onTouchendPassive:t[5]||(t[5]=(...u)=>e.stop&&e.stop(...u)),onTouchcancelPassive:t[6]||(t[6]=(...u)=>e.stop&&e.stop(...u))},[P("div",{style:tt([{backgroundColor:e.unref(e.color),boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 20px ${e.unref(e.glowColor)}`},(l=e.unref(e.style))!=null?l:[]])},[(M(),we(gt(e.unref(e.comp))))],4),C(o,{mark:e.unref(e.mark)},null,8,["mark"]),C(s,{id:e.id},null,8,["id"])],38)):ve("",!0)}var M2=Qe(P2,[["render",F2],["__scopeId","data-v-1c0c107d"]]);const L2=Symbol("TreeNode"),U2=Symbol("Tree");function Ra(e){return an(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=_n("treeNode-"),t.type=L2,t[Jt]=M2,H(t,"visibility"),ft(t,"visibility",nt.Visible),H(t,"canClick"),ft(t,"canClick",!0),H(t,"color"),H(t,"display"),H(t,"glowColor"),H(t,"classes"),H(t,"style"),H(t,"mark"),t.onClick){const r=t.onClick.bind(t);t.onClick=function(){x(t.canClick)&&r()}}if(t.onHold){const r=t.onHold.bind(t);t.onHold=function(){x(t.canClick)&&r()}}return t[nn]=function(){const{display:r,visibility:i,style:a,classes:o,onClick:s,onHold:l,color:u,glowColor:c,canClick:f,mark:d,id:h}=this;return{display:r,visibility:i,style:a,classes:o,onClick:s,onHold:l,color:u,glowColor:c,canClick:f,mark:d,id:h}},t})}function Cg(e){return an(()=>{const t=e();return t.id=_n("tree-"),t.type=U2,t[Jt]=I2,t.isResetting=Te(!1),t.resettingNode=An(null),t.reset=function(n){var i,a;const r=t;r.isResetting.value=!0,r.resettingNode.value=n,(i=r.resetPropagation)==null||i.call(r,r,n),(a=r.onReset)==null||a.call(r,n),r.isResetting.value=!1,r.resettingNode.value=null},t.links=J(()=>{var r;return(r=x(t.branches))!=null?r:[]}),H(t,"visibility"),ft(t,"visibility",nt.Visible),H(t,"nodes"),H(t,"leftSideNodes"),H(t,"rightSideNodes"),H(t,"branches"),t[nn]=function(){const{nodes:n,leftSideNodes:r,rightSideNodes:i,branches:a}=this;return{nodes:n,leftSideNodes:r,rightSideNodes:i,branches:a}},t})}const B2=function(e,t){const n=[t];let r=[t];if(e.branches!=null){const i=x(e.branches);for(;r.length>0;){const a=[];r.forEach(o=>{i.filter(s=>s.startNode===o||s.endNode===o).map(s=>s.startNode===o?s.endNode:s.startNode).filter(s=>!n.includes(s)).forEach(s=>{var l;a.includes(s)||(a.push(s),(l=s.reset)==null||l.reset())})}),r=a,n.push(...r)}}};function Eg(e,t=null,n=0){const r=Zn(n);return J(()=>t==null||O.gte(e.value,x(r))?zr(e)+" "+e.displayName:`Reach ${O.eq(t.precision,0)?gn(x(r)):kt(x(r),t.precision)} ${t.displayName} to unlock (You have ${O.eq(t.precision,0)?gn(t.value):kt(t.value,t.precision)})`)}const k2=Ie({props:{visibility:{type:q(Number),required:!0},display:q(Object,String,Function),earned:{type:q(Boolean),required:!0},image:q(String),style:q(String,Object,Array),classes:q(Object),mark:q(Boolean,String),id:{type:String,required:!0}},components:{Node:Jr,MarkNode:Xo},setup(e){const{display:t}=Et(e);return{component:lo(t),unref:x,Visibility:nt}}});function D2(e,t,n,r,i,a){var l;const o=wt("MarkNode"),s=wt("Node");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("div",{key:0,style:tt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0,backgroundImage:e.earned&&e.image&&`url(${e.image})`||""},(l=e.unref(e.style))!=null?l:[]]),class:ze({feature:!0,achievement:!0,locked:!e.unref(e.earned),bought:e.unref(e.earned),...e.unref(e.classes)})},[e.component?(M(),we(gt(e.component),{key:0})):ve("",!0),C(o,{mark:e.unref(e.mark)},null,8,["mark"]),C(s,{id:e.id},null,8,["id"])],6)):ve("",!0)}var G2=Qe(k2,[["render",D2],["__scopeId","data-v-58163dab"]]),V2=Object.defineProperty,Rh=Object.getOwnPropertySymbols,$2=Object.prototype.hasOwnProperty,j2=Object.prototype.propertyIsEnumerable,Ah=(e,t,n)=>t in e?V2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ig=(e,t)=>{for(var n in t||(t={}))$2.call(t,n)&&Ah(e,n,t[n]);if(Rh)for(var n of Rh(t))j2.call(t,n)&&Ah(e,n,t[n]);return e},eu=e=>typeof e=="function",tu=e=>typeof e=="string",Sg=e=>tu(e)&&e.trim().length>0,H2=e=>typeof e=="number",Ki=e=>typeof e=="undefined",Va=e=>typeof e=="object"&&e!==null,z2=e=>Sr(e,"tag")&&Sg(e.tag),Ng=e=>window.TouchEvent&&e instanceof TouchEvent,Rg=e=>Sr(e,"component")&&Ag(e.component),X2=e=>eu(e)||Va(e),Ag=e=>!Ki(e)&&(tu(e)||X2(e)||Rg(e)),Oh=e=>Va(e)&&["height","width","right","left","top","bottom"].every(t=>H2(e[t])),Sr=(e,t)=>(Va(e)||eu(e))&&t in e,W2=(e=>()=>e++)(0);function Ou(e){return Ng(e)?e.targetTouches[0].clientX:e.clientX}function Ph(e){return Ng(e)?e.targetTouches[0].clientY:e.clientY}var K2=e=>{Ki(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},cs=e=>Rg(e)?cs(e.component):z2(e)?Ie({render(){return e}}):typeof e=="string"?e:ot(x(e)),Y2=e=>{if(typeof e=="string")return e;const t=Sr(e,"props")&&Va(e.props)?e.props:{},n=Sr(e,"listeners")&&Va(e.listeners)?e.listeners:{};return{component:cs(e),props:t,listeners:n}},Z2=()=>typeof window!="undefined",Wf=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,t){const n=this.getHandlers(e);n.push(t),this.allHandlers[e]=n}off(e,t){const n=this.getHandlers(e);n.splice(n.indexOf(t)>>>0,1)}emit(e,t){this.getHandlers(e).forEach(r=>r(t))}},J2=e=>["on","off","emit"].every(t=>Sr(e,t)&&eu(e[t])),kn;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(kn||(kn={}));var Il;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(Il||(Il={}));var Dn;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(Dn||(Dn={}));var lr="Vue-Toastification",ar={type:{type:String,default:kn.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Og={type:ar.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},ol={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:ar.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},Ac={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Pg={transition:{type:[Object,String],default:`${lr}__bounce`}},Q2={position:{type:String,default:Il.TOP_RIGHT},draggable:ar.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:ar.trueBoolean,pauseOnHover:ar.trueBoolean,closeOnClick:ar.trueBoolean,timeout:Ac.timeout,hideProgressBar:Ac.hideProgressBar,toastClassName:ar.classNames,bodyClassName:ar.classNames,icon:Og.customIcon,closeButton:ol.component,closeButtonClassName:ol.classNames,showCloseButtonOnHover:ol.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Wf}},q2={id:{type:[String,Number],required:!0,default:0},type:ar.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},eC={container:{type:[Object,Function],default:()=>document.body},newestOnTop:ar.trueBoolean,maxToasts:{type:Number,default:20},transition:Pg.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:ar.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},$r={CORE_TOAST:Q2,TOAST:q2,CONTAINER:eC,PROGRESS_BAR:Ac,ICON:Og,TRANSITION:Pg,CLOSE_BUTTON:ol},Fg=Ie({name:"VtProgressBar",props:$r.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${lr}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function tC(e,t){return M(),W("div",{style:tt(e.style),class:ze(e.cpClass)},null,6)}Fg.render=tC;var nC=Fg,Mg=Ie({name:"VtCloseButton",props:$r.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?cs(this.component):"button"},classes(){const e=[`${lr}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),rC=le(" \xD7 ");function iC(e,t){return M(),we(gt(e.buttonComponent),un({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:Pe(()=>[rC]),_:1},16,["aria-label","class"])}Mg.render=iC;var oC=Mg,Lg={},aC={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},sC=P("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),lC=[sC];function uC(e,t){return M(),W("svg",aC,lC)}Lg.render=uC;var cC=Lg,Ug={},fC={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},dC=P("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),hC=[dC];function pC(e,t){return M(),W("svg",fC,hC)}Ug.render=pC;var Fh=Ug,Bg={},vC={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},mC=P("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),gC=[mC];function yC(e,t){return M(),W("svg",vC,gC)}Bg.render=yC;var bC=Bg,kg={},xC={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},_C=P("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),TC=[_C];function wC(e,t){return M(),W("svg",xC,TC)}kg.render=wC;var CC=kg,Dg=Ie({name:"VtIcon",props:$r.ICON,computed:{customIconChildren(){return Sr(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return tu(this.customIcon)?this.trimValue(this.customIcon):Sr(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Sr(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:Ag(this.customIcon)?cs(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[kn.DEFAULT]:Fh,[kn.INFO]:Fh,[kn.SUCCESS]:cC,[kn.ERROR]:CC,[kn.WARNING]:bC}[this.type]},iconClasses(){const e=[`${lr}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=""){return Sg(e)?e.trim():t}}});function EC(e,t){return M(),we(gt(e.component),{class:ze(e.iconClasses)},{default:Pe(()=>[le(Je(e.customIconChildren),1)]),_:1},8,["class"])}Dg.render=EC;var IC=Dg,Gg=Ie({name:"VtToast",components:{ProgressBar:nC,CloseButton:oC,Icon:IC},inheritAttrs:!1,props:Object.assign({},$r.CORE_TOAST,$r.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${lr}__toast`,`${lr}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${lr}__toast--rtl`),e},bodyClasses(){return[`${lr}__toast-${tu(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return Oh(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Sr,getVueComponentFromObj:cs,closeToast(){this.eventBus.emit(Dn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:Ou(e),y:Ph(e)},this.dragStart=Ou(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Ou(e),y:Ph(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Oh(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),SC=["role"];function NC(e,t){const n=wt("Icon"),r=wt("CloseButton"),i=wt("ProgressBar");return M(),W("div",{class:ze(e.classes),style:tt(e.draggableStyle),onClick:t[0]||(t[0]=(...a)=>e.clickHandler&&e.clickHandler(...a)),onMouseenter:t[1]||(t[1]=(...a)=>e.hoverPause&&e.hoverPause(...a)),onMouseleave:t[2]||(t[2]=(...a)=>e.hoverPlay&&e.hoverPlay(...a))},[e.icon?(M(),we(n,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):ve("v-if",!0),P("div",{role:e.accessibility.toastRole||"alert",class:ze(e.bodyClasses)},[typeof e.content=="string"?(M(),W(Oe,{key:0},[le(Je(e.content),1)],2112)):(M(),we(gt(e.getVueComponentFromObj(e.content)),un({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},Vv(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,SC),e.closeButton?(M(),we(r,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:ln(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):ve("v-if",!0),e.timeout?(M(),we(i,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):ve("v-if",!0)],38)}Gg.render=NC;var RC=Gg,Vg=Ie({name:"VtTransition",props:$r.TRANSITION,emits:["leave"],methods:{hasProp:Sr,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function AC(e,t){return M(),we(wm,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:Pe(()=>[Mt(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}Vg.render=AC;var OC=Vg,$g=Ie({name:"VueToastification",devtools:{hide:!0},components:{Toast:RC,VtTransition:OC},props:Object.assign({},$r.CORE_TOAST,$r.CONTAINER,$r.TRANSITION),data(){return{count:0,positions:Object.values(Il),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(Dn.ADD,this.addToast),e.on(Dn.CLEAR,this.clearToasts),e.on(Dn.DISMISS,this.dismissToast),e.on(Dn.UPDATE,this.updateToast),e.on(Dn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){eu(e)&&(e=await e()),K2(this.$el),e.appendChild(this.$el)},setToast(e){Ki(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=Y2(e.content);const t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),n=this.defaults.filterBeforeCreate(t,this.toastArray);n&&this.setToast(n)},dismissToast(e){const t=this.toasts[e];!Ki(t)&&!Ki(t.onClose)&&t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const t=this.filteredToasts.filter(n=>n.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){Ki(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:n}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):n&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){return[`${lr}__container`,e].concat(this.defaults.containerClassName)}}});function PC(e,t){const n=wt("Toast"),r=wt("VtTransition");return M(),W("div",null,[(M(!0),W(Oe,null,Rr(e.positions,i=>(M(),W("div",{key:i},[C(r,{transition:e.defaults.transition,class:ze(e.getClasses(i))},{default:Pe(()=>[(M(!0),W(Oe,null,Rr(e.getPositionToasts(i),a=>(M(),we(n,un({key:a.id},a),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}$g.render=PC;var FC=$g,Mh=(e={},t=!0)=>{const n=e.eventBus=e.eventBus||new Wf;t&&tn(()=>{const a=Pf(FC,Ig({},e)),o=a.mount(document.createElement("div")),s=e.onMounted;if(Ki(s)||s(o,a),e.shareAppContext){const l=e.shareAppContext;l===!0?console.warn(`[${lr}] App to share context with was not provided.`):(a._context.components=l._context.components,a._context.directives=l._context.directives,a._context.mixins=l._context.mixins,a._context.provides=l._context.provides,a.config.globalProperties=l.config.globalProperties)}});const r=(a,o)=>{const s=Object.assign({},{id:W2(),type:kn.DEFAULT},o,{content:a});return n.emit(Dn.ADD,s),s.id};r.clear=()=>n.emit(Dn.CLEAR,void 0),r.updateDefaults=a=>{n.emit(Dn.UPDATE_DEFAULTS,a)},r.dismiss=a=>{n.emit(Dn.DISMISS,a)};function i(a,{content:o,options:s},l=!1){const u=Object.assign({},s,{content:o});n.emit(Dn.UPDATE,{id:a,options:u,create:l})}return r.update=i,r.success=(a,o)=>r(a,Object.assign({},o,{type:kn.SUCCESS})),r.info=(a,o)=>r(a,Object.assign({},o,{type:kn.INFO})),r.error=(a,o)=>r(a,Object.assign({},o,{type:kn.ERROR})),r.warning=(a,o)=>r(a,Object.assign({},o,{type:kn.WARNING})),r},MC=()=>{const e=()=>console.warn(`[${lr}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function Oc(e){return Z2()?J2(e)?Mh({eventBus:e},!1):Mh(e,!0):MC()}var jg=Symbol("VueToastification"),Hg=new Wf,LC=(e,t)=>{(t==null?void 0:t.shareAppContext)===!0&&(t.shareAppContext=e);const n=Oc(Ig({eventBus:Hg},t));e.provide(jg,n)},Kf=e=>{if(e)return Oc(e);const t=Fr()?Kn(jg,void 0):void 0;return t||Oc(Hg)},UC=LC;sn.on("setupVue",e=>e.use(UC));function Yf(e="white",t="8px"){return{transform:"scale(1.05, 1.05)",borderColor:"rgba(0, 0, 0, 0.125)",boxShadow:`-4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0 0 ${t} ${e}`,zIndex:1}}function BC(){return Yf("red","20px")}const kC=Kf(),DC=Symbol("Achievement");function Pu(e){const t=Kt(!1);return an(()=>{var r;const n=(r=e==null?void 0:e())!=null?r:{};if(n.id=_n("achievement-"),n.type=DC,n[Jt]=G2,n.earned=t,n.complete=function(){t.value=!0},H(n,"visibility"),ft(n,"visibility",nt.Visible),H(n,"display"),H(n,"mark"),H(n,"image"),H(n,"style"),H(n,"classes"),n[nn]=function(){const{visibility:i,display:a,earned:o,image:s,style:l,classes:u,mark:c,id:f}=this;return{visibility:i,display:a,earned:o,image:s,style:x(l),classes:u,mark:c,id:f}},n.shouldEarn){const i=n;zt(()=>{var a,o;if(bt.active===xe.id&&!i.earned.value&&x(i.visibility)===nt.Visible&&((a=i.shouldEarn)==null?void 0:a.call(i))&&(i.earned.value=!0,(o=i.onComplete)==null||o.call(i),i.display)){const s=Ye(x(i.display));kC.info(C("div",null,[C("h3",null,[le("Achievement earned!")]),C("div",null,[C(s,null,null)])]))}})}return n})}const GC=Ie({props:{visibility:{type:q(Number),required:!0},onClick:Function,onHold:Function,display:{type:q(Object,String,Function),required:!0},title:q(Object,String,Function),style:q(String,Object,Array),canClick:{type:q(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Jr},setup(e){const{onClick:t,onHold:n,title:r,display:i}=Et(e),{start:a,stop:o}=Mf(t,n),s=lo(r),l=Vo(i);return{start:a,stop:o,titleComponent:s,component:l,Visibility:nt,unref:x}}}),VC={key:0};function $C(e,t,n,r,i,a){var s;const o=wt("Node");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("button",{key:0,class:ze({feature:!0,tile:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick)}),style:tt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(s=e.unref(e.style))!=null?s:{}]),onClick:t[0]||(t[0]=(...l)=>e.onClick&&e.onClick(...l)),onMousedown:t[1]||(t[1]=(...l)=>e.start&&e.start(...l)),onMouseleave:t[2]||(t[2]=(...l)=>e.stop&&e.stop(...l)),onMouseup:t[3]||(t[3]=(...l)=>e.stop&&e.stop(...l)),onTouchstartPassive:t[4]||(t[4]=(...l)=>e.start&&e.start(...l)),onTouchendPassive:t[5]||(t[5]=(...l)=>e.stop&&e.stop(...l)),onTouchcancelPassive:t[6]||(t[6]=(...l)=>e.stop&&e.stop(...l))},[e.title?(M(),W("div",VC,[(M(),we(gt(e.titleComponent)))])):ve("",!0),(M(),we(gt(e.component),{style:{"white-space":"pre-line"}})),C(o,{id:e.id},null,8,["id"])],38)):ve("",!0)}var jC=Qe(GC,[["render",$C],["__scopeId","data-v-26ac0e82"]]);const HC=Ie({props:{visibility:{type:q(Number),required:!0},rows:{type:q(Number),required:!0},cols:{type:q(Number),required:!0},cells:{type:q(Object),required:!0}},components:{GridCell:jC},setup(){const e=J(()=>Kr[bt.theme].mergeAdjacent);function t(n){const{visibility:r,onClick:i,onHold:a,display:o,title:s,style:l,canClick:u,id:c}=n;return{visibility:r,onClick:i,onHold:a,display:o,title:s,style:l,canClick:u,id:c}}return{unref:x,gatherCellProps:t,Visibility:nt,mergeAdjacent:e}}});function zC(e,t,n,r,i,a){const o=wt("GridCell");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("div",{key:0,style:tt({visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0}),class:"table"},[(M(!0),W(Oe,null,Rr(e.unref(e.rows),s=>(M(),W("div",{class:ze(["row",{mergeAdjacent:e.mergeAdjacent}]),key:s},[(M(!0),W(Oe,null,Rr(e.unref(e.cols),l=>(M(),we(o,un({key:l},e.gatherCellProps(e.unref(e.cells)[s*100+l])),null,16))),128))],2))),128))],4)):ve("",!0)}var XC=Qe(HC,[["render",zC]]);function WC(e){return new Proxy({},KC(e))}function KC(e){const t=J(()=>{const n=[];for(let r=1;r<=x(e.rows);r++)for(let i=1;i<=x(e.cols);i++)n.push((r*100+i).toString());return n});return{get(n,r){if(r==="isProxy")return!0;if(typeof r=="symbol")return e[r];if(!!t.value.includes(r.toString()))return n[r]==null&&(n[r]=new Proxy(e,YC(r.toString()))),n[r]},set(n,r,i){return console.warn("Cannot set grid cells",n,r,i),!1},ownKeys(){return t.value},has(n,r){return t.value.includes(r.toString())},getOwnPropertyDescriptor(n,r){if(t.value.includes(r.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function YC(e){const t=["id","visibility","canClick","startState","state","style","classes","title","display","onClick","onHold"],n={};return{get(r,i,a){if(i==="isProxy")return!0;let o=r[i];return Xi(o)?()=>o.call(a,e,r.getState(e)):o!=null||typeof i=="symbol"?o:(i=i.slice(0,1).toUpperCase()+i.slice(1),i==="startState"?o.call(a,e):(o=r[`get${i}`],Xi(o)?(i in n||(n[i]=J(()=>o.call(a,e,r.getState(e)))),n[i].value):o!=null?x(o):(o=r[`on${i}`],Xi(o)?()=>o.call(a,e,r.getState(e)):o!=null?o:r[i])))},set(r,i,a,o){return i=`set${i.slice(0,1).toUpperCase()+i.slice(1)}`,i in r&&Xi(r[i])&&r[i].length<3?(r[i].call(o,e,a),!0):(console.warn(`No setter for "${i}".`,r),!1)},ownKeys(){return t},has(r,i){return t.includes(i.toString())},getOwnPropertyDescriptor(r,i){if(t.includes(i.toString()))return{configurable:!0,enumerable:!0,writable:!1}}}}function ZC(e){const t=Kt({});return an(()=>{const n=e();if(n.id=_n("grid-"),n[Jt]=XC,n.cellState=t,n.getID=function(r){return n.id+"-"+r},n.getState=function(r){return this.cellState.value[r]!=null?t.value[r]:this.cells[r].startState},n.setState=function(r,i){t.value[r]=i},n.cells=WC(n),H(n,"visibility"),ft(n,"visibility",nt.Visible),H(n,"rows"),H(n,"cols"),H(n,"getVisibility"),ft(n,"getVisibility",nt.Visible),H(n,"getCanClick"),ft(n,"getCanClick",!0),H(n,"getStartState"),H(n,"getStyle"),H(n,"getClasses"),H(n,"getTitle"),H(n,"getDisplay"),n.onClick){const r=n.onClick.bind(n);n.onClick=function(i,a){x(n.cells[i].canClick)&&r(i,a)}}if(n.onHold){const r=n.onHold.bind(n);n.onHold=function(i,a){x(n.cells[i].canClick)&&r(i,a)}}return n[nn]=function(){const{visibility:r,rows:i,cols:a,cells:o,id:s}=this;return{visibility:r,rows:i,cols:a,cells:o,id:s}},n})}var JC=Ie({props:{display:{type:q(Object,String,Function),required:!0},visibility:{type:q(Number),required:!0},style:q(Object,String,Array),classes:q(Object),onClick:Function,onHold:Function,canClick:{type:q(Boolean),required:!0},small:Boolean,mark:q(Boolean,String),id:{type:String,required:!0}},components:{Node:Jr,MarkNode:Xo},setup(e){const{display:t,onClick:n,onHold:r}=Et(e),i=An("");zt(()=>{const s=Ot(t);if(s==null){i.value="";return}if(Jn(s)){i.value=Ye(s);return}const l=Ye(s.title||"","h3"),u=Ye(s.description,"div");i.value=Ye(it(()=>C("span",null,[s.title?C("div",null,[C(l,null,null)]):null,C(u,null,null)])))});const{start:a,stop:o}=Mf(n,r);return{start:a,stop:o,comp:i,Visibility:nt,unref:x}}});function QC(e,t,n,r,i,a){var l;const o=wt("MarkNode"),s=wt("Node");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("button",{key:0,style:tt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(l=e.unref(e.style))!=null?l:[]]),onClick:t[0]||(t[0]=(...u)=>e.onClick&&e.onClick(...u)),onMousedown:t[1]||(t[1]=(...u)=>e.start&&e.start(...u)),onMouseleave:t[2]||(t[2]=(...u)=>e.stop&&e.stop(...u)),onMouseup:t[3]||(t[3]=(...u)=>e.stop&&e.stop(...u)),onTouchstartPassive:t[4]||(t[4]=(...u)=>e.start&&e.start(...u)),onTouchendPassive:t[5]||(t[5]=(...u)=>e.stop&&e.stop(...u)),onTouchcancelPassive:t[6]||(t[6]=(...u)=>e.stop&&e.stop(...u)),class:ze({feature:!0,clickable:!0,can:e.unref(e.canClick),locked:!e.unref(e.canClick),small:e.small,...e.unref(e.classes)})},[e.unref(e.comp)?(M(),we(gt(e.unref(e.comp)),{key:0})):ve("",!0),C(o,{mark:e.unref(e.mark)},null,8,["mark"]),C(s,{id:e.id},null,8,["id"])],38)):ve("",!0)}var zg=Qe(JC,[["render",QC],["__scopeId","data-v-5e7c90cf"]]);const qC=Symbol("Clickable");function $a(e){return an(()=>{var n;const t=(n=e==null?void 0:e())!=null?n:{};if(t.id=_n("clickable-"),t.type=qC,t[Jt]=zg,H(t,"visibility"),ft(t,"visibility",nt.Visible),H(t,"canClick"),ft(t,"canClick",!0),H(t,"classes"),H(t,"style"),H(t,"mark"),H(t,"display"),t.onClick){const r=t.onClick.bind(t);t.onClick=function(i){x(t.canClick)&&r(i)}}if(t.onHold){const r=t.onHold.bind(t);t.onHold=function(){x(t.canClick)&&r()}}return t[nn]=function(){const{display:r,visibility:i,style:a,classes:o,onClick:s,onHold:l,canClick:u,small:c,mark:f,id:d}=this;return{display:r,visibility:i,style:x(a),classes:o,onClick:s,onHold:l,canClick:u,small:c,mark:f,id:d}},t})}function Xg(e){return $a(()=>{const t=e();H(t,"showNextAt"),ft(t,"showNextAt",!0),ft(t,"minimumGain",1),t.resetDescription==null?t.resetDescription=J(()=>O.lt(t.conversion.gainResource.value,1e3)?"Reset for ":""):H(t,"resetDescription"),t.display==null&&(t.display=it(()=>C("span",null,[x(t.resetDescription),C("b",null,[zr(t.conversion.gainResource,O.max(x(t.conversion.actualGain),x(t.minimumGain)))])," ",t.conversion.gainResource.displayName,x(t.showNextAt)?C("div",null,[C("br",null,null),x(t.conversion.buyMax)?"Next:":"Req:"," ",zr(t.conversion.baseResource,x(t.conversion.buyMax)||O.floor(x(t.conversion.actualGain)).neq(1)?x(t.conversion.nextAt):x(t.conversion.currentAt))," ",t.conversion.baseResource.displayName]):null]))),t.canClick==null&&(t.canClick=J(()=>O.gte(x(t.conversion.actualGain),x(t.minimumGain))));const n=t.onClick;return t.onClick=function(){!x(t.canClick)||(t.conversion.convert(),t.tree.reset(t.treeNode),t.resetTime&&(t.resetTime.value=t.resetTime[Da]),n==null||n())},t})}function Wg(e){return Ra(()=>{const t=e();return H(t,"display"),ft(t,"display",t.layerID),H(t,"append"),{...t,display:t.display,onClick:x(t.append)?function(){if(xe.tabs.includes(t.layerID)){const n=xe.tabs.lastIndexOf(t.layerID);xe.tabs.splice(n,1)}else xe.tabs.push(t.layerID)}:function(){xe.tabs.splice(1,1,t.layerID)}}})}function Kg(e){return an(()=>{const t=e();return t.currentGain==null&&(t.currentGain=J(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=O.floor(n).max(0),x(t.buyMax)||(n=n.min(1)),n})),t.actualGain==null&&(t.actualGain=t.currentGain),t.currentAt==null&&(t.currentAt=J(()=>{let n=t.scaling.currentAt(t);return t.roundUpCost&&(n=O.ceil(n)),n})),t.nextAt==null&&(t.nextAt=J(()=>{let n=t.scaling.nextAt(t);return t.roundUpCost&&(n=O.ceil(n)),n})),t.convert==null&&(t.convert=function(){var r;const n=x(t.currentGain);t.gainResource.value=O.add(t.gainResource.value,n),t.spend(n),(r=t.onConvert)==null||r.call(t,n)}),t.spend==null&&(t.spend=function(){t.baseResource.value=0}),H(t,"currentGain"),H(t,"actualGain"),H(t,"currentAt"),H(t,"nextAt"),H(t,"buyMax"),ft(t,"buyMax",!0),H(t,"roundUpCost"),ft(t,"roundUpCost",!0),t})}function Yg(e,t){const n=Zn(e),r=Zn(t);return{currentGain(i){let a=x(i.baseResource.value);if(i.costModifier&&(a=i.costModifier.apply(a)),O.lt(a,x(n)))return 0;const o=O.div(a,x(n)).pow(x(r));return o.isNan()?new O(0):o},currentAt(i){let a=x(i.currentGain);return i.gainModifier&&(a=i.gainModifier.revert(a)),a=O.max(0,a).root(x(r)).times(x(n)),i.costModifier&&(a=i.costModifier.revert(a)),a},nextAt(i){let a=O.add(x(i.currentGain),1).floor();return i.gainModifier&&(a=i.gainModifier.revert(a)),a=O.max(0,a).root(x(r)).times(x(n)).max(x(n)),i.costModifier&&(a=i.costModifier.revert(a)),a}}}function eE(e){return Kg(e)}function tE(e){return Kg(()=>{const t=e();return ft(t,"buyMax",!1),t.currentGain==null&&(t.currentGain=J(()=>{let n=t.gainModifier?t.gainModifier.apply(t.scaling.currentGain(t)):t.scaling.currentGain(t);return n=O.floor(n).max(t.gainResource.value),x(t.buyMax)||(n=n.min(O.add(t.gainResource.value,1))),n})),t.actualGain==null&&(t.actualGain=J(()=>{let n=O.sub(O.floor(t.scaling.currentGain(t)),t.gainResource.value).max(0);return x(t.buyMax)||(n=n.min(1)),n})),ft(t,"convert",function(){var r;const n=x(t.actualGain);t.gainResource.value=t.gainModifier?t.gainModifier.apply(x(t.currentGain)):x(t.currentGain),t.spend(n),(r=t.onConvert)==null||r.call(t,n)}),t})}function nE(e,t,n=.5){return O.lte(e,t)?e:O.pow(e,n).times(O.pow(t,O.sub(1,n)))}function rE(e,t,n=.5){return{...e,currentGain:r=>nE(e.currentGain(r),x(t),x(n))}}const iE={name:"CollapseTransition",props:{name:{type:String,required:!1,default:"collapse"},dimension:{type:String,required:!1,default:"height",validator:e=>["height","width"].includes(e)},duration:{type:Number,required:!1,default:300},easing:{type:String,required:!1,default:"ease-in-out"}},watch:{dimension(){this.clearCachedDimensions()}},data(){return{cachedStyles:null}},computed:{transition(){let e=[];return Object.keys(this.cachedStyles).forEach(t=>{e.push(`${this.convertToCssProperty(t)} ${this.duration}ms ${this.easing}`)}),e.join(", ")}},methods:{beforeAppear(e){this.$emit("before-appear",e)},appear(e){this.$emit("appear",e)},afterAppear(e){this.$emit("after-appear",e)},appearCancelled(e){this.$emit("appear-cancelled",e)},beforeEnter(e){this.$emit("before-enter",e)},enter(e,t){this.detectAndCacheDimensions(e),this.setClosedDimensions(e),this.hideOverflow(e),this.forceRepaint(e),this.setTransition(e),this.setOpenedDimensions(e),this.$emit("enter",e,t),setTimeout(t,this.duration)},afterEnter(e){this.unsetOverflow(e),this.unsetTransition(e),this.unsetDimensions(e),this.clearCachedDimensions(),this.$emit("after-enter",e)},enterCancelled(e){this.$emit("enter-cancelled",e)},beforeLeave(e){this.$emit("before-leave",e)},leave(e,t){this.detectAndCacheDimensions(e),this.setOpenedDimensions(e),this.hideOverflow(e),this.forceRepaint(e),this.setTransition(e),this.setClosedDimensions(e),this.$emit("leave",e,t),setTimeout(t,this.duration)},afterLeave(e){this.unsetOverflow(e),this.unsetTransition(e),this.unsetDimensions(e),this.clearCachedDimensions(),this.$emit("after-leave",e)},leaveCancelled(e){this.$emit("leave-cancelled",e)},detectAndCacheDimensions(e){if(this.cachedStyles)return;const t=e.style.visibility,n=e.style.display;e.style.visibility="hidden",e.style.display="",this.cachedStyles=this.detectRelevantDimensions(e),e.style.visibility=t,e.style.display=n},clearCachedDimensions(){this.cachedStyles=null},detectRelevantDimensions(e){return this.dimension==="height"?{height:e.offsetHeight+"px",paddingTop:e.style.paddingTop||this.getCssValue(e,"padding-top"),paddingBottom:e.style.paddingBottom||this.getCssValue(e,"padding-bottom")}:this.dimension==="width"?{width:e.offsetWidth+"px",paddingLeft:e.style.paddingLeft||this.getCssValue(e,"padding-left"),paddingRight:e.style.paddingRight||this.getCssValue(e,"padding-right")}:{}},setTransition(e){e.style.transition=this.transition},unsetTransition(e){e.style.transition=""},hideOverflow(e){e.style.overflow="hidden"},unsetOverflow(e){e.style.overflow=""},setClosedDimensions(e){Object.keys(this.cachedStyles).forEach(t=>{e.style[t]="0"})},setOpenedDimensions(e){Object.keys(this.cachedStyles).forEach(t=>{e.style[t]=this.cachedStyles[t]})},unsetDimensions(e){Object.keys(this.cachedStyles).forEach(t=>{e.style[t]=""})},forceRepaint(e){getComputedStyle(e)[this.dimension]},getCssValue(e,t){return getComputedStyle(e,null).getPropertyValue(t)},convertToCssProperty(e){const t=e.match(/([A-Z])/g);if(!t)return e;for(let n=0,r=t.length;n<r;n++)e=e.replace(new RegExp(t[n]),"-"+t[n].toLowerCase());return e.slice(0,1)==="-"&&(e=e.slice(1)),e}}};function oE(e,t,n,r,i,a){return M(),we(Ti,{name:n.name,onBeforeAppear:a.beforeAppear,onAppear:a.appear,onAfterAppear:a.afterAppear,onAppearCancelled:a.appearCancelled,onBeforeEnter:a.beforeEnter,onEnter:a.enter,onAfterEnter:a.afterEnter,onEnterCancelled:a.enterCancelled,onBeforeLeave:a.beforeLeave,onLeave:a.leave,onAfterLeave:a.afterLeave,onLeaveCancelled:a.leaveCancelled},{default:Pe(()=>[Mt(e.$slots,"default")]),_:3},8,["name","onBeforeAppear","onAppear","onAfterAppear","onAppearCancelled","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled"])}var aE=Qe(iE,[["render",oE]]);const sE=Ie({props:{visibility:{type:q(Number),required:!0},display:{type:q(Object,String,Function),required:!0},title:{type:q(Object,String,Function),required:!0},color:q(String),collapsed:{type:Object,required:!0},style:q(Object,String,Array),titleStyle:q(Object,String,Array),bodyStyle:q(Object,String,Array),classes:q(Object),id:{type:String,required:!0}},components:{Node:Jr,CollapseTransition:aE},setup(e){const{title:t,display:n}=Et(e),r=Vo(t),i=Vo(n),a=J(()=>Kr[bt.theme].mergeAdjacent);return{titleComponent:r,bodyComponent:i,stacked:a,unref:x,Visibility:nt}}}),lE=e=>(hr("data-v-338c9154"),e=e(),pr(),e),uE=lE(()=>P("span",{class:"toggle"},"\u25BC",-1));function cE(e,t,n,r,i,a){var l;const o=wt("CollapseTransition"),s=wt("Node");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("div",{key:0,class:ze(["infobox",{collapsed:e.unref(e.collapsed),stacked:e.stacked,...e.unref(e.classes)}]),style:tt([{borderColor:e.unref(e.color),visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(l=e.unref(e.style))!=null?l:{}])},[P("button",{class:"title",style:tt([{backgroundColor:e.unref(e.color)},e.unref(e.titleStyle)||[]]),onClick:t[0]||(t[0]=u=>e.collapsed.value=!e.unref(e.collapsed))},[uE,(M(),we(gt(e.titleComponent)))],4),C(o,null,{default:Pe(()=>[e.unref(e.collapsed)?ve("",!0):(M(),W("div",{key:0,class:"body",style:tt({backgroundColor:e.unref(e.color)})},[(M(),we(gt(e.bodyComponent),{style:tt(e.unref(e.bodyStyle))},null,8,["style"]))],4))]),_:1}),C(s,{id:e.id},null,8,["id"])],6)):ve("",!0)}var fE=Qe(sE,[["render",cE],["__scopeId","data-v-338c9154"]]);const dE=Symbol("Infobox");function Zg(e){const t=Kt(!1);return an(()=>{const n=e();return n.id=_n("infobox-"),n.type=dE,n[Jt]=fE,n.collapsed=t,H(n,"visibility"),ft(n,"visibility",nt.Visible),H(n,"color"),H(n,"style"),H(n,"titleStyle"),H(n,"bodyStyle"),H(n,"classes"),H(n,"title"),H(n,"display"),n[nn]=function(){const{visibility:r,display:i,title:a,color:o,collapsed:s,style:l,titleStyle:u,bodyStyle:c,classes:f,id:d}=this;return{visibility:r,display:i,title:a,color:o,collapsed:s,style:x(l),titleStyle:u,bodyStyle:c,classes:f,id:d}},n})}var Fu=/iPhone/i,Lh=/iPod/i,Uh=/iPad/i,Bh=/\biOS-universal(?:.+)Mac\b/i,Mu=/\bAndroid(?:.+)Mobile\b/i,kh=/Android/i,po=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Os=/Silk/i,Mr=/Windows Phone/i,Dh=/\bWindows(?:.+)ARM\b/i,Gh=/BlackBerry/i,Vh=/BB10/i,$h=/Opera Mini/i,jh=/\b(CriOS|Chrome)(?:.+)Mobile/i,Hh=/Mobile(?:.+)Firefox\b/i,zh=function(e){return typeof e!="undefined"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream=="undefined"};function hE(e){return function(t){return t.test(e)}}function pE(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator!="undefined"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split("[FBAN");typeof r[1]!="undefined"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]!="undefined"&&(n=r[0]);var i=hE(n),a={apple:{phone:i(Fu)&&!i(Mr),ipod:i(Lh),tablet:!i(Fu)&&(i(Uh)||zh(t))&&!i(Mr),universal:i(Bh),device:(i(Fu)||i(Lh)||i(Uh)||i(Bh)||zh(t))&&!i(Mr)},amazon:{phone:i(po),tablet:!i(po)&&i(Os),device:i(po)||i(Os)},android:{phone:!i(Mr)&&i(po)||!i(Mr)&&i(Mu),tablet:!i(Mr)&&!i(po)&&!i(Mu)&&(i(Os)||i(kh)),device:!i(Mr)&&(i(po)||i(Os)||i(Mu)||i(kh))||i(/\bokhttp\b/i)},windows:{phone:i(Mr),tablet:i(Dh),device:i(Mr)||i(Dh)},other:{blackberry:i(Gh),blackberry10:i(Vh),opera:i($h),firefox:i(Hh),chrome:i(jh),device:i(Gh)||i(Vh)||i($h)||i(Hh)||i(jh)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}/*!
* @pixi/settings - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/settings is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Yi=pE(globalThis.navigator);function vE(e){var t=!0;if(Yi.tablet||Yi.phone){if(Yi.apple.device){var n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(n){var r=parseInt(n[1],10);r<11&&(t=!1)}}if(Yi.android.device){var n=navigator.userAgent.match(/Android\s([0-9.]*)/);if(n){var r=parseInt(n[1],10);r<7&&(t=!1)}}}return t?e:4}function mE(){return!Yi.apple.device}/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Xh;(function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"})(Xh||(Xh={}));var Wh;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"})(Wh||(Wh={}));var Kh;(function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"})(Kh||(Kh={}));var Yh;(function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"})(Yh||(Yh={}));var Zh;(function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Zh||(Zh={}));var Jh;(function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(Jh||(Jh={}));var Qh;(function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Qh||(Qh={}));var qh;(function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT"})(qh||(qh={}));var ep;(function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT"})(ep||(ep={}));var Pc;(function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"})(Pc||(Pc={}));var Fc;(function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Fc||(Fc={}));var Mc;(function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL"})(Mc||(Mc={}));var tp;(function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(tp||(tp={}));var np;(function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT"})(np||(np={}));var Lc;(function(e){e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL"})(Lc||(Lc={}));var Aa;(function(e){e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp"})(Aa||(Aa={}));var rp;(function(e){e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE"})(rp||(rp={}));var Uc;(function(e){e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH"})(Uc||(Uc={}));var ip;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(ip||(ip={}));var He={MIPMAP_TEXTURES:Mc.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:Uc.NONE,SPRITE_MAX_TEXTURES:vE(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:Lc.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:Fc.CLAMP,SCALE_MODE:Pc.LINEAR,PRECISION_VERTEX:Aa.HIGH,PRECISION_FRAGMENT:Yi.apple.device?Aa.HIGH:Aa.MEDIUM,CAN_UPLOAD_SAME_BUFFER:mE(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Xr;(function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"})(Xr||(Xr={}));var ja;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"})(ja||(ja={}));var Sl;(function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"})(Sl||(Sl={}));var Me;(function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"})(Me||(Me={}));var Ha;(function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Ha||(Ha={}));var ge;(function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(ge||(ge={}));var eo;(function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(eo||(eo={}));var vt;(function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT"})(vt||(vt={}));var Nl;(function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT"})(Nl||(Nl={}));var Dr;(function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"})(Dr||(Dr={}));var Bc;(function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(Bc||(Bc={}));var ro;(function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL"})(ro||(ro={}));var bi;(function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(bi||(bi={}));var ai;(function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT"})(ai||(ai={}));var kc;(function(e){e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL"})(kc||(kc={}));var _r;(function(e){e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp"})(_r||(_r={}));var hn;(function(e){e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE"})(hn||(hn={}));var en;(function(e){e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH"})(en||(en={}));var Nr;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(Nr||(Nr={}));var Jg={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,u,c){this.fn=l,this.context=u,this.once=c||!1}function a(l,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new i(c,f||l,d),p=n?n+u:u;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],h]:l._events[p].push(h):(l._events[p]=h,l._eventsCount++),l}function o(l,u){--l._eventsCount===0?l._events=new r:delete l._events[u]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},s.prototype.listeners=function(u){var c=n?n+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},s.prototype.listenerCount=function(u){var c=n?n+u:u,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,c,f,d,h,p){var v=n?n+u:u;if(!this._events[v])return!1;var g=this._events[v],y=arguments.length,m,b;if(g.fn){switch(g.once&&this.removeListener(u,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,f),!0;case 4:return g.fn.call(g.context,c,f,d),!0;case 5:return g.fn.call(g.context,c,f,d,h),!0;case 6:return g.fn.call(g.context,c,f,d,h,p),!0}for(b=1,m=new Array(y-1);b<y;b++)m[b-1]=arguments[b];g.fn.apply(g.context,m)}else{var T=g.length,S;for(b=0;b<T;b++)switch(g[b].once&&this.removeListener(u,g[b].fn,void 0,!0),y){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,c);break;case 3:g[b].fn.call(g[b].context,c,f);break;case 4:g[b].fn.call(g[b].context,c,f,d);break;default:if(!m)for(S=1,m=new Array(y-1);S<y;S++)m[S-1]=arguments[S];g[b].fn.apply(g[b].context,m)}}return!0},s.prototype.on=function(u,c,f){return a(this,u,c,f,!1)},s.prototype.once=function(u,c,f){return a(this,u,c,f,!0)},s.prototype.removeListener=function(u,c,f,d){var h=n?n+u:u;if(!this._events[h])return this;if(!c)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===c&&(!d||p.once)&&(!f||p.context===f)&&o(this,h);else{for(var v=0,g=[],y=p.length;v<y;v++)(p[v].fn!==c||d&&!p[v].once||f&&p[v].context!==f)&&g.push(p[v]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&o(this,c)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(Jg);var nu=Jg.exports,Qg={exports:{}};Qg.exports=ru;Qg.exports.default=ru;function ru(e,t,n){n=n||2;var r=t&&t.length,i=r?t[0]*n:e.length,a=qg(e,0,i,n,!0),o=[];if(!a||a.next===a.prev)return o;var s,l,u,c,f,d,h;if(r&&(a=_E(e,t,a,n)),e.length>80*n){s=u=e[0],l=c=e[1];for(var p=n;p<i;p+=n)f=e[p],d=e[p+1],f<s&&(s=f),d<l&&(l=d),f>u&&(u=f),d>c&&(c=d);h=Math.max(u-s,c-l),h=h!==0?1/h:0}return za(a,o,n,s,l,h),o}function qg(e,t,n,r,i){var a,o;if(i===Vc(e,t,n,r)>0)for(a=t;a<n;a+=r)o=op(a,e[a],e[a+1],o);else for(a=n-r;a>=t;a-=r)o=op(a,e[a],e[a+1],o);return o&&iu(o,o.next)&&(Wa(o),o=o.next),o}function xi(e,t){if(!e)return e;t||(t=e);var n=e,r;do if(r=!1,!n.steiner&&(iu(n,n.next)||Gt(n.prev,n,n.next)===0)){if(Wa(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function za(e,t,n,r,i,a,o){if(!!e){!o&&a&&IE(e,r,i,a);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,a?yE(e,r,i,a):gE(e)){t.push(l.i/n),t.push(e.i/n),t.push(u.i/n),Wa(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=bE(xi(e),t,n),za(e,t,n,r,i,a,2)):o===2&&xE(e,t,n,r,i,a):za(xi(e),t,n,r,i,a,1);break}}}}function gE(e){var t=e.prev,n=e,r=e.next;if(Gt(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(Co(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Gt(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function yE(e,t,n,r){var i=e.prev,a=e,o=e.next;if(Gt(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,l=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,u=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=Dc(s,l,t,n,r),d=Dc(u,c,t,n,r),h=e.prevZ,p=e.nextZ;h&&h.z>=f&&p&&p.z<=d;){if(h!==e.prev&&h!==e.next&&Co(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&Gt(h.prev,h,h.next)>=0||(h=h.prevZ,p!==e.prev&&p!==e.next&&Co(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Gt(p.prev,p,p.next)>=0))return!1;p=p.nextZ}for(;h&&h.z>=f;){if(h!==e.prev&&h!==e.next&&Co(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&Gt(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&Co(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Gt(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function bE(e,t,n){var r=e;do{var i=r.prev,a=r.next.next;!iu(i,a)&&ey(i,r,r.next,a)&&Xa(i,a)&&Xa(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),Wa(r),Wa(r.next),r=e=a),r=r.next}while(r!==e);return xi(r)}function xE(e,t,n,r,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&RE(o,s)){var l=ty(o,s);o=xi(o,o.next),l=xi(l,l.next),za(o,t,n,r,i,a),za(l,t,n,r,i,a);return}s=s.next}o=o.next}while(o!==e)}function _E(e,t,n,r){var i=[],a,o,s,l,u;for(a=0,o=t.length;a<o;a++)s=t[a]*r,l=a<o-1?t[a+1]*r:e.length,u=qg(e,s,l,r,!1),u===u.next&&(u.steiner=!0),i.push(NE(u));for(i.sort(TE),a=0;a<i.length;a++)n=wE(i[a],n),n=xi(n,n.next);return n}function TE(e,t){return e.x-t.x}function wE(e,t){var n=CE(e,t);if(!n)return t;var r=ty(n,e),i=xi(n,n.next);return xi(r,r.next),t===n?i:t}function CE(e,t){var n=t,r=e.x,i=e.y,a=-1/0,o;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if(a=s,s===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===a)return o;var l=o,u=o.x,c=o.y,f=1/0,d;n=o;do r>=n.x&&n.x>=u&&r!==n.x&&Co(i<c?r:a,i,u,c,i<c?a:r,i,n.x,n.y)&&(d=Math.abs(i-n.y)/(r-n.x),Xa(n,e)&&(d<f||d===f&&(n.x>o.x||n.x===o.x&&EE(o,n)))&&(o=n,f=d)),n=n.next;while(n!==l);return o}function EE(e,t){return Gt(e.prev,e,t.prev)<0&&Gt(t.next,e,e.next)<0}function IE(e,t,n,r){var i=e;do i.z===null&&(i.z=Dc(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,SE(i)}function SE(e){var t,n,r,i,a,o,s,l,u=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t<u&&(s++,r=r.nextZ,!!r);t++);for(l=u;s>0||l>0&&r;)s!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,u*=2}while(o>1);return e}function Dc(e,t,n,r,i){return e=32767*(e-n)*i,t=32767*(t-r)*i,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function NE(e){var t=e,n=e;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==e);return n}function Co(e,t,n,r,i,a,o,s){return(i-o)*(t-s)-(e-o)*(a-s)>=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}function RE(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!AE(e,t)&&(Xa(e,t)&&Xa(t,e)&&OE(e,t)&&(Gt(e.prev,e,t.prev)||Gt(e,t.prev,t))||iu(e,t)&&Gt(e.prev,e,e.next)>0&&Gt(t.prev,t,t.next)>0)}function Gt(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function iu(e,t){return e.x===t.x&&e.y===t.y}function ey(e,t,n,r){var i=Fs(Gt(e,t,n)),a=Fs(Gt(e,t,r)),o=Fs(Gt(n,r,e)),s=Fs(Gt(n,r,t));return!!(i!==a&&o!==s||i===0&&Ps(e,n,t)||a===0&&Ps(e,r,t)||o===0&&Ps(n,e,r)||s===0&&Ps(n,t,r))}function Ps(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Fs(e){return e>0?1:e<0?-1:0}function AE(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&ey(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function Xa(e,t){return Gt(e.prev,e,e.next)<0?Gt(e,t,e.next)>=0&&Gt(e,e.prev,t)>=0:Gt(e,t,e.prev)<0||Gt(e,e.next,t)<0}function OE(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==e);return r}function ty(e,t){var n=new Gc(e.i,e.x,e.y),r=new Gc(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function op(e,t,n,r){var i=new Gc(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Wa(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Gc(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}ru.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(Vc(e,0,a,n));if(i)for(var s=0,l=t.length;s<l;s++){var u=t[s]*n,c=s<l-1?t[s+1]*n:e.length;o-=Math.abs(Vc(e,u,c,n))}var f=0;for(s=0;s<r.length;s+=3){var d=r[s]*n,h=r[s+1]*n,p=r[s+2]*n;f+=Math.abs((e[d]-e[p])*(e[h+1]-e[d+1])-(e[d]-e[h])*(e[p+1]-e[d+1]))}return o===0&&f===0?0:Math.abs((f-o)/o)};function Vc(e,t,n,r){for(var i=0,a=t,o=n-r;a<n;a+=r)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}ru.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<t;o++)n.vertices.push(e[i][a][o]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n};var $c={exports:{}};/*! https://mths.be/punycode v1.3.2 by @mathias */(function(e,t){(function(n){var r=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,a=typeof Js=="object"&&Js;(a.global===a||a.window===a||a.self===a)&&(n=a);var o,s=2147483647,l=36,u=1,c=26,f=38,d=700,h=72,p=128,v="-",g=/^xn--/,y=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=l-u,S=Math.floor,w=String.fromCharCode,N;function I(re){throw RangeError(b[re])}function R(re,de){for(var ye=re.length,Se=[];ye--;)Se[ye]=de(re[ye]);return Se}function U(re,de){var ye=re.split("@"),Se="";ye.length>1&&(Se=ye[0]+"@",re=ye[1]),re=re.replace(m,".");var k=re.split("."),X=R(k,de).join(".");return Se+X}function $(re){for(var de=[],ye=0,Se=re.length,k,X;ye<Se;)k=re.charCodeAt(ye++),k>=55296&&k<=56319&&ye<Se?(X=re.charCodeAt(ye++),(X&64512)==56320?de.push(((k&1023)<<10)+(X&1023)+65536):(de.push(k),ye--)):de.push(k);return de}function z(re){return R(re,function(de){var ye="";return de>65535&&(de-=65536,ye+=w(de>>>10&1023|55296),de=56320|de&1023),ye+=w(de),ye}).join("")}function j(re){return re-48<10?re-22:re-65<26?re-65:re-97<26?re-97:l}function B(re,de){return re+22+75*(re<26)-((de!=0)<<5)}function he(re,de,ye){var Se=0;for(re=ye?S(re/d):re>>1,re+=S(re/de);re>T*c>>1;Se+=l)re=S(re/T);return S(Se+(T+1)*re/(re+f))}function Y(re){var de=[],ye=re.length,Se,k=0,X=p,ce=h,ue,Ve,ie,Ze,at,ut,E,A,V;for(ue=re.lastIndexOf(v),ue<0&&(ue=0),Ve=0;Ve<ue;++Ve)re.charCodeAt(Ve)>=128&&I("not-basic"),de.push(re.charCodeAt(Ve));for(ie=ue>0?ue+1:0;ie<ye;){for(Ze=k,at=1,ut=l;ie>=ye&&I("invalid-input"),E=j(re.charCodeAt(ie++)),(E>=l||E>S((s-k)/at))&&I("overflow"),k+=E*at,A=ut<=ce?u:ut>=ce+c?c:ut-ce,!(E<A);ut+=l)V=l-A,at>S(s/V)&&I("overflow"),at*=V;Se=de.length+1,ce=he(k-Ze,Se,Ze==0),S(k/Se)>s-X&&I("overflow"),X+=S(k/Se),k%=Se,de.splice(k++,0,X)}return z(de)}function oe(re){var de,ye,Se,k,X,ce,ue,Ve,ie,Ze,at,ut=[],E,A,V,K;for(re=$(re),E=re.length,de=p,ye=0,X=h,ce=0;ce<E;++ce)at=re[ce],at<128&&ut.push(w(at));for(Se=k=ut.length,k&&ut.push(v);Se<E;){for(ue=s,ce=0;ce<E;++ce)at=re[ce],at>=de&&at<ue&&(ue=at);for(A=Se+1,ue-de>S((s-ye)/A)&&I("overflow"),ye+=(ue-de)*A,de=ue,ce=0;ce<E;++ce)if(at=re[ce],at<de&&++ye>s&&I("overflow"),at==de){for(Ve=ye,ie=l;Ze=ie<=X?u:ie>=X+c?c:ie-X,!(Ve<Ze);ie+=l)K=Ve-Ze,V=l-Ze,ut.push(w(B(Ze+K%V,0))),Ve=S(K/V);ut.push(w(B(Ve,0))),X=he(ye,A,Se==k),ye=0,++Se}++ye,++de}return ut.join("")}function me(re){return U(re,function(de){return g.test(de)?Y(de.slice(4).toLowerCase()):de})}function Ke(re){return U(re,function(de){return y.test(de)?"xn--"+oe(de):de})}if(o={version:"1.3.2",ucs2:{decode:$,encode:z},decode:Y,encode:oe,toASCII:Ke,toUnicode:me},r&&i)if(e.exports==r)i.exports=o;else for(N in o)o.hasOwnProperty(N)&&(r[N]=o[N]);else n.punycode=o})(Js)})($c,$c.exports);var PE={isString:function(e){return typeof e=="string"},isObject:function(e){return typeof e=="object"&&e!==null},isNull:function(e){return e===null},isNullOrUndefined:function(e){return e==null}},Ka={};function FE(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var ME=function(e,t,n,r){t=t||"&",n=n||"=";var i={};if(typeof e!="string"||e.length===0)return i;var a=/\+/g;e=e.split(t);var o=1e3;r&&typeof r.maxKeys=="number"&&(o=r.maxKeys);var s=e.length;o>0&&s>o&&(s=o);for(var l=0;l<s;++l){var u=e[l].replace(a,"%20"),c=u.indexOf(n),f,d,h,p;c>=0?(f=u.substr(0,c),d=u.substr(c+1)):(f=u,d=""),h=decodeURIComponent(f),p=decodeURIComponent(d),FE(i,h)?Array.isArray(i[h])?i[h].push(p):i[h]=[i[h],p]:i[h]=p}return i},qo=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},LE=function(e,t,n,r){return t=t||"&",n=n||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(i){var a=encodeURIComponent(qo(i))+n;return Array.isArray(e[i])?e[i].map(function(o){return a+encodeURIComponent(qo(o))}).join(t):a+encodeURIComponent(qo(e[i]))}).join(t):r?encodeURIComponent(qo(r))+n+encodeURIComponent(qo(e)):""};Ka.decode=Ka.parse=ME;Ka.encode=Ka.stringify=LE;var UE=$c.exports,gr=PE,BE=ou,kE=YE,DE=KE;function cr(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var GE=/^([a-z0-9.+-]+:)/i,VE=/:[0-9]*$/,$E=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,jE=["<",">",'"',"`"," ","\r",`
`," "],HE=["{","}","|","\\","^","`"].concat(jE),jc=["'"].concat(HE),ap=["%","/","?",";","#"].concat(jc),sp=["/","?","#"],zE=255,lp=/^[+a-z0-9A-Z_-]{0,63}$/,XE=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,WE={javascript:!0,"javascript:":!0},Hc={javascript:!0,"javascript:":!0},Oo={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},zc=Ka;function ou(e,t,n){if(e&&gr.isObject(e)&&e instanceof cr)return e;var r=new cr;return r.parse(e,t,n),r}cr.prototype.parse=function(e,t,n){if(!gr.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r<e.indexOf("#")?"?":"#",a=e.split(i),o=/\\/g;a[0]=a[0].replace(o,"/"),e=a.join(i);var s=e;if(s=s.trim(),!n&&e.split("#").length===1){var l=$E.exec(s);if(l)return this.path=s,this.href=s,this.pathname=l[1],l[2]?(this.search=l[2],t?this.query=zc.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var u=GE.exec(s);if(u){u=u[0];var c=u.toLowerCase();this.protocol=c,s=s.substr(u.length)}if(n||u||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var f=s.substr(0,2)==="//";f&&!(u&&Hc[u])&&(s=s.substr(2),this.slashes=!0)}if(!Hc[u]&&(f||u&&!Oo[u])){for(var d=-1,h=0;h<sp.length;h++){var p=s.indexOf(sp[h]);p!==-1&&(d===-1||p<d)&&(d=p)}var v,g;d===-1?g=s.lastIndexOf("@"):g=s.lastIndexOf("@",d),g!==-1&&(v=s.slice(0,g),s=s.slice(g+1),this.auth=decodeURIComponent(v)),d=-1;for(var h=0;h<ap.length;h++){var p=s.indexOf(ap[h]);p!==-1&&(d===-1||p<d)&&(d=p)}d===-1&&(d=s.length),this.host=s.slice(0,d),s=s.slice(d),this.parseHost(),this.hostname=this.hostname||"";var y=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!y)for(var m=this.hostname.split(/\./),h=0,b=m.length;h<b;h++){var T=m[h];if(!!T&&!T.match(lp)){for(var S="",w=0,N=T.length;w<N;w++)T.charCodeAt(w)>127?S+="x":S+=T[w];if(!S.match(lp)){var I=m.slice(0,h),R=m.slice(h+1),U=T.match(XE);U&&(I.push(U[1]),R.unshift(U[2])),R.length&&(s="/"+R.join(".")+s),this.hostname=I.join(".");break}}}this.hostname.length>zE?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=UE.toASCII(this.hostname));var $=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+$,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!=="/"&&(s="/"+s))}if(!WE[c])for(var h=0,b=jc.length;h<b;h++){var j=jc[h];if(s.indexOf(j)!==-1){var B=encodeURIComponent(j);B===j&&(B=escape(j)),s=s.split(j).join(B)}}var he=s.indexOf("#");he!==-1&&(this.hash=s.substr(he),s=s.slice(0,he));var Y=s.indexOf("?");if(Y!==-1?(this.search=s.substr(Y),this.query=s.substr(Y+1),t&&(this.query=zc.parse(this.query)),s=s.slice(0,Y)):t&&(this.search="",this.query={}),s&&(this.pathname=s),Oo[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var $=this.pathname||"",oe=this.search||"";this.path=$+oe}return this.href=this.format(),this};function KE(e){return gr.isString(e)&&(e=ou(e)),e instanceof cr?e.format():cr.prototype.format.call(e)}cr.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&gr.isObject(this.query)&&Object.keys(this.query).length&&(a=zc.stringify(this.query));var o=this.search||a&&"?"+a||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||Oo[t])&&i!==!1?(i="//"+(i||""),n&&n.charAt(0)!=="/"&&(n="/"+n)):i||(i=""),r&&r.charAt(0)!=="#"&&(r="#"+r),o&&o.charAt(0)!=="?"&&(o="?"+o),n=n.replace(/[?#]/g,function(s){return encodeURIComponent(s)}),o=o.replace("#","%23"),t+i+n+o+r};function YE(e,t){return ou(e,!1,!0).resolve(t)}cr.prototype.resolve=function(e){return this.resolveObject(ou(e,!1,!0)).format()};cr.prototype.resolveObject=function(e){if(gr.isString(e)){var t=new cr;t.parse(e,!1,!0),e=t}for(var n=new cr,r=Object.keys(this),i=0;i<r.length;i++){var a=r[i];n[a]=this[a]}if(n.hash=e.hash,e.href==="")return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var o=Object.keys(e),s=0;s<o.length;s++){var l=o[s];l!=="protocol"&&(n[l]=e[l])}return Oo[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!Oo[e.protocol]){for(var u=Object.keys(e),c=0;c<u.length;c++){var f=u[c];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,!e.host&&!Hc[e.protocol]){for(var b=(e.pathname||"").split("/");b.length&&!(e.host=b.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),b[0]!==""&&b.unshift(""),b.length<2&&b.unshift(""),n.pathname=b.join("/")}else n.pathname=e.pathname;if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var d=n.pathname||"",h=n.search||"";n.path=d+h}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var p=n.pathname&&n.pathname.charAt(0)==="/",v=e.host||e.pathname&&e.pathname.charAt(0)==="/",g=v||p||n.host&&e.pathname,y=g,m=n.pathname&&n.pathname.split("/")||[],b=e.pathname&&e.pathname.split("/")||[],T=n.protocol&&!Oo[n.protocol];if(T&&(n.hostname="",n.port=null,n.host&&(m[0]===""?m[0]=n.host:m.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(b[0]===""?b[0]=e.host:b.unshift(e.host)),e.host=null),g=g&&(b[0]===""||m[0]==="")),v)n.host=e.host||e.host===""?e.host:n.host,n.hostname=e.hostname||e.hostname===""?e.hostname:n.hostname,n.search=e.search,n.query=e.query,m=b;else if(b.length)m||(m=[]),m.pop(),m=m.concat(b),n.search=e.search,n.query=e.query;else if(!gr.isNullOrUndefined(e.search)){if(T){n.hostname=n.host=m.shift();var S=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;S&&(n.auth=S.shift(),n.host=n.hostname=S.shift())}return n.search=e.search,n.query=e.query,(!gr.isNull(n.pathname)||!gr.isNull(n.search))&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!m.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=m.slice(-1)[0],N=(n.host||e.host||m.length>1)&&(w==="."||w==="..")||w==="",I=0,R=m.length;R>=0;R--)w=m[R],w==="."?m.splice(R,1):w===".."?(m.splice(R,1),I++):I&&(m.splice(R,1),I--);if(!g&&!y)for(;I--;I)m.unshift("..");g&&m[0]!==""&&(!m[0]||m[0].charAt(0)!=="/")&&m.unshift(""),N&&m.join("/").substr(-1)!=="/"&&m.push("");var U=m[0]===""||m[0]&&m[0].charAt(0)==="/";if(T){n.hostname=n.host=U?"":m.length?m.shift():"";var S=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;S&&(n.auth=S.shift(),n.host=n.hostname=S.shift())}return g=g||n.host&&m.length,g&&!U&&m.unshift(""),m.length?n.pathname=m.join("/"):(n.pathname=null,n.path=null),(!gr.isNull(n.pathname)||!gr.isNull(n.search))&&(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n};cr.prototype.parseHost=function(){var e=this.host,t=VE.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};/*!
* @pixi/utils - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/utils is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var ZE={parse:BE,format:DE,resolve:kE};He.RETINA_PREFIX=/@([0-9\.]+)x/;He.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var up=!1,cp="6.4.2";function JE(e){var t;if(!up){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=[`
%c %c %c PixiJS `+cp+" - \u2730 "+e+` \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665
`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=globalThis.console).log.apply(t,n)}else globalThis.console&&globalThis.console.log("PixiJS "+cp+" - "+e+" - http://www.pixijs.com/");up=!0}}var Lu;function QE(){return typeof Lu=="undefined"&&(Lu=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:He.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!globalThis.WebGLRenderingContext)return!1;var n=document.createElement("canvas"),r=n.getContext("webgl",t)||n.getContext("experimental-webgl",t),i=!!(r&&r.getContextAttributes().stencil);if(r){var a=r.getExtension("WEBGL_lose_context");a&&a.loseContext()}return r=null,i}catch{return!1}}()),Lu}function qE(e,t){return t===void 0&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(e&255)/255,t}function eI(e){var t=e.toString(16);return t="000000".substring(0,6-t.length)+t,"#"+t}function tI(){for(var e=[],t=[],n=0;n<32;n++)e[n]=n,t[n]=n;e[Me.NORMAL_NPM]=Me.NORMAL,e[Me.ADD_NPM]=Me.ADD,e[Me.SCREEN_NPM]=Me.SCREEN,t[Me.NORMAL]=Me.NORMAL_NPM,t[Me.ADD]=Me.ADD_NPM,t[Me.SCREEN]=Me.SCREEN_NPM;var r=[];return r.push(t),r.push(e),r}var nI=tI();function rI(e,t){if(t===1)return(t*255<<24)+e;if(t===0)return 0;var n=e>>16&255,r=e>>8&255,i=e&255;return n=n*t+.5|0,r=r*t+.5|0,i=i*t+.5|0,(t*255<<24)+(n<<16)+(r<<8)+i}function ny(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function Rl(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function fp(e){return!(e&e-1)&&!!e}function dp(e){var t=(e>65535?1:0)<<4;e>>>=t;var n=(e>255?1:0)<<3;return e>>>=n,t|=n,n=(e>15?1:0)<<2,e>>>=n,t|=n,n=(e>3?1:0)<<1,e>>>=n,t|=n,t|e>>1}function al(e,t,n){var r=e.length,i;if(!(t>=r||n===0)){n=t+n>r?r-t:n;var a=r-n;for(i=t;i<a;++i)e[i]=e[i+n];e.length=a}}function Ms(e){return e===0?0:e<0?-1:1}var iI=0;function Ya(){return++iI}var hp={};function Za(e,t,n){if(n===void 0&&(n=3),!hp[t]){var r=new Error().stack;typeof r=="undefined"?console.warn("PixiJS Deprecation Warning: ",t+`
Deprecated since v`+e):(r=r.split(`
`).splice(n).join(`
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t+`
Deprecated since v`+e),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",t+`
Deprecated since v`+e),console.warn(r))),hp[t]=!0}}var pp={},Ur=Object.create(null),Oi=Object.create(null);(function(){function e(t,n,r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=r||He.RESOLUTION,this.resize(t,n)}return e.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},e.prototype.resize=function(t,n){this.canvas.width=Math.round(t*this.resolution),this.canvas.height=Math.round(n*this.resolution)},e.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=Math.round(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=Math.round(t)},enumerable:!1,configurable:!0}),e})();var Ls;function oI(e,t){if(t===void 0&&(t=globalThis.location),e.indexOf("data:")===0)return"";t=t||globalThis.location,Ls||(Ls=document.createElement("a")),Ls.href=e;var n=ZE.parse(Ls.href),r=!n.port&&t.port===""||n.port===t.port;return n.hostname!==t.hostname||!r||n.protocol!==t.protocol?"anonymous":""}function vp(e,t){var n=He.RETINA_PREFIX.exec(e);return n?parseFloat(n[1]):t!==void 0?t:1}/*!
* @pixi/runner - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/runner is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var pn=function(){function e(t){this.items=[],this._name=t,this._aliasCount=0}return e.prototype.emit=function(t,n,r,i,a,o,s,l){if(arguments.length>8)throw new Error("max arguments reached");var u=this,c=u.name,f=u.items;this._aliasCount++;for(var d=0,h=f.length;d<h;d++)f[d][c](t,n,r,i,a,o,s,l);return f===this.items&&this._aliasCount--,this},e.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},e.prototype.remove=function(t){var n=this.items.indexOf(t);return n!==-1&&(this.ensureNonAliasedItems(),this.items.splice(n,1)),this},e.prototype.contains=function(t){return this.items.indexOf(t)!==-1},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(e.prototype,"empty",{get:function(){return this.items.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),e}();Object.defineProperties(pn.prototype,{dispatch:{value:pn.prototype.emit},run:{value:pn.prototype.emit}});/*!
* @pixi/ticker - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/ticker is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/He.TARGET_FPMS=.06;var Al;(function(e){e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY"})(Al||(Al={}));var Uu=function(){function e(t,n,r,i){n===void 0&&(n=null),r===void 0&&(r=0),i===void 0&&(i=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=n,this.priority=r,this.once=i}return e.prototype.match=function(t,n){return n===void 0&&(n=null),this.fn===t&&this.context===n},e.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var n=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),n},e.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},e.prototype.destroy=function(t){t===void 0&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var n=this.next;return this.next=t?null:n,this.previous=null,n},e}(),Ui=function(){function e(){var t=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Uu(null,null,1/0),this.deltaMS=1/He.TARGET_FPMS,this.elapsedMS=1/He.TARGET_FPMS,this._tick=function(n){t._requestId=null,t.started&&(t.update(n),t.started&&t._requestId===null&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return e.prototype._requestIfNeeded=function(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(t,n,r){return r===void 0&&(r=Al.NORMAL),this._addListener(new Uu(t,n,r))},e.prototype.addOnce=function(t,n,r){return r===void 0&&(r=Al.NORMAL),this._addListener(new Uu(t,n,r,!0))},e.prototype._addListener=function(t){var n=this._head.next,r=this._head;if(!n)t.connect(r);else{for(;n;){if(t.priority>n.priority){t.connect(r);break}r=n,n=n.next}t.previous||t.connect(r)}return this._startIfPossible(),this},e.prototype.remove=function(t,n){for(var r=this._head.next;r;)r.match(t,n)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,n=this._head;n=n.next;)t++;return t},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(t){t===void 0&&(t=performance.now());var n;if(t>this.lastTime){if(n=this.elapsedMS=t-this.lastTime,n>this._maxElapsedMS&&(n=this._maxElapsedMS),n*=this.speed,this._minElapsedMS){var r=t-this._lastFrame|0;if(r<this._minElapsedMS)return;this._lastFrame=t-r%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*He.TARGET_FPMS;for(var i=this._head,a=i.next;a;)a=a.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(e.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var n=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,n)/1e3,He.TARGET_FPMS);this._maxElapsedMS=1/r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(t===0)this._minElapsedMS=0;else{var n=Math.max(this.minFPS,t);this._minElapsedMS=1/(n/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"shared",{get:function(){if(!e._shared){var t=e._shared=new e;t.autoStart=!0,t._protected=!0}return e._shared},enumerable:!1,configurable:!0}),Object.defineProperty(e,"system",{get:function(){if(!e._system){var t=e._system=new e;t.autoStart=!0,t._protected=!0}return e._system},enumerable:!1,configurable:!0}),e}();/*!
* @pixi/math - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/math is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var aI=Math.PI*2,sI=180/Math.PI,lI=Math.PI/180,Xc;(function(e){e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC"})(Xc||(Xc={}));var Yt=function(){function e(t,n){t===void 0&&(t=0),n===void 0&&(n=0),this.x=0,this.y=0,this.x=t,this.y=n}return e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},e.prototype.copyTo=function(t){return t.set(this.x,this.y),t},e.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},e.prototype.set=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=t),this.x=t,this.y=n,this},e.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},e}(),Us=[new Yt,new Yt,new Yt,new Yt],Zt=function(){function e(t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.x=Number(t),this.y=Number(n),this.width=Number(r),this.height=Number(i),this.type=Xc.RECT}return Object.defineProperty(e.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e,"EMPTY",{get:function(){return new e(0,0,0,0)},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},e.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},e.prototype.contains=function(t,n){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&n>=this.y&&n<this.y+this.height},e.prototype.intersects=function(t,n){if(!n){var r=this.x<t.x?t.x:this.x,i=this.right>t.right?t.right:this.right;if(i<=r)return!1;var a=this.y<t.y?t.y:this.y,o=this.bottom>t.bottom?t.bottom:this.bottom;return o>a}var s=this.left,l=this.right,u=this.top,c=this.bottom;if(l<=s||c<=u)return!1;var f=Us[0].set(t.left,t.top),d=Us[1].set(t.left,t.bottom),h=Us[2].set(t.right,t.top),p=Us[3].set(t.right,t.bottom);if(h.x<=f.x||d.y<=f.y)return!1;var v=Math.sign(n.a*n.d-n.b*n.c);if(v===0||(n.apply(f,f),n.apply(d,d),n.apply(h,h),n.apply(p,p),Math.max(f.x,d.x,h.x,p.x)<=s||Math.min(f.x,d.x,h.x,p.x)>=l||Math.max(f.y,d.y,h.y,p.y)<=u||Math.min(f.y,d.y,h.y,p.y)>=c))return!1;var g=v*(d.y-f.y),y=v*(f.x-d.x),m=g*s+y*u,b=g*l+y*u,T=g*s+y*c,S=g*l+y*c;if(Math.max(m,b,T,S)<=g*f.x+y*f.y||Math.min(m,b,T,S)>=g*p.x+y*p.y)return!1;var w=v*(f.y-h.y),N=v*(h.x-f.x),I=w*s+N*u,R=w*l+N*u,U=w*s+N*c,$=w*l+N*c;return!(Math.max(I,R,U,$)<=w*f.x+N*f.y||Math.min(I,R,U,$)>=w*p.x+N*p.y)},e.prototype.pad=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=t),this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this},e.prototype.fit=function(t){var n=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),a=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(r-n,0),this.y=i,this.height=Math.max(a-i,0),this},e.prototype.ceil=function(t,n){t===void 0&&(t=1),n===void 0&&(n=.001);var r=Math.ceil((this.x+this.width-n)*t)/t,i=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=r-this.x,this.height=i-this.y,this},e.prototype.enlarge=function(t){var n=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),a=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=r-n,this.y=i,this.height=a-i,this},e.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},e}(),ha=function(){function e(t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=0),this._x=r,this._y=i,this.cb=t,this.scope=n}return e.prototype.clone=function(t,n){return t===void 0&&(t=this.cb),n===void 0&&(n=this.scope),new e(t,n,this._x,this._y)},e.prototype.set=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=t),(this._x!==t||this._y!==n)&&(this._x=t,this._y=n,this.cb.call(this.scope)),this},e.prototype.copyFrom=function(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},e.prototype.copyTo=function(t){return t.set(this._x,this._y),t},e.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},e.prototype.toString=function(){return"[@pixi/math:ObservablePoint x="+0+" y="+0+" scope="+this.scope+"]"},Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),e}(),jn=function(){function e(t,n,r,i,a,o){t===void 0&&(t=1),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=1),a===void 0&&(a=0),o===void 0&&(o=0),this.array=null,this.a=t,this.b=n,this.c=r,this.d=i,this.tx=a,this.ty=o}return e.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},e.prototype.set=function(t,n,r,i,a,o){return this.a=t,this.b=n,this.c=r,this.d=i,this.tx=a,this.ty=o,this},e.prototype.toArray=function(t,n){this.array||(this.array=new Float32Array(9));var r=n||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},e.prototype.apply=function(t,n){n=n||new Yt;var r=t.x,i=t.y;return n.x=this.a*r+this.c*i+this.tx,n.y=this.b*r+this.d*i+this.ty,n},e.prototype.applyInverse=function(t,n){n=n||new Yt;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,a=t.y;return n.x=this.d*r*i+-this.c*r*a+(this.ty*this.c-this.tx*this.d)*r,n.y=this.a*r*a+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,n},e.prototype.translate=function(t,n){return this.tx+=t,this.ty+=n,this},e.prototype.scale=function(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this},e.prototype.rotate=function(t){var n=Math.cos(t),r=Math.sin(t),i=this.a,a=this.c,o=this.tx;return this.a=i*n-this.b*r,this.b=i*r+this.b*n,this.c=a*n-this.d*r,this.d=a*r+this.d*n,this.tx=o*n-this.ty*r,this.ty=o*r+this.ty*n,this},e.prototype.append=function(t){var n=this.a,r=this.b,i=this.c,a=this.d;return this.a=t.a*n+t.b*i,this.b=t.a*r+t.b*a,this.c=t.c*n+t.d*i,this.d=t.c*r+t.d*a,this.tx=t.tx*n+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*a+this.ty,this},e.prototype.setTransform=function(t,n,r,i,a,o,s,l,u){return this.a=Math.cos(s+u)*a,this.b=Math.sin(s+u)*a,this.c=-Math.sin(s-l)*o,this.d=Math.cos(s-l)*o,this.tx=t-(r*this.a+i*this.c),this.ty=n-(r*this.b+i*this.d),this},e.prototype.prepend=function(t){var n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this},e.prototype.decompose=function(t){var n=this.a,r=this.b,i=this.c,a=this.d,o=t.pivot,s=-Math.atan2(-i,a),l=Math.atan2(r,n),u=Math.abs(s+l);return u<1e-5||Math.abs(aI-u)<1e-5?(t.rotation=l,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=s,t.skew.y=l),t.scale.x=Math.sqrt(n*n+r*r),t.scale.y=Math.sqrt(i*i+a*a),t.position.x=this.tx+(o.x*n+o.y*i),t.position.y=this.ty+(o.x*r+o.y*a),t},e.prototype.invert=function(){var t=this.a,n=this.b,r=this.c,i=this.d,a=this.tx,o=t*i-n*r;return this.a=i/o,this.b=-n/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-i*a)/o,this.ty=-(t*this.ty-n*a)/o,this},e.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},e.prototype.clone=function(){var t=new e;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},e.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(e,"IDENTITY",{get:function(){return new e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"TEMP_MATRIX",{get:function(){return new e},enumerable:!1,configurable:!0}),e}(),Bi=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],ki=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Di=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Gi=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Wc=[],ry=[],Bs=Math.sign;function uI(){for(var e=0;e<16;e++){var t=[];Wc.push(t);for(var n=0;n<16;n++)for(var r=Bs(Bi[e]*Bi[n]+Di[e]*ki[n]),i=Bs(ki[e]*Bi[n]+Gi[e]*ki[n]),a=Bs(Bi[e]*Di[n]+Di[e]*Gi[n]),o=Bs(ki[e]*Di[n]+Gi[e]*Gi[n]),s=0;s<16;s++)if(Bi[s]===r&&ki[s]===i&&Di[s]===a&&Gi[s]===o){t.push(s);break}}for(var e=0;e<16;e++){var l=new jn;l.set(Bi[e],ki[e],Di[e],Gi[e],0,0),ry.push(l)}}uI();var Lt={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return Bi[e]},uY:function(e){return ki[e]},vX:function(e){return Di[e]},vY:function(e){return Gi[e]},inv:function(e){return e&8?e&15:-e&7},add:function(e,t){return Wc[e][t]},sub:function(e,t){return Wc[e][Lt.inv(t)]},rotate180:function(e){return e^4},isVertical:function(e){return(e&3)===2},byDirection:function(e,t){return Math.abs(e)*2<=Math.abs(t)?t>=0?Lt.S:Lt.N:Math.abs(t)*2<=Math.abs(e)?e>0?Lt.E:Lt.W:t>0?e>0?Lt.SE:Lt.SW:e>0?Lt.NE:Lt.NW},matrixAppendRotationInv:function(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=ry[Lt.inv(t)];i.tx=n,i.ty=r,e.append(i)}},cI=function(){function e(){this.worldTransform=new jn,this.localTransform=new jn,this.position=new ha(this.onChange,this,0,0),this.scale=new ha(this.onChange,this,1,1),this.pivot=new ha(this.onChange,this,0,0),this.skew=new ha(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},e.prototype.toString=function(){return"[@pixi/math:Transform "+("position=("+this.position.x+", "+this.position.y+") ")+("rotation="+this.rotation+" ")+("scale=("+this.scale.x+", "+this.scale.y+") ")+("skew=("+this.skew.x+", "+this.skew.y+") ")+"]"},e.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(t){var n=this.localTransform;if(this._localID!==this._currentLocalID&&(n.a=this._cx*this.scale.x,n.b=this._sx*this.scale.x,n.c=this._cy*this.scale.y,n.d=this._sy*this.scale.y,n.tx=this.position.x-(this.pivot.x*n.a+this.pivot.y*n.c),n.ty=this.position.y-(this.pivot.x*n.b+this.pivot.y*n.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,i=this.worldTransform;i.a=n.a*r.a+n.b*r.c,i.b=n.a*r.b+n.b*r.d,i.c=n.c*r.a+n.d*r.c,i.d=n.c*r.b+n.d*r.d,i.tx=n.tx*r.a+n.ty*r.c+r.tx,i.ty=n.tx*r.b+n.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),e.IDENTITY=new e,e}();/*!
* @pixi/core - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/core is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/He.PREFER_ENV=Yi.any?Xr.WEBGL:Xr.WEBGL2;He.STRICT_TEXTURE_CACHE=!1;var Kc=[];function iy(e,t){if(!e)return null;var n="";if(typeof e=="string"){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);r&&(n=r[1].toLowerCase())}for(var i=Kc.length-1;i>=0;--i){var a=Kc[i];if(a.test&&a.test(e,n))return new a(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Yc=function(e,t){return Yc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Yc(e,t)};function Nt(e,t){Yc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Zc=function(){return Zc=Object.assign||function(t){for(var n=arguments,r,i=1,a=arguments.length;i<a;i++){r=n[i];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Zc.apply(this,arguments)};function fI(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n}var Ja=function(){function e(t,n){t===void 0&&(t=0),n===void 0&&(n=0),this._width=t,this._height=n,this.destroyed=!1,this.internal=!1,this.onResize=new pn("setRealSize"),this.onUpdate=new pn("update"),this.onError=new pn("onError")}return e.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},e.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},e.prototype.resize=function(t,n){(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,this.onResize.emit(t,n))},Object.defineProperty(e.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),e.prototype.update=function(){this.destroyed||this.onUpdate.emit()},e.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),e.prototype.style=function(t,n,r){return!1},e.prototype.dispose=function(){},e.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},e.test=function(t,n){return!1},e}(),Zf=function(e){Nt(t,e);function t(n,r){var i=this,a=r||{},o=a.width,s=a.height;if(!o||!s)throw new Error("BufferResource width or height invalid");return i=e.call(this,o,s)||this,i.data=n,i}return t.prototype.upload=function(n,r,i){var a=n.gl;a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===bi.UNPACK);var o=r.realWidth,s=r.realHeight;return i.width===o&&i.height===s?a.texSubImage2D(r.target,0,0,0,o,s,r.format,i.type,this.data):(i.width=o,i.height=s,a.texImage2D(r.target,0,i.internalFormat,o,s,0,r.format,i.type,this.data)),!0},t.prototype.dispose=function(){this.data=null},t.test=function(n){return n instanceof Float32Array||n instanceof Uint8Array||n instanceof Uint32Array},t}(Ja),dI={scaleMode:Dr.NEAREST,format:ge.RGBA,alphaMode:bi.NPM},rn=function(e){Nt(t,e);function t(n,r){n===void 0&&(n=null),r===void 0&&(r=null);var i=e.call(this)||this;r=r||{};var a=r.alphaMode,o=r.mipmap,s=r.anisotropicLevel,l=r.scaleMode,u=r.width,c=r.height,f=r.wrapMode,d=r.format,h=r.type,p=r.target,v=r.resolution,g=r.resourceOptions;return n&&!(n instanceof Ja)&&(n=iy(n,g),n.internal=!0),i.resolution=v||He.RESOLUTION,i.width=Math.round((u||0)*i.resolution)/i.resolution,i.height=Math.round((c||0)*i.resolution)/i.resolution,i._mipmap=o!==void 0?o:He.MIPMAP_TEXTURES,i.anisotropicLevel=s!==void 0?s:He.ANISOTROPIC_LEVEL,i._wrapMode=f||He.WRAP_MODE,i._scaleMode=l!==void 0?l:He.SCALE_MODE,i.format=d||ge.RGBA,i.type=h||vt.UNSIGNED_BYTE,i.target=p||eo.TEXTURE_2D,i.alphaMode=a!==void 0?a:bi.UNPACK,i.uid=Ya(),i.touched=0,i.isPowerOfTwo=!1,i._refreshPOT(),i._glTextures={},i.dirtyId=0,i.dirtyStyleId=0,i.cacheId=null,i.valid=u>0&&c>0,i.textureCacheIds=[],i.destroyed=!1,i.resource=null,i._batchEnabled=0,i._batchLocation=0,i.parentTextureArray=null,i.setResource(n),i}return Object.defineProperty(t.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mipmap",{get:function(){return this._mipmap},set:function(n){this._mipmap!==n&&(this._mipmap=n,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(n){this._scaleMode!==n&&(this._scaleMode=n,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(n){this._wrapMode!==n&&(this._wrapMode=n,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(n,r){var i;return n!==void 0&&n!==this.scaleMode&&(this.scaleMode=n,i=!0),r!==void 0&&r!==this.mipmap&&(this.mipmap=r,i=!0),i&&this.dirtyStyleId++,this},t.prototype.setSize=function(n,r,i){return i=i||this.resolution,this.setRealSize(n*i,r*i,i)},t.prototype.setRealSize=function(n,r,i){return this.resolution=i||this.resolution,this.width=Math.round(n)/this.resolution,this.height=Math.round(r)/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=fp(this.realWidth)&&fp(this.realHeight)},t.prototype.setResolution=function(n){var r=this.resolution;return r===n?this:(this.resolution=n,this.valid&&(this.width=Math.round(this.width*r)/n,this.height=Math.round(this.height*r)/n,this.emit("update",this)),this._refreshPOT(),this)},t.prototype.setResource=function(n){if(this.resource===n)return this;if(this.resource)throw new Error("Resource can be set only once");return n.bind(this),this.resource=n,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},t.prototype.onError=function(n){this.emit("error",this,n)},t.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Oi[this.cacheId],delete Ur[this.cacheId],this.cacheId=null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit("dispose",this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(n,r,i){i===void 0&&(i=He.STRICT_TEXTURE_CACHE);var a=typeof n=="string",o=null;if(a)o=n;else{if(!n._pixiId){var s=r&&r.pixiIdPrefix||"pixiid";n._pixiId=s+"_"+Ya()}o=n._pixiId}var l=Oi[o];if(a&&i&&!l)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return l||(l=new t(n,r),l.cacheId=o,t.addToCache(l,o)),l},t.fromBuffer=function(n,r,i,a){n=n||new Float32Array(r*i*4);var o=new Zf(n,{width:r,height:i}),s=n instanceof Float32Array?vt.FLOAT:vt.UNSIGNED_BYTE;return new t(o,Object.assign(dI,a||{width:r,height:i,type:s}))},t.addToCache=function(n,r){r&&(n.textureCacheIds.indexOf(r)===-1&&n.textureCacheIds.push(r),Oi[r]&&console.warn("BaseTexture added to the cache with an id ["+r+"] that already had an entry"),Oi[r]=n)},t.removeFromCache=function(n){if(typeof n=="string"){var r=Oi[n];if(r){var i=r.textureCacheIds.indexOf(n);return i>-1&&r.textureCacheIds.splice(i,1),delete Oi[n],r}}else if(n&&n.textureCacheIds){for(var a=0;a<n.textureCacheIds.length;++a)delete Oi[n.textureCacheIds[a]];return n.textureCacheIds.length=0,n}return null},t._globalBatch=0,t}(nu),oy=function(e){Nt(t,e);function t(n,r){var i=this,a=r||{},o=a.width,s=a.height;i=e.call(this,o,s)||this,i.items=[],i.itemDirtyIds=[];for(var l=0;l<n;l++){var u=new rn;i.items.push(u),i.itemDirtyIds.push(-2)}return i.length=n,i._load=null,i.baseTexture=null,i}return t.prototype.initFromArray=function(n,r){for(var i=0;i<this.length;i++)!n[i]||(n[i].castToBaseTexture?this.addBaseTextureAt(n[i].castToBaseTexture(),i):n[i]instanceof Ja?this.addResourceAt(n[i],i):this.addResourceAt(iy(n[i],r),i))},t.prototype.dispose=function(){for(var n=0,r=this.length;n<r;n++)this.items[n].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},t.prototype.addResourceAt=function(n,r){if(!this.items[r])throw new Error("Index "+r+" is out of bounds");return n.valid&&!this.valid&&this.resize(n.width,n.height),this.items[r].setResource(n),this},t.prototype.bind=function(n){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");e.prototype.bind.call(this,n);for(var r=0;r<this.length;r++)this.items[r].parentTextureArray=n,this.items[r].on("update",n.update,n)},t.prototype.unbind=function(n){e.prototype.unbind.call(this,n);for(var r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",n.update,n)},t.prototype.load=function(){var n=this;if(this._load)return this._load;var r=this.items.map(function(a){return a.resource}).filter(function(a){return a}),i=r.map(function(a){return a.load()});return this._load=Promise.all(i).then(function(){var a=n.items[0],o=a.realWidth,s=a.realHeight;return n.resize(o,s),Promise.resolve(n)}),this._load},t}(Ja),hI=function(e){Nt(t,e);function t(n,r){var i=this,a=r||{},o=a.width,s=a.height,l,u;return Array.isArray(n)?(l=n,u=n.length):u=n,i=e.call(this,u,{width:o,height:s})||this,l&&i.initFromArray(l,r),i}return t.prototype.addBaseTextureAt=function(n,r){if(n.resource)this.addResourceAt(n.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this},t.prototype.bind=function(n){e.prototype.bind.call(this,n),n.target=eo.TEXTURE_2D_ARRAY},t.prototype.upload=function(n,r,i){var a=this,o=a.length,s=a.itemDirtyIds,l=a.items,u=n.gl;i.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,o,0,r.format,i.type,null);for(var c=0;c<o;c++){var f=l[c];s[c]<f.dirtyId&&(s[c]=f.dirtyId,f.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,c,f.resource.width,f.resource.height,1,r.format,i.type,f.resource.source))}return!0},t}(oy),_i=function(e){Nt(t,e);function t(n){var r=this,i=n,a=i.naturalWidth||i.videoWidth||i.width,o=i.naturalHeight||i.videoHeight||i.height;return r=e.call(this,a,o)||this,r.source=n,r.noSubImage=!1,r}return t.crossOrigin=function(n,r,i){i===void 0&&r.indexOf("data:")!==0?n.crossOrigin=oI(r):i!==!1&&(n.crossOrigin=typeof i=="string"?i:"anonymous")},t.prototype.upload=function(n,r,i,a){var o=n.gl,s=r.realWidth,l=r.realHeight;if(a=a||this.source,a instanceof HTMLImageElement){if(!a.complete||a.naturalWidth===0)return!1}else if(a instanceof HTMLVideoElement&&a.readyState<=1)return!1;return o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===bi.UNPACK),!this.noSubImage&&r.target===o.TEXTURE_2D&&i.width===s&&i.height===l?o.texSubImage2D(o.TEXTURE_2D,0,0,0,r.format,i.type,a):(i.width=s,i.height=l,o.texImage2D(r.target,0,i.internalFormat,r.format,i.type,a)),!0},t.prototype.update=function(){if(!this.destroyed){var n=this.source,r=n.naturalWidth||n.videoWidth||n.width,i=n.naturalHeight||n.videoHeight||n.height;this.resize(r,i),e.prototype.update.call(this)}},t.prototype.dispose=function(){this.source=null},t}(Ja),ay=function(e){Nt(t,e);function t(n){return e.call(this,n)||this}return t.test=function(n){var r=globalThis.OffscreenCanvas;return r&&n instanceof r?!0:globalThis.HTMLCanvasElement&&n instanceof HTMLCanvasElement},t}(_i),pI=function(e){Nt(t,e);function t(n,r){var i=this,a=r||{},o=a.width,s=a.height,l=a.autoLoad,u=a.linkBaseTexture;if(n&&n.length!==t.SIDES)throw new Error("Invalid length. Got "+n.length+", expected 6");i=e.call(this,6,{width:o,height:s})||this;for(var c=0;c<t.SIDES;c++)i.items[c].target=eo.TEXTURE_CUBE_MAP_POSITIVE_X+c;return i.linkBaseTexture=u!==!1,n&&i.initFromArray(n,r),l!==!1&&i.load(),i}return t.prototype.bind=function(n){e.prototype.bind.call(this,n),n.target=eo.TEXTURE_CUBE_MAP},t.prototype.addBaseTextureAt=function(n,r,i){if(!this.items[r])throw new Error("Index "+r+" is out of bounds");if(!this.linkBaseTexture||n.parentTextureArray||Object.keys(n._glTextures).length>0)if(n.resource)this.addResourceAt(n.resource,r);else throw new Error("CubeResource does not support copying of renderTexture.");else n.target=eo.TEXTURE_CUBE_MAP_POSITIVE_X+r,n.parentTextureArray=this.baseTexture,this.items[r]=n;return n.valid&&!this.valid&&this.resize(n.realWidth,n.realHeight),this.items[r]=n,this},t.prototype.upload=function(n,r,i){for(var a=this.itemDirtyIds,o=0;o<t.SIDES;o++){var s=this.items[o];a[o]<s.dirtyId&&(s.valid&&s.resource?(s.resource.upload(n,s,i),a[o]=s.dirtyId):a[o]<-1&&(n.gl.texImage2D(s.target,0,i.internalFormat,r.realWidth,r.realHeight,0,r.format,i.type,null),a[o]=-1))}return!0},t.test=function(n){return Array.isArray(n)&&n.length===t.SIDES},t.SIDES=6,t}(oy),sy=function(e){Nt(t,e);function t(n,r){var i=this;if(r=r||{},!(n instanceof HTMLImageElement)){var a=new Image;_i.crossOrigin(a,n,r.crossorigin),a.src=n,n=a}return i=e.call(this,n)||this,!n.complete&&!!i._width&&!!i._height&&(i._width=0,i._height=0),i.url=n.src,i._process=null,i.preserveBitmap=!1,i.createBitmap=(r.createBitmap!==void 0?r.createBitmap:He.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,i.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,i.bitmap=null,i._load=null,r.autoLoad!==!1&&i.load(),i}return t.prototype.load=function(n){var r=this;return this._load?this._load:(n!==void 0&&(this.createBitmap=n),this._load=new Promise(function(i,a){var o=r.source;r.url=o.src;var s=function(){r.destroyed||(o.onload=null,o.onerror=null,r.resize(o.width,o.height),r._load=null,r.createBitmap?i(r.process()):i(r))};o.complete&&o.src?s():(o.onload=s,o.onerror=function(l){a(l),r.onError.emit(l)})}),this._load)},t.prototype.process=function(){var n=this,r=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);var i=globalThis.createImageBitmap,a=!r.crossOrigin||r.crossOrigin==="anonymous";return this._process=fetch(r.src,{mode:a?"cors":"no-cors"}).then(function(o){return o.blob()}).then(function(o){return i(o,0,0,r.width,r.height,{premultiplyAlpha:n.alphaMode===bi.UNPACK?"premultiply":"none"})}).then(function(o){return n.destroyed?Promise.reject():(n.bitmap=o,n.update(),n._process=null,Promise.resolve(n))}),this._process},t.prototype.upload=function(n,r,i){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return e.prototype.upload.call(this,n,r,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(e.prototype.upload.call(this,n,r,i,this.bitmap),!this.preserveBitmap){var a=!0,o=r._glTextures;for(var s in o){var l=o[s];if(l!==i&&l.dirtyId!==r.dirtyId){a=!1;break}}a&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},t.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,e.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},t.test=function(n){return typeof n=="string"||n instanceof HTMLImageElement},t}(_i),vI=function(e){Nt(t,e);function t(n,r){var i=this;return r=r||{},i=e.call(this,document.createElement("canvas"))||this,i._width=0,i._height=0,i.svg=n,i.scale=r.scale||1,i._overrideWidth=r.width,i._overrideHeight=r.height,i._resolve=null,i._crossorigin=r.crossorigin,i._load=null,r.autoLoad!==!1&&i.load(),i}return t.prototype.load=function(){var n=this;return this._load?this._load:(this._load=new Promise(function(r){if(n._resolve=function(){n.resize(n.source.width,n.source.height),r(n)},t.SVG_XML.test(n.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");n.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n.svg)))}n._loadSvg()}),this._load)},t.prototype._loadSvg=function(){var n=this,r=new Image;_i.crossOrigin(r,this.svg,this._crossorigin),r.src=this.svg,r.onerror=function(i){!n._resolve||(r.onerror=null,n.onError.emit(i))},r.onload=function(){if(!!n._resolve){var i=r.width,a=r.height;if(!i||!a)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var o=i*n.scale,s=a*n.scale;(n._overrideWidth||n._overrideHeight)&&(o=n._overrideWidth||n._overrideHeight/a*i,s=n._overrideHeight||n._overrideWidth/i*a),o=Math.round(o),s=Math.round(s);var l=n.source;l.width=o,l.height=s,l._pixiId="canvas_"+Ya(),l.getContext("2d").drawImage(r,0,0,i,a,0,0,o,s),n._resolve(),n._resolve=null}}},t.getSize=function(n){var r=t.SVG_SIZE.exec(n),i={};return r&&(i[r[1]]=Math.round(parseFloat(r[3])),i[r[5]]=Math.round(parseFloat(r[7]))),i},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},t.test=function(n,r){return r==="svg"||typeof n=="string"&&/^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(n)||typeof n=="string"&&t.SVG_XML.test(n)},t.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,t.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(_i),mI=function(e){Nt(t,e);function t(n,r){var i=this;if(r=r||{},!(n instanceof HTMLVideoElement)){var a=document.createElement("video");a.setAttribute("preload","auto"),a.setAttribute("webkit-playsinline",""),a.setAttribute("playsinline",""),typeof n=="string"&&(n=[n]);var o=n[0].src||n[0];_i.crossOrigin(a,o,r.crossorigin);for(var s=0;s<n.length;++s){var l=document.createElement("source"),u=n[s],c=u.src,f=u.mime;c=c||n[s];var d=c.split("?").shift().toLowerCase(),h=d.slice(d.lastIndexOf(".")+1);f=f||t.MIME_TYPES[h]||"video/"+h,l.src=c,l.type=f,a.appendChild(l)}n=a}return i=e.call(this,n)||this,i.noSubImage=!0,i._autoUpdate=!0,i._isConnectedToTicker=!1,i._updateFPS=r.updateFPS||0,i._msToNextUpdate=0,i.autoPlay=r.autoPlay!==!1,i._load=null,i._resolve=null,i._onCanPlay=i._onCanPlay.bind(i),i._onError=i._onError.bind(i),r.autoLoad!==!1&&i.load(),i}return t.prototype.update=function(n){if(!this.destroyed){var r=Ui.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-r),(!this._updateFPS||this._msToNextUpdate<=0)&&(e.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},t.prototype.load=function(){var n=this;if(this._load)return this._load;var r=this.source;return(r.readyState===r.HAVE_ENOUGH_DATA||r.readyState===r.HAVE_FUTURE_DATA)&&r.width&&r.height&&(r.complete=!0),r.addEventListener("play",this._onPlayStart.bind(this)),r.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(r.addEventListener("canplay",this._onCanPlay),r.addEventListener("canplaythrough",this._onCanPlay),r.addEventListener("error",this._onError,!0)),this._load=new Promise(function(i){n.valid?i(n):(n._resolve=i,r.load())}),this._load},t.prototype._onError=function(n){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(n)},t.prototype._isSourcePlaying=function(){var n=this.source;return n.currentTime>0&&n.paused===!1&&n.ended===!1&&n.readyState>2},t.prototype._isSourceReady=function(){var n=this.source;return n.readyState===3||n.readyState===4},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Ui.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Ui.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var n=this.source;n.removeEventListener("canplay",this._onCanPlay),n.removeEventListener("canplaythrough",this._onCanPlay);var r=this.valid;this.resize(n.videoWidth,n.videoHeight),!r&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&n.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&(Ui.shared.remove(this.update,this),this._isConnectedToTicker=!1);var n=this.source;n&&(n.removeEventListener("error",this._onError,!0),n.pause(),n.src="",n.load()),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(n){n!==this._autoUpdate&&(this._autoUpdate=n,!this._autoUpdate&&this._isConnectedToTicker?(Ui.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Ui.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(n){n!==this._updateFPS&&(this._updateFPS=n)},enumerable:!1,configurable:!0}),t.test=function(n,r){return globalThis.HTMLVideoElement&&n instanceof HTMLVideoElement||t.TYPES.indexOf(r)>-1},t.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],t.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},t}(_i),gI=function(e){Nt(t,e);function t(n){return e.call(this,n)||this}return t.test=function(n){return!!globalThis.createImageBitmap&&n instanceof ImageBitmap},t}(_i);Kc.push(sy,gI,ay,mI,vI,Zf,pI,hI);var yI=function(e){Nt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.upload=function(n,r,i){var a=n.gl;a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===bi.UNPACK);var o=r.realWidth,s=r.realHeight;return i.width===o&&i.height===s?a.texSubImage2D(r.target,0,0,0,o,s,r.format,i.type,this.data):(i.width=o,i.height=s,a.texImage2D(r.target,0,i.internalFormat,o,s,0,r.format,i.type,this.data)),!0},t}(Zf),Jc=function(){function e(t,n){this.width=Math.round(t||100),this.height=Math.round(n||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new pn("disposeFramebuffer"),this.multisample=en.NONE}return Object.defineProperty(e.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(t,n){return t===void 0&&(t=0),this.colorTextures[t]=n||new rn(null,{scaleMode:Dr.NEAREST,resolution:1,mipmap:ro.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(t){return this.depthTexture=t||new rn(new yI(null,{width:this.width,height:this.height}),{scaleMode:Dr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:ro.OFF,format:ge.DEPTH_COMPONENT,type:vt.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(t,n){if(t=Math.round(t),n=Math.round(n),!(t===this.width&&n===this.height)){this.width=t,this.height=n,this.dirtyId++,this.dirtySize++;for(var r=0;r<this.colorTextures.length;r++){var i=this.colorTextures[r],a=i.resolution;i.setSize(t/a,n/a)}if(this.depthTexture){var a=this.depthTexture.resolution;this.depthTexture.setSize(t/a,n/a)}}},e.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},e.prototype.destroyDepthTexture=function(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)},e}(),ly=function(e){Nt(t,e);function t(n){n===void 0&&(n={});var r=this;if(typeof n=="number"){var i=arguments[0],a=arguments[1],o=arguments[2],s=arguments[3];n={width:i,height:a,scaleMode:o,resolution:s}}return n.width=n.width||100,n.height=n.height||100,n.multisample=n.multisample!==void 0?n.multisample:en.NONE,r=e.call(this,null,n)||this,r.mipmap=ro.OFF,r.valid=!0,r.clearColor=[0,0,0,0],r.framebuffer=new Jc(r.realWidth,r.realHeight).addColorTexture(0,r),r.framebuffer.multisample=n.multisample,r.maskStack=[],r.filterStack=[{}],r}return t.prototype.resize=function(n,r){this.framebuffer.resize(n*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)},t.prototype.dispose=function(){this.framebuffer.dispose(),e.prototype.dispose.call(this)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.framebuffer.destroyDepthTexture(),this.framebuffer=null},t}(rn),uy=function(){function e(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}return e.prototype.set=function(t,n,r){var i=n.width,a=n.height;if(r){var o=t.width/2/i,s=t.height/2/a,l=t.x/i+o,u=t.y/a+s;r=Lt.add(r,Lt.NW),this.x0=l+o*Lt.uX(r),this.y0=u+s*Lt.uY(r),r=Lt.add(r,2),this.x1=l+o*Lt.uX(r),this.y1=u+s*Lt.uY(r),r=Lt.add(r,2),this.x2=l+o*Lt.uX(r),this.y2=u+s*Lt.uY(r),r=Lt.add(r,2),this.x3=l+o*Lt.uX(r),this.y3=u+s*Lt.uY(r)}else this.x0=t.x/i,this.y0=t.y/a,this.x1=(t.x+t.width)/i,this.y1=t.y/a,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/a,this.x3=t.x/i,this.y3=(t.y+t.height)/a;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3},e.prototype.toString=function(){return"[@pixi/core:TextureUvs "+("x0="+this.x0+" y0="+this.y0+" ")+("x1="+this.x1+" y1="+this.y1+" x2="+this.x2+" ")+("y2="+this.y2+" x3="+this.x3+" y3="+this.y3)+"]"},e}(),mp=new uy;function ks(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}var Gr=function(e){Nt(t,e);function t(n,r,i,a,o,s){var l=e.call(this)||this;if(l.noFrame=!1,r||(l.noFrame=!0,r=new Zt(0,0,1,1)),n instanceof t&&(n=n.baseTexture),l.baseTexture=n,l._frame=r,l.trim=a,l.valid=!1,l._uvs=mp,l.uvMatrix=null,l.orig=i||r,l._rotate=Number(o||0),o===!0)l._rotate=2;else if(l._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return l.defaultAnchor=s?new Yt(s.x,s.y):new Yt(0,0),l._updateID=0,l.textureCacheIds=[],n.valid?l.noFrame?n.valid&&l.onBaseTextureUpdated(n):l.frame=r:n.once("loaded",l.onBaseTextureUpdated,l),l.noFrame&&n.on("update",l.onBaseTextureUpdated,l),l}return t.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},t.prototype.onBaseTextureUpdated=function(n){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=n.width,this._frame.height=n.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},t.prototype.destroy=function(n){if(this.baseTexture){if(n){var r=this.baseTexture.resource;r&&r.url&&Ur[r.url]&&t.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,t.removeFromCache(this),this.textureCacheIds=null},t.prototype.clone=function(){var n=this._frame.clone(),r=this._frame===this.orig?n:this.orig.clone(),i=new t(this.baseTexture,!this.noFrame&&n,r,this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor);return this.noFrame&&(i._frame=n),i},t.prototype.updateUvs=function(){this._uvs===mp&&(this._uvs=new uy),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},t.from=function(n,r,i){r===void 0&&(r={}),i===void 0&&(i=He.STRICT_TEXTURE_CACHE);var a=typeof n=="string",o=null;if(a)o=n;else if(n instanceof rn){if(!n.cacheId){var s=r&&r.pixiIdPrefix||"pixiid";n.cacheId=s+"-"+Ya(),rn.addToCache(n,n.cacheId)}o=n.cacheId}else{if(!n._pixiId){var s=r&&r.pixiIdPrefix||"pixiid";n._pixiId=s+"_"+Ya()}o=n._pixiId}var l=Ur[o];if(a&&i&&!l)throw new Error('The cacheId "'+o+'" does not exist in TextureCache.');return!l&&!(n instanceof rn)?(r.resolution||(r.resolution=vp(n)),l=new t(new rn(n,r)),l.baseTexture.cacheId=o,rn.addToCache(l.baseTexture,o),t.addToCache(l,o)):!l&&n instanceof rn&&(l=new t(n),t.addToCache(l,o)),l},t.fromURL=function(n,r){var i=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),a=t.from(n,Object.assign({resourceOptions:i},r),!1),o=a.baseTexture.resource;return a.baseTexture.valid?Promise.resolve(a):o.load().then(function(){return Promise.resolve(a)})},t.fromBuffer=function(n,r,i,a){return new t(rn.fromBuffer(n,r,i,a))},t.fromLoader=function(n,r,i,a){var o=new rn(n,Object.assign({scaleMode:He.SCALE_MODE,resolution:vp(r)},a)),s=o.resource;s instanceof sy&&(s.url=r);var l=new t(o);return i||(i=r),rn.addToCache(l.baseTexture,i),t.addToCache(l,i),i!==r&&(rn.addToCache(l.baseTexture,r),t.addToCache(l,r)),l.baseTexture.valid?Promise.resolve(l):new Promise(function(u){l.baseTexture.once("loaded",function(){return u(l)})})},t.addToCache=function(n,r){r&&(n.textureCacheIds.indexOf(r)===-1&&n.textureCacheIds.push(r),Ur[r]&&console.warn("Texture added to the cache with an id ["+r+"] that already had an entry"),Ur[r]=n)},t.removeFromCache=function(n){if(typeof n=="string"){var r=Ur[n];if(r){var i=r.textureCacheIds.indexOf(n);return i>-1&&r.textureCacheIds.splice(i,1),delete Ur[n],r}}else if(n&&n.textureCacheIds){for(var a=0;a<n.textureCacheIds.length;++a)Ur[n.textureCacheIds[a]]===n&&delete Ur[n.textureCacheIds[a]];return n.textureCacheIds.length=0,n}return null},Object.defineProperty(t.prototype,"resolution",{get:function(){return this.baseTexture.resolution},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"frame",{get:function(){return this._frame},set:function(n){this._frame=n,this.noFrame=!1;var r=n.x,i=n.y,a=n.width,o=n.height,s=r+a>this.baseTexture.width,l=i+o>this.baseTexture.height;if(s||l){var u=s&&l?"and":"or",c="X: "+r+" + "+a+" = "+(r+a)+" > "+this.baseTexture.width,f="Y: "+i+" + "+o+" = "+(i+o)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+(c+" "+u+" "+f))}this.valid=a&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=n),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this._rotate},set:function(n){this._rotate=n,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(t,"EMPTY",{get:function(){return t._EMPTY||(t._EMPTY=new t(new rn),ks(t._EMPTY),ks(t._EMPTY.baseTexture)),t._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(t,"WHITE",{get:function(){if(!t._WHITE){var n=document.createElement("canvas"),r=n.getContext("2d");n.width=16,n.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),t._WHITE=new t(new rn(new ay(n))),ks(t._WHITE),ks(t._WHITE.baseTexture)}return t._WHITE},enumerable:!1,configurable:!0}),t}(nu),Jf=function(e){Nt(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Object.defineProperty(t.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(n){this.framebuffer.multisample=n},enumerable:!1,configurable:!0}),t.prototype.resize=function(n,r,i){i===void 0&&(i=!0);var a=this.baseTexture.resolution,o=Math.round(n*a)/a,s=Math.round(r*a)/a;this.valid=o>0&&s>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=s,i&&this.baseTexture.resize(o,s),this.updateUvs()},t.prototype.setResolution=function(n){var r=this.baseTexture;r.resolution!==n&&(r.setResolution(n),this.resize(r.width,r.height,!1))},t.create=function(n){for(var r=arguments,i=[],a=1;a<arguments.length;a++)i[a-1]=r[a];return typeof n=="number"&&(Za("6.0.0","Arguments (width, height, scaleMode, resolution) have been deprecated."),n={width:n,height:i[0],scaleMode:i[1],resolution:i[2]}),new t(new ly(n))},t}(Gr),bI=function(){function e(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return e.prototype.createTexture=function(t,n,r){r===void 0&&(r=en.NONE);var i=new ly(Object.assign({width:t,height:n,resolution:1,multisample:r},this.textureOptions));return new Jf(i)},e.prototype.getOptimalTexture=function(t,n,r,i){r===void 0&&(r=1),i===void 0&&(i=en.NONE);var a;t=Math.ceil(t*r-1e-6),n=Math.ceil(n*r-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||n!==this._pixelsHeight?(t=Rl(t),n=Rl(n),a=((t&65535)<<16|n&65535)>>>0,i>1&&(a+=i*4294967296)):a=i>1?-i:-1,this.texturePool[a]||(this.texturePool[a]=[]);var o=this.texturePool[a].pop();return o||(o=this.createTexture(t,n,i)),o.filterPoolKey=a,o.setResolution(r),o},e.prototype.getFilterTexture=function(t,n,r){var i=this.getOptimalTexture(t.width,t.height,n||t.resolution,r||en.NONE);return i.filterFrame=t.filterFrame,i},e.prototype.returnTexture=function(t){var n=t.filterPoolKey;t.filterFrame=null,this.texturePool[n].push(t)},e.prototype.returnFilterTexture=function(t){this.returnTexture(t)},e.prototype.clear=function(t){if(t=t!==!1,t)for(var n in this.texturePool){var r=this.texturePool[n];if(r)for(var i=0;i<r.length;i++)r[i].destroy(!0)}this.texturePool={}},e.prototype.setScreenSize=function(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(var n in this.texturePool)if(Number(n)<0){var r=this.texturePool[n];if(r)for(var i=0;i<r.length;i++)r[i].destroy(!0);this.texturePool[n]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}},e.SCREEN_KEY=-1,e}(),gp=function(){function e(t,n,r,i,a,o,s){n===void 0&&(n=0),r===void 0&&(r=!1),i===void 0&&(i=vt.FLOAT),this.buffer=t,this.size=n,this.normalized=r,this.type=i,this.stride=a,this.start=o,this.instance=s}return e.prototype.destroy=function(){this.buffer=null},e.from=function(t,n,r,i,a){return new e(t,n,r,i,a)},e}(),xI=0,Mn=function(){function e(t,n,r){n===void 0&&(n=!0),r===void 0&&(r=!1),this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=r,this.static=n,this.id=xI++,this.disposeRunner=new pn("disposeBuffer")}return e.prototype.update=function(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++},e.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},e.prototype.destroy=function(){this.dispose(),this.data=null},Object.defineProperty(e.prototype,"index",{get:function(){return this.type===Nr.ELEMENT_ARRAY_BUFFER},set:function(t){this.type=t?Nr.ELEMENT_ARRAY_BUFFER:Nr.ARRAY_BUFFER},enumerable:!1,configurable:!0}),e.from=function(t){return t instanceof Array&&(t=new Float32Array(t)),new e(t)},e}(),_I={Float32Array,Uint32Array,Int32Array,Uint8Array};function TI(e,t){for(var n=0,r=0,i={},a=0;a<e.length;a++)r+=t[a],n+=e[a].length;for(var o=new ArrayBuffer(n*4),s=null,l=0,a=0;a<e.length;a++){var u=t[a],c=e[a],f=ny(c);i[f]||(i[f]=new _I[f](o)),s=i[f];for(var d=0;d<c.length;d++){var h=(d/u|0)*r+l,p=d%u;s[h+p]=c[d]}l+=u}return new Float32Array(o)}var yp={5126:4,5123:2,5121:1},wI=0,CI={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array},Qf=function(){function e(t,n){t===void 0&&(t=[]),n===void 0&&(n={}),this.buffers=t,this.indexBuffer=null,this.attributes=n,this.glVertexArrayObjects={},this.id=wI++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new pn("disposeGeometry"),this.refCount=0}return e.prototype.addAttribute=function(t,n,r,i,a,o,s,l){if(r===void 0&&(r=0),i===void 0&&(i=!1),l===void 0&&(l=!1),!n)throw new Error("You must pass a buffer when creating an attribute");n instanceof Mn||(n instanceof Array&&(n=new Float32Array(n)),n=new Mn(n));var u=t.split("|");if(u.length>1){for(var c=0;c<u.length;c++)this.addAttribute(u[c],n,r,i,a);return this}var f=this.buffers.indexOf(n);return f===-1&&(this.buffers.push(n),f=this.buffers.length-1),this.attributes[t]=new gp(f,r,i,a,o,s,l),this.instanced=this.instanced||l,this},e.prototype.getAttribute=function(t){return this.attributes[t]},e.prototype.getBuffer=function(t){return this.buffers[this.getAttribute(t).buffer]},e.prototype.addIndex=function(t){return t instanceof Mn||(t instanceof Array&&(t=new Uint16Array(t)),t=new Mn(t)),t.type=Nr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.indexOf(t)===-1&&this.buffers.push(t),this},e.prototype.getIndex=function(){return this.indexBuffer},e.prototype.interleave=function(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;var t=[],n=[],r=new Mn,i;for(i in this.attributes){var a=this.attributes[i],o=this.buffers[a.buffer];t.push(o.data),n.push(a.size*yp[a.type]/4),a.buffer=0}for(r.data=TI(t,n),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[r],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},e.prototype.getSize=function(){for(var t in this.attributes){var n=this.attributes[t],r=this.buffers[n.buffer];return r.data.length/(n.stride/4||n.size)}return 0},e.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},e.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},e.prototype.clone=function(){for(var t=new e,n=0;n<this.buffers.length;n++)t.buffers[n]=new Mn(this.buffers[n].data.slice(0));for(var n in this.attributes){var r=this.attributes[n];t.attributes[n]=new gp(r.buffer,r.size,r.normalized,r.type,r.stride,r.start,r.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Nr.ELEMENT_ARRAY_BUFFER),t},e.merge=function(t){for(var n=new e,r=[],i=[],a=[],o,s=0;s<t.length;s++){o=t[s];for(var l=0;l<o.buffers.length;l++)i[l]=i[l]||0,i[l]+=o.buffers[l].data.length,a[l]=0}for(var s=0;s<o.buffers.length;s++)r[s]=new CI[ny(o.buffers[s].data)](i[s]),n.buffers[s]=new Mn(r[s]);for(var s=0;s<t.length;s++){o=t[s];for(var l=0;l<o.buffers.length;l++)r[l].set(o.buffers[l].data,a[l]),a[l]+=o.buffers[l].data.length}if(n.attributes=o.attributes,o.indexBuffer){n.indexBuffer=n.buffers[o.buffers.indexOf(o.indexBuffer)],n.indexBuffer.type=Nr.ELEMENT_ARRAY_BUFFER;for(var u=0,c=0,f=0,d=0,s=0;s<o.buffers.length;s++)if(o.buffers[s]!==o.indexBuffer){d=s;break}for(var s in o.attributes){var h=o.attributes[s];(h.buffer|0)===d&&(c+=h.size*yp[h.type]/4)}for(var s=0;s<t.length;s++){for(var p=t[s].indexBuffer.data,l=0;l<p.length;l++)n.indexBuffer.data[l+f]+=u;u+=t[s].buffers[d].data.length/c,f+=p.length}}return n},e}(),EI=function(e){Nt(t,e);function t(){var n=e.call(this)||this;return n.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2]),n}return t}(Qf),II=function(e){Nt(t,e);function t(){var n=e.call(this)||this;return n.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),n.uvs=new Float32Array([0,0,1,0,1,1,0,1]),n.vertexBuffer=new Mn(n.vertices),n.uvBuffer=new Mn(n.uvs),n.addAttribute("aVertexPosition",n.vertexBuffer).addAttribute("aTextureCoord",n.uvBuffer).addIndex([0,1,2,0,2,3]),n}return t.prototype.map=function(n,r){var i=0,a=0;return this.uvs[0]=i,this.uvs[1]=a,this.uvs[2]=i+r.width/n.width,this.uvs[3]=a,this.uvs[4]=i+r.width/n.width,this.uvs[5]=a+r.height/n.height,this.uvs[6]=i,this.uvs[7]=a+r.height/n.height,i=r.x,a=r.y,this.vertices[0]=i,this.vertices[1]=a,this.vertices[2]=i+r.width,this.vertices[3]=a,this.vertices[4]=i+r.width,this.vertices[5]=a+r.height,this.vertices[6]=i,this.vertices[7]=a+r.height,this.invalidate(),this},t.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},t}(Qf),SI=0,Po=function(){function e(t,n,r){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=SI++,this.static=!!n,this.ubo=!!r,t instanceof Mn?(this.buffer=t,this.buffer.type=Nr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new Mn(new Float32Array(1)),this.buffer.type=Nr.UNIFORM_BUFFER,this.autoManage=!0))}return e.prototype.update=function(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()},e.prototype.add=function(t,n,r){if(!this.ubo)this.uniforms[t]=new e(n,r);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")},e.from=function(t,n,r){return new e(t,n,r)},e.uboFrom=function(t,n){return new e(t,n!=null?n:!0,!0)},e}(),NI=function(){function e(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=en.NONE,this.sourceFrame=new Zt,this.destinationFrame=new Zt,this.bindingSourceFrame=new Zt,this.bindingDestinationFrame=new Zt,this.filters=[],this.transform=null}return e.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null},e}(),Ds=[new Yt,new Yt,new Yt,new Yt],Bu=new jn,RI=function(){function e(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new bI,this.texturePool.setScreenSize(t.view),this.statePool=[],this.quad=new EI,this.quadUv=new II,this.tempRect=new Zt,this.activeState={},this.globalUniforms=new Po({outputFrame:new Zt,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}return e.prototype.push=function(t,n){for(var r,i,a=this.renderer,o=this.defaultFilterStack,s=this.statePool.pop()||new NI,l=this.renderer.renderTexture,u=n[0].resolution,c=n[0].multisample,f=n[0].padding,d=n[0].autoFit,h=(r=n[0].legacy)!==null&&r!==void 0?r:!0,p=1;p<n.length;p++){var v=n[p];u=Math.min(u,v.resolution),c=Math.min(c,v.multisample),f=this.useMaxPadding?Math.max(f,v.padding):f+v.padding,d=d&&v.autoFit,h=h||((i=v.legacy)!==null&&i!==void 0?i:!0)}o.length===1&&(this.defaultFilterStack[0].renderTexture=l.current),o.push(s),s.resolution=u,s.multisample=c,s.legacy=h,s.target=t,s.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),s.sourceFrame.pad(f);var g=this.tempRect.copyFrom(l.sourceFrame);a.projection.transform&&this.transformAABB(Bu.copyFrom(a.projection.transform).invert(),g),d?(s.sourceFrame.fit(g),(s.sourceFrame.width<=0||s.sourceFrame.height<=0)&&(s.sourceFrame.width=0,s.sourceFrame.height=0)):s.sourceFrame.intersects(g)||(s.sourceFrame.width=0,s.sourceFrame.height=0),this.roundFrame(s.sourceFrame,l.current?l.current.resolution:a.resolution,l.sourceFrame,l.destinationFrame,a.projection.transform),s.renderTexture=this.getOptimalFilterTexture(s.sourceFrame.width,s.sourceFrame.height,u,c),s.filters=n,s.destinationFrame.width=s.renderTexture.width,s.destinationFrame.height=s.renderTexture.height;var y=this.tempRect;y.x=0,y.y=0,y.width=s.sourceFrame.width,y.height=s.sourceFrame.height,s.renderTexture.filterFrame=s.sourceFrame,s.bindingSourceFrame.copyFrom(l.sourceFrame),s.bindingDestinationFrame.copyFrom(l.destinationFrame),s.transform=a.projection.transform,a.projection.transform=null,l.bind(s.renderTexture,s.sourceFrame,y),a.framebuffer.clear(0,0,0,0)},e.prototype.pop=function(){var t=this.defaultFilterStack,n=t.pop(),r=n.filters;this.activeState=n;var i=this.globalUniforms.uniforms;i.outputFrame=n.sourceFrame,i.resolution=n.resolution;var a=i.inputSize,o=i.inputPixel,s=i.inputClamp;if(a[0]=n.destinationFrame.width,a[1]=n.destinationFrame.height,a[2]=1/a[0],a[3]=1/a[1],o[0]=Math.round(a[0]*n.resolution),o[1]=Math.round(a[1]*n.resolution),o[2]=1/o[0],o[3]=1/o[1],s[0]=.5*o[2],s[1]=.5*o[3],s[2]=n.sourceFrame.width*a[2]-.5*o[2],s[3]=n.sourceFrame.height*a[3]-.5*o[3],n.legacy){var l=i.filterArea;l[0]=n.destinationFrame.width,l[1]=n.destinationFrame.height,l[2]=n.sourceFrame.x,l[3]=n.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();var u=t[t.length-1];if(this.renderer.framebuffer.blit(),r.length===1)r[0].apply(this,n.renderTexture,u.renderTexture,ai.BLEND,n),this.returnFilterTexture(n.renderTexture);else{var c=n.renderTexture,f=this.getOptimalFilterTexture(c.width,c.height,n.resolution);f.filterFrame=c.filterFrame;var d=0;for(d=0;d<r.length-1;++d){d===1&&n.multisample>1&&(f=this.getOptimalFilterTexture(c.width,c.height,n.resolution),f.filterFrame=c.filterFrame),r[d].apply(this,c,f,ai.CLEAR,n);var h=c;c=f,f=h}r[d].apply(this,c,u.renderTexture,ai.BLEND,n),d>1&&n.multisample>1&&this.returnFilterTexture(n.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(f)}n.clear(),this.statePool.push(n)},e.prototype.bindAndClear=function(t,n){n===void 0&&(n=ai.CLEAR);var r=this.renderer,i=r.renderTexture,a=r.state;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t&&t.filterFrame){var o=this.tempRect;o.x=0,o.y=0,o.width=t.filterFrame.width,o.height=t.filterFrame.height,i.bind(t,t.filterFrame,o)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var s=a.stateId&1||this.forceClear;(n===ai.CLEAR||n===ai.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)},e.prototype.applyFilter=function(t,n,r,i){var a=this.renderer;a.state.set(t.state),this.bindAndClear(r,i),t.uniforms.uSampler=n,t.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(n._frame,n.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(Ha.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Ha.TRIANGLE_STRIP))},e.prototype.calculateSpriteMatrix=function(t,n){var r=this.activeState,i=r.sourceFrame,a=r.destinationFrame,o=n._texture.orig,s=t.set(a.width,0,0,a.height,i.x,i.y),l=n.worldTransform.copyTo(jn.TEMP_MATRIX);return l.invert(),s.prepend(l),s.scale(1/o.width,1/o.height),s.translate(n.anchor.x,n.anchor.y),s},e.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},e.prototype.getOptimalFilterTexture=function(t,n,r,i){return r===void 0&&(r=1),i===void 0&&(i=en.NONE),this.texturePool.getOptimalTexture(t,n,r,i)},e.prototype.getFilterTexture=function(t,n,r){if(typeof t=="number"){var i=t;t=n,n=i}t=t||this.activeState.renderTexture;var a=this.texturePool.getOptimalTexture(t.width,t.height,n||t.resolution,r||en.NONE);return a.filterFrame=t.filterFrame,a},e.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},e.prototype.emptyPool=function(){this.texturePool.clear(!0)},e.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},e.prototype.transformAABB=function(t,n){var r=Ds[0],i=Ds[1],a=Ds[2],o=Ds[3];r.set(n.left,n.top),i.set(n.left,n.bottom),a.set(n.right,n.top),o.set(n.right,n.bottom),t.apply(r,r),t.apply(i,i),t.apply(a,a),t.apply(o,o);var s=Math.min(r.x,i.x,a.x,o.x),l=Math.min(r.y,i.y,a.y,o.y),u=Math.max(r.x,i.x,a.x,o.x),c=Math.max(r.y,i.y,a.y,o.y);n.x=s,n.y=l,n.width=u-s,n.height=c-l},e.prototype.roundFrame=function(t,n,r,i,a){if(!(t.width<=0||t.height<=0||r.width<=0||r.height<=0)){if(a){var o=a.a,s=a.b,l=a.c,u=a.d;if((Math.abs(s)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(u)>1e-4))return}a=a?Bu.copyFrom(a):Bu.identity(),a.translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.transformAABB(a,t),t.ceil(n),this.transformAABB(a.invert(),t)}},e}(),cy=function(){function e(t){this.renderer=t}return e.prototype.flush=function(){},e.prototype.destroy=function(){this.renderer=null},e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.render=function(t){},e}(),AI=function(){function e(t){this.renderer=t,this.emptyRenderer=new cy(t),this.currentRenderer=this.emptyRenderer}return e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.copyBoundTextures=function(t,n){for(var r=this.renderer.texture.boundTextures,i=n-1;i>=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)},e.prototype.boundArray=function(t,n,r,i){for(var a=t.elements,o=t.ids,s=t.count,l=0,u=0;u<s;u++){var c=a[u],f=c._batchLocation;if(f>=0&&f<i&&n[f]===c){o[u]=f;continue}for(;l<i;){var d=n[l];if(d&&d._batchEnabled===r&&d._batchLocation===l){l++;continue}o[u]=l,c._batchLocation=l,n[l]=c;break}}},e.prototype.destroy=function(){this.renderer=null},e}(),bp=0,OI=function(){function e(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),t.view.addEventListener("webglcontextlost",this.handleContextLost,!1),t.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}return Object.defineProperty(e.prototype,"isLost",{get:function(){return!this.gl||this.gl.isContextLost()},enumerable:!1,configurable:!0}),e.prototype.contextChange=function(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=bp++,t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext()},e.prototype.initFromContext=function(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=bp++,this.renderer.runners.contextChange.emit(t)},e.prototype.initFromOptions=function(t){var n=this.createContext(this.renderer.view,t);this.initFromContext(n)},e.prototype.createContext=function(t,n){var r;if(He.PREFER_ENV>=Xr.WEBGL2&&(r=t.getContext("webgl2",n)),r)this.webGLVersion=2;else if(this.webGLVersion=1,r=t.getContext("webgl",n)||t.getContext("experimental-webgl",n),!r)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=r,this.getExtensions(),this.gl},e.prototype.getExtensions=function(){var t=this.gl,n={anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,n,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,n,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;this.renderer=null,t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(t){var n=t.getContextAttributes(),r="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;r&&(this.webGLVersion=2),n&&!n.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var i=r||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},e}(),PI=function(){function e(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=en.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}return e}(),FI=new Zt,MI=function(){function e(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new Jc(10,10),this.msaaSamples=null}return e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Zt,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),this.renderer.context.webGLVersion===1){var n=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;He.PREFER_ENV===Xr.WEBGL_LEGACY&&(n=null,r=null),n?t.drawBuffers=function(i){return n.drawBuffersWEBGL(i)}:(this.hasMRT=!1,t.drawBuffers=function(){}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},e.prototype.bind=function(t,n,r){r===void 0&&(r=0);var i=this.gl;if(t){var a=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,a.mipLevel=r),a.dirtyId!==t.dirtyId&&(a.dirtyId=t.dirtyId,a.dirtyFormat!==t.dirtyFormat?(a.dirtyFormat=t.dirtyFormat,a.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):a.dirtySize!==t.dirtySize&&(a.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var o=0;o<t.colorTextures.length;o++){var s=t.colorTextures[o];this.renderer.texture.unbind(s.parentTextureArray||s)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),n){var l=n.width>>r,u=n.height>>r,c=l/n.width;this.setViewport(n.x*c,n.y*c,l,u)}else{var l=t.width>>r,u=t.height>>r;this.setViewport(0,0,l,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),n?this.setViewport(n.x,n.y,n.width,n.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},e.prototype.setViewport=function(t,n,r,i){var a=this.viewport;t=Math.round(t),n=Math.round(n),r=Math.round(r),i=Math.round(i),(a.width!==r||a.height!==i||a.x!==t||a.y!==n)&&(a.x=t,a.y=n,a.width=r,a.height=i,this.gl.viewport(t,n,r,i))},Object.defineProperty(e.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),e.prototype.clear=function(t,n,r,i,a){a===void 0&&(a=Sl.COLOR|Sl.DEPTH);var o=this.gl;o.clearColor(t,n,r,i),o.clear(a)},e.prototype.initFramebuffer=function(t){var n=this.gl,r=new PI(n.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r},e.prototype.resizeFramebuffer=function(t){var n=this.gl,r=t.glFramebuffers[this.CONTEXT_UID];r.msaaBuffer&&(n.bindRenderbuffer(n.RENDERBUFFER,r.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.RGBA8,t.width,t.height)),r.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height));var i=t.colorTextures,a=i.length;n.drawBuffers||(a=Math.min(a,1));for(var o=0;o<a;o++){var s=i[o],l=s.parentTextureArray||s;this.renderer.texture.bind(l,0)}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)},e.prototype.updateFramebuffer=function(t,n){var r=this.gl,i=t.glFramebuffers[this.CONTEXT_UID],a=t.colorTextures,o=a.length;r.drawBuffers||(o=Math.min(o,1)),i.multisample>1&&this.canMultisampleFramebuffer(t)?(i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.RGBA8,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var s=[],l=0;l<o;l++){var u=a[l],c=u.parentTextureArray||u;this.renderer.texture.bind(c,0),!(l===0&&i.msaaBuffer)&&(r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+l,u.target,c._glTextures[this.CONTEXT_UID].texture,n),s.push(r.COLOR_ATTACHMENT0+l))}if(s.length>1&&r.drawBuffers(s),t.depthTexture){var f=this.writeDepthTexture;if(f){var d=t.depthTexture;this.renderer.texture.bind(d,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,d._glTextures[this.CONTEXT_UID].texture,n)}}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil)):i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null)},e.prototype.canMultisampleFramebuffer=function(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture},e.prototype.detectSamples=function(t){var n=this.msaaSamples,r=en.NONE;if(t<=1||n===null)return r;for(var i=0;i<n.length;i++)if(n[i]<=t){r=n[i];break}return r===1&&(r=en.NONE),r},e.prototype.blit=function(t,n,r){var i=this,a=i.current,o=i.renderer,s=i.gl,l=i.CONTEXT_UID;if(o.context.webGLVersion===2&&!!a){var u=a.glFramebuffers[l];if(!!u){if(!t){if(!u.msaaBuffer)return;var c=a.colorTextures[0];if(!c)return;u.blitFramebuffer||(u.blitFramebuffer=new Jc(a.width,a.height),u.blitFramebuffer.addColorTexture(0,c)),t=u.blitFramebuffer,t.colorTextures[0]!==c&&(t.colorTextures[0]=c,t.dirtyId++,t.dirtyFormat++),(t.width!==a.width||t.height!==a.height)&&(t.width=a.width,t.height=a.height,t.dirtyId++,t.dirtySize++)}n||(n=FI,n.width=a.width,n.height=a.height),r||(r=n);var f=n.width===r.width&&n.height===r.height;this.bind(t),s.bindFramebuffer(s.READ_FRAMEBUFFER,u.framebuffer),s.blitFramebuffer(n.left,n.top,n.right,n.bottom,r.left,r.top,r.right,r.bottom,s.COLOR_BUFFER_BIT,f?s.NEAREST:s.LINEAR)}}},e.prototype.disposeFramebuffer=function(t,n){var r=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!!r){delete t.glFramebuffers[this.CONTEXT_UID];var a=this.managedFramebuffers.indexOf(t);a>=0&&this.managedFramebuffers.splice(a,1),t.disposeRunner.remove(this),n||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&r.blitFramebuffer.dispose()}},e.prototype.disposeAll=function(t){var n=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r<n.length;r++)this.disposeFramebuffer(n[r],t)},e.prototype.forceStencil=function(){var t=this.current;if(!!t){var n=t.glFramebuffers[this.CONTEXT_UID];if(!(!n||n.stencil)){t.stencil=!0;var r=t.width,i=t.height,a=this.gl,o=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,o),n.msaaBuffer?a.renderbufferStorageMultisample(a.RENDERBUFFER,n.multisample,a.DEPTH24_STENCIL8,r,i):a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,r,i),n.stencil=o,a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,o)}}},e.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new Zt},e.prototype.destroy=function(){this.renderer=null},e}(),ku={5126:4,5123:2,5121:1},LI=function(){function e(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}return e.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl,n=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,n.webGLVersion!==2){var r=this.renderer.context.extensions.vertexArrayObject;He.PREFER_ENV===Xr.WEBGL_LEGACY&&(r=null),r?(t.createVertexArray=function(){return r.createVertexArrayOES()},t.bindVertexArray=function(a){return r.bindVertexArrayOES(a)},t.deleteVertexArray=function(a){return r.deleteVertexArrayOES(a)}):(this.hasVao=!1,t.createVertexArray=function(){return null},t.bindVertexArray=function(){return null},t.deleteVertexArray=function(){return null})}if(n.webGLVersion!==2){var i=t.getExtension("ANGLE_instanced_arrays");i?(t.vertexAttribDivisor=function(a,o){return i.vertexAttribDivisorANGLE(a,o)},t.drawElementsInstanced=function(a,o,s,l,u){return i.drawElementsInstancedANGLE(a,o,s,l,u)},t.drawArraysInstanced=function(a,o,s,l){return i.drawArraysInstancedANGLE(a,o,s,l)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=n.webGLVersion===2||!!n.extensions.uint32ElementIndex},e.prototype.bind=function(t,n){n=n||this.renderer.shader.shader;var r=this.gl,i=t.glVertexArrayObjects[this.CONTEXT_UID],a=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},a=!0);var o=i[n.program.id]||this.initGeometryVao(t,n,a);this._activeGeometry=t,this._activeVao!==o&&(this._activeVao=o,this.hasVao?r.bindVertexArray(o):this.activateVao(t,n.program)),this.updateBuffers()},e.prototype.reset=function(){this.unbind()},e.prototype.updateBuffers=function(){for(var t=this._activeGeometry,n=this.renderer.buffer,r=0;r<t.buffers.length;r++){var i=t.buffers[r];n.update(i)}},e.prototype.checkCompatibility=function(t,n){var r=t.attributes,i=n.attributeData;for(var a in i)if(!r[a])throw new Error('shader and geometry incompatible, geometry missing the "'+a+'" attribute')},e.prototype.getSignature=function(t,n){var r=t.attributes,i=n.attributeData,a=["g",t.id];for(var o in r)i[o]&&a.push(o,i[o].location);return a.join("-")},e.prototype.initGeometryVao=function(t,n,r){r===void 0&&(r=!0);var i=this.gl,a=this.CONTEXT_UID,o=this.renderer.buffer,s=n.program;s.glPrograms[a]||this.renderer.shader.generateProgram(n),this.checkCompatibility(t,s);var l=this.getSignature(t,s),u=t.glVertexArrayObjects[this.CONTEXT_UID],c=u[l];if(c)return u[s.id]=c,c;var f=t.buffers,d=t.attributes,h={},p={};for(var v in f)h[v]=0,p[v]=0;for(var v in d)!d[v].size&&s.attributeData[v]?d[v].size=s.attributeData[v].size:d[v].size||console.warn("PIXI Geometry attribute '"+v+"' size cannot be determined (likely the bound shader does not have the attribute)"),h[d[v].buffer]+=d[v].size*ku[d[v].type];for(var v in d){var g=d[v],y=g.size;g.stride===void 0&&(h[g.buffer]===y*ku[g.type]?g.stride=0:g.stride=h[g.buffer]),g.start===void 0&&(g.start=p[g.buffer],p[g.buffer]+=y*ku[g.type])}c=i.createVertexArray(),i.bindVertexArray(c);for(var m=0;m<f.length;m++){var b=f[m];o.bind(b),r&&b._glBuffers[a].refCount++}return this.activateVao(t,s),this._activeVao=c,u[s.id]=c,u[l]=c,c},e.prototype.disposeGeometry=function(t,n){var r;if(!!this.managedGeometries[t.id]){delete this.managedGeometries[t.id];var i=t.glVertexArrayObjects[this.CONTEXT_UID],a=this.gl,o=t.buffers,s=(r=this.renderer)===null||r===void 0?void 0:r.buffer;if(t.disposeRunner.remove(this),!!i){if(s)for(var l=0;l<o.length;l++){var u=o[l]._glBuffers[this.CONTEXT_UID];u&&(u.refCount--,u.refCount===0&&!n&&s.dispose(o[l],n))}if(!n){for(var c in i)if(c[0]==="g"){var f=i[c];this._activeVao===f&&this.unbind(),a.deleteVertexArray(f)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}},e.prototype.disposeAll=function(t){for(var n=Object.keys(this.managedGeometries),r=0;r<n.length;r++)this.disposeGeometry(this.managedGeometries[n[r]],t)},e.prototype.activateVao=function(t,n){var r=this.gl,i=this.CONTEXT_UID,a=this.renderer.buffer,o=t.buffers,s=t.attributes;t.indexBuffer&&a.bind(t.indexBuffer);var l=null;for(var u in s){var c=s[u],f=o[c.buffer],d=f._glBuffers[i];if(n.attributeData[u]){l!==d&&(a.bind(f),l=d);var h=n.attributeData[u].location;if(r.enableVertexAttribArray(h),r.vertexAttribPointer(h,c.size,c.type||r.FLOAT,c.normalized,c.stride,c.start),c.instance)if(this.hasInstance)r.vertexAttribDivisor(h,1);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}},e.prototype.draw=function(t,n,r,i){var a=this.gl,o=this._activeGeometry;if(o.indexBuffer){var s=o.indexBuffer.data.BYTES_PER_ELEMENT,l=s===2?a.UNSIGNED_SHORT:a.UNSIGNED_INT;s===2||s===4&&this.canUseUInt32ElementIndex?o.instanced?a.drawElementsInstanced(t,n||o.indexBuffer.data.length,l,(r||0)*s,i||1):a.drawElements(t,n||o.indexBuffer.data.length,l,(r||0)*s):console.warn("unsupported index buffer type: uint32")}else o.instanced?a.drawArraysInstanced(t,r,n||o.getSize(),i||1):a.drawArrays(t,r,n||o.getSize());return this},e.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},e.prototype.destroy=function(){this.renderer=null},e}(),UI=function(){function e(t){t===void 0&&(t=null),this.type=hn.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=He.FILTER_MULTISAMPLE,this.enabled=!0,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._target=null}return Object.defineProperty(e.prototype,"filter",{get:function(){return this._filters?this._filters[0]:null},set:function(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=hn.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null},e.prototype.copyCountersOrReset=function(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)},e}();function xp(e,t,n){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}function _p(e,t){var n=e.getShaderSource(t).split(`
`).map(function(u,c){return c+": "+u}),r=e.getShaderInfoLog(t),i=r.split(`
`),a={},o=i.map(function(u){return parseFloat(u.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))}).filter(function(u){return u&&!a[u]?(a[u]=!0,!0):!1}),s=[""];o.forEach(function(u){n[u-1]="%c"+n[u-1]+"%c",s.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});var l=n.join(`
`);s[0]=l,console.error(r),console.groupCollapsed("click to view full shader code"),console.warn.apply(console,s),console.groupEnd()}function BI(e,t,n,r){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(n,e.COMPILE_STATUS)||_p(e,n),e.getShaderParameter(r,e.COMPILE_STATUS)||_p(e,r),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}function Du(e){for(var t=new Array(e),n=0;n<t.length;n++)t[n]=!1;return t}function fy(e,t){switch(e){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return Du(2*t);case"bvec3":return Du(3*t);case"bvec4":return Du(4*t);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var dy={},ea=dy;function kI(){if(ea===dy||ea&&ea.isContextLost()){var e=document.createElement("canvas"),t=void 0;He.PREFER_ENV>=Xr.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),ea=t}return ea}var Gs;function DI(){if(!Gs){Gs=_r.MEDIUM;var e=kI();if(e&&e.getShaderPrecisionFormat){var t=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT);Gs=t.precision?_r.HIGH:_r.MEDIUM}}return Gs}function Tp(e,t,n){if(e.substring(0,9)!=="precision"){var r=t;return t===_r.HIGH&&n!==_r.HIGH&&(r=_r.MEDIUM),"precision "+r+` float;
`+e}else if(n!==_r.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}var GI={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function hy(e){return GI[e]}var Vs=null,wp={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function py(e,t){if(!Vs){var n=Object.keys(wp);Vs={};for(var r=0;r<n.length;++r){var i=n[r];Vs[e[i]]=wp[i]}}return Vs[t]}var Fo=[{test:function(e){return e.type==="float"&&e.size===1},code:function(e){return`
if(uv["`+e+'"] !== ud["'+e+`"].value)
{
ud["`+e+'"].value = uv["'+e+`"]
gl.uniform1f(ud["`+e+'"].location, uv["'+e+`"])
}
`}},{test:function(e){return(e.type==="sampler2D"||e.type==="samplerCube"||e.type==="sampler2DArray")&&e.size===1&&!e.isArray},code:function(e){return`t = syncData.textureCount++;
renderer.texture.bind(uv["`+e+`"], t);
if(ud["`+e+`"].value !== t)
{
ud["`+e+`"].value = t;
gl.uniform1i(ud["`+e+`"].location, t);
; // eslint-disable-line max-len
}`}},{test:function(e,t){return e.type==="mat3"&&e.size===1&&t.a!==void 0},code:function(e){return`
gl.uniformMatrix3fv(ud["`+e+'"].location, false, uv["'+e+`"].toArray(true));
`},codeUbo:function(e){return`
var `+e+"_matrix = uv."+e+`.toArray(true);
data[offset] = `+e+`_matrix[0];
data[offset+1] = `+e+`_matrix[1];
data[offset+2] = `+e+`_matrix[2];
data[offset + 4] = `+e+`_matrix[3];
data[offset + 5] = `+e+`_matrix[4];
data[offset + 6] = `+e+`_matrix[5];
data[offset + 8] = `+e+`_matrix[6];
data[offset + 9] = `+e+`_matrix[7];
data[offset + 10] = `+e+`_matrix[8];
`}},{test:function(e,t){return e.type==="vec2"&&e.size===1&&t.x!==void 0},code:function(e){return`
cv = ud["`+e+`"].value;
v = uv["`+e+`"];
if(cv[0] !== v.x || cv[1] !== v.y)
{
cv[0] = v.x;
cv[1] = v.y;
gl.uniform2f(ud["`+e+`"].location, v.x, v.y);
}`},codeUbo:function(e){return`
v = uv.`+e+`;
data[offset] = v.x;
data[offset+1] = v.y;
`}},{test:function(e){return e.type==="vec2"&&e.size===1},code:function(e){return`
cv = ud["`+e+`"].value;
v = uv["`+e+`"];
if(cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(ud["`+e+`"].location, v[0], v[1]);
}
`}},{test:function(e,t){return e.type==="vec4"&&e.size===1&&t.width!==void 0},code:function(e){return`
cv = ud["`+e+`"].value;
v = uv["`+e+`"];
if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
{
cv[0] = v.x;
cv[1] = v.y;
cv[2] = v.width;
cv[3] = v.height;
gl.uniform4f(ud["`+e+`"].location, v.x, v.y, v.width, v.height)
}`},codeUbo:function(e){return`
v = uv.`+e+`;
data[offset] = v.x;
data[offset+1] = v.y;
data[offset+2] = v.width;
data[offset+3] = v.height;
`}},{test:function(e){return e.type==="vec4"&&e.size===1},code:function(e){return`
cv = ud["`+e+`"].value;
v = uv["`+e+`"];
if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(ud["`+e+`"].location, v[0], v[1], v[2], v[3])
}`}}],VI={float:`
if (cv !== v)
{
cu.value = v;
gl.uniform1f(location, v);
}`,vec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2f(location, v[0], v[1])
}`,vec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3f(location, v[0], v[1], v[2])
}`,vec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
}`,int:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,ivec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,ivec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,ivec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,uint:`
if (cv !== v)
{
cu.value = v;
gl.uniform1ui(location, v);
}`,uvec2:`
if (cv[0] !== v[0] || cv[1] !== v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2ui(location, v[0], v[1]);
}`,uvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3ui(location, v[0], v[1], v[2]);
}`,uvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
}`,bool:`
if (cv !== v)
{
cu.value = v;
gl.uniform1i(location, v);
}`,bvec2:`
if (cv[0] != v[0] || cv[1] != v[1])
{
cv[0] = v[0];
cv[1] = v[1];
gl.uniform2i(location, v[0], v[1]);
}`,bvec3:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
gl.uniform3i(location, v[0], v[1], v[2]);
}`,bvec4:`
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
{
cv[0] = v[0];
cv[1] = v[1];
cv[2] = v[2];
cv[3] = v[3];
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
}`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},$I={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function jI(e,t){var n,r=[`
var v = null;
var cv = null;
var cu = null;
var t = 0;
var gl = renderer.gl;
`];for(var i in e.uniforms){var a=t[i];if(!a){!((n=e.uniforms[i])===null||n===void 0)&&n.group&&(e.uniforms[i].ubo?r.push(`
renderer.shader.syncUniformBufferGroup(uv.`+i+", '"+i+`');
`):r.push(`
renderer.shader.syncUniformGroup(uv.`+i+`, syncData);
`));continue}for(var o=e.uniforms[i],s=!1,l=0;l<Fo.length;l++)if(Fo[l].test(a,o)){r.push(Fo[l].code(i,o)),s=!0;break}if(!s){var u=a.size===1?VI:$I,c=u[a.type].replace("location",'ud["'+i+'"].location');r.push(`
cu = ud["`+i+`"];
cv = cu.value;
v = uv["`+i+`"];
`+c+";")}}return new Function("ud","uv","renderer","syncData",r.join(`
`))}var HI=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
`);function zI(e){for(var t="",n=0;n<e;++n)n>0&&(t+=`
else `),n<e-1&&(t+="if(test == "+n+".0){}");return t}function XI(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var n=t.createShader(t.FRAGMENT_SHADER);;){var r=HI.replace(/%forloop%/gi,zI(e));if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))e=e/2|0;else break}return e}var ta;function WI(){if(typeof ta=="boolean")return ta;try{var e=new Function("param1","param2","param3","return param1[param2] === param3;");ta=e({a:"b"},"a","b")===!0}catch{ta=!1}return ta}var KI=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor *= texture2D(uSampler, vTextureCoord);
}`,YI=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
void main(void){
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
}
`,ZI=0,$s={},qf=function(){function e(t,n,r){r===void 0&&(r="pixi-shader"),this.id=ZI++,this.vertexSrc=t||e.defaultVertexSrc,this.fragmentSrc=n||e.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),$s[r]?($s[r]++,r+="-"+$s[r]):$s[r]=1,this.vertexSrc="#define SHADER_NAME "+r+`
`+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+r+`
`+this.fragmentSrc,this.vertexSrc=Tp(this.vertexSrc,He.PRECISION_VERTEX,_r.HIGH),this.fragmentSrc=Tp(this.fragmentSrc,He.PRECISION_FRAGMENT,DI())),this.glPrograms={},this.syncUniforms=null}return Object.defineProperty(e,"defaultVertexSrc",{get:function(){return YI},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentSrc",{get:function(){return KI},enumerable:!1,configurable:!0}),e.from=function(t,n,r){var i=t+n,a=pp[i];return a||(pp[i]=a=new e(t,n,r)),a},e}(),vy=function(){function e(t,n){this.uniformBindCount=0,this.program=t,n?n instanceof Po?this.uniformGroup=n:this.uniformGroup=new Po(n):this.uniformGroup=new Po({})}return e.prototype.checkUniformExists=function(t,n){if(n.uniforms[t])return!0;for(var r in n.uniforms){var i=n.uniforms[r];if(i.group&&this.checkUniformExists(t,i))return!0}return!1},e.prototype.destroy=function(){this.uniformGroup=null},Object.defineProperty(e.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),e.from=function(t,n,r){var i=qf.from(t,n);return new e(i,r)},e}(),Gu=0,Vu=1,$u=2,ju=3,Hu=4,zu=5,ed=function(){function e(){this.data=0,this.blendMode=Me.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}return Object.defineProperty(e.prototype,"blend",{get:function(){return!!(this.data&1<<Gu)},set:function(t){!!(this.data&1<<Gu)!==t&&(this.data^=1<<Gu)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsets",{get:function(){return!!(this.data&1<<Vu)},set:function(t){!!(this.data&1<<Vu)!==t&&(this.data^=1<<Vu)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"culling",{get:function(){return!!(this.data&1<<$u)},set:function(t){!!(this.data&1<<$u)!==t&&(this.data^=1<<$u)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depthTest",{get:function(){return!!(this.data&1<<ju)},set:function(t){!!(this.data&1<<ju)!==t&&(this.data^=1<<ju)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"depthMask",{get:function(){return!!(this.data&1<<zu)},set:function(t){!!(this.data&1<<zu)!==t&&(this.data^=1<<zu)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clockwiseFrontFace",{get:function(){return!!(this.data&1<<Hu)},set:function(t){!!(this.data&1<<Hu)!==t&&(this.data^=1<<Hu)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this.blend=t!==Me.NONE,this._blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(t){this.offsets=!!t,this._polygonOffset=t},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"[@pixi/core:State "+("blendMode="+this.blendMode+" ")+("clockwiseFrontFace="+this.clockwiseFrontFace+" ")+("culling="+this.culling+" ")+("depthMask="+this.depthMask+" ")+("polygonOffset="+this.polygonOffset)+"]"},e.for2d=function(){var t=new e;return t.depthTest=!1,t.blend=!0,t},e}(),JI=`attribute vec2 aVertexPosition;
uniform mat3 projectionMatrix;
varying vec2 vTextureCoord;
uniform vec4 inputSize;
uniform vec4 outputFrame;
vec4 filterVertexPosition( void )
{
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
}
vec2 filterTextureCoord( void )
{
return aVertexPosition * (outputFrame.zw * inputSize.zw);
}
void main(void)
{
gl_Position = filterVertexPosition();
vTextureCoord = filterTextureCoord();
}
`,QI=`varying vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void){
gl_FragColor = texture2D(uSampler, vTextureCoord);
}
`,qI=function(e){Nt(t,e);function t(n,r,i){var a=this,o=qf.from(n||t.defaultVertexSrc,r||t.defaultFragmentSrc);return a=e.call(this,o,i)||this,a.padding=0,a.resolution=He.FILTER_RESOLUTION,a.multisample=He.FILTER_MULTISAMPLE,a.enabled=!0,a.autoFit=!0,a.state=new ed,a}return t.prototype.apply=function(n,r,i,a,o){n.applyFilter(this,r,i,a)},Object.defineProperty(t.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(n){this.state.blendMode=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"resolution",{get:function(){return this._resolution},set:function(n){this._resolution=n},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultVertexSrc",{get:function(){return JI},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentSrc",{get:function(){return QI},enumerable:!1,configurable:!0}),t}(vy),eS=`attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat3 projectionMatrix;
uniform mat3 otherMatrix;
varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
void main(void)
{
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
}
`,tS=`varying vec2 vMaskCoord;
varying vec2 vTextureCoord;
uniform sampler2D uSampler;
uniform sampler2D mask;
uniform float alpha;
uniform float npmAlpha;
uniform vec4 maskClamp;
void main(void)
{
float clip = step(3.5,
step(maskClamp.x, vMaskCoord.x) +
step(maskClamp.y, vMaskCoord.y) +
step(vMaskCoord.x, maskClamp.z) +
step(vMaskCoord.y, maskClamp.w));
vec4 original = texture2D(uSampler, vTextureCoord);
vec4 masky = texture2D(mask, vMaskCoord);
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
original *= (alphaMul * masky.r * alpha * clip);
gl_FragColor = original;
}
`,Cp=new jn,nS=function(){function e(t,n){this._texture=t,this.mapCoord=new jn,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof n=="undefined"?.5:n,this.isSimple=!1}return Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture=t,this._textureID=-1},enumerable:!1,configurable:!0}),e.prototype.multiplyUvs=function(t,n){n===void 0&&(n=t);for(var r=this.mapCoord,i=0;i<t.length;i+=2){var a=t[i],o=t[i+1];n[i]=a*r.a+o*r.c+r.tx,n[i+1]=a*r.b+o*r.d+r.ty}return n},e.prototype.update=function(t){var n=this._texture;if(!n||!n.valid||!t&&this._textureID===n._updateID)return!1;this._textureID=n._updateID,this._updateID++;var r=n._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var i=n.orig,a=n.trim;a&&(Cp.set(i.width/a.width,0,0,i.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(Cp));var o=n.baseTexture,s=this.uClampFrame,l=this.clampMargin/o.resolution,u=this.clampOffset;return s[0]=(n._frame.x+l+u)/o.width,s[1]=(n._frame.y+l+u)/o.height,s[2]=(n._frame.x+n._frame.width-l+u)/o.width,s[3]=(n._frame.y+n._frame.height-l+u)/o.height,this.uClampOffset[0]=u/o.realWidth,this.uClampOffset[1]=u/o.realHeight,this.isSimple=n._frame.width===o.width&&n._frame.height===o.height&&n.rotate===0,!0},e}(),rS=function(e){Nt(t,e);function t(n,r,i){var a=this,o=null;return typeof n!="string"&&r===void 0&&i===void 0&&(o=n,n=void 0,r=void 0,i=void 0),a=e.call(this,n||eS,r||tS,i)||this,a.maskSprite=o,a.maskMatrix=new jn,a}return Object.defineProperty(t.prototype,"maskSprite",{get:function(){return this._maskSprite},set:function(n){this._maskSprite=n,this._maskSprite&&(this._maskSprite.renderable=!1)},enumerable:!1,configurable:!0}),t.prototype.apply=function(n,r,i,a){var o=this._maskSprite,s=o._texture;!s.valid||(s.uvMatrix||(s.uvMatrix=new nS(s,0)),s.uvMatrix.update(),this.uniforms.npmAlpha=s.baseTexture.alphaMode?0:1,this.uniforms.mask=s,this.uniforms.otherMatrix=n.calculateSpriteMatrix(this.maskMatrix,o).prepend(s.uvMatrix.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=s.uvMatrix.uClampFrame,n.applyFilter(this,r,i,a))},t}(qI),iS=function(){function e(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return e.prototype.setMaskStack=function(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)},e.prototype.push=function(t,n){var r=n;if(!r.isMaskData){var i=this.maskDataPool.pop()||new UI;i.pooled=!0,i.maskObject=n,r=i}var a=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(r.copyCountersOrReset(a),r.autoDetect&&this.detect(r),r._target=t,r.type!==hn.SPRITE&&this.maskStack.push(r),r.enabled)switch(r.type){case hn.SCISSOR:this.renderer.scissor.push(r);break;case hn.STENCIL:this.renderer.stencil.push(r);break;case hn.SPRITE:r.copyCountersOrReset(null),this.pushSpriteMask(r);break}r.type===hn.SPRITE&&this.maskStack.push(r)},e.prototype.pop=function(t){var n=this.maskStack.pop();if(!(!n||n._target!==t)){if(n.enabled)switch(n.type){case hn.SCISSOR:this.renderer.scissor.pop();break;case hn.STENCIL:this.renderer.stencil.pop(n.maskObject);break;case hn.SPRITE:this.popSpriteMask(n);break}if(n.reset(),n.pooled&&this.maskDataPool.push(n),this.maskStack.length!==0){var r=this.maskStack[this.maskStack.length-1];r.type===hn.SPRITE&&r._filters&&(r._filters[0].maskSprite=r.maskObject)}}},e.prototype.detect=function(t){var n=t.maskObject;n.isSprite?t.type=hn.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=hn.SCISSOR:t.type=hn.STENCIL},e.prototype.pushSpriteMask=function(t){var n,r,i=t.maskObject,a=t._target,o=t._filters;o||(o=this.alphaMaskPool[this.alphaMaskIndex],o||(o=this.alphaMaskPool[this.alphaMaskIndex]=[new rS]));var s=this.renderer,l=s.renderTexture,u,c;if(l.current){var f=l.current;u=t.resolution||f.resolution,c=(n=t.multisample)!==null&&n!==void 0?n:f.multisample}else u=t.resolution||s.resolution,c=(r=t.multisample)!==null&&r!==void 0?r:s.multisample;o[0].resolution=u,o[0].multisample=c,o[0].maskSprite=i;var d=a.filterArea;a.filterArea=i.getBounds(!0),s.filter.push(a,o),a.filterArea=d,t._filters||this.alphaMaskIndex++},e.prototype.popSpriteMask=function(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)},e.prototype.destroy=function(){this.renderer=null},e}(),my=function(){function e(t){this.renderer=t,this.maskStack=[],this.glConst=0}return e.prototype.getStackLength=function(){return this.maskStack.length},e.prototype.setMaskStack=function(t){var n=this.renderer.gl,r=this.getStackLength();this.maskStack=t;var i=this.getStackLength();i!==r&&(i===0?n.disable(this.glConst):(n.enable(this.glConst),this._useCurrent()))},e.prototype._useCurrent=function(){},e.prototype.destroy=function(){this.renderer=null,this.maskStack=null},e}(),Ep=new jn,oS=function(e){Nt(t,e);function t(n){var r=e.call(this,n)||this;return r.glConst=WebGLRenderingContext.SCISSOR_TEST,r}return t.prototype.getStackLength=function(){var n=this.maskStack[this.maskStack.length-1];return n?n._scissorCounter:0},t.prototype.calcScissorRect=function(n){if(!n._scissorRectLocal){var r=n._scissorRect,i=n.maskObject,a=this.renderer,o=a.renderTexture;i.renderable=!0;var s=i.getBounds();this.roundFrameToPixels(s,o.current?o.current.resolution:a.resolution,o.sourceFrame,o.destinationFrame,a.projection.transform),i.renderable=!1,r&&s.fit(r),n._scissorRectLocal=s}},t.isMatrixRotated=function(n){if(!n)return!1;var r=n.a,i=n.b,a=n.c,o=n.d;return(Math.abs(i)>1e-4||Math.abs(a)>1e-4)&&(Math.abs(r)>1e-4||Math.abs(o)>1e-4)},t.prototype.testScissor=function(n){var r=n.maskObject;if(!r.isFastRect||!r.isFastRect()||t.isMatrixRotated(r.worldTransform)||t.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(n);var i=n._scissorRectLocal;return i.width>0&&i.height>0},t.prototype.roundFrameToPixels=function(n,r,i,a,o){t.isMatrixRotated(o)||(o=o?Ep.copyFrom(o):Ep.identity(),o.translate(-i.x,-i.y).scale(a.width/i.width,a.height/i.height).translate(a.x,a.y),this.renderer.filter.transformAABB(o,n),n.fit(a),n.x=Math.round(n.x*r),n.y=Math.round(n.y*r),n.width=Math.round(n.width*r),n.height=Math.round(n.height*r))},t.prototype.push=function(n){n._scissorRectLocal||this.calcScissorRect(n);var r=this.renderer.gl;n._scissorRect||r.enable(r.SCISSOR_TEST),n._scissorCounter++,n._scissorRect=n._scissorRectLocal,this._useCurrent()},t.prototype.pop=function(){var n=this.renderer.gl;this.getStackLength()>0?this._useCurrent():n.disable(n.SCISSOR_TEST)},t.prototype._useCurrent=function(){var n=this.maskStack[this.maskStack.length-1]._scissorRect,r;this.renderer.renderTexture.current?r=n.y:r=this.renderer.height-n.height-n.y,this.renderer.gl.scissor(n.x,r,n.width,n.height)},t}(my),aS=function(e){Nt(t,e);function t(n){var r=e.call(this,n)||this;return r.glConst=WebGLRenderingContext.STENCIL_TEST,r}return t.prototype.getStackLength=function(){var n=this.maskStack[this.maskStack.length-1];return n?n._stencilCounter:0},t.prototype.push=function(n){var r=n.maskObject,i=this.renderer.gl,a=n._stencilCounter;a===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),n._stencilCounter++,i.colorMask(!1,!1,!1,!1),i.stencilFunc(i.EQUAL,a,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,this._useCurrent()},t.prototype.pop=function(n){var r=this.renderer.gl;this.getStackLength()===0?r.disable(r.STENCIL_TEST):(r.colorMask(!1,!1,!1,!1),r.stencilOp(r.KEEP,r.KEEP,r.DECR),n.renderable=!0,n.render(this.renderer),this.renderer.batch.flush(),n.renderable=!1,this._useCurrent())},t.prototype._useCurrent=function(){var n=this.renderer.gl;n.colorMask(!0,!0,!0,!0),n.stencilFunc(n.EQUAL,this.getStackLength(),4294967295),n.stencilOp(n.KEEP,n.KEEP,n.KEEP)},t}(my),sS=function(){function e(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new jn,this.transform=null}return e.prototype.update=function(t,n,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=n||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);var a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)},e.prototype.calculateProjection=function(t,n,r,i){var a=this.projectionMatrix,o=i?-1:1;a.identity(),a.a=1/n.width*2,a.d=o*(1/n.height*2),a.tx=-1-n.x*a.a,a.ty=-o-n.y*a.d},e.prototype.setTransform=function(t){},e.prototype.destroy=function(){this.renderer=null},e}(),Pi=new Zt,na=new Zt,lS=function(){function e(t){this.renderer=t,this.clearColor=t._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Zt,this.destinationFrame=new Zt,this.viewportFrame=new Zt}return e.prototype.bind=function(t,n,r){t===void 0&&(t=null);var i=this.renderer;this.current=t;var a,o,s;t?(a=t.baseTexture,s=a.resolution,n||(Pi.width=t.frame.width,Pi.height=t.frame.height,n=Pi),r||(na.x=t.frame.x,na.y=t.frame.y,na.width=n.width,na.height=n.height,r=na),o=a.framebuffer):(s=i.resolution,n||(Pi.width=i.screen.width,Pi.height=i.screen.height,n=Pi),r||(r=Pi,r.width=n.width,r.height=n.height));var l=this.viewportFrame;l.x=r.x*s,l.y=r.y*s,l.width=r.width*s,l.height=r.height*s,t||(l.y=i.view.height-(l.y+l.height)),l.ceil(),this.renderer.framebuffer.bind(o,l),this.renderer.projection.update(r,n,s,!o),t?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(n),this.destinationFrame.copyFrom(r)},e.prototype.clear=function(t,n){this.current?t=t||this.current.baseTexture.clearColor:t=t||this.clearColor;var r=this.destinationFrame,i=this.current?this.current.baseTexture:this.renderer.screen,a=r.width!==i.width||r.height!==i.height;if(a){var o=this.viewportFrame,s=o.x,l=o.y,u=o.width,c=o.height;s=Math.round(s),l=Math.round(l),u=Math.round(u),c=Math.round(c),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,l,u,c)}this.renderer.framebuffer.clear(t[0],t[1],t[2],t[3],n),a&&this.renderer.scissor.pop()},e.prototype.resize=function(){this.bind(null)},e.prototype.reset=function(){this.bind(null)},e.prototype.destroy=function(){this.renderer=null},e}();function uS(e,t,n,r,i){n.buffer.update(i)}var cS={float:`
data[offset] = v;
`,vec2:`
data[offset] = v[0];
data[offset+1] = v[1];
`,vec3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
`,vec4:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset+3] = v[3];
`,mat2:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+4] = v[2];
data[offset+5] = v[3];
`,mat3:`
data[offset] = v[0];
data[offset+1] = v[1];
data[offset+2] = v[2];
data[offset + 4] = v[3];
data[offset + 5] = v[4];
data[offset + 6] = v[5];
data[offset + 8] = v[6];
data[offset + 9] = v[7];
data[offset + 10] = v[8];
`,mat4:`
for(var i = 0; i < 16; i++)
{
data[offset + i] = v[i];
}
`},gy={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function fS(e){for(var t=e.map(function(l){return{data:l,offset:0,dataLen:0,dirty:0}}),n=0,r=0,i=0,a=0;a<t.length;a++){var o=t[a];if(n=gy[o.data.type],o.data.size>1&&(n=Math.max(n,16)*o.data.size),o.dataLen=n,r%n!==0&&r<16){var s=r%n%16;r+=s,i+=s}r+n>16?(i=Math.ceil(i/16)*16,o.offset=i,i+=n,r=n):(o.offset=i,r+=n,i+=n)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function dS(e,t){var n=[];for(var r in e)t[r]&&n.push(t[r]);return n.sort(function(i,a){return i.index-a.index}),n}function hS(e,t){if(!e.autoManage)return{size:0,syncFunc:uS};for(var n=dS(e.uniforms,t),r=fS(n),i=r.uboElements,a=r.size,o=[`
var v = null;
var v2 = null;
var cv = null;
var t = 0;
var gl = renderer.gl
var index = 0;
var data = buffer.data;
`],s=0;s<i.length;s++){for(var l=i[s],u=e.uniforms[l.data.name],c=l.data.name,f=!1,d=0;d<Fo.length;d++){var h=Fo[d];if(h.codeUbo&&h.test(l.data,u)){o.push("offset = "+l.offset/4+";",Fo[d].codeUbo(l.data.name,u)),f=!0;break}}if(!f)if(l.data.size>1){var p=hy(l.data.type),v=Math.max(gy[l.data.type]/16,1),g=p/v,y=(4-g%4)%4;o.push(`
cv = ud.`+c+`.value;
v = uv.`+c+`;
offset = `+l.offset/4+`;
t = 0;
for(var i=0; i < `+l.data.size*v+`; i++)
{
for(var j = 0; j < `+g+`; j++)
{
data[offset++] = v[t++];
}
offset += `+y+`;
}
`)}else{var m=cS[l.data.type];o.push(`
cv = ud.`+c+`.value;
v = uv.`+c+`;
offset = `+l.offset/4+`;
`+m+`;
`)}}return o.push(`
renderer.buffer.update(buffer);
`),{size:a,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(`
`))}}var pS=function(){function e(t,n){this.program=t,this.uniformData=n,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return e.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},e}();function vS(e,t){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var a=t.getActiveAttrib(e,i);if(a.name.indexOf("gl_")!==0){var o=py(t,a.type),s={type:o,name:a.name,size:hy(o),location:t.getAttribLocation(e,a.name)};n[a.name]=s}}return n}function mS(e,t){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),i=0;i<r;i++){var a=t.getActiveUniform(e,i),o=a.name.replace(/\[.*?\]$/,""),s=!!a.name.match(/\[.*?\]$/),l=py(t,a.type);n[o]={name:o,index:i,type:l,size:a.size,isArray:s,value:fy(l,a.size)}}return n}function gS(e,t){var n=xp(e,e.VERTEX_SHADER,t.vertexSrc),r=xp(e,e.FRAGMENT_SHADER,t.fragmentSrc),i=e.createProgram();if(e.attachShader(i,n),e.attachShader(i,r),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS)||BI(e,i,n,r),t.attributeData=vS(i,e),t.uniformData=mS(i,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){var a=Object.keys(t.attributeData);a.sort(function(c,f){return c>f?1:-1});for(var o=0;o<a.length;o++)t.attributeData[a[o]].location=o,e.bindAttribLocation(i,o,a[o]);e.linkProgram(i)}e.deleteShader(n),e.deleteShader(r);var s={};for(var o in t.uniformData){var l=t.uniformData[o];s[o]={location:e.getUniformLocation(i,o),value:fy(l.type,l.size)}}var u=new pS(i,s);return u}var yS=0,js={textureCount:0,uboCount:0},bS=function(){function e(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=yS++}return e.prototype.systemCheck=function(){if(!WI())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},e.prototype.contextChange=function(t){this.gl=t,this.reset()},e.prototype.bind=function(t,n){t.uniforms.globals=this.renderer.globalUniforms;var r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),n||(js.textureCount=0,js.uboCount=0,this.syncUniformGroup(t.uniformGroup,js)),i},e.prototype.setUniforms=function(t){var n=this.shader.program,r=n.glPrograms[this.renderer.CONTEXT_UID];n.syncUniforms(r.uniformData,t,this.renderer)},e.prototype.syncUniformGroup=function(t,n){var r=this.getGlProgram();(!t.static||t.dirtyId!==r.uniformDirtyGroups[t.id])&&(r.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,n))},e.prototype.syncUniforms=function(t,n,r){var i=t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t);i(n.uniformData,t.uniforms,this.renderer,r)},e.prototype.createSyncGroups=function(t){var n=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[n]||(this.cache[n]=jI(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[n],t.syncUniforms[this.shader.program.id]},e.prototype.syncUniformBufferGroup=function(t,n){var r=this.getGlProgram();if(!t.static||t.dirtyId!==0||!r.uniformGroups[t.id]){t.dirtyId=0;var i=r.uniformGroups[t.id]||this.createSyncBufferGroup(t,r,n);t.buffer.update(),i(r.uniformData,t.uniforms,this.renderer,js,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[n])},e.prototype.createSyncBufferGroup=function(t,n,r){var i=this.renderer.gl;this.renderer.buffer.bind(t.buffer);var a=this.gl.getUniformBlockIndex(n.program,r);n.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(n.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;var o=this.getSignature(t,this.shader.program.uniformData,"ubo"),s=this._uboCache[o];if(s||(s=this._uboCache[o]=hS(t,this.shader.program.uniformData)),t.autoManage){var l=new Float32Array(s.size/4);t.buffer.update(l)}return n.uniformGroups[t.id]=s.syncFunc,n.uniformGroups[t.id]},e.prototype.getSignature=function(t,n,r){var i=t.uniforms,a=[r+"-"];for(var o in i)a.push(o),n[o]&&a.push(n[o].type);return a.join("-")},e.prototype.getGlProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},e.prototype.generateProgram=function(t){var n=this.gl,r=t.program,i=gS(n,r);return r.glPrograms[this.renderer.CONTEXT_UID]=i,i},e.prototype.reset=function(){this.program=null,this.shader=null},e.prototype.destroy=function(){this.renderer=null,this.destroyed=!0},e}();function xS(e,t){return t===void 0&&(t=[]),t[Me.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.ADD]=[e.ONE,e.ONE],t[Me.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.NONE]=[0,0],t[Me.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Me.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Me.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Me.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Me.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Me.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Me.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Me.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Me.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Me.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Me.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}var _S=0,TS=1,wS=2,CS=3,ES=4,IS=5,SS=function(){function e(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Me.NONE,this._blendEq=!1,this.map=[],this.map[_S]=this.setBlend,this.map[TS]=this.setOffset,this.map[wS]=this.setCullFace,this.map[CS]=this.setDepthTest,this.map[ES]=this.setFrontFace,this.map[IS]=this.setDepthMask,this.checks=[],this.defaultState=new ed,this.defaultState.blend=!0}return e.prototype.contextChange=function(t){this.gl=t,this.blendModes=xS(t),this.set(this.defaultState),this.reset()},e.prototype.set=function(t){if(t=t||this.defaultState,this.stateId!==t.data){for(var n=this.stateId^t.data,r=0;n;)n&1&&this.map[r].call(this,!!(t.data&1<<r)),n=n>>1,r++;this.stateId=t.data}for(var r=0;r<this.checks.length;r++)this.checks[r](this,t)},e.prototype.forceState=function(t){t=t||this.defaultState;for(var n=0;n<this.map.length;n++)this.map[n].call(this,!!(t.data&1<<n));for(var n=0;n<this.checks.length;n++)this.checks[n](this,t);this.stateId=t.data},e.prototype.setBlend=function(t){this.updateCheck(e.checkBlendMode,t),this.gl[t?"enable":"disable"](this.gl.BLEND)},e.prototype.setOffset=function(t){this.updateCheck(e.checkPolygonOffset,t),this.gl[t?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},e.prototype.setDepthTest=function(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)},e.prototype.setDepthMask=function(t){this.gl.depthMask(t)},e.prototype.setCullFace=function(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)},e.prototype.setFrontFace=function(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])},e.prototype.setBlendMode=function(t){if(t!==this.blendMode){this.blendMode=t;var n=this.blendModes[t],r=this.gl;n.length===2?r.blendFunc(n[0],n[1]):r.blendFuncSeparate(n[0],n[1],n[2],n[3]),n.length===6?(this._blendEq=!0,r.blendEquationSeparate(n[4],n[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}},e.prototype.setPolygonOffset=function(t,n){this.gl.polygonOffset(t,n)},e.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},e.prototype.updateCheck=function(t,n){var r=this.checks.indexOf(t);n&&r===-1?this.checks.push(t):!n&&r!==-1&&this.checks.splice(r,1)},e.checkBlendMode=function(t,n){t.setBlendMode(n.blendMode)},e.checkPolygonOffset=function(t,n){t.setPolygonOffset(1,n.polygonOffset)},e.prototype.destroy=function(){this.gl=null},e}(),NS=function(){function e(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=He.GC_MAX_IDLE,this.checkCountMax=He.GC_MAX_CHECK_COUNT,this.mode=He.GC_MODE}return e.prototype.postrender=function(){!this.renderer.renderingToScreen||(this.count++,this.mode!==kc.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,n=t.managedTextures,r=!1,i=0;i<n.length;i++){var a=n[i];!a.framebuffer&&this.count-a.touched>this.maxIdle&&(t.destroyTexture(a,!0),n[i]=null,r=!0)}if(r){for(var o=0,i=0;i<n.length;i++)n[i]!==null&&(n[o++]=n[i]);n.length=o}},e.prototype.unload=function(t){var n=this.renderer.texture,r=t._texture;r&&!r.framebuffer&&n.destroyTexture(r);for(var i=t.children.length-1;i>=0;i--)this.unload(t.children[i])},e.prototype.destroy=function(){this.renderer=null},e}();function RS(e){var t,n,r,i,a,o,s,l,u,c,f,d,h,p,v,g,y,m,b,T,S,w,N;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?N=(t={},t[vt.UNSIGNED_BYTE]=(n={},n[ge.RGBA]=e.RGBA8,n[ge.RGB]=e.RGB8,n[ge.RG]=e.RG8,n[ge.RED]=e.R8,n[ge.RGBA_INTEGER]=e.RGBA8UI,n[ge.RGB_INTEGER]=e.RGB8UI,n[ge.RG_INTEGER]=e.RG8UI,n[ge.RED_INTEGER]=e.R8UI,n[ge.ALPHA]=e.ALPHA,n[ge.LUMINANCE]=e.LUMINANCE,n[ge.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,n),t[vt.BYTE]=(r={},r[ge.RGBA]=e.RGBA8_SNORM,r[ge.RGB]=e.RGB8_SNORM,r[ge.RG]=e.RG8_SNORM,r[ge.RED]=e.R8_SNORM,r[ge.RGBA_INTEGER]=e.RGBA8I,r[ge.RGB_INTEGER]=e.RGB8I,r[ge.RG_INTEGER]=e.RG8I,r[ge.RED_INTEGER]=e.R8I,r),t[vt.UNSIGNED_SHORT]=(i={},i[ge.RGBA_INTEGER]=e.RGBA16UI,i[ge.RGB_INTEGER]=e.RGB16UI,i[ge.RG_INTEGER]=e.RG16UI,i[ge.RED_INTEGER]=e.R16UI,i[ge.DEPTH_COMPONENT]=e.DEPTH_COMPONENT16,i),t[vt.SHORT]=(a={},a[ge.RGBA_INTEGER]=e.RGBA16I,a[ge.RGB_INTEGER]=e.RGB16I,a[ge.RG_INTEGER]=e.RG16I,a[ge.RED_INTEGER]=e.R16I,a),t[vt.UNSIGNED_INT]=(o={},o[ge.RGBA_INTEGER]=e.RGBA32UI,o[ge.RGB_INTEGER]=e.RGB32UI,o[ge.RG_INTEGER]=e.RG32UI,o[ge.RED_INTEGER]=e.R32UI,o[ge.DEPTH_COMPONENT]=e.DEPTH_COMPONENT24,o),t[vt.INT]=(s={},s[ge.RGBA_INTEGER]=e.RGBA32I,s[ge.RGB_INTEGER]=e.RGB32I,s[ge.RG_INTEGER]=e.RG32I,s[ge.RED_INTEGER]=e.R32I,s),t[vt.FLOAT]=(l={},l[ge.RGBA]=e.RGBA32F,l[ge.RGB]=e.RGB32F,l[ge.RG]=e.RG32F,l[ge.RED]=e.R32F,l[ge.DEPTH_COMPONENT]=e.DEPTH_COMPONENT32F,l),t[vt.HALF_FLOAT]=(u={},u[ge.RGBA]=e.RGBA16F,u[ge.RGB]=e.RGB16F,u[ge.RG]=e.RG16F,u[ge.RED]=e.R16F,u),t[vt.UNSIGNED_SHORT_5_6_5]=(c={},c[ge.RGB]=e.RGB565,c),t[vt.UNSIGNED_SHORT_4_4_4_4]=(f={},f[ge.RGBA]=e.RGBA4,f),t[vt.UNSIGNED_SHORT_5_5_5_1]=(d={},d[ge.RGBA]=e.RGB5_A1,d),t[vt.UNSIGNED_INT_2_10_10_10_REV]=(h={},h[ge.RGBA]=e.RGB10_A2,h[ge.RGBA_INTEGER]=e.RGB10_A2UI,h),t[vt.UNSIGNED_INT_10F_11F_11F_REV]=(p={},p[ge.RGB]=e.R11F_G11F_B10F,p),t[vt.UNSIGNED_INT_5_9_9_9_REV]=(v={},v[ge.RGB]=e.RGB9_E5,v),t[vt.UNSIGNED_INT_24_8]=(g={},g[ge.DEPTH_STENCIL]=e.DEPTH24_STENCIL8,g),t[vt.FLOAT_32_UNSIGNED_INT_24_8_REV]=(y={},y[ge.DEPTH_STENCIL]=e.DEPTH32F_STENCIL8,y),t):N=(m={},m[vt.UNSIGNED_BYTE]=(b={},b[ge.RGBA]=e.RGBA,b[ge.RGB]=e.RGB,b[ge.ALPHA]=e.ALPHA,b[ge.LUMINANCE]=e.LUMINANCE,b[ge.LUMINANCE_ALPHA]=e.LUMINANCE_ALPHA,b),m[vt.UNSIGNED_SHORT_5_6_5]=(T={},T[ge.RGB]=e.RGB,T),m[vt.UNSIGNED_SHORT_4_4_4_4]=(S={},S[ge.RGBA]=e.RGBA,S),m[vt.UNSIGNED_SHORT_5_5_5_1]=(w={},w[ge.RGBA]=e.RGBA,w),m),N}var Xu=function(){function e(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=vt.UNSIGNED_BYTE,this.internalFormat=ge.RGBA,this.samplerType=0}return e}(),AS=function(){function e(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new rn,this.hasIntegerTextures=!1}return e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=RS(t);var n=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=n;for(var r=0;r<n;r++)this.boundTextures[r]=null;this.emptyTextures={};var i=new Xu(t.createTexture());t.bindTexture(t.TEXTURE_2D,i.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=i,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new Xu(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(var r=0;r<6;r++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(var r=0;r<this.boundTextures.length;r++)this.bind(null,r)},e.prototype.bind=function(t,n){n===void 0&&(n=0);var r=this.gl;if(t=t==null?void 0:t.castToBaseTexture(),t&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;var i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[n]!==t&&(this.currentLocation!==n&&(this.currentLocation=n,r.activeTexture(r.TEXTURE0+n)),r.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId&&(this.currentLocation!==n&&(this.currentLocation=n,r.activeTexture(r.TEXTURE0+n)),this.updateTexture(t)),this.boundTextures[n]=t}else this.currentLocation!==n&&(this.currentLocation=n,r.activeTexture(r.TEXTURE0+n)),r.bindTexture(r.TEXTURE_2D,this.emptyTextures[r.TEXTURE_2D].texture),this.boundTextures[n]=null},e.prototype.reset=function(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture},e.prototype.unbind=function(t){var n=this,r=n.gl,i=n.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var a=0;a<i.length;a++)i[a]===this.unknownTexture&&this.bind(null,a)}for(var a=0;a<i.length;a++)i[a]===t&&(this.currentLocation!==a&&(r.activeTexture(r.TEXTURE0+a),this.currentLocation=a),r.bindTexture(t.target,this.emptyTextures[t.target].texture),i[a]=null)},e.prototype.ensureSamplerType=function(t){var n=this,r=n.boundTextures,i=n.hasIntegerTextures,a=n.CONTEXT_UID;if(!!i)for(var o=t-1;o>=0;--o){var s=r[o];if(s){var l=s._glTextures[a];l.samplerType!==Nl.FLOAT&&this.renderer.texture.unbind(s)}}},e.prototype.initTexture=function(t){var n=new Xu(this.gl.createTexture());return n.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=n,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),n},e.prototype.initTextureType=function(t,n){var r,i;n.internalFormat=(i=(r=this.internalFormats[t.type])===null||r===void 0?void 0:r[t.format])!==null&&i!==void 0?i:t.format,this.webGLVersion===2&&t.type===vt.HALF_FLOAT?n.type=this.gl.HALF_FLOAT:n.type=t.type},e.prototype.updateTexture=function(t){var n=t._glTextures[this.CONTEXT_UID];if(!!n){var r=this.renderer;if(this.initTextureType(t,n),t.resource&&t.resource.upload(r,t,n))n.samplerType!==Nl.FLOAT&&(this.hasIntegerTextures=!0);else{var i=t.realWidth,a=t.realHeight,o=r.gl;(n.width!==i||n.height!==a||n.dirtyId<0)&&(n.width=i,n.height=a,o.texImage2D(t.target,0,n.internalFormat,i,a,0,t.format,n.type,null))}t.dirtyStyleId!==n.dirtyStyleId&&this.updateTextureStyle(t),n.dirtyId=t.dirtyId}},e.prototype.destroyTexture=function(t,n){var r=this.gl;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!n)){var i=this.managedTextures.indexOf(t);i!==-1&&al(this.managedTextures,i,1)}},e.prototype.updateTextureStyle=function(t){var n=t._glTextures[this.CONTEXT_UID];!n||((t.mipmap===ro.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?n.mipmap=!1:n.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?n.wrapMode=Bc.CLAMP:n.wrapMode=t.wrapMode,t.resource&&t.resource.style(this.renderer,t,n)||this.setStyle(t,n),n.dirtyStyleId=t.dirtyStyleId)},e.prototype.setStyle=function(t,n){var r=this.gl;if(n.mipmap&&t.mipmap!==ro.ON_MANUAL&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,n.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,n.wrapMode),n.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===Dr.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Dr.LINEAR){var a=Math.min(t.anisotropicLevel,r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));r.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===Dr.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===Dr.LINEAR?r.LINEAR:r.NEAREST)},e.prototype.destroy=function(){this.renderer=null},e}(),Wu=new jn,OS=function(e){Nt(t,e);function t(n,r){n===void 0&&(n=ja.UNKNOWN);var i=e.call(this)||this;return r=Object.assign({},He.RENDER_OPTIONS,r),i.options=r,i.type=n,i.screen=new Zt(0,0,r.width,r.height),i.view=r.view||document.createElement("canvas"),i.resolution=r.resolution||He.RESOLUTION,i.useContextAlpha=r.useContextAlpha,i.autoDensity=!!r.autoDensity,i.preserveDrawingBuffer=r.preserveDrawingBuffer,i.clearBeforeRender=r.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=r.backgroundColor||i._backgroundColor,i.backgroundAlpha=r.backgroundAlpha,r.transparent!==void 0&&(Za("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=r.transparent,i.backgroundAlpha=r.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return t.prototype.initPlugins=function(n){for(var r in n)this.plugins[r]=new n[r](this)},Object.defineProperty(t.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(n,r){this.view.width=Math.round(n*this.resolution),this.view.height=Math.round(r*this.resolution);var i=this.view.width/this.resolution,a=this.view.height/this.resolution;this.screen.width=i,this.screen.height=a,this.autoDensity&&(this.view.style.width=i+"px",this.view.style.height=a+"px"),this.emit("resize",i,a)},t.prototype.generateTexture=function(n,r,i,a){r===void 0&&(r={}),typeof r=="number"&&(Za("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),r={scaleMode:r,resolution:i,region:a});var o=r.region,s=fI(r,["region"]);a=o||n.getLocalBounds(null,!0),a.width===0&&(a.width=1),a.height===0&&(a.height=1);var l=Jf.create(Zc({width:a.width,height:a.height},s));return Wu.tx=-a.x,Wu.ty=-a.y,this.render(n,{renderTexture:l,clear:!1,transform:Wu,skipUpdateTransform:!!n.parent}),l},t.prototype.destroy=function(n){for(var r in this.plugins)this.plugins[r].destroy(),this.plugins[r]=null;n&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var i=this;i.plugins=null,i.type=ja.UNKNOWN,i.view=null,i.screen=null,i._tempDisplayObjectParent=null,i.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(n){this._backgroundColor=n,this._backgroundColorString=eI(n),qE(n,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(n){this._backgroundColorRgba[3]=n},enumerable:!1,configurable:!0}),t}(nu),PS=function(){function e(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}return e}(),FS=function(){function e(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}return e.prototype.destroy=function(){this.renderer=null},e.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},e.prototype.bind=function(t){var n=this,r=n.gl,i=n.CONTEXT_UID,a=t._glBuffers[i]||this.createGLBuffer(t);r.bindBuffer(t.type,a.buffer)},e.prototype.bindBufferBase=function(t,n){var r=this,i=r.gl,a=r.CONTEXT_UID;if(this.boundBufferBases[n]!==t){var o=t._glBuffers[a]||this.createGLBuffer(t);this.boundBufferBases[n]=t,i.bindBufferBase(i.UNIFORM_BUFFER,n,o.buffer)}},e.prototype.bindBufferRange=function(t,n,r){var i=this,a=i.gl,o=i.CONTEXT_UID;r=r||0;var s=t._glBuffers[o]||this.createGLBuffer(t);a.bindBufferRange(a.UNIFORM_BUFFER,n||0,s.buffer,r*256,256)},e.prototype.update=function(t){var n=this,r=n.gl,i=n.CONTEXT_UID,a=t._glBuffers[i];if(t._updateID!==a.updateID)if(a.updateID=t._updateID,r.bindBuffer(t.type,a.buffer),a.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{var o=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;a.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,o)}},e.prototype.dispose=function(t,n){if(!!this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(n||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}},e.prototype.disposeAll=function(t){for(var n=Object.keys(this.managedBuffers),r=0;r<n.length;r++)this.dispose(this.managedBuffers[n[r]],t)},e.prototype.createGLBuffer=function(t){var n=this,r=n.CONTEXT_UID,i=n.gl;return t._glBuffers[r]=new PS(i.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]},e}(),MS=function(e){Nt(t,e);function t(n){var r=e.call(this,ja.WEBGL,n)||this;return n=r.options,r.gl=null,r.CONTEXT_UID=0,r.runners={destroy:new pn("destroy"),contextChange:new pn("contextChange"),reset:new pn("reset"),update:new pn("update"),postrender:new pn("postrender"),prerender:new pn("prerender"),resize:new pn("resize")},r.runners.contextChange.add(r),r.globalUniforms=new Po({projectionMatrix:new jn},!0),r.addSystem(iS,"mask").addSystem(OI,"context").addSystem(SS,"state").addSystem(bS,"shader").addSystem(AS,"texture").addSystem(FS,"buffer").addSystem(LI,"geometry").addSystem(MI,"framebuffer").addSystem(oS,"scissor").addSystem(aS,"stencil").addSystem(sS,"projection").addSystem(NS,"textureGC").addSystem(RI,"filter").addSystem(lS,"renderTexture").addSystem(AI,"batch"),r.initPlugins(t.__plugins),r.multisample=void 0,n.context?r.context.initFromContext(n.context):r.context.initFromOptions({alpha:!!r.useContextAlpha,antialias:n.antialias,premultipliedAlpha:r.useContextAlpha&&r.useContextAlpha!=="notMultiplied",stencil:!0,preserveDrawingBuffer:n.preserveDrawingBuffer,powerPreference:r.options.powerPreference}),r.renderingToScreen=!0,JE(r.context.webGLVersion===2?"WebGL 2":"WebGL 1"),r.resize(r.options.width,r.options.height),r}return t.create=function(n){if(QE())return new t(n);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},t.prototype.contextChange=function(){var n=this.gl,r;if(this.context.webGLVersion===1){var i=n.getParameter(n.FRAMEBUFFER_BINDING);n.bindFramebuffer(n.FRAMEBUFFER,null),r=n.getParameter(n.SAMPLES),n.bindFramebuffer(n.FRAMEBUFFER,i)}else{var i=n.getParameter(n.DRAW_FRAMEBUFFER_BINDING);n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),r=n.getParameter(n.SAMPLES),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,i)}r>=en.HIGH?this.multisample=en.HIGH:r>=en.MEDIUM?this.multisample=en.MEDIUM:r>=en.LOW?this.multisample=en.LOW:this.multisample=en.NONE},t.prototype.addSystem=function(n,r){var i=new n(this);if(this[r])throw new Error('Whoops! The name "'+r+'" is already in use');this[r]=i;for(var a in this.runners)this.runners[a].add(i);return this},t.prototype.render=function(n,r){var i,a,o,s;if(r&&(r instanceof Jf?(Za("6.0.0","Renderer#render arguments changed, use options instead."),i=r,a=arguments[2],o=arguments[3],s=arguments[4]):(i=r.renderTexture,a=r.clear,o=r.transform,s=r.skipUpdateTransform)),this.renderingToScreen=!i,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=o,!this.context.isLost){if(i||(this._lastObjectRendered=n),!s){var l=n.enableTempParent();n.updateTransform(),n.disableTempParent(l)}this.renderTexture.bind(i),this.batch.currentRenderer.start(),(a!==void 0?a:this.clearBeforeRender)&&this.renderTexture.clear(),n.render(this),this.batch.currentRenderer.flush(),i&&i.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},t.prototype.generateTexture=function(n,r,i,a){r===void 0&&(r={});var o=e.prototype.generateTexture.call(this,n,r,i,a);return this.framebuffer.blit(),o},t.prototype.resize=function(n,r){e.prototype.resize.call(this,n,r),this.runners.resize.emit(this.screen.height,this.screen.width)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(n){this.runners.destroy.emit();for(var r in this.runners)this.runners[r].destroy();e.prototype.destroy.call(this,n),this.gl=null},Object.defineProperty(t.prototype,"extract",{get:function(){return Za("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),t.registerPlugin=function(n,r){t.__plugins=t.__plugins||{},t.__plugins[n]=r},t}(OS);function LS(e){return MS.create(e)}var US=function(){function e(){this.texArray=null,this.blend=0,this.type=Ha.TRIANGLES,this.start=0,this.size=0,this.data=null}return e}(),BS=function(){function e(){this.elements=[],this.ids=[],this.count=0}return e.prototype.clear=function(){for(var t=0;t<this.count;t++)this.elements[t]=null;this.count=0},e}(),kS=function(){function e(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}return Object.defineProperty(e.prototype,"int8View",{get:function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uint8View",{get:function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"int16View",{get:function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uint16View",{get:function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"int32View",{get:function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},enumerable:!1,configurable:!0}),e.prototype.view=function(t){return this[t+"View"]},e.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},e.sizeOf=function(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(t+" isn't a valid view type")}},e}(),DS=function(e){Nt(t,e);function t(n){var r=e.call(this,n)||this;return r.shaderGenerator=null,r.geometryClass=null,r.vertexSize=null,r.state=ed.for2d(),r.size=He.SPRITE_BATCH_SIZE*4,r._vertexCount=0,r._indexCount=0,r._bufferedElements=[],r._bufferedTextures=[],r._bufferSize=0,r._shader=null,r._packedGeometries=[],r._packedGeometryPoolSize=2,r._flushId=0,r._aBuffers={},r._iBuffers={},r.MAX_TEXTURES=1,r.renderer.on("prerender",r.onPrerender,r),n.runners.contextChange.add(r),r._dcIndex=0,r._aIndex=0,r._iIndex=0,r._attributeBuffer=null,r._indexBuffer=null,r._tempBoundTextures=[],r}return t.prototype.contextChange=function(){var n=this.renderer.gl;He.PREFER_ENV===Xr.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),He.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=XI(this.MAX_TEXTURES,n)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var r=0;r<this._packedGeometryPoolSize;r++)this._packedGeometries[r]=new this.geometryClass;this.initFlushBuffers()},t.prototype.initFlushBuffers=function(){for(var n=t._drawCallPool,r=t._textureArrayPool,i=this.size/4,a=Math.floor(i/this.MAX_TEXTURES)+1;n.length<i;)n.push(new US);for(;r.length<a;)r.push(new BS);for(var o=0;o<this.MAX_TEXTURES;o++)this._tempBoundTextures[o]=null},t.prototype.onPrerender=function(){this._flushId=0},t.prototype.render=function(n){!n._texture.valid||(this._vertexCount+n.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=n.vertexData.length/2,this._indexCount+=n.indices.length,this._bufferedTextures[this._bufferSize]=n._texture.baseTexture,this._bufferedElements[this._bufferSize++]=n)},t.prototype.buildTexturesAndDrawCalls=function(){var n=this,r=n._bufferedTextures,i=n.MAX_TEXTURES,a=t._textureArrayPool,o=this.renderer.batch,s=this._tempBoundTextures,l=this.renderer.textureGC.count,u=++rn._globalBatch,c=0,f=a[0],d=0;o.copyBoundTextures(s,i);for(var h=0;h<this._bufferSize;++h){var p=r[h];r[h]=null,p._batchEnabled!==u&&(f.count>=i&&(o.boundArray(f,s,u,i),this.buildDrawCalls(f,d,h),d=h,f=a[++c],++u),p._batchEnabled=u,p.touched=l,f.elements[f.count++]=p)}f.count>0&&(o.boundArray(f,s,u,i),this.buildDrawCalls(f,d,this._bufferSize),++c,++u);for(var h=0;h<s.length;h++)s[h]=null;rn._globalBatch=u},t.prototype.buildDrawCalls=function(n,r,i){var a=this,o=a._bufferedElements,s=a._attributeBuffer,l=a._indexBuffer,u=a.vertexSize,c=t._drawCallPool,f=this._dcIndex,d=this._aIndex,h=this._iIndex,p=c[f];p.start=this._iIndex,p.texArray=n;for(var v=r;v<i;++v){var g=o[v],y=g._texture.baseTexture,m=nI[y.alphaMode?1:0][g.blendMode];o[v]=null,r<v&&p.blend!==m&&(p.size=h-p.start,r=v,p=c[++f],p.texArray=n,p.start=h),this.packInterleavedGeometry(g,s,l,d,h),d+=g.vertexData.length/2*u,h+=g.indices.length,p.blend=m}r<i&&(p.size=h-p.start,++f),this._dcIndex=f,this._aIndex=d,this._iIndex=h},t.prototype.bindAndClearTexArray=function(n){for(var r=this.renderer.texture,i=0;i<n.count;i++)r.bind(n.elements[i],n.ids[i]),n.elements[i]=null;n.count=0},t.prototype.updateGeometry=function(){var n=this,r=n._packedGeometries,i=n._attributeBuffer,a=n._indexBuffer;He.CAN_UPLOAD_SAME_BUFFER?(r[this._flushId]._buffer.update(i.rawBinaryData),r[this._flushId]._indexBuffer.update(a),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,r[this._flushId]=new this.geometryClass),r[this._flushId]._buffer.update(i.rawBinaryData),r[this._flushId]._indexBuffer.update(a),this.renderer.geometry.bind(r[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},t.prototype.drawBatches=function(){for(var n=this._dcIndex,r=this.renderer,i=r.gl,a=r.state,o=t._drawCallPool,s=null,l=0;l<n;l++){var u=o[l],c=u.texArray,f=u.type,d=u.size,h=u.start,p=u.blend;s!==c&&(s=c,this.bindAndClearTexArray(c)),this.state.blendMode=p,a.set(this.state),i.drawElements(f,d,i.UNSIGNED_SHORT,h*2)}},t.prototype.flush=function(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)},t.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES),this.renderer.shader.bind(this._shader),He.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},t.prototype.stop=function(){this.flush()},t.prototype.destroy=function(){for(var n=0;n<this._packedGeometryPoolSize;n++)this._packedGeometries[n]&&this._packedGeometries[n].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),e.prototype.destroy.call(this)},t.prototype.getAttributeBuffer=function(n){var r=Rl(Math.ceil(n/8)),i=dp(r),a=r*8;this._aBuffers.length<=i&&(this._iBuffers.length=i+1);var o=this._aBuffers[a];return o||(this._aBuffers[a]=o=new kS(a*this.vertexSize*4)),o},t.prototype.getIndexBuffer=function(n){var r=Rl(Math.ceil(n/12)),i=dp(r),a=r*12;this._iBuffers.length<=i&&(this._iBuffers.length=i+1);var o=this._iBuffers[i];return o||(this._iBuffers[i]=o=new Uint16Array(a)),o},t.prototype.packInterleavedGeometry=function(n,r,i,a,o){for(var s=r.uint32View,l=r.float32View,u=a/this.vertexSize,c=n.uvs,f=n.indices,d=n.vertexData,h=n._texture.baseTexture._batchLocation,p=Math.min(n.worldAlpha,1),v=p<1&&n._texture.baseTexture.alphaMode?rI(n._tintRGB,p):n._tintRGB+(p*255<<24),g=0;g<d.length;g+=2)l[a++]=d[g],l[a++]=d[g+1],l[a++]=c[g],l[a++]=c[g+1],s[a++]=v,l[a++]=h;for(var g=0;g<f.length;g++)i[o++]=u+f[g]},t._drawCallPool=[],t._textureArrayPool=[],t}(cy),GS=function(){function e(t,n){if(this.vertexSrc=t,this.fragTemplate=n,this.programCache={},this.defaultGroupCache={},n.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(n.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')}return e.prototype.generateShader=function(t){if(!this.programCache[t]){for(var n=new Int32Array(t),r=0;r<t;r++)n[r]=r;this.defaultGroupCache[t]=Po.from({uSamplers:n},!0);var i=this.fragTemplate;i=i.replace(/%count%/gi,""+t),i=i.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new qf(this.vertexSrc,i)}var a={tint:new Float32Array([1,1,1,1]),translationMatrix:new jn,default:this.defaultGroupCache[t]};return new vy(this.programCache[t],a)},e.prototype.generateSampleSrc=function(t){var n="";n+=`
`,n+=`
`;for(var r=0;r<t;r++)r>0&&(n+=`
else `),r<t-1&&(n+="if(vTextureId < "+r+".5)"),n+=`
{`,n+=`
color = texture2D(uSamplers[`+r+"], vTextureCoord);",n+=`
}`;return n+=`
`,n+=`
`,n},e}(),VS=function(e){Nt(t,e);function t(n){n===void 0&&(n=!1);var r=e.call(this)||this;return r._buffer=new Mn(null,n,!1),r._indexBuffer=new Mn(null,n,!0),r.addAttribute("aVertexPosition",r._buffer,2,!1,vt.FLOAT).addAttribute("aTextureCoord",r._buffer,2,!1,vt.FLOAT).addAttribute("aColor",r._buffer,4,!0,vt.UNSIGNED_BYTE).addAttribute("aTextureId",r._buffer,1,!0,vt.FLOAT).addIndex(r._indexBuffer),r}return t}(Qf),Ip=`precision highp float;
attribute vec2 aVertexPosition;
attribute vec2 aTextureCoord;
attribute vec4 aColor;
attribute float aTextureId;
uniform mat3 projectionMatrix;
uniform mat3 translationMatrix;
uniform vec4 tint;
varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
void main(void){
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
vTextureCoord = aTextureCoord;
vTextureId = aTextureId;
vColor = aColor * tint;
}
`,Sp=`varying vec2 vTextureCoord;
varying vec4 vColor;
varying float vTextureId;
uniform sampler2D uSamplers[%count%];
void main(void){
vec4 color;
%forloop%
gl_FragColor = color * vColor;
}
`,$S=function(){function e(){}return e.create=function(t){var n=Object.assign({vertex:Ip,fragment:Sp,geometryClass:VS,vertexSize:6},t),r=n.vertex,i=n.fragment,a=n.vertexSize,o=n.geometryClass;return function(s){Nt(l,s);function l(u){var c=s.call(this,u)||this;return c.shaderGenerator=new GS(r,i),c.geometryClass=o,c.vertexSize=a,c}return l}(DS)},Object.defineProperty(e,"defaultVertexSrc",{get:function(){return Ip},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentTemplate",{get:function(){return Sp},enumerable:!1,configurable:!0}),e}();$S.create();/*!
* @pixi/display - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/display is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/He.SORTABLE_CHILDREN=!1;var Qc=function(){function e(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return e.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?Zt.EMPTY:(t=t||new Zt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},e.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},e.prototype.addPointMatrix=function(t,n){var r=t.a,i=t.b,a=t.c,o=t.d,s=t.tx,l=t.ty,u=r*n.x+a*n.y+s,c=i*n.x+o*n.y+l;this.minX=Math.min(this.minX,u),this.maxX=Math.max(this.maxX,u),this.minY=Math.min(this.minY,c),this.maxY=Math.max(this.maxY,c)},e.prototype.addQuad=function(t){var n=this.minX,r=this.minY,i=this.maxX,a=this.maxY,o=t[0],s=t[1];n=o<n?o:n,r=s<r?s:r,i=o>i?o:i,a=s>a?s:a,o=t[2],s=t[3],n=o<n?o:n,r=s<r?s:r,i=o>i?o:i,a=s>a?s:a,o=t[4],s=t[5],n=o<n?o:n,r=s<r?s:r,i=o>i?o:i,a=s>a?s:a,o=t[6],s=t[7],n=o<n?o:n,r=s<r?s:r,i=o>i?o:i,a=s>a?s:a,this.minX=n,this.minY=r,this.maxX=i,this.maxY=a},e.prototype.addFrame=function(t,n,r,i,a){this.addFrameMatrix(t.worldTransform,n,r,i,a)},e.prototype.addFrameMatrix=function(t,n,r,i,a){var o=t.a,s=t.b,l=t.c,u=t.d,c=t.tx,f=t.ty,d=this.minX,h=this.minY,p=this.maxX,v=this.maxY,g=o*n+l*r+c,y=s*n+u*r+f;d=g<d?g:d,h=y<h?y:h,p=g>p?g:p,v=y>v?y:v,g=o*i+l*r+c,y=s*i+u*r+f,d=g<d?g:d,h=y<h?y:h,p=g>p?g:p,v=y>v?y:v,g=o*n+l*a+c,y=s*n+u*a+f,d=g<d?g:d,h=y<h?y:h,p=g>p?g:p,v=y>v?y:v,g=o*i+l*a+c,y=s*i+u*a+f,d=g<d?g:d,h=y<h?y:h,p=g>p?g:p,v=y>v?y:v,this.minX=d,this.minY=h,this.maxX=p,this.maxY=v},e.prototype.addVertexData=function(t,n,r){for(var i=this.minX,a=this.minY,o=this.maxX,s=this.maxY,l=n;l<r;l+=2){var u=t[l],c=t[l+1];i=u<i?u:i,a=c<a?c:a,o=u>o?u:o,s=c>s?c:s}this.minX=i,this.minY=a,this.maxX=o,this.maxY=s},e.prototype.addVertices=function(t,n,r,i){this.addVerticesMatrix(t.worldTransform,n,r,i)},e.prototype.addVerticesMatrix=function(t,n,r,i,a,o){a===void 0&&(a=0),o===void 0&&(o=a);for(var s=t.a,l=t.b,u=t.c,c=t.d,f=t.tx,d=t.ty,h=this.minX,p=this.minY,v=this.maxX,g=this.maxY,y=r;y<i;y+=2){var m=n[y],b=n[y+1],T=s*m+u*b+f,S=c*b+l*m+d;h=Math.min(h,T-a),v=Math.max(v,T+a),p=Math.min(p,S-o),g=Math.max(g,S+o)}this.minX=h,this.minY=p,this.maxX=v,this.maxY=g},e.prototype.addBounds=function(t){var n=this.minX,r=this.minY,i=this.maxX,a=this.maxY;this.minX=t.minX<n?t.minX:n,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>a?t.maxY:a},e.prototype.addBoundsMask=function(t,n){var r=t.minX>n.minX?t.minX:n.minX,i=t.minY>n.minY?t.minY:n.minY,a=t.maxX<n.maxX?t.maxX:n.maxX,o=t.maxY<n.maxY?t.maxY:n.maxY;if(r<=a&&i<=o){var s=this.minX,l=this.minY,u=this.maxX,c=this.maxY;this.minX=r<s?r:s,this.minY=i<l?i:l,this.maxX=a>u?a:u,this.maxY=o>c?o:c}},e.prototype.addBoundsMatrix=function(t,n){this.addFrameMatrix(n,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.addBoundsArea=function(t,n){var r=t.minX>n.x?t.minX:n.x,i=t.minY>n.y?t.minY:n.y,a=t.maxX<n.x+n.width?t.maxX:n.x+n.width,o=t.maxY<n.y+n.height?t.maxY:n.y+n.height;if(r<=a&&i<=o){var s=this.minX,l=this.minY,u=this.maxX,c=this.maxY;this.minX=r<s?r:s,this.minY=i<l?i:l,this.maxX=a>u?a:u,this.maxY=o>c?o:c}},e.prototype.pad=function(t,n){t===void 0&&(t=0),n===void 0&&(n=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n)},e.prototype.addFramePad=function(t,n,r,i,a,o){t-=a,n-=o,r+=a,i+=o,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>r?this.maxX:r,this.minY=this.minY<n?this.minY:n,this.maxY=this.maxY>i?this.maxY:i},e}();/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var qc=function(e,t){return qc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},qc(e,t)};function td(e,t){qc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ol=function(e){td(t,e);function t(){var n=e.call(this)||this;return n.tempDisplayObjectParent=null,n.transform=new cI,n.alpha=1,n.visible=!0,n.renderable=!0,n.cullable=!1,n.cullArea=null,n.parent=null,n.worldAlpha=1,n._lastSortedIndex=0,n._zIndex=0,n.filterArea=null,n.filters=null,n._enabledFilters=null,n._bounds=new Qc,n._localBounds=null,n._boundsID=0,n._boundsRect=null,n._localBoundsRect=null,n._mask=null,n._maskRefCount=0,n._destroyed=!1,n.isSprite=!1,n.isMask=!1,n}return t.mixin=function(n){for(var r=Object.keys(n),i=0;i<r.length;++i){var a=r[i];Object.defineProperty(t.prototype,a,Object.getOwnPropertyDescriptor(n,a))}},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),t.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},t.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},t.prototype.getBounds=function(n,r){return n||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new Zt),r=this._boundsRect),this._bounds.getRectangle(r)},t.prototype.getLocalBounds=function(n){n||(this._localBoundsRect||(this._localBoundsRect=new Zt),n=this._localBoundsRect),this._localBounds||(this._localBounds=new Qc);var r=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var a=this._bounds,o=this._boundsID;this._bounds=this._localBounds;var s=this.getBounds(!1,n);return this.parent=i,this.transform=r,this._bounds=a,this._bounds.updateID+=this._boundsID-o,s},t.prototype.toGlobal=function(n,r,i){return i===void 0&&(i=!1),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(n,r)},t.prototype.toLocal=function(n,r,i,a){return r&&(n=r.toGlobal(n,i,a)),a||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(n,i)},t.prototype.setParent=function(n){if(!n||!n.addChild)throw new Error("setParent: Argument must be a Container");return n.addChild(this),n},t.prototype.setTransform=function(n,r,i,a,o,s,l,u,c){return n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=1),a===void 0&&(a=1),o===void 0&&(o=0),s===void 0&&(s=0),l===void 0&&(l=0),u===void 0&&(u=0),c===void 0&&(c=0),this.position.x=n,this.position.y=r,this.scale.x=i||1,this.scale.y=a||1,this.rotation=o,this.skew.x=s,this.skew.y=l,this.pivot.x=u,this.pivot.y=c,this},t.prototype.destroy=function(n){this.parent&&this.parent.removeChild(this),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()},Object.defineProperty(t.prototype,"_tempDisplayObjectParent",{get:function(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new jS),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),t.prototype.enableTempParent=function(){var n=this.parent;return this.parent=this._tempDisplayObjectParent,n},t.prototype.disableTempParent=function(n){this.parent=n},Object.defineProperty(t.prototype,"x",{get:function(){return this.position.x},set:function(n){this.transform.position.x=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.position.y},set:function(n){this.transform.position.y=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.transform.position},set:function(n){this.transform.position.copyFrom(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this.transform.scale},set:function(n){this.transform.scale.copyFrom(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(n){this.transform.pivot.copyFrom(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skew",{get:function(){return this.transform.skew},set:function(n){this.transform.skew.copyFrom(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(n){this.transform.rotation=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return this.transform.rotation*sI},set:function(n){this.transform.rotation=n*lI},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zIndex",{get:function(){return this._zIndex},set:function(n){this._zIndex=n,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"worldVisible",{get:function(){var n=this;do{if(!n.visible)return!1;n=n.parent}while(n);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mask",{get:function(){return this._mask},set:function(n){if(this._mask!==n){if(this._mask){var r=this._mask.maskObject||this._mask;r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1)}if(this._mask=n,this._mask){var r=this._mask.maskObject||this._mask;r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++}}},enumerable:!1,configurable:!0}),t}(nu),jS=function(e){td(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.sortDirty=null,n}return t}(Ol);Ol.prototype.displayObjectUpdateTransform=Ol.prototype.updateTransform;/*!
* @pixi/constants - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var Np;(function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"})(Np||(Np={}));var Rp;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"})(Rp||(Rp={}));var Ap;(function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"})(Ap||(Ap={}));var Op;(function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"})(Op||(Op={}));var Pp;(function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(Pp||(Pp={}));var Fp;(function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"})(Fp||(Fp={}));var Mp;(function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"})(Mp||(Mp={}));var Lp;(function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT"})(Lp||(Lp={}));var Up;(function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT"})(Up||(Up={}));var Bp;(function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"})(Bp||(Bp={}));var kp;(function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(kp||(kp={}));var Dp;(function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL"})(Dp||(Dp={}));var Gp;(function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"})(Gp||(Gp={}));var Vp;(function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT"})(Vp||(Vp={}));var $p;(function(e){e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL"})($p||($p={}));var jp;(function(e){e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp"})(jp||(jp={}));var ef;(function(e){e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE"})(ef||(ef={}));var Hp;(function(e){e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH"})(Hp||(Hp={}));var zp;(function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"})(zp||(zp={}));function HS(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}var Pl=function(e){td(t,e);function t(){var n=e.call(this)||this;return n.children=[],n.sortableChildren=He.SORTABLE_CHILDREN,n.sortDirty=!1,n}return t.prototype.onChildrenChange=function(n){},t.prototype.addChild=function(){for(var n=arguments,r=[],i=0;i<arguments.length;i++)r[i]=n[i];if(r.length>1)for(var a=0;a<r.length;a++)this.addChild(r[a]);else{var o=r[0];o.parent&&o.parent.removeChild(o),o.parent=this,this.sortDirty=!0,o.transform._parentID=-1,this.children.push(o),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",o,this,this.children.length-1),o.emit("added",this)}return r[0]},t.prototype.addChildAt=function(n,r){if(r<0||r>this.children.length)throw new Error(n+"addChildAt: The index "+r+" supplied is out of bounds "+this.children.length);return n.parent&&n.parent.removeChild(n),n.parent=this,this.sortDirty=!0,n.transform._parentID=-1,this.children.splice(r,0,n),this._boundsID++,this.onChildrenChange(r),n.emit("added",this),this.emit("childAdded",n,this,r),n},t.prototype.swapChildren=function(n,r){if(n!==r){var i=this.getChildIndex(n),a=this.getChildIndex(r);this.children[i]=r,this.children[a]=n,this.onChildrenChange(i<a?i:a)}},t.prototype.getChildIndex=function(n){var r=this.children.indexOf(n);if(r===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return r},t.prototype.setChildIndex=function(n,r){if(r<0||r>=this.children.length)throw new Error("The index "+r+" supplied is out of bounds "+this.children.length);var i=this.getChildIndex(n);al(this.children,i,1),this.children.splice(r,0,n),this.onChildrenChange(r)},t.prototype.getChildAt=function(n){if(n<0||n>=this.children.length)throw new Error("getChildAt: Index ("+n+") does not exist.");return this.children[n]},t.prototype.removeChild=function(){for(var n=arguments,r=[],i=0;i<arguments.length;i++)r[i]=n[i];if(r.length>1)for(var a=0;a<r.length;a++)this.removeChild(r[a]);else{var o=r[0],s=this.children.indexOf(o);if(s===-1)return null;o.parent=null,o.transform._parentID=-1,al(this.children,s,1),this._boundsID++,this.onChildrenChange(s),o.emit("removed",this),this.emit("childRemoved",o,this,s)}return r[0]},t.prototype.removeChildAt=function(n){var r=this.getChildAt(n);return r.parent=null,r.transform._parentID=-1,al(this.children,n,1),this._boundsID++,this.onChildrenChange(n),r.emit("removed",this),this.emit("childRemoved",r,this,n),r},t.prototype.removeChildren=function(n,r){n===void 0&&(n=0),r===void 0&&(r=this.children.length);var i=n,a=r,o=a-i,s;if(o>0&&o<=a){s=this.children.splice(i,o);for(var l=0;l<s.length;++l)s[l].parent=null,s[l].transform&&(s[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(n);for(var l=0;l<s.length;++l)s[l].emit("removed",this),this.emit("childRemoved",s[l],this,l);return s}else if(o===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},t.prototype.sortChildren=function(){for(var n=!1,r=0,i=this.children.length;r<i;++r){var a=this.children[r];a._lastSortedIndex=r,!n&&a.zIndex!==0&&(n=!0)}n&&this.children.length>1&&this.children.sort(HS),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var n=0,r=this.children.length;n<r;++n){var i=this.children[n];i.visible&&i.updateTransform()}},t.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var n=0;n<this.children.length;n++){var r=this.children[n];if(!(!r.visible||!r.renderable))if(r.calculateBounds(),r._mask){var i=r._mask.maskObject||r._mask;i.calculateBounds(),this._bounds.addBoundsMask(r._bounds,i._bounds)}else r.filterArea?this._bounds.addBoundsArea(r._bounds,r.filterArea):this._bounds.addBounds(r._bounds)}this._bounds.updateID=this._boundsID},t.prototype.getLocalBounds=function(n,r){r===void 0&&(r=!1);var i=e.prototype.getLocalBounds.call(this,n);if(!r)for(var a=0,o=this.children.length;a<o;++a){var s=this.children[a];s.visible&&s.updateTransform()}return i},t.prototype._calculateBounds=function(){},t.prototype._renderWithCulling=function(n){var r=n.renderTexture.sourceFrame;if(r.width>0&&r.height>0){var i,a;if(this.cullArea?(i=this.cullArea,a=this.worldTransform):this._render!==t.prototype._render&&(i=this.getBounds(!0)),i&&r.intersects(i,a))this._render(n);else if(this.cullArea)return;for(var o=0,s=this.children.length;o<s;++o){var l=this.children[o],u=l.cullable;l.cullable=u||!this.cullArea,l.render(n),l.cullable=u}}},t.prototype.render=function(n){if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(n);else if(this.cullable)this._renderWithCulling(n);else{this._render(n);for(var r=0,i=this.children.length;r<i;++r)this.children[r].render(n)}},t.prototype.renderAdvanced=function(n){var r=this.filters,i=this._mask;if(r){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var a=0;a<r.length;a++)r[a].enabled&&this._enabledFilters.push(r[a])}var o=r&&this._enabledFilters&&this._enabledFilters.length||i&&(!i.isMaskData||i.enabled&&(i.autoDetect||i.type!==ef.NONE));if(o&&n.batch.flush(),r&&this._enabledFilters&&this._enabledFilters.length&&n.filter.push(this,this._enabledFilters),i&&n.mask.push(this,this._mask),this.cullable)this._renderWithCulling(n);else{this._render(n);for(var a=0,s=this.children.length;a<s;++a)this.children[a].render(n)}o&&n.batch.flush(),i&&n.mask.pop(this),r&&this._enabledFilters&&this._enabledFilters.length&&n.filter.pop()},t.prototype._render=function(n){},t.prototype.destroy=function(n){e.prototype.destroy.call(this),this.sortDirty=!1;var r=typeof n=="boolean"?n:n&&n.children,i=this.removeChildren(0,this.children.length);if(r)for(var a=0;a<i.length;++a)i[a].destroy(n)},Object.defineProperty(t.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(n){var r=this.getLocalBounds().width;r!==0?this.scale.x=n/r:this.scale.x=1,this._width=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(n){var r=this.getLocalBounds().height;r!==0?this.scale.y=n/r:this.scale.y=1,this._height=n},enumerable:!1,configurable:!0}),t}(Ol);Pl.prototype.containerUpdateTransform=Pl.prototype.updateTransform;/*!
* @pixi/sprite - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/sprite is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*//*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var tf=function(e,t){return tf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},tf(e,t)};function zS(e,t){tf(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ra=new Yt,XS=new Uint16Array([0,1,2,0,2,3]),WS=function(e){zS(t,e);function t(n){var r=e.call(this)||this;return r._anchor=new ha(r._onAnchorUpdate,r,n?n.defaultAnchor.x:0,n?n.defaultAnchor.y:0),r._texture=null,r._width=0,r._height=0,r._tint=null,r._tintRGB=null,r.tint=16777215,r.blendMode=Me.NORMAL,r._cachedTint=16777215,r.uvs=null,r.texture=n||Gr.EMPTY,r.vertexData=new Float32Array(8),r.vertexTrimmedData=null,r._transformID=-1,r._textureID=-1,r._transformTrimmedID=-1,r._textureTrimmedID=-1,r.indices=XS,r.pluginName="batch",r.isSprite=!0,r._roundPixels=He.ROUND_PIXELS,r}return t.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=Ms(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=Ms(this.scale.y)*this._height/this._texture.orig.height)},t.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},t.prototype.calculateVertices=function(){var n=this._texture;if(!(this._transformID===this.transform._worldID&&this._textureID===n._updateID)){this._textureID!==n._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=n._updateID;var r=this.transform.worldTransform,i=r.a,a=r.b,o=r.c,s=r.d,l=r.tx,u=r.ty,c=this.vertexData,f=n.trim,d=n.orig,h=this._anchor,p=0,v=0,g=0,y=0;if(f?(v=f.x-h._x*d.width,p=v+f.width,y=f.y-h._y*d.height,g=y+f.height):(v=-h._x*d.width,p=v+d.width,y=-h._y*d.height,g=y+d.height),c[0]=i*v+o*y+l,c[1]=s*y+a*v+u,c[2]=i*p+o*y+l,c[3]=s*y+a*p+u,c[4]=i*p+o*g+l,c[5]=s*g+a*p+u,c[6]=i*v+o*g+l,c[7]=s*g+a*v+u,this._roundPixels)for(var m=He.RESOLUTION,b=0;b<c.length;++b)c[b]=Math.round((c[b]*m|0)/m)}},t.prototype.calculateTrimmedVertices=function(){if(!this.vertexTrimmedData)this.vertexTrimmedData=new Float32Array(8);else if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return;this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var n=this._texture,r=this.vertexTrimmedData,i=n.orig,a=this._anchor,o=this.transform.worldTransform,s=o.a,l=o.b,u=o.c,c=o.d,f=o.tx,d=o.ty,h=-a._x*i.width,p=h+i.width,v=-a._y*i.height,g=v+i.height;r[0]=s*h+u*v+f,r[1]=c*v+l*h+d,r[2]=s*p+u*v+f,r[3]=c*v+l*p+d,r[4]=s*p+u*g+f,r[5]=c*g+l*p+d,r[6]=s*h+u*g+f,r[7]=c*g+l*h+d},t.prototype._render=function(n){this.calculateVertices(),n.batch.setObjectRenderer(n.plugins[this.pluginName]),n.plugins[this.pluginName].render(this)},t.prototype._calculateBounds=function(){var n=this._texture.trim,r=this._texture.orig;!n||n.width===r.width&&n.height===r.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},t.prototype.getLocalBounds=function(n){return this.children.length===0?(this._localBounds||(this._localBounds=new Qc),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),n||(this._localBoundsRect||(this._localBoundsRect=new Zt),n=this._localBoundsRect),this._localBounds.getRectangle(n)):e.prototype.getLocalBounds.call(this,n)},t.prototype.containsPoint=function(n){this.worldTransform.applyInverse(n,ra);var r=this._texture.orig.width,i=this._texture.orig.height,a=-r*this.anchor.x,o=0;return ra.x>=a&&ra.x<a+r&&(o=-i*this.anchor.y,ra.y>=o&&ra.y<o+i)},t.prototype.destroy=function(n){e.prototype.destroy.call(this,n),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null;var r=typeof n=="boolean"?n:n&&n.texture;if(r){var i=typeof n=="boolean"?n:n&&n.baseTexture;this._texture.destroy(!!i)}this._texture=null},t.from=function(n,r){var i=n instanceof Gr?n:Gr.from(n,r);return new t(i)},Object.defineProperty(t.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(n){this._roundPixels!==n&&(this._transformID=-1),this._roundPixels=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(n){var r=Ms(this.scale.x)||1;this.scale.x=r*n/this._texture.orig.width,this._width=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(n){var r=Ms(this.scale.y)||1;this.scale.y=r*n/this._texture.orig.height,this._height=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"anchor",{get:function(){return this._anchor},set:function(n){this._anchor.copyFrom(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tint",{get:function(){return this._tint},set:function(n){this._tint=n,this._tintRGB=(n>>16)+(n&65280)+((n&255)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(n){this._texture!==n&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=n||Gr.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,n&&(n.baseTexture.valid?this._onTextureUpdate():n.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),t}(Pl);/*!
* @pixi/particle-emitter - v5.0.7
* Compiled Fri, 27 May 2022 02:00:12 UTC
*
* @pixi/particle-emitter is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/class Tr{constructor(t,n,r){this.value=t,this.time=n,this.next=null,this.isStepped=!1,r?this.ease=typeof r=="function"?r:xy(r):this.ease=null}static createList(t){if("list"in t){const r=t.list;let i;const{value:a,time:o}=r[0],s=i=new Tr(typeof a=="string"?Hs(a):a,o,t.ease);if(r.length>2||r.length===2&&r[1].value!==a)for(let l=1;l<r.length;++l){const{value:u,time:c}=r[l];i.next=new Tr(typeof u=="string"?Hs(u):u,c),i=i.next}return s.isStepped=!!t.isStepped,s}const n=new Tr(typeof t.start=="string"?Hs(t.start):t.start,0);return t.end!==t.start&&(n.next=new Tr(typeof t.end=="string"?Hs(t.end):t.end,1)),n}}let Qa=Gr.from;const br=Math.PI/180;function jr(e,t){if(!e)return;const n=Math.sin(e),r=Math.cos(e),i=t.x*r-t.y*n,a=t.x*n+t.y*r;t.x=i,t.y=a}function au(e,t,n){return e<<16|t<<8|n}function yy(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function KS(e){const t=1/yy(e);e.x*=t,e.y*=t}function by(e,t){e.x*=t,e.y*=t}function Hs(e,t){t||(t={}),e.charAt(0)==="#"?e=e.substr(1):e.indexOf("0x")===0&&(e=e.substr(2));let n;return e.length===8&&(n=e.substr(0,2),e=e.substr(2)),t.r=parseInt(e.substr(0,2),16),t.g=parseInt(e.substr(2,2),16),t.b=parseInt(e.substr(4,2),16),n&&(t.a=parseInt(n,16)),t}function xy(e){const t=e.length,n=1/t;return function(r){const i=t*r|0,a=(r-i*n)*t,o=e[i]||e[t-1];return o.s+a*(2*(1-a)*(o.cp-o.s)+a*(o.e-o.s))}}function YS(e){return e?(e=e.toUpperCase().replace(/ /g,"_"),Me[e]||Me.NORMAL):Me.NORMAL}class Ku extends WS{constructor(t){super(),this.prevChild=this.nextChild=null,this.emitter=t,this.config={},this.anchor.x=this.anchor.y=.5,this.maxLife=0,this.age=0,this.agePercent=0,this.oneOverLife=0,this.next=null,this.prev=null,this.init=this.init,this.kill=this.kill}init(t){this.maxLife=t,this.age=this.agePercent=0,this.rotation=0,this.position.x=this.position.y=0,this.scale.x=this.scale.y=1,this.tint=16777215,this.alpha=1,this.oneOverLife=1/this.maxLife,this.visible=!0}kill(){this.emitter.recycle(this)}destroy(){this.parent&&this.parent.removeChild(this),this.emitter=this.next=this.prev=null,super.destroy()}}var St;(function(e){e[e.Spawn=0]="Spawn",e[e.Normal=2]="Normal",e[e.Late=5]="Late"})(St||(St={}));const Yu=Ui.shared,Fi=Symbol("Position particle per emitter position");class Tt{constructor(t,n){this.initBehaviors=[],this.updateBehaviors=[],this.recycleBehaviors=[],this.minLifetime=0,this.maxLifetime=0,this.customEase=null,this._frequency=1,this.spawnChance=1,this.maxParticles=1e3,this.emitterLifetime=-1,this.spawnPos=new Yt,this.particlesPerWave=1,this.rotation=0,this.ownerPos=new Yt,this._prevEmitterPos=new Yt,this._prevPosIsValid=!1,this._posChanged=!1,this._parent=null,this.addAtBack=!1,this.particleCount=0,this._emit=!1,this._spawnTimer=0,this._emitterLife=-1,this._activeParticlesFirst=null,this._activeParticlesLast=null,this._poolFirst=null,this._origConfig=null,this._autoUpdate=!1,this._destroyWhenComplete=!1,this._completeCallback=null,this.parent=t,n&&this.init(n),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos}static registerBehavior(t){Tt.knownBehaviors[t.type]=t}get frequency(){return this._frequency}set frequency(t){typeof t=="number"&&t>0?this._frequency=t:this._frequency=1}get parent(){return this._parent}set parent(t){this.cleanup(),this._parent=t}init(t){if(!t)return;this.cleanup(),this._origConfig=t,this.minLifetime=t.lifetime.min,this.maxLifetime=t.lifetime.max,t.ease?this.customEase=typeof t.ease=="function"?t.ease:xy(t.ease):this.customEase=null,this.particlesPerWave=1,t.particlesPerWave&&t.particlesPerWave>1&&(this.particlesPerWave=t.particlesPerWave),this.frequency=t.frequency,this.spawnChance=typeof t.spawnChance=="number"&&t.spawnChance>0?t.spawnChance:1,this.emitterLifetime=t.emitterLifetime||-1,this.maxParticles=t.maxParticles>0?t.maxParticles:1e3,this.addAtBack=!!t.addAtBack,this.rotation=0,this.ownerPos.set(0),t.pos?this.spawnPos.copyFrom(t.pos):this.spawnPos.set(0),this._prevEmitterPos.copyFrom(this.spawnPos),this._prevPosIsValid=!1,this._spawnTimer=0,this.emit=t.emit===void 0?!0:!!t.emit,this.autoUpdate=!!t.autoUpdate;const n=t.behaviors.map(r=>{const i=Tt.knownBehaviors[r.type];return i?new i(r.config):(console.error(`Unknown behavior: ${r.type}`),null)}).filter(r=>!!r);n.push(Fi),n.sort((r,i)=>r===Fi?i.order===St.Spawn?1:-1:i===Fi?r.order===St.Spawn?-1:1:r.order-i.order),this.initBehaviors=n.slice(),this.updateBehaviors=n.filter(r=>r!==Fi&&r.updateParticle),this.recycleBehaviors=n.filter(r=>r!==Fi&&r.recycleParticle)}getBehavior(t){return Tt.knownBehaviors[t]&&this.initBehaviors.find(n=>n instanceof Tt.knownBehaviors[t])||null}fillPool(t){for(;t>0;--t){const n=new Ku(this);n.next=this._poolFirst,this._poolFirst=n}}recycle(t,n=!1){for(let r=0;r<this.recycleBehaviors.length;++r)this.recycleBehaviors[r].recycleParticle(t,!n);t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next),t===this._activeParticlesLast&&(this._activeParticlesLast=t.prev),t===this._activeParticlesFirst&&(this._activeParticlesFirst=t.next),t.prev=null,t.next=this._poolFirst,this._poolFirst=t,t.parent&&t.parent.removeChild(t),--this.particleCount}rotate(t){if(this.rotation===t)return;const n=t-this.rotation;this.rotation=t,jr(n,this.spawnPos),this._posChanged=!0}updateSpawnPos(t,n){this._posChanged=!0,this.spawnPos.x=t,this.spawnPos.y=n}updateOwnerPos(t,n){this._posChanged=!0,this.ownerPos.x=t,this.ownerPos.y=n}resetPositionTracking(){this._prevPosIsValid=!1}get emit(){return this._emit}set emit(t){this._emit=!!t,this._emitterLife=this.emitterLifetime}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){this._autoUpdate&&!t?Yu.remove(this.update,this):!this._autoUpdate&&t&&Yu.add(this.update,this),this._autoUpdate=!!t}playOnceAndDestroy(t){this.autoUpdate=!0,this.emit=!0,this._destroyWhenComplete=!0,this._completeCallback=t}playOnce(t){this.emit=!0,this._completeCallback=t}update(t){if(this._autoUpdate&&(t=Yu.elapsedMS*.001),!this._parent)return;for(let o=this._activeParticlesFirst,s;o;o=s)if(s=o.next,o.age+=t,o.age>o.maxLife||o.age<0)this.recycle(o);else{let l=o.age*o.oneOverLife;this.customEase&&(this.customEase.length===4?l=this.customEase(l,0,1,1):l=this.customEase(l)),o.agePercent=l;for(let u=0;u<this.updateBehaviors.length;++u)if(this.updateBehaviors[u].updateParticle(o,t)){this.recycle(o);break}}let n,r;this._prevPosIsValid&&(n=this._prevEmitterPos.x,r=this._prevEmitterPos.y);const i=this.ownerPos.x+this.spawnPos.x,a=this.ownerPos.y+this.spawnPos.y;if(this._emit)for(this._spawnTimer-=t<0?0:t;this._spawnTimer<=0;){if(this._emitterLife>=0&&(this._emitterLife-=this._frequency,this._emitterLife<=0)){this._spawnTimer=0,this._emitterLife=0,this.emit=!1;break}if(this.particleCount>=this.maxParticles){this._spawnTimer+=this._frequency;continue}let o,s;if(this._prevPosIsValid&&this._posChanged){const c=1+this._spawnTimer/t;o=(i-n)*c+n,s=(a-r)*c+r}else o=i,s=a;let l=null,u=null;for(let c=Math.min(this.particlesPerWave,this.maxParticles-this.particleCount),f=0;f<c;++f){if(this.spawnChance<1&&Math.random()>=this.spawnChance)continue;let d;if(this.minLifetime===this.maxLifetime?d=this.minLifetime:d=Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,-this._spawnTimer>=d)continue;let h;this._poolFirst?(h=this._poolFirst,this._poolFirst=this._poolFirst.next,h.next=null):h=new Ku(this),h.init(d),this.addAtBack?this._parent.addChildAt(h,0):this._parent.addChild(h),l?(u.next=h,h.prev=u,u=h):u=l=h,++this.particleCount}if(l){this._activeParticlesLast?(this._activeParticlesLast.next=l,l.prev=this._activeParticlesLast,this._activeParticlesLast=u):(this._activeParticlesFirst=l,this._activeParticlesLast=u);for(let c=0;c<this.initBehaviors.length;++c){const f=this.initBehaviors[c];if(f===Fi)for(let d=l,h;d;d=h){h=d.next,this.rotation!==0&&(jr(this.rotation,d.position),d.rotation+=this.rotation),d.position.x+=o,d.position.y+=s,d.age+=-this._spawnTimer;let p=d.age*d.oneOverLife;this.customEase&&(this.customEase.length===4?p=this.customEase(p,0,1,1):p=this.customEase(p)),d.agePercent=p}else f.initParticles(l)}for(let c=l,f;c;c=f){f=c.next;for(let d=0;d<this.updateBehaviors.length;++d)if(this.updateBehaviors[d].updateParticle(c,-this._spawnTimer)){this.recycle(c);break}}}this._spawnTimer+=this._frequency}if(this._posChanged&&(this._prevEmitterPos.x=i,this._prevEmitterPos.y=a,this._prevPosIsValid=!0,this._posChanged=!1),!this._emit&&!this._activeParticlesFirst){if(this._completeCallback){const o=this._completeCallback;this._completeCallback=null,o()}this._destroyWhenComplete&&this.destroy()}}emitNow(){const t=this.ownerPos.x+this.spawnPos.x,n=this.ownerPos.y+this.spawnPos.y;let r=null,i=null;for(let a=Math.min(this.particlesPerWave,this.maxParticles-this.particleCount),o=0;o<a;++o){if(this.spawnChance<1&&Math.random()>=this.spawnChance)continue;let s;this._poolFirst?(s=this._poolFirst,this._poolFirst=this._poolFirst.next,s.next=null):s=new Ku(this);let l;this.minLifetime===this.maxLifetime?l=this.minLifetime:l=Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime,s.init(l),this.addAtBack?this._parent.addChildAt(s,0):this._parent.addChild(s),r?(i.next=s,s.prev=i,i=s):i=r=s,++this.particleCount}if(r){this._activeParticlesLast?(this._activeParticlesLast.next=r,r.prev=this._activeParticlesLast,this._activeParticlesLast=i):(this._activeParticlesFirst=r,this._activeParticlesLast=i);for(let a=0;a<this.initBehaviors.length;++a){const o=this.initBehaviors[a];if(o===Fi)for(let s=r,l;s;s=l)l=s.next,this.rotation!==0&&(jr(this.rotation,s.position),s.rotation+=this.rotation),s.position.x+=t,s.position.y+=n;else o.initParticles(r)}}}cleanup(){let t,n;for(t=this._activeParticlesFirst;t;t=n)n=t.next,this.recycle(t,!0);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0}get destroyed(){return!(this._parent&&this.initBehaviors.length)}destroy(){this.autoUpdate=!1,this.cleanup();let t;for(let n=this._poolFirst;n;n=t)t=n.next,n.destroy();this._poolFirst=this._parent=this.spawnPos=this.ownerPos=this.customEase=this._completeCallback=null,this.initBehaviors.length=this.updateBehaviors.length=this.recycleBehaviors.length=0}}Tt.knownBehaviors={};class nd{constructor(t){this.x=t.x,this.y=t.y,this.w=t.w,this.h=t.h}getRandPos(t){t.x=Math.random()*this.w+this.x,t.y=Math.random()*this.h+this.y}}nd.type="rect";nd.editorConfig=null;class su{constructor(t){this.x=t.x||0,this.y=t.y||0,this.radius=t.radius,this.innerRadius=t.innerRadius||0,this.rotation=!!t.affectRotation}getRandPos(t){this.innerRadius!==this.radius?t.x=Math.random()*(this.radius-this.innerRadius)+this.innerRadius:t.x=this.radius,t.y=0;const n=Math.random()*Math.PI*2;this.rotation&&(t.rotation+=n),jr(n,t.position),t.position.x+=this.x,t.position.y+=this.y}}su.type="torus";su.editorConfig=null;class rd{constructor(t){this.segments=[],this.countingLengths=[],this.totalLength=0,this.init(t)}init(t){if(!t||!t.length)this.segments.push({p1:{x:0,y:0},p2:{x:0,y:0},l:0});else if(Array.isArray(t[0]))for(let n=0;n<t.length;++n){const r=t[n];let i=r[0];for(let a=1;a<r.length;++a){const o=r[a];this.segments.push({p1:i,p2:o,l:0}),i=o}}else{let n=t[0];for(let r=1;r<t.length;++r){const i=t[r];this.segments.push({p1:n,p2:i,l:0}),n=i}}for(let n=0;n<this.segments.length;++n){const{p1:r,p2:i}=this.segments[n],a=Math.sqrt((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y));this.segments[n].l=a,this.totalLength+=a,this.countingLengths.push(this.totalLength)}}getRandPos(t){const n=Math.random()*this.totalLength;let r,i;if(this.segments.length===1)r=this.segments[0],i=n;else for(let s=0;s<this.countingLengths.length;++s)if(n<this.countingLengths[s]){r=this.segments[s],i=s===0?n:n-this.countingLengths[s-1];break}i/=r.l||1;const{p1:a,p2:o}=r;t.x=a.x+i*(o.x-a.x),t.y=a.y+i*(o.y-a.y)}}rd.type="polygonalChain";rd.editorConfig=null;class id{constructor(t){var n;this.order=St.Late,this.minStart=t.minStart,this.maxStart=t.maxStart,this.accel=t.accel,this.rotate=!!t.rotate,this.maxSpeed=(n=t.maxSpeed)!==null&&n!==void 0?n:0}initParticles(t){let n=t;for(;n;){const r=Math.random()*(this.maxStart-this.minStart)+this.minStart;n.config.velocity?n.config.velocity.set(r,0):n.config.velocity=new Yt(r,0),jr(n.rotation,n.config.velocity),n=n.next}}updateParticle(t,n){const r=t.config.velocity,i=r.x,a=r.y;if(r.x+=this.accel.x*n,r.y+=this.accel.y*n,this.maxSpeed){const o=yy(r);o>this.maxSpeed&&by(r,this.maxSpeed/o)}t.x+=(i+r.x)/2*n,t.y+=(a+r.y)/2*n,this.rotate&&(t.rotation=Math.atan2(r.y,r.x))}}id.type="moveAcceleration";id.editorConfig=null;function ZS(e){return this.ease&&(e=this.ease(e)),(this.first.next.value-this.first.value)*e+this.first.value}function JS(e){this.ease&&(e=this.ease(e));const t=this.first.value,n=this.first.next.value,r=(n.r-t.r)*e+t.r,i=(n.g-t.g)*e+t.g,a=(n.b-t.b)*e+t.b;return au(r,i,a)}function QS(e){this.ease&&(e=this.ease(e));let t=this.first,n=t.next;for(;e>n.time;)t=n,n=n.next;return e=(e-t.time)/(n.time-t.time),(n.value-t.value)*e+t.value}function qS(e){this.ease&&(e=this.ease(e));let t=this.first,n=t.next;for(;e>n.time;)t=n,n=n.next;e=(e-t.time)/(n.time-t.time);const r=t.value,i=n.value,a=(i.r-r.r)*e+r.r,o=(i.g-r.g)*e+r.g,s=(i.b-r.b)*e+r.b;return au(a,o,s)}function eN(e){this.ease&&(e=this.ease(e));let t=this.first;for(;t.next&&e>t.next.time;)t=t.next;return t.value}function tN(e){this.ease&&(e=this.ease(e));let t=this.first;for(;t.next&&e>t.next.time;)t=t.next;const n=t.value;return au(n.r,n.g,n.b)}class fs{constructor(t=!1){this.first=null,this.isColor=!!t,this.interpolate=null,this.ease=null}reset(t){this.first=t,t.next&&t.next.time>=1?this.interpolate=this.isColor?JS:ZS:t.isStepped?this.interpolate=this.isColor?tN:eN:this.interpolate=this.isColor?qS:QS,this.ease=this.first.ease}}class od{constructor(t){this.order=St.Normal,this.list=new fs(!1),this.list.reset(Tr.createList(t.alpha))}initParticles(t){let n=t;for(;n;)n.alpha=this.list.first.value,n=n.next}updateParticle(t){t.alpha=this.list.interpolate(t.agePercent)}}od.type="alpha";od.editorConfig=null;class ad{constructor(t){this.order=St.Normal,this.value=t.alpha}initParticles(t){let n=t;for(;n;)n.alpha=this.value,n=n.next}}ad.type="alphaStatic";ad.editorConfig=null;function _y(e){const t=[];for(let n=0;n<e.length;++n){let r=e[n];if(typeof r=="string")t.push(Qa(r));else if(r instanceof Gr)t.push(r);else{let i=r.count||1;for(typeof r.texture=="string"?r=Qa(r.texture):r=r.texture;i>0;--i)t.push(r)}}return t}class sd{constructor(t){this.order=St.Normal,this.anims=[];for(let n=0;n<t.anims.length;++n){const r=t.anims[n],i=_y(r.textures),a=r.framerate<0?-1:r.framerate>0?r.framerate:60,o={textures:i,duration:a>0?i.length/a:0,framerate:a,loop:a>0?!!r.loop:!1};this.anims.push(o)}}initParticles(t){let n=t;for(;n;){const r=Math.floor(Math.random()*this.anims.length),i=n.config.anim=this.anims[r];n.texture=i.textures[0],n.config.animElapsed=0,i.framerate===-1?(n.config.animDuration=n.maxLife,n.config.animFramerate=i.textures.length/n.maxLife):(n.config.animDuration=i.duration,n.config.animFramerate=i.framerate),n=n.next}}updateParticle(t,n){const r=t.config,i=r.anim;r.animElapsed+=n,r.animElapsed>=r.animDuration&&(r.anim.loop?r.animElapsed=r.animElapsed%r.animDuration:r.animElapsed=r.animDuration-1e-6);const a=r.animElapsed*r.animFramerate+1e-7|0;t.texture=i.textures[a]||i.textures[i.textures.length-1]||Gr.EMPTY}}sd.type="animatedRandom";sd.editorConfig=null;class ld{constructor(t){this.order=St.Normal;const n=t.anim,r=_y(n.textures),i=n.framerate<0?-1:n.framerate>0?n.framerate:60;this.anim={textures:r,duration:i>0?r.length/i:0,framerate:i,loop:i>0?!!n.loop:!1}}initParticles(t){let n=t;const r=this.anim;for(;n;)n.texture=r.textures[0],n.config.animElapsed=0,r.framerate===-1?(n.config.animDuration=n.maxLife,n.config.animFramerate=r.textures.length/n.maxLife):(n.config.animDuration=r.duration,n.config.animFramerate=r.framerate),n=n.next}updateParticle(t,n){const r=this.anim,i=t.config;i.animElapsed+=n,i.animElapsed>=i.animDuration&&(r.loop?i.animElapsed=i.animElapsed%i.animDuration:i.animElapsed=i.animDuration-1e-6);const a=i.animElapsed*i.animFramerate+1e-7|0;t.texture=r.textures[a]||r.textures[r.textures.length-1]||Gr.EMPTY}}ld.type="animatedSingle";ld.editorConfig=null;class ud{constructor(t){this.order=St.Normal,this.value=t.blendMode}initParticles(t){let n=t;for(;n;)n.blendMode=YS(this.value),n=n.next}}ud.type="blendMode";ud.editorConfig=null;class cd{constructor(t){this.order=St.Spawn,this.spacing=t.spacing*br,this.start=t.start*br,this.distance=t.distance}initParticles(t){let n=0,r=t;for(;r;){let i;this.spacing?i=this.start+this.spacing*n:i=Math.random()*Math.PI*2,r.rotation=i,this.distance&&(r.position.x=this.distance,jr(i,r.position)),r=r.next,++n}}}cd.type="spawnBurst";cd.editorConfig=null;class fd{constructor(t){this.order=St.Normal,this.list=new fs(!0),this.list.reset(Tr.createList(t.color))}initParticles(t){let n=t;const r=this.list.first.value,i=au(r.r,r.g,r.b);for(;n;)n.tint=i,n=n.next}updateParticle(t){t.tint=this.list.interpolate(t.agePercent)}}fd.type="color";fd.editorConfig=null;class dd{constructor(t){this.order=St.Normal;let n=t.color;n.charAt(0)==="#"?n=n.substr(1):n.indexOf("0x")===0&&(n=n.substr(2)),this.value=parseInt(n,16)}initParticles(t){let n=t;for(;n;)n.tint=this.value,n=n.next}}dd.type="colorStatic";dd.editorConfig=null;class hd{constructor(t){this.order=St.Normal,this.index=0,this.textures=t.textures.map(n=>typeof n=="string"?Qa(n):n)}initParticles(t){let n=t;for(;n;)n.texture=this.textures[this.index],++this.index>=this.textures.length&&(this.index=0),n=n.next}}hd.type="textureOrdered";hd.editorConfig=null;const vo=new Yt,Ty=["E","LN2","LN10","LOG2E","LOG10E","PI","SQRT1_2","SQRT2","abs","acos","acosh","asin","asinh","atan","atanh","atan2","cbrt","ceil","cos","cosh","exp","expm1","floor","fround","hypot","log","log1p","log10","log2","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh"],nN=new RegExp(["[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]"].concat(Ty).join("|"),"g");function rN(e){const t=e.match(nN);for(let n=t.length-1;n>=0;--n)Ty.indexOf(t[n])>=0&&(t[n]=`Math.${t[n]}`);return e=t.join(""),new Function("x",`return ${e};`)}class pd{constructor(t){var n;if(this.order=St.Late,t.path)if(typeof t.path=="function")this.path=t.path;else try{this.path=rN(t.path)}catch{this.path=null}else this.path=r=>r;this.list=new fs(!1),this.list.reset(Tr.createList(t.speed)),this.minMult=(n=t.minMult)!==null&&n!==void 0?n:1}initParticles(t){let n=t;for(;n;){n.config.initRotation=n.rotation,n.config.initPosition?n.config.initPosition.copyFrom(n.position):n.config.initPosition=new Yt(n.x,n.y),n.config.movement=0;const r=Math.random()*(1-this.minMult)+this.minMult;n.config.speedMult=r,n=n.next}}updateParticle(t,n){const r=this.list.interpolate(t.agePercent)*t.config.speedMult;t.config.movement+=r*n,vo.x=t.config.movement,vo.y=this.path(vo.x),jr(t.config.initRotation,vo),t.position.x=t.config.initPosition.x+vo.x,t.position.y=t.config.initPosition.y+vo.y}}pd.type="movePath";pd.editorConfig=null;class vd{constructor(){this.order=St.Spawn}initParticles(t){}}vd.type="spawnPoint";vd.editorConfig=null;class md{constructor(t){this.order=St.Normal,this.textures=t.textures.map(n=>typeof n=="string"?Qa(n):n)}initParticles(t){let n=t;for(;n;){const r=Math.floor(Math.random()*this.textures.length);n.texture=this.textures[r],n=n.next}}}md.type="textureRandom";md.editorConfig=null;class gd{constructor(t){this.order=St.Normal,this.minStart=t.minStart*br,this.maxStart=t.maxStart*br,this.minSpeed=t.minSpeed*br,this.maxSpeed=t.maxSpeed*br,this.accel=t.accel*br}initParticles(t){let n=t;for(;n;)this.minStart===this.maxStart?n.rotation+=this.maxStart:n.rotation+=Math.random()*(this.maxStart-this.minStart)+this.minStart,n.config.rotSpeed=Math.random()*(this.maxSpeed-this.minSpeed)+this.minSpeed,n=n.next}updateParticle(t,n){if(this.accel){const r=t.config.rotSpeed;t.config.rotSpeed+=this.accel*n,t.rotation+=(t.config.rotSpeed+r)/2*n}else t.rotation+=t.config.rotSpeed*n}}gd.type="rotation";gd.editorConfig=null;class yd{constructor(t){this.order=St.Normal,this.min=t.min*br,this.max=t.max*br}initParticles(t){let n=t;for(;n;)this.min===this.max?n.rotation+=this.max:n.rotation+=Math.random()*(this.max-this.min)+this.min,n=n.next}}yd.type="rotationStatic";yd.editorConfig=null;class bd{constructor(t){this.order=St.Late+1,this.rotation=(t.rotation||0)*br}initParticles(t){let n=t;for(;n;)n.rotation=this.rotation,n=n.next}}bd.type="noRotation";bd.editorConfig=null;class xd{constructor(t){var n;this.order=St.Normal,this.list=new fs(!1),this.list.reset(Tr.createList(t.scale)),this.minMult=(n=t.minMult)!==null&&n!==void 0?n:1}initParticles(t){let n=t;for(;n;){const r=Math.random()*(1-this.minMult)+this.minMult;n.config.scaleMult=r,n.scale.x=n.scale.y=this.list.first.value*r,n=n.next}}updateParticle(t){t.scale.x=t.scale.y=this.list.interpolate(t.agePercent)*t.config.scaleMult}}xd.type="scale";xd.editorConfig=null;class _d{constructor(t){this.order=St.Normal,this.min=t.min,this.max=t.max}initParticles(t){let n=t;for(;n;){const r=Math.random()*(this.max-this.min)+this.min;n.scale.x=n.scale.y=r,n=n.next}}}_d.type="scaleStatic";_d.editorConfig=null;class dr{constructor(t){this.order=St.Spawn;const n=dr.shapes[t.type];if(!n)throw new Error(`No shape found with type '${t.type}'`);this.shape=new n(t.data)}static registerShape(t,n){dr.shapes[n||t.type]=t}initParticles(t){let n=t;for(;n;)this.shape.getRandPos(n),n=n.next}}dr.type="spawnShape";dr.editorConfig=null;dr.shapes={};dr.registerShape(rd);dr.registerShape(nd);dr.registerShape(su);dr.registerShape(su,"circle");class Td{constructor(t){this.order=St.Normal,this.texture=typeof t.texture=="string"?Qa(t.texture):t.texture}initParticles(t){let n=t;for(;n;)n.texture=this.texture,n=n.next}}Td.type="textureSingle";Td.editorConfig=null;class wd{constructor(t){var n;this.order=St.Late,this.list=new fs(!1),this.list.reset(Tr.createList(t.speed)),this.minMult=(n=t.minMult)!==null&&n!==void 0?n:1}initParticles(t){let n=t;for(;n;){const r=Math.random()*(1-this.minMult)+this.minMult;n.config.speedMult=r,n.config.velocity?n.config.velocity.set(this.list.first.value*r,0):n.config.velocity=new Yt(this.list.first.value*r,0),jr(n.rotation,n.config.velocity),n=n.next}}updateParticle(t,n){const r=this.list.interpolate(t.agePercent)*t.config.speedMult,i=t.config.velocity;KS(i),by(i,r),t.x+=i.x*n,t.y+=i.y*n}}wd.type="moveSpeed";wd.editorConfig=null;class Cd{constructor(t){this.order=St.Late,this.min=t.min,this.max=t.max}initParticles(t){let n=t;for(;n;){const r=Math.random()*(this.max-this.min)+this.min;n.config.velocity?n.config.velocity.set(r,0):n.config.velocity=new Yt(r,0),jr(n.rotation,n.config.velocity),n=n.next}}updateParticle(t,n){const r=t.config.velocity;t.x+=r.x*n,t.y+=r.y*n}}Cd.type="moveSpeedStatic";Cd.editorConfig=null;function iN(e,t){var n,r,i,a,o,s,l,u,c,f,d,h,p,v,g,y,m,b,T,S,w;if("behaviors"in e)return e;const N={lifetime:e.lifetime,ease:e.ease,particlesPerWave:e.particlesPerWave,frequency:e.frequency,spawnChance:e.spawnChance,emitterLifetime:e.emitterLifetime,maxParticles:e.maxParticles,addAtBack:e.addAtBack,pos:e.pos,emit:e.emit,autoUpdate:e.autoUpdate,behaviors:[]};if(e.alpha)if("start"in e.alpha)if(e.alpha.start===e.alpha.end)e.alpha.start!==1&&N.behaviors.push({type:"alphaStatic",config:{alpha:e.alpha.start}});else{const I={list:[{time:0,value:e.alpha.start},{time:1,value:e.alpha.end}]};N.behaviors.push({type:"alpha",config:{alpha:I}})}else e.alpha.list.length===1?e.alpha.list[0].value!==1&&N.behaviors.push({type:"alphaStatic",config:{alpha:e.alpha.list[0].value}}):N.behaviors.push({type:"alpha",config:{alpha:e.alpha}});if(e.acceleration&&(e.acceleration.x||e.acceleration.y)){let I,R;"start"in e.speed?(I=e.speed.start*((n=e.speed.minimumSpeedMultiplier)!==null&&n!==void 0?n:1),R=e.speed.start):(I=e.speed.list[0].value*((r=e.minimumSpeedMultiplier)!==null&&r!==void 0?r:1),R=e.speed.list[0].value),N.behaviors.push({type:"moveAcceleration",config:{accel:e.acceleration,minStart:I,maxStart:R,rotate:!e.noRotation,maxSpeed:e.maxSpeed}})}else if(!((i=e.extraData)===null||i===void 0)&&i.path){let I,R;"start"in e.speed?(R=(a=e.speed.minimumSpeedMultiplier)!==null&&a!==void 0?a:1,e.speed.start===e.speed.end?I={list:[{time:0,value:e.speed.start}]}:I={list:[{time:0,value:e.speed.start},{time:1,value:e.speed.end}]}):(I=e.speed,R=(o=e.minimumSpeedMultiplier)!==null&&o!==void 0?o:1),N.behaviors.push({type:"movePath",config:{path:e.extraData.path,speed:I,minMult:R}})}else if(e.speed)if("start"in e.speed)if(e.speed.start===e.speed.end)N.behaviors.push({type:"moveSpeedStatic",config:{min:e.speed.start*((s=e.speed.minimumSpeedMultiplier)!==null&&s!==void 0?s:1),max:e.speed.start}});else{const I={list:[{time:0,value:e.speed.start},{time:1,value:e.speed.end}]};N.behaviors.push({type:"moveSpeed",config:{speed:I,minMult:e.speed.minimumSpeedMultiplier}})}else e.speed.list.length===1?N.behaviors.push({type:"moveSpeedStatic",config:{min:e.speed.list[0].value*((l=e.minimumSpeedMultiplier)!==null&&l!==void 0?l:1),max:e.speed.list[0].value}}):N.behaviors.push({type:"moveSpeed",config:{speed:e.speed,minMult:(u=e.minimumSpeedMultiplier)!==null&&u!==void 0?u:1}});if(e.scale)if("start"in e.scale){const I=(c=e.scale.minimumScaleMultiplier)!==null&&c!==void 0?c:1;if(e.scale.start===e.scale.end)N.behaviors.push({type:"scaleStatic",config:{min:e.scale.start*I,max:e.scale.start}});else{const R={list:[{time:0,value:e.scale.start},{time:1,value:e.scale.end}]};N.behaviors.push({type:"scale",config:{scale:R,minMult:I}})}}else if(e.scale.list.length===1){const I=(f=e.minimumScaleMultiplier)!==null&&f!==void 0?f:1,R=e.scale.list[0].value;N.behaviors.push({type:"scaleStatic",config:{min:R*I,max:R}})}else N.behaviors.push({type:"scale",config:{scale:e.scale,minMult:(d=e.minimumScaleMultiplier)!==null&&d!==void 0?d:1}});if(e.color)if("start"in e.color)if(e.color.start===e.color.end)e.color.start!=="ffffff"&&N.behaviors.push({type:"colorStatic",config:{color:e.color.start}});else{const I={list:[{time:0,value:e.color.start},{time:1,value:e.color.end}]};N.behaviors.push({type:"color",config:{color:I}})}else e.color.list.length===1?e.color.list[0].value!=="ffffff"&&N.behaviors.push({type:"colorStatic",config:{color:e.color.list[0].value}}):N.behaviors.push({type:"color",config:{color:e.color}});if(e.rotationAcceleration||((h=e.rotationSpeed)===null||h===void 0?void 0:h.min)||((p=e.rotationSpeed)===null||p===void 0?void 0:p.max)?N.behaviors.push({type:"rotation",config:{accel:e.rotationAcceleration||0,minSpeed:((v=e.rotationSpeed)===null||v===void 0?void 0:v.min)||0,maxSpeed:((g=e.rotationSpeed)===null||g===void 0?void 0:g.max)||0,minStart:((y=e.startRotation)===null||y===void 0?void 0:y.min)||0,maxStart:((m=e.startRotation)===null||m===void 0?void 0:m.max)||0}}):(((b=e.startRotation)===null||b===void 0?void 0:b.min)||((T=e.startRotation)===null||T===void 0?void 0:T.max))&&N.behaviors.push({type:"rotationStatic",config:{min:((S=e.startRotation)===null||S===void 0?void 0:S.min)||0,max:((w=e.startRotation)===null||w===void 0?void 0:w.max)||0}}),e.noRotation&&N.behaviors.push({type:"noRotation",config:{}}),e.blendMode&&e.blendMode!=="normal"&&N.behaviors.push({type:"blendMode",config:{blendMode:e.blendMode}}),Array.isArray(t)&&typeof t[0]!="string"&&"framerate"in t[0]){for(let I=0;I<t.length;++I)t[I].framerate==="matchLife"&&(t[I].framerate=-1);N.behaviors.push({type:"animatedRandom",config:{anims:t}})}else typeof t!="string"&&"framerate"in t?(t.framerate==="matchLife"&&(t.framerate=-1),N.behaviors.push({type:"animatedSingle",config:{anim:t}})):e.orderedArt&&Array.isArray(t)?N.behaviors.push({type:"textureOrdered",config:{textures:t}}):Array.isArray(t)?N.behaviors.push({type:"textureRandom",config:{textures:t}}):N.behaviors.push({type:"textureSingle",config:{texture:t}});if(e.spawnType==="burst")N.behaviors.push({type:"spawnBurst",config:{start:e.angleStart||0,spacing:e.particleSpacing,distance:0}});else if(e.spawnType==="point")N.behaviors.push({type:"spawnPoint",config:{}});else{let I;e.spawnType==="ring"?I={type:"torus",data:{x:e.spawnCircle.x,y:e.spawnCircle.y,radius:e.spawnCircle.r,innerRadius:e.spawnCircle.minR,affectRotation:!0}}:e.spawnType==="circle"?I={type:"torus",data:{x:e.spawnCircle.x,y:e.spawnCircle.y,radius:e.spawnCircle.r,innerRadius:0,affectRotation:!1}}:e.spawnType==="rect"?I={type:"rect",data:e.spawnRect}:e.spawnType==="polygonalChain"&&(I={type:"polygonalChain",data:e.spawnPolygon}),I&&N.behaviors.push({type:"spawnShape",config:I})}return N}Tt.registerBehavior(id);Tt.registerBehavior(od);Tt.registerBehavior(ad);Tt.registerBehavior(sd);Tt.registerBehavior(ld);Tt.registerBehavior(ud);Tt.registerBehavior(cd);Tt.registerBehavior(fd);Tt.registerBehavior(dd);Tt.registerBehavior(hd);Tt.registerBehavior(pd);Tt.registerBehavior(vd);Tt.registerBehavior(md);Tt.registerBehavior(gd);Tt.registerBehavior(yd);Tt.registerBehavior(bd);Tt.registerBehavior(xd);Tt.registerBehavior(_d);Tt.registerBehavior(dr);Tt.registerBehavior(Td);Tt.registerBehavior(wd);Tt.registerBehavior(Cd);/*!
* @pixi/app - v6.4.2
* Compiled Thu, 02 Jun 2022 15:39:26 UTC
*
* @pixi/app is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var wy=function(){function e(t){var n=this;this.stage=new Pl,t=Object.assign({forceCanvas:!1},t),this.renderer=LS(t),e._plugins.forEach(function(r){r.init.call(n,t)})}return e.registerPlugin=function(t){e._plugins.push(t)},e.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(e.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t,n){var r=this,i=e._plugins.slice(0);i.reverse(),i.forEach(function(a){a.destroy.call(r)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null},e._plugins=[],e}(),oN=function(){function e(){}return e.init=function(t){var n=this;Object.defineProperty(this,"resizeTo",{set:function(r){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=r,r&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){!n._resizeTo||(n.cancelResize(),n._resizeId=requestAnimationFrame(function(){return n.resize()}))},this.cancelResize=function(){n._resizeId&&(cancelAnimationFrame(n._resizeId),n._resizeId=null)},this.resize=function(){if(!!n._resizeTo){n.cancelResize();var r,i;if(n._resizeTo===globalThis.window)r=globalThis.innerWidth,i=globalThis.innerHeight;else{var a=n._resizeTo,o=a.clientWidth,s=a.clientHeight;r=o,i=s}n.renderer.resize(r,i)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null},e.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},e}();wy.registerPlugin(oN);var aN=Ie({props:{style:q(String,Object,Array),classes:q(Object),onInit:{type:Function,required:!0},id:{type:String,required:!0},onContainerResized:Function,onHotReload:Function},setup(e){const t=Te(null),n=new ResizeObserver(a),r=Te(null);vr(()=>{var s,l;const o=r.value;o!=null&&(n.observe(o),t.value=new wy({resizeTo:o,backgroundAlpha:0}),(s=r.value)==null||s.appendChild(t.value.view),(l=e.onInit)==null||l.call(e,t.value)),a(),e.onHotReload&&tn(e.onHotReload)}),as(()=>{var o;(o=t.value)==null||o.destroy()});let i=!0;function a(){i&&(i=!1,tn(()=>{var o;r.value!=null&&e.onContainerResized&&(e.onContainerResized(r.value.getBoundingClientRect()),(o=t.value)==null||o.resize()),i=!0}))}return document.fonts.ready.then(a),{unref:x,resizeListener:r}}});function sN(e,t,n,r,i,a){return M(),W("div",{ref:"resizeListener",class:ze(["resize-listener",e.unref(e.classes)]),style:tt(e.unref(e.style))},null,6)}var lN=Qe(aN,[["render",sN],["__scopeId","data-v-8adf21fa"]]);const uN=Symbol("Particles");function cN(e){return an(()=>{var i,a;const t=(i=e==null?void 0:e())!=null?i:{};t.id=_n("particles-"),t.type=uN,t[Jt]=lN,t.app=An(null),t.addEmitter=o=>{const s=t;return s.app.value?Promise.resolve(new Tt(s.app.value.stage,o)):new Promise(l=>{n.push({resolve:l,config:o})})};let n=[];function r(o){t.app.value=o,n.forEach(({resolve:s,config:l})=>s(new Tt(o.stage,l))),n=[]}return t.onContainerResized=(a=t.onContainerResized)==null?void 0:a.bind(t),t[nn]=function(){const{id:o,style:s,classes:l,onContainerResized:u,onHotReload:c}=this;return{id:o,style:x(s),classes:l,onContainerResized:u,onHotReload:c,onInit:r}},t})}window.upgradeConfig=iN;const fN=Symbol("Reset");function Cy(e){return an(()=>{const t=e();return t.id=_n("reset-"),t.type=fN,t.reset=function(){var r;const n=i=>{i&&typeof i=="object"&&(ka in i?i[ka].value=i[Da]:!(i instanceof O)&&!et(i)&&Object.values(i).forEach(a=>n(a)))};x(t.thingsToReset).forEach(n),sn.emit("reset",t),(r=t.onReset)==null||r.call(t)},H(t,"thingsToReset"),t})}const zs={};sn.on("removeLayer",e=>{var t;(t=zs[e.id])==null||t.call(zs),zs[e.id]=void 0});const dN=Ie({__name:"Sticky",setup(e){const t=Te("0"),n=new ResizeObserver(i),r=Te(null);function i(){let a=r.value;if(a==null)return;let o=0;for(;a.previousSibling;){const s=a.previousSibling;s.dataset&&"vSticky"in s.dataset&&(o+=s.offsetHeight),a=s}t.value=o+"px"}return tn(i),document.fonts.ready.then(i),vr(()=>{var o;const a=(o=r.value)==null?void 0:o.parentElement;a&&n.observe(a)}),(a,o)=>(M(),W("div",{class:"sticky",style:tt({top:t.value}),ref_key:"element",ref:r,"data-v-sticky":""},[Mt(a.$slots,"default",{},void 0,!0)],4))}});var Fl=Qe(dN,[["__scopeId","data-v-21495571"]]);const Ey=Ie({__name:"Resource",props:{resource:null,color:null},setup(e){const t=e,n=J(()=>zr(t.resource));return(r,i)=>(M(),W("h2",{style:tt({color:e.color,"text-shadow":"0px 0px 10px "+e.color})},Je(x(n)),5))}});const hN={class:"main-display"},pN={key:0},vN={key:1},mN=le(", "),Iy=Ie({__name:"MainDisplay",props:{resource:null,color:null,classes:null,style:null,effectDisplay:null},setup(e){const n=Et(e),r=Te(null),i=lo(n.effectDisplay),a=J(()=>O.lt(n.resource.value,"1e1000"));return(o,s)=>(M(),we(Fl,null,{default:Pe(()=>{var l,u;return[P("div",{class:"main-display-container",style:tt({height:`${((u=(l=r.value)==null?void 0:l.$el.clientHeight)!=null?u:0)+50}px`})},[P("div",hN,[x(a)?(M(),W("span",pN,"You have ")):ve("",!0),C(Ey,{resource:e.resource,color:e.color||"white"},null,8,["resource","color"]),le(" "+Je(e.resource.displayName),1),x(i)?(M(),W("span",vN,[mN,(M(),we(gt(x(i)),{ref_key:"effectRef",ref:r},null,512))])):ve("",!0)])],4)]}),_:1}))}});function nf(e,t){return H(t,"display"),H(t,"classes"),H(t,"style"),H(t,"direction"),ft(t,"direction",Ct.Up),H(t,"xoffset"),H(t,"yoffset"),t.pinnable&&("pinned"in e?(console.error("Cannot add pinnable tooltip to element that already has a property called 'pinned'"),t.pinnable=!1):e.pinned=t.pinned=Kt(!1)),tn(()=>{const n=e[Jt];e[Jt]=At;const r=e[nn].bind(e);e[nn]=function(){const{display:a,classes:o,style:s,direction:l,xoffset:u,yoffset:c,pinned:f}=this;return{element:{[Jt]:n,[nn]:r},display:a,classes:o,style:x(s),direction:l,xoffset:u,yoffset:c,pinned:f}}.bind(t)}),t}function gN(e,t,n){const r=Zn(e),i=Zn(t),a=n==null?void 0:Zn(n);return{apply:o=>O.add(o,x(r)),revert:o=>O.sub(o,x(r)),enabled:a,description:t==null?void 0:it(()=>C("div",{class:"modifier-container"},[C("span",{class:"modifier-amount"},[O.gte(x(r),0)?"+":"",kt(x(r))]),x(i)?C("span",{class:"modifier-description"},[Er(x(i))]):null]))}}function yN(e,t,n){const r=Zn(e),i=Zn(t),a=n==null?void 0:Zn(n);return{apply:o=>O.times(o,x(r)),revert:o=>O.div(o,x(r)),enabled:a,description:t==null?void 0:it(()=>C("div",{class:"modifier-container"},[C("span",{class:"modifier-amount"},[le("x"),kt(x(r))]),x(i)?C("span",{class:"modifier-description"},[Er(x(i))]):null]))}}function bN(e,t,n){const r=Zn(e),i=Zn(t),a=n==null?void 0:Zn(n);return{apply:o=>O.pow(o,x(r)),revert:o=>O.root(o,x(r)),enabled:a,description:t==null?void 0:it(()=>C("div",{class:"modifier-container"},[C("span",{class:"modifier-amount"},[le("^"),kt(x(r))]),x(i)?C("span",{class:"modifier-description"},[Er(x(i))]):null]))}}function xN(...e){return{apply:t=>e.filter(n=>x(n.enabled)!==!1).reduce((n,r)=>r.apply(n),t),revert:e.every(t=>t.revert!=null)?t=>e.filter(n=>x(n.enabled)!==!1).reduceRight((n,r)=>r.revert(n),t):void 0,enabled:J(()=>e.filter(t=>x(t.enabled)!==!1).length>0),description:it(()=>C(Oe,null,[e.filter(t=>x(t.enabled)!==!1).map(t=>x(t.description)).filter(t=>t).map(Er)]))}}function _N(e,t,n,r=1,i="",a="Base"){return C("div",null,[C("h3",null,[e,t?C("span",{class:"subtitle"},[le(" ("),t,le(")")]):null]),C("br",null,null),C("div",{class:"modifier-container"},[C("span",{class:"modifier-amount"},[kt(r),i]),C("span",{class:"modifier-description"},[Er(a)])]),Er(x(n.description)),C("hr",null,null),le("Total: "),kt(n.apply(r)),i])}const TN={class:"field"},wN={key:0,class:"field-title"},CN=["min","max"],EN=Ie({__name:"Slider",props:{title:null,modelValue:null,min:null,max:null},emits:["update:modelValue"],setup(e,{emit:t}){const r=Et(e),i=J({get(){return String(x(r.modelValue)||0)},set(a){t("update:modelValue",Number(a))}});return(a,o)=>(M(),W("div",TN,[e.title?(M(),W("span",wN,Je(e.title),1)):ve("",!0),C(At,{display:`${x(i)}`,class:ze({fullWidth:!e.title}),direction:x(Ct).Down},{default:Pe(()=>[zo(P("input",{type:"range","onUpdate:modelValue":o[0]||(o[0]=s=>et(i)?i.value=s:null),min:e.min,max:e.max},null,8,CN),[[Do,x(i)]])]),_:1},8,["display","class","direction"])]))}});var IN=Qe(EN,[["__scopeId","data-v-1b053b9f"]]);const SN=Ie({__name:"VerticalRule",props:{height:null},setup(e){return(t,n)=>(M(),W("div",{class:"vr",style:tt({height:e.height})},null,4))}});var NN=Qe(SN,[["__scopeId","data-v-5e0a978a"]]);const RN=Ie({props:{progress:{type:q(String,Object,Number),required:!0},width:{type:q(Number),required:!0},height:{type:q(Number),required:!0},direction:{type:q(String),required:!0},display:q(Object,String,Function),visibility:{type:q(Number),required:!0},style:q(Object,String,Array),classes:q(Object),borderStyle:q(Object,String,Array),textStyle:q(Object,String,Array),baseStyle:q(Object,String,Array),fillStyle:q(Object,String,Array),mark:q(Boolean,String),id:{type:String,required:!0}},components:{MarkNode:Xo,Node:Jr},setup(e){const{progress:t,width:n,height:r,direction:i,display:a}=Et(e),o=J(()=>{let u=t.value instanceof O?t.value.toNumber():Number(t.value);return(1-Math.min(Math.max(u,0),1))*100}),s=J(()=>{const u={width:Ot(n)+.5+"px",height:Ot(r)+.5+"px"};switch(x(i)){case Ct.Up:u.clipPath=`inset(${o.value}% 0% 0% 0%)`,u.width=Ot(n)+1+"px";break;case Ct.Down:u.clipPath=`inset(0% 0% ${o.value}% 0%)`,u.width=Ot(n)+1+"px";break;case Ct.Right:u.clipPath=`inset(0% ${o.value}% 0% 0%)`;break;case Ct.Left:u.clipPath=`inset(0% 0% 0% ${o.value} + '%)`;break;case Ct.Default:u.clipPath="inset(0% 50% 0% 0%)";break}return u}),l=lo(a);return{normalizedProgress:o,barStyle:s,component:l,unref:x,Visibility:nt}}});function AN(e,t,n,r,i,a){var l,u,c,f,d,h,p;const o=wt("MarkNode"),s=wt("Node");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("div",{key:0,style:tt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px",visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(l=e.unref(e.style))!=null?l:{}]),class:ze({bar:!0,...e.unref(e.classes)})},[P("div",{class:"overlayTextContainer border",style:tt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(u=e.unref(e.borderStyle))!=null?u:{}])},[e.component?(M(),W("span",{key:0,class:"overlayText",style:tt(e.unref(e.textStyle))},[(M(),we(gt(e.component)))],4)):ve("",!0)],4),P("div",{class:"border",style:tt([{width:e.unref(e.width)+"px",height:e.unref(e.height)+"px"},(c=e.unref(e.style))!=null?c:{},(f=e.unref(e.baseStyle))!=null?f:{},(d=e.unref(e.borderStyle))!=null?d:{}])},[P("div",{class:"fill",style:tt([e.barStyle,(h=e.unref(e.style))!=null?h:{},(p=e.unref(e.fillStyle))!=null?p:{}])},null,4)],4),C(o,{mark:e.unref(e.mark)},null,8,["mark"]),C(s,{id:e.id},null,8,["id"])],6)):ve("",!0)}var ON=Qe(RN,[["render",AN],["__scopeId","data-v-02d0d7b2"]]);const PN=Symbol("Bar");function Zu(e){return an(()=>{const t=e();return t.id=_n("bar-"),t.type=PN,t[Jt]=ON,H(t,"visibility"),ft(t,"visibility",nt.Visible),H(t,"width"),H(t,"height"),H(t,"direction"),H(t,"style"),H(t,"classes"),H(t,"borderStyle"),H(t,"baseStyle"),H(t,"textStyle"),H(t,"fillStyle"),H(t,"progress"),H(t,"display"),H(t,"mark"),t[nn]=function(){const{progress:n,width:r,height:i,direction:a,display:o,visibility:s,style:l,classes:u,borderStyle:c,textStyle:f,baseStyle:d,fillStyle:h,mark:p,id:v}=this;return{progress:n,width:r,height:i,direction:a,display:o,visibility:s,style:x(l),classes:u,borderStyle:c,textStyle:f,baseStyle:d,fillStyle:h,mark:p,id:v}},t})}const FN=Symbol("Buyable");function MN(e){const t=Kt(0);return an(()=>{var a,o;const n=e();if(n.canPurchase==null&&(n.resource==null||n.cost==null))throw console.warn("Cannot create buyable without a canPurchase property or a resource and cost property",n),"Cannot create buyable without a canPurchase property or a resource and cost property";n.id=_n("buyable-"),n.type=FN,n[Jt]=zg,n.amount=t,n.canAfford=J(()=>{const s=n,l=x(s.cost);return s.resource!=null&&l!=null&&O.gte(s.resource.value,l)}),n.canPurchase==null&&(n.canPurchase=J(()=>x(n.visibility)===nt.Visible&&x(n.canAfford)&&O.lt(n.amount.value,x(n.purchaseLimit)))),n.maxed=J(()=>O.gte(n.amount.value,x(n.purchaseLimit))),H(n,"classes");const r=n.classes;n.classes=J(()=>{const s=x(r)||{};return n.maxed.value&&(s.bought=!0),s}),H(n,"canPurchase"),n.canClick=n.canPurchase,n.onClick=n.purchase=(o=(a=n.onClick)!=null?a:n.purchase)!=null?o:function(){var u;const s=n;if(!x(s.canPurchase))return;const l=x(s.cost);s.cost!=null&&s.resource!=null&&(s.resource.value=O.sub(s.resource.value,l),s.amount.value=O.add(s.amount.value,1)),(u=s.onPurchase)==null||u.call(s,l)},H(n,"display");const i=n.display;return n.display=it(()=>{const s=x(i);if(Jn(s)){const l=Ye(s);return C(l,null,null)}if(s!=null&&n.cost!=null&&n.resource!=null){const l=n,u=Ye(s.title||"","h3"),c=Ye(s.description||""),f=Ye(s.effectDisplay||"");return C("span",null,[s.title?C("div",null,[C(u,null,null)]):null,s.description?C(c,null,null):null,s.showAmount===!1?null:C("div",null,[C("br",null,null),x(l.purchaseLimit)===O.dInf?C(Oe,null,[le("Amount: "),gn(l.amount.value)]):C(Oe,null,[le("Amount: "),gn(l.amount.value),le(" /")," ",gn(x(l.purchaseLimit))])]),s.effectDisplay?C("div",null,[C("br",null,null),le("Currently: "),C(f,null,null)]):null,l.cost&&!l.maxed.value?C("div",null,[C("br",null,null),le("Cost: "),kt(x(l.cost)||0)," ",n.resource.displayName]):null])}return""}),H(n,"visibility"),ft(n,"visibility",nt.Visible),H(n,"cost"),H(n,"resource"),H(n,"purchaseLimit"),ft(n,"purchaseLimit",O.dInf),H(n,"style"),H(n,"mark"),H(n,"small"),n[nn]=function(){const{display:s,visibility:l,style:u,classes:c,onClick:f,canClick:d,small:h,mark:p,id:v}=this;return{display:s,visibility:l,style:x(u),classes:c,onClick:f,canClick:d,small:h,mark:p,id:v}},n})}var LN=Ie({props:{active:{type:q(Boolean),required:!0},maxed:{type:q(Boolean),required:!0},canComplete:{type:q(Boolean),required:!0},display:q(String,Object,Function),visibility:{type:q(Number),required:!0},style:q(String,Object,Array),classes:q(Object),completed:{type:q(Boolean),required:!0},canStart:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0},toggle:{type:Function,required:!0}},components:{MarkNode:Xo,Node:Jr},setup(e){const{active:t,maxed:n,canComplete:r,display:i}=Et(e),a=J(()=>t.value?r.value?"Finish":"Exit Early":n.value?"Completed":"Start"),o=An(""),s=J(()=>{const l=Ot(t),u=Ot(r);return l?u?BC():Yf():{}});return zt(()=>{const l=Ot(i);if(l==null){o.value="";return}if(Jn(l)){o.value=Ye(l);return}const u=Ye(l.title||"","h3"),c=Ye(l.description,"div"),f=Ye(l.goal||""),d=Ye(l.reward||""),h=Ye(l.effectDisplay||"");o.value=Ye(it(()=>C("span",null,[l.title?C("div",null,[C(u,null,null)]):null,C(c,null,null),l.goal?C("div",null,[C("br",null,null),le("Goal: "),C(f,null,null)]):null,l.reward?C("div",null,[C("br",null,null),le("Reward: "),C(d,null,null)]):null,l.effectDisplay?C("div",null,[le("Currently: "),C(h,null,null)]):null])))}),{buttonText:a,notifyStyle:s,comp:o,Visibility:nt,unref:x}}});const UN=["disabled"];function BN(e,t,n,r,i,a){var l;const o=wt("MarkNode"),s=wt("Node");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("div",{key:0,style:tt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.notifyStyle,(l=e.unref(e.style))!=null?l:{}]),class:ze({feature:!0,challenge:!0,done:e.unref(e.completed),canStart:e.unref(e.canStart)&&!e.unref(e.maxed),maxed:e.unref(e.maxed),...e.unref(e.classes)})},[P("button",{class:"toggleChallenge",onClick:t[0]||(t[0]=(...u)=>e.toggle&&e.toggle(...u)),disabled:!e.unref(e.canStart)||e.unref(e.maxed)},Je(e.buttonText),9,UN),e.unref(e.comp)?(M(),we(gt(e.unref(e.comp)),{key:0})):ve("",!0),C(o,{mark:e.unref(e.mark)},null,8,["mark"]),C(s,{id:e.id},null,8,["id"])],6)):ve("",!0)}var kN=Qe(LN,[["render",BN],["__scopeId","data-v-4d2947df"]]);const DN=Symbol("ChallengeType");function GN(e){const t=Kt(0),n=Kt(!1);return an(()=>{const r=e();if(r.canComplete==null&&(r.resource==null||r.goal==null))throw console.warn("Cannot create challenge without a canComplete property or a resource and goal property",r),"Cannot create challenge without a canComplete property or a resource and goal property";r.id=_n("challenge-"),r.type=DN,r[Jt]=kN,r.completions=t,r.active=n,r.completed=J(()=>O.gt(r.completions.value,0)),r.maxed=J(()=>O.gte(r.completions.value,x(r.completionLimit))),r.toggle=function(){var o,s,l,u,c;const a=r;if(a.active.value){if(x(a.canComplete)&&!a.maxed.value){let f=x(a.canComplete);typeof f=="boolean"&&(f=1),a.completions.value=O.min(O.add(a.completions.value,f),x(a.completionLimit)),(o=a.onComplete)==null||o.call(a)}a.active.value=!1,(s=a.onExit)==null||s.call(a),(l=a.reset)==null||l.reset()}else x(a.canStart)&&x(a.visibility)===nt.Visible&&!a.maxed.value&&((u=a.reset)==null||u.reset(),a.active.value=!0,(c=a.onEnter)==null||c.call(a))},r.complete=function(a){var l,u,c;const o=r;let s=x(o.canComplete);o.active.value&&s!==!1&&(s===!0||O.neq(0,s))&&!o.maxed.value&&(typeof s=="boolean"&&(s=1),o.completions.value=O.min(O.add(o.completions.value,s),x(o.completionLimit)),(l=o.onComplete)==null||l.call(o),a!==!0&&(o.active.value=!1,(u=o.onExit)==null||u.call(o),(c=o.reset)==null||c.reset()))},H(r,"visibility"),ft(r,"visibility",nt.Visible);const i=r.visibility;return r.visibility=J(()=>bt.hideChallenges===!0&&x(r.maxed)?nt.None:x(i)),r.canComplete==null&&(r.canComplete=J(()=>{const a=r;return!a.active.value||a.resource==null||a.goal==null?!1:O.gte(a.resource.value,x(a.goal))})),r.mark==null&&(r.mark=J(()=>O.gt(x(r.completionLimit),1)&&!!x(r.maxed))),H(r,"canStart"),ft(r,"canStart",!0),H(r,"canComplete"),H(r,"completionLimit"),ft(r,"completionLimit",1),H(r,"mark"),H(r,"goal"),H(r,"classes"),H(r,"style"),H(r,"display"),r.reset!=null&&sn.on("reset",a=>{a===r.reset&&r.active.value&&r.toggle()}),r[nn]=function(){const{active:a,maxed:o,canComplete:s,display:l,visibility:u,style:c,classes:f,completed:d,canStart:h,mark:p,id:v,toggle:g}=this;return{active:a,maxed:o,canComplete:s,display:l,visibility:u,style:x(c),classes:f,completed:d,canStart:h,mark:p,id:v,toggle:g}},r})}sn.on("loadSettings",e=>{ft(e,"hideChallenges",!1)});Ym(it(()=>C(Bn,{title:"Hide Maxed Challenges","onUpdate:modelValue":e=>bt.hideChallenges=e,modelValue:bt.hideChallenges},null)));const lu=jo({}),Ed=Symbol("Hotkey");function Xp(e){return an(()=>{const t=e();return t.type=Ed,H(t,"enabled"),ft(t,"enabled",!0),H(t,"description"),t})}sn.on("addLayer",e=>{Gm(e,Ed).forEach(t=>{lu[t.key]=t})});sn.on("removeLayer",e=>{Gm(e,Ed).forEach(t=>{lu[t.key]=void 0})});document.onkeydown=function(e){var r;if(((r=e.target)==null?void 0:r.tagName)==="INPUT"||Id.value&&!xe.keepGoing)return;let t=e.key;e.shiftKey&&(t="shift+"+t),e.ctrlKey&&(t="ctrl+"+t);const n=lu[t];n&&x(n.enabled)&&(e.preventDefault(),n.onPress())};Gx(it(()=>{const e=Object.values(lu).filter(t=>x(t==null?void 0:t.enabled));return e.length===0?"":C("div",null,[C("br",null,null),C("h4",null,[le("Hotkeys")]),e.map(t=>C("div",null,[t==null?void 0:t.key,le(": "),t==null?void 0:t.description]))])}));const VN=Symbol("Links");function $N(e){return an(()=>{const t=e();return t.type=VN,t[Jt]=wg,H(t,"links"),t[nn]=function(){const{links:n}=this;return{links:n}},t})}var jN=Ie({props:{visibility:{type:q(Number),required:!0},display:{type:q(String,Object,Function),required:!0},style:q(String,Object,Array),classes:q(Object),earned:{type:q(Boolean),required:!0},id:{type:String,required:!0}},components:{Node:Jr},setup(e){const{display:t}=Et(e),n=An("");return zt(()=>{const r=Ot(t);if(r==null){n.value="";return}if(Jn(r)){n.value=Ye(r);return}const i=Ye(r.requirement,"h3"),a=Ye(r.effectDisplay||"","b"),o=Ye(r.optionsDisplay||"","span");n.value=Ye(it(()=>C("span",null,[C(i,null,null),r.effectDisplay?C("div",null,[C(a,null,null)]):null,r.optionsDisplay?C("div",{class:"equal-spaced"},[C(o,null,null)]):null])))}),{comp:n,unref:x,Visibility:nt}}});function HN(e,t,n,r,i,a){var s;const o=wt("Node");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("div",{key:0,style:tt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(s=e.unref(e.style))!=null?s:{}]),class:ze({feature:!0,milestone:!0,done:e.unref(e.earned),...e.unref(e.classes)})},[(M(),we(gt(e.unref(e.comp)))),C(o,{id:e.id},null,8,["id"])],6)):ve("",!0)}var zN=Qe(jN,[["render",HN],["__scopeId","data-v-f4e8794e"]]);const XN=Kf(),WN=Symbol("Milestone");let ci;(function(e){e.All="all",e.Configurable="configurable",e.Incomplete="incomplete",e.None="none"})(ci||(ci={}));function Wp(e){const t=Kt(!1);return an(()=>{var i;const n=(i=e==null?void 0:e())!=null?i:{};n.id=_n("milestone-"),n.type=WN,n[Jt]=zN,n.earned=t,n.complete=function(){t.value=!0},H(n,"visibility"),ft(n,"visibility",nt.Visible);const r=n.visibility;if(n.visibility=J(()=>{const a=x(n.display);switch(bt.msDisplay){default:case ci.All:return x(r);case ci.Configurable:return x(n.earned)&&!(a!=null&&typeof a=="object"&&"optionsDisplay"in a)?nt.None:x(r);case ci.Incomplete:return x(n.earned)?nt.None:x(r);case ci.None:return nt.None}}),H(n,"style"),H(n,"classes"),H(n,"display"),n[nn]=function(){const{visibility:a,display:o,style:s,classes:l,earned:u,id:c}=this;return{visibility:a,display:o,style:x(s),classes:l,earned:u,id:c}},n.shouldEarn){const a=n;zt(()=>{var o,s;if(bt.active===xe.id&&!a.earned.value&&x(a.visibility)===nt.Visible&&((o=a.shouldEarn)==null?void 0:o.call(a))&&(a.earned.value=!0,(s=a.onComplete)==null||s.call(a),a.display)){const l=x(a.display),u=Ye(Jn(l)?l:l.requirement);XN(C(Oe,null,[C("h3",null,[le("Milestone earned!")]),C("div",null,[C(u,null,null)])]))}})}return n})}sn.on("loadSettings",e=>{ft(e,"msDisplay",ci.All)});const KN=Object.values(ci).map(e=>({label:Dm(e),value:e}));Ym(it(()=>C(Gf,{title:"Show Milestones",options:KN,"onUpdate:modelValue":e=>bt.msDisplay=e,modelValue:bt.msDisplay},null)));const YN=Ie({__name:"Tab",props:{display:null},setup(e){const t=e,{display:n}=Et(t),r=Vo(n);return(i,a)=>(M(),we(gt(x(r))))}}),ZN=Symbol("Tab");function Xs(e){return an(()=>{const t=e();return t.id=_n("tab-"),t.type=ZN,t[Jt]=YN,t[nn]=function(){const{display:n}=this;return{display:n}},t})}const JN=Ie({props:{visibility:{type:q(Number),required:!0},display:{type:q(Object,String,Function),required:!0},style:q(String,Object,Array),classes:q(Object),glowColor:q(String),active:Boolean,floating:Boolean},emits:["selectTab"],setup(e,{emit:t}){const{display:n,glowColor:r,floating:i}=Et(e),a=Vo(n),o=J(()=>{const l=Ot(r);return l?x(i)?Yf(l):{boxShadow:`0px 9px 5px -6px ${l}`}:{}});function s(){t("selectTab")}return{selectTab:s,component:a,glowColorStyle:o,unref:x,Visibility:nt}}});function QN(e,t,n,r,i,a){var o;return e.unref(e.visibility)!==e.Visibility.None?(M(),W("button",{key:0,onClick:t[0]||(t[0]=(...s)=>e.selectTab&&e.selectTab(...s)),class:ze(["tabButton",{active:e.active,...e.unref(e.classes)}]),style:tt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},e.glowColorStyle,(o=e.unref(e.style))!=null?o:{}])},[(M(),we(gt(e.component)))],6)):ve("",!0)}var Sy=Qe(JN,[["render",QN],["__scopeId","data-v-610a2549"]]);const qN=Ie({props:{visibility:{type:q(Number),required:!0},activeTab:{type:q(Object),required:!0},selected:{type:Object,required:!0},tabs:{type:q(Object),required:!0},style:q(String,Object,Array),classes:q(Object),buttonContainerStyle:q(String,Object,Array),buttonContainerClasses:q(Object)},components:{Sticky:Fl,TabButton:Sy},setup(e){const{activeTab:t}=Et(e),n=J(()=>Kr[bt.theme].floatingTabs),r=An("");zt(()=>{const s=Ot(t);if(s==null){r.value="";return}if(Jn(s)){r.value=Ye(s);return}r.value=Ye(x(s.display))});const i=J(()=>{const s=Ot(t);return Jn(s)||!s?void 0:x(s.classes)}),a=J(()=>{const s=Ot(t);return Jn(s)||!s?void 0:x(s.style)});function o(s){const{display:l,style:u,classes:c,glowColor:f,visibility:d}=s;return{display:l,style:x(u),classes:c,glowColor:f,visibility:d}}return{floating:n,tabClasses:i,tabStyle:a,Visibility:nt,component:r,gatherButtonProps:o,unref:x}}});function eR(e,t,n,r,i,a){var l,u;const o=wt("TabButton"),s=wt("Sticky");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("div",{key:0,class:ze(["tab-family-container",{...e.unref(e.classes),...e.tabClasses}]),style:tt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(l=e.unref(e.style))!=null?l:[],(u=e.tabStyle)!=null?u:[]])},[C(s,{class:ze(["tab-buttons-container",e.unref(e.buttonContainerClasses)]),style:tt(e.unref(e.buttonContainerStyle))},{default:Pe(()=>[P("div",{class:ze(["tab-buttons",{floating:e.floating}])},[(M(!0),W(Oe,null,Rr(e.unref(e.tabs),(c,f)=>(M(),we(o,un({onSelectTab:d=>e.selected.value=f,floating:e.floating,key:f,active:e.unref(c.tab)===e.unref(e.activeTab)},e.gatherButtonProps(c)),null,16,["onSelectTab","floating","active"]))),128))],2)]),_:1},8,["class","style"]),e.unref(e.activeTab)?(M(),we(gt(e.unref(e.component)),{key:0})):ve("",!0)],6)):ve("",!0)}var tR=Qe(qN,[["render",eR],["__scopeId","data-v-11575f45"]]);const nR=Symbol("TabButton"),rR=Symbol("TabFamily");function Kp(e,t){if(Object.keys(e).length===0)throw console.warn("Cannot create tab family with 0 tabs"),"Cannot create tab family with 0 tabs";const n=Kt(Object.keys(e)[0]);return an(()=>{var a;const r=(a=t==null?void 0:t())!=null?a:{};r.id=_n("tabFamily-"),r.type=rR,r[Jt]=tR,r.tabs=Object.keys(e).reduce((o,s)=>{const l=e[s]();return l.type=nR,l[Jt]=Sy,H(l,"visibility"),ft(l,"visibility",nt.Visible),H(l,"tab"),H(l,"display"),H(l,"classes"),H(l,"style"),H(l,"glowColor"),o[s]=l,o},{}),r.selected=n,r.activeTab=J(()=>{const o=x(i.tabs);if(n.value in o&&x(o[n.value].visibility)===nt.Visible)return x(o[n.value].tab);const s=Object.values(o).find(l=>x(l.visibility)===nt.Visible);return s?x(s.tab):null}),H(r,"visibility"),ft(r,"visibility",nt.Visible),H(r,"classes"),H(r,"style"),H(r,"buttonContainerClasses"),H(r,"buttonContainerStyle"),r[nn]=function(){const{visibility:o,activeTab:s,selected:l,tabs:u,style:c,classes:f,buttonContainerClasses:d,buttonContainerStyle:h}=this;return{visibility:o,activeTab:s,selected:l,tabs:u,style:x(c),classes:f,buttonContainerClasses:d,buttonContainerStyle:h}};const i=r;return i})}var iR=Ie({props:{display:{type:q(String,Object,Function),required:!0},visibility:{type:q(Number),required:!0},style:q(String,Object,Array),classes:q(Object),resource:Object,cost:q(String,Object,Number),canPurchase:{type:q(Boolean),required:!0},bought:{type:q(Boolean),required:!0},mark:q(Boolean,String),id:{type:String,required:!0},purchase:{type:Function,required:!0}},components:{Node:Jr,MarkNode:Xo},setup(e){const{display:t,cost:n}=Et(e),r=An("");return zt(()=>{const i=Ot(t);if(i==null){r.value="";return}if(Jn(i)){r.value=Ye(i);return}const a=Ot(n),o=Ye(i.title||"","h3"),s=Ye(i.description,"div"),l=Ye(i.effectDisplay||"");r.value=Ye(it(()=>{var u;return C("span",null,[i.title?C("div",null,[C(o,null,null)]):null,C(s,null,null),i.effectDisplay?C("div",null,[le("Currently: "),C(l,null,null)]):null,e.resource!=null?C(Oe,null,[C("br",null,null),le("Cost: "),e.resource&&zr(e.resource,a)," ",(u=e.resource)==null?void 0:u.displayName]):null])}))}),{component:r,unref:x,Visibility:nt}}});const oR=["disabled"];function aR(e,t,n,r,i,a){var l;const o=wt("MarkNode"),s=wt("Node");return e.unref(e.visibility)!==e.Visibility.None?(M(),W("button",{key:0,style:tt([{visibility:e.unref(e.visibility)===e.Visibility.Hidden?"hidden":void 0},(l=e.unref(e.style))!=null?l:{}]),onClick:t[0]||(t[0]=(...u)=>e.purchase&&e.purchase(...u)),class:ze({feature:!0,upgrade:!0,can:e.unref(e.canPurchase),locked:!e.unref(e.canPurchase),bought:e.unref(e.bought),...e.unref(e.classes)}),disabled:!e.unref(e.canPurchase)},[e.unref(e.component)?(M(),we(gt(e.unref(e.component)),{key:0})):ve("",!0),C(o,{mark:e.unref(e.mark)},null,8,["mark"]),C(s,{id:e.id},null,8,["id"])],14,oR)):ve("",!0)}var sR=Qe(iR,[["render",aR],["__scopeId","data-v-7742f590"]]);const lR=Symbol("Upgrade");function Ws(e){const t=Kt(!1);return an(()=>{const n=e();return n.id=_n("upgrade-"),n.type=lR,n[Jt]=sR,n.canAfford==null&&(n.resource==null||n.cost==null)&&console.warn("Error: can't create upgrade without a canAfford property or a resource and cost property",n),n.bought=t,n.canAfford==null?n.canAfford=J(()=>{const r=n;return r.resource!=null&&r.cost!=null&&O.gte(r.resource.value,x(r.cost))}):H(n,"canAfford"),n.canPurchase=J(()=>x(n.visibility)===nt.Visible&&x(n.canAfford)&&!x(n.bought)),n.purchase=function(){var i;const r=n;!x(r.canPurchase)||(r.resource!=null&&r.cost!=null&&(r.resource.value=O.sub(r.resource.value,x(r.cost))),t.value=!0,(i=r.onPurchase)==null||i.call(r))},H(n,"visibility"),ft(n,"visibility",nt.Visible),H(n,"classes"),H(n,"style"),H(n,"display"),H(n,"mark"),H(n,"cost"),H(n,"resource"),n[nn]=function(){const{display:r,visibility:i,style:a,classes:o,resource:s,cost:l,canPurchase:u,bought:c,mark:f,id:d,purchase:h}=this;return{display:r,visibility:i,style:x(a),classes:o,resource:s,cost:l,canPurchase:u,bought:c,mark:f,id:d,purchase:h}},n})}function uR(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!fr(e)}const Ju="c",nr=ss(Ju,()=>{const e="#4BDC13",t="Candies",n=Ga(0,"lollipops"),r=Tg(n),i=Kt(!1),a=Kt("pointy"),o=Kt(10),s=Kt(new O(10)),l=J(()=>O.pow(n.value,.2)),u=J(()=>O.times(n.value,10)),c=Zg(()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"},color:"rgb(75, 220, 19)"})),f=Wp(()=>({shouldEarn(){return O.gte(r.value,3)},display:{requirement:"3 Lollipops",effectDisplay:"Unlock the next milestone"}})),d=Wp(()=>({visibility(){return Yo(f.earned.value)},shouldEarn(){return O.gte(r.value,4)},display:{requirement:"4 Lollipops",effectDisplay:"You can toggle beep and boop (which do nothing)",optionsDisplay:it(()=>C(Oe,null,[C(Bn,{title:"beep","onUpdate:modelValue":ie=>i.value=ie,modelValue:i.value},null),C(Bn,{title:"boop","onUpdate:modelValue":ie=>xr.boop.value=ie,modelValue:xr.boop.value},null)]))},style(){return this.earned?{backgroundColor:"#1111DD"}:{}}})),h=[f,d],p=GN(()=>({title:"Fun",completionLimit:3,display(){return{description:`Makes the game 0% harder<br>${gn(this.completions.value)}/${this.completionLimit} completions`,goal:"Have 20 points I guess",reward:"Says hi",effectDisplay:kt(v.value)+"x"}},visibility(){return Yo(O.gt(r.value,0))},goal:20,resource:yt.points,onComplete(){console.log("hiii")},onEnter(){yt.points.value=0,yt.best.value=yt.points.value,yt.total.value=yt.points.value,console.log("So challenging")},onExit(){console.log("Sweet freedom!")},style:{height:"200px"}})),v=J(()=>O.add(n.value,1).tetrate(.02)),g=Ws(()=>({display:{title:"Generator of Genericness",description:"Gain 1 point every second"},cost:1,resource:n})),y=Ws(()=>({display:()=>({description:"Point generation is faster based on your unspent Lollipops",effectDisplay:`${kt(m.value)}x`}),cost:1,resource:n,visibility:()=>Yo(g.bought.value)})),m=J(()=>{let ie=O.add(n.value,1).pow(.5);return ie.gte("1e20000000")&&(ie=ie.sqrt().times("1e10000000")),ie}),b=Ws(()=>({visibility(){return Yo(y.bought.value)},canAfford(){return O.lt(yt.points.value,7)},onPurchase(){yt.points.value=O.add(yt.points.value,7)},display:"Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab.",style(){return this.bought?{backgroundColor:"#1111dd"}:this.canAfford?{}:{backgroundColor:"#dd1111"}}})),T=Ws(()=>({resource:Ga(w.amount,"Exhancers",0),cost:3,display:{title:"This upgrade doesn't exist",description:"Or does it?"}})),S=[g,y,b],w=MN(()=>({resource:n,cost(){let ie=new O(this.amount.value);return ie.gte(25)&&(ie=ie.pow(2).div(25)),O.pow(2,ie.pow(1.5)).floor()},display(){return{title:"Exhancers",description:`Adds ${kt(N.value)} things and multiplies stuff by ${kt(I.value)}.`}},onPurchase(ie){s.value=O.add(s.value,ie!=null?ie:0)},style:{height:"222px"},purchaseLimit:4})),N=J(()=>O.gte(w.amount.value,0)?O.pow(25,O.pow(w.amount.value,1.1)):O.pow(1/25,O.times(w.amount.value,-1).pow(1.1))),I=J(()=>O.gte(w.amount.value,0)?O.pow(25,O.pow(w.amount.value,1.1)):O.pow(1/25,O.times(w.amount.value,-1).pow(1.1))),R=Kt(!1),U=Te(!1),$=$a(()=>({small:!0,display:"Respec Thingies",onClick(){if(R.value&&!U.value){U.value=!0;return}n.value=O.add(n.value,s.value),w.amount.value=0,yt.tree.reset(re)}})),z=$a(()=>({small:!0,display:"Sell One",onClick(){O.lte(w.amount.value,0)||(w.amount.value=O.sub(w.amount.value,1),n.value=O.add(n.value,w.cost.value),s.value=O.sub(s.value,w.cost.value))}})),j=it(()=>C(qs,null,{default:()=>[C(wa,null,{default:()=>[C(Bn,{title:"Confirm","onUpdate:modelValue":ie=>R.value=ie,modelValue:R.value},null),tr($)]}),tr(w),tr(z),C(wi,{modelValue:U.value,"onUpdate:modelValue":ie=>U.value=ie},{header:()=>C("h2",null,[le("Confirm Respec")]),body:()=>C(Oe,null,[le("Are you sure? Respeccing these doesn't accomplish much")]),footer:()=>C("div",{class:"modal-default-footer"},[C("div",{class:"modal-default-flex-grow"},null),C("button",{class:"button modal-default-button",onClick:()=>U.value=!1},[le("Cancel")]),C("button",{class:"button modal-default-button danger",onClick:()=>{$.onClick(),U.value=!1}},[le("Respec")])])})]})),B=Zu(()=>({fillStyle:{backgroundColor:"#FFFFFF"},baseStyle:{backgroundColor:"#696969"},textStyle:{color:"#04e050"},direction:Ct.Right,width:300,height:30,progress(){return O.add(yt.points.value,1).log(10).div(10).toNumber()},display(){return kt(yt.points.value)+" / 1e10 points"}})),he=Zu(()=>({fillStyle:{backgroundColor:"#4BEC13"},baseStyle:{backgroundColor:"#000000"},textStyle:{textShadow:"0px 0px 2px #000000"},borderStyle:{borderWidth:"7px"},direction:Ct.Up,width:50,height:200,progress(){return O.div(yt.points.value,100)},display(){return gn(O.div(yt.points.value,1).min(100))+"%"}})),Y=Zu(()=>({fillStyle:{backgroundColor:"#FE0102"},baseStyle:{backgroundColor:"#222222"},textStyle:{textShadow:"0px 0px 2px #000000"},direction:Ct.Up,width:100,height:30,progress(){return O.div(n.value,50)}})),oe=eE(()=>({scaling:rE(Yg(10,.5),1e100,.5),baseResource:yt.points,gainResource:n,roundUpCost:!0,gainModifier:xN(bN(2,"Because I felt like it"),gN(1,"Nice modifier"))})),me=Cy(()=>({thingsToReset:()=>[nr]})),Ke=[Xp(()=>({key:"c",description:"reset for lollipops or whatever",onPress(){de.canClick.value&&de.onClick()}})),Xp(()=>({key:"ctrl+c",description:"respec things",onPress(){$.onClick()}}))],re=Wg(()=>({layerID:Ju,color:e,reset:me,mark:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",tooltip(){let ie=zr(n);return O.gt(w.amount.value,0)&&(ie+=`<br><i><br><br><br>${gn(w.amount.value)} Exhancers</i>`),ie},style:{color:"#3325CC",textDecoration:"underline"}}));nf(re,{display:Eg(n),pinnable:!0});const de=Xg(()=>({conversion:oe,tree:yt.tree,treeNode:re,style:{color:"#AA66AA"},resetDescription:"Melt your points into "}));nf(de,{display:it(()=>_N("Modifiers","",oe.gainModifier,oe.scaling.currentGain(oe))),pinnable:!0,direction:Ct.Down,style:"width: 400px; text-align: left"});const ye=Ra(()=>({display:"TH",color:"#6d3678",canClick(){return O.gte(yt.points.value,10)},tooltip:"Thanos your points",onClick(){yt.points.value=O.div(yt.points.value,2),console.log("Thanos'd")},glowColor(){return O.eq(w.amount.value,1)?"orange":""}})),Se=Ra(()=>({display:"h",color(){return Kr[bt.theme].variables["--locked"]},tooltip:{display:J(()=>`Restore your points to ${kt(o.value)}`),right:!0},canClick(){return O.lt(yt.points.value,o.value)},onClick(){yt.points.value=o.value}})),k=Ra(()=>({visibility:nt.Hidden})),X=Cg(()=>({nodes(){return[[xr.treeNode,re],[ye,k,Se]]},branches(){return[{startNode:xr.treeNode,endNode:re,"stroke-width":"25px",stroke:"green",style:{filter:"blur(5px)"}},{startNode:re,endNode:ye},{startNode:ye,endNode:Se}]}})),ce=$N(()=>({links:[{startNode:Se,endNode:Y,"stroke-width":"5px",stroke:"red",offsetEnd:{x:-50+100*Y.progress.value.toNumber(),y:0}}]})),ue=Kp({first:()=>({tab:it(()=>C(Oe,null,[tr(...S),tr(T),C("div",null,[le("confirmed")])])),display:"first"}),second:()=>({tab:xr.display,display:"second"})},()=>({style:{width:"660px",backgroundColor:"brown","--background":"brown",border:"solid white",marginLeft:"auto",marginRight:"auto"}})),Ve=Kp({mainTab:()=>({tab:Xs(()=>({display:it(()=>{let ie;return C(Oe,null,[C(Iy,{resource:n,color:e,effectDisplay:`which are boosting waffles by ${kt(l.value)} and increasing the Ice Cream cap by ${kt(u.value)}`},null),C(Fl,null,uR(ie=Bt(de))?ie:{default:()=>[ie]}),C(Ey,{resource:n,color:e},null),C(En,{height:"5px"},null),C("button",{onClick:()=>console.log("yeet")},[le("'HI'")]),C("div",null,[le("Name your points!")]),C(zf,{modelValue:a.value,"onUpdate:modelValue":Ze=>a.value=Ze},null),C(Fl,{style:"color: red; font-size: 32px; font-family: Comic Sans MS;"},{default:()=>[le("I have "),zr(yt.points),le(" "),a.value,le(" points!")]}),C("hr",null,null),Hx(...h),C(En,null,null),tr(...S),tr(T),tr(p)])})})),display:"main tab",glowColor(){return g.canPurchase.value||y.canPurchase.value||b.canPurchase.value||p.canComplete.value?"blue":""},style:{color:"orange"}}),thingies:()=>({tab:Xs(()=>({style(){return{backgroundColor:"#222222","--background":"#222222"}},display:it(()=>C(Oe,null,[Bt(j),C(En,null,null),C(wa,{style:"width: 600px; height: 350px; background-color: green; border-style: solid;"},{default:()=>[C(Bn,{"onUpdate:modelValue":ie=>i.value=ie,modelValue:i.value},null),C(En,{width:"30px",height:"10px"},null),C("div",null,[C("span",null,[le("Beep")])]),C(En,null,null),C(NN,{height:"200px"},null)]}),C(En,null,null),C("img",{src:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png"},null)]))})),glowColor:"white",display:"thingies",style:{borderColor:"orange"}}),jail:()=>({tab:Xs(()=>({display:it(()=>C(Oe,null,[Bt(c),Bt(B),C(En,null,null),C(wa,null,{default:()=>[C(qs,{style:"background-color: #555555; padding: 15px"},{default:()=>[C("div",{style:"color: teal"},[le("Sugar level:")]),C(En,null,null),Bt(he)]}),C(En,null,null),C(qs,null,{default:()=>[C("div",null,[le("idk")]),C(En,{width:"0",height:"50px"},null),Bt(Y)]})]}),C(En,null,null),C("div",null,[le(`It's jail because "bars"! So funny! Ha ha!`)]),Bt(X)]))})),display:"jail"}),illuminati:()=>({tab:Xs(()=>({display:it(()=>C("div",null,[C("h1",null,[le(" C O N F I R M E D ")]),C(En,null,null),Bt(ue),C("div",null,[le("Adjust how many points H gives you!")]),C(IN,{"onUpdate:modelValue":ie=>o.value=ie,modelValue:o.value,min:1,max:30},null)])),style:{backgroundColor:"#3325CC"}})),visibility(){return Yo(b.bought.value)},display:"illuminati"})});return{id:Ju,color:e,name:t,points:n,best:r,beep:i,thingy:a,otherThingy:o,spentOnBuyables:s,waffleBoost:l,icecreamCap:u,coolInfo:c,lollipopMilestones:h,funChallenge:p,funEffect:v,generatorUpgrade:g,lollipopMultiplierUpgrade:y,lollipopMultiplierEffect:m,unlockIlluminatiUpgrade:b,quasiUpgrade:T,exhancers:w,respecBuyables:$,sellExhancer:z,bars:{tallBoi:he,longBoi:B,flatBoi:Y},tree:X,g:ye,h:Se,spook:k,conversion:oe,reset:me,hotkeys:Ke,treeNode:re,resetButton:de,confirmRespec:R,minWidth:800,tabs:Ve,display:it(()=>C(Oe,null,[Bt(Ve),Bt(ce)]))}}),cR={min:.5,max:1},fR=[{s:0,cp:.329,e:.548},{s:.548,cp:.767,e:.876},{s:.876,cp:.985,e:1}],dR=.001,hR=.1,pR=100,vR=!0,mR={x:0,y:0},gR=!1,yR=[{type:"alpha",config:{alpha:{list:[{time:0,value:.74},{time:1,value:0}]}}},{type:"moveSpeed",config:{speed:{list:[{time:0,value:300},{time:1,value:0}]},minMult:1}},{type:"scale",config:{scale:{list:[{time:0,value:1},{time:1,value:.25}]},minMult:1}},{type:"color",config:{color:{list:[{time:0,value:"#ffdfa0"},{time:1,value:"#100f0c"}]}}},{type:"rotation",config:{accel:0,minSpeed:0,maxSpeed:200,minStart:0,maxStart:360}},{type:"textureRandom",config:{textures:["/particle.png"]}},{type:"spawnShape",config:{type:"rect",data:{x:0,y:0,w:0,h:0}}}];var bR={lifetime:cR,ease:fR,frequency:dR,emitterLifetime:hR,maxParticles:pR,addAtBack:vR,pos:mR,emit:gR,behaviors:yR};const Qu="f",xr=ss(Qu,()=>{const e="#FE0102",t="Farms",n=Ga(0,"farm points"),r=Kt(!1),i=Zg(()=>({title:"Lore",titleStyle:{color:"#FE0000"},display:"DEEP LORE!",bodyStyle:{backgroundColor:"#0000EE"}})),a=Kt("Start"),o=$a(()=>({display(){return{title:"Clicky clicky!",description:"Current state:<br>"+a.value}},initialState:"Start",canClick(){return a.value!=="Borkened..."},onClick(p){var v,g,y,m,b,T,S,w;switch(a.value){case"Start":a.value="A new state!";break;case"A new state!":a.value="Keep going!";break;case"Keep going!":a.value="Maybe that's a bit too far...";break;case"Maybe that's a bit too far...":const N=p==null?void 0:"touches"in p?p.touches[0]:p,I=Object.assign({},bR,{pos:{x:((v=N==null?void 0:N.clientX)!=null?v:0)-((m=(y=(g=d.boundingRect)==null?void 0:g.value)==null?void 0:y.left)!=null?m:0),y:((b=N==null?void 0:N.clientY)!=null?b:0)-((w=(S=(T=d.boundingRect)==null?void 0:T.value)==null?void 0:S.top)!=null?w:0)}});d.addEmitter(I).then(R=>R.playOnceAndDestroy()),a.value="Borkened...";break;default:a.value="Start";break}},onHold(){console.log("Clickkkkk...")},style(){switch(a.value){case"Start":return{"background-color":"green"};case"A new state!":return{"background-color":"yellow"};case"Keep going!":return{"background-color":"orange"};case"Maybe that's a bit too far...":return{"background-color":"red"};default:return{}}}})),s=$a(()=>({onClick(){a.value=="Borkened..."&&(a.value="Start")},display(){return a.value=="Borkened..."?"Fix the clickable!":"Does nothing"},small:!0})),l=Cy(()=>({thingsToReset:()=>[xr]})),u=tE(()=>({scaling:Yg(10,.5),baseResource:yt.points,gainResource:n,modifyGainAmount:yN(nr.otherThingy)})),c=Wg(()=>({layerID:Qu,color:e,reset:l,tooltip(){return c.canClick.value?`${zr(n)} ${n.displayName}`:`This weird farmer dinosaur will only see you if you have at least 10 points. You only have ${zr(yt.points)}`},canClick(){return O.gte(yt.points.value,10)}}));nf(c,{display:Eg(n),pinnable:!0});const f=Xg(()=>({conversion:u,tree:yt.tree,treeNode:c,display:it(()=>f.conversion.buyMax?C("span",null,[le("Hi! I'm a "),C("u",null,[le("weird dinosaur")]),le(" and I'll give you")," ",C("b",null,[gn(f.conversion.currentGain.value)]),le(" Farm Points in exchange for all of your points and lollipops! (You'll get another one at")," ",gn(f.conversion.nextAt.value),le(" points)")]):C("span",null,[le("Hi! I'm a "),C("u",null,[le("weird dinosaur")]),le(" and I'll give you a Farm Point in exchange for all of your points and lollipops! (At least")," ",gn(f.conversion.nextAt.value),le(" points)")]))})),d=cN(()=>({boundingRect:Te(null),onContainerResized(p){this.boundingRect.value=p},style:"z-index: 2"})),h=it(()=>C(Oe,null,[Bt(i),C(Iy,{resource:n,color:e},null),Bt(f),C("div",null,[le("You have "),gn(u.baseResource.value),le(" points")]),C("div",null,[C("br",null,null),C("img",{src:"https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390"},null),C("div",null,[le("Bork Bork!")])]),C(En,null,null),tr(s),tr(o),Bt(d)]));return{id:Qu,color:e,name:t,points:n,boop:r,coolInfo:i,clickable:o,clickableState:a,reset:l,conversion:u,treeNode:c,resetButton:f,minWidth:650,display:h}});function qu(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!fr(e)}const Yp="a",rf=ss(Yp,()=>{const e="yellow",t="Achievements",n=Ga(0,"achievement power"),r=Ra(()=>({display:"A",color:e,tooltip:{display:"Achievements",right:!0},onClick(){yt.showAchievements()}})),i=Pu(()=>({image:"https://unsoftcapped2.github.io/The-Modding-Tree-2/discord.png",display:"Get me!",tooltip:J(()=>i.earned.value?"You did it!":"How did this happen?"),shouldEarn:()=>!0})),a=Pu(()=>({display:"Impossible!",tooltip:J(()=>a.earned.value?"HOW????":"Mwahahaha!"),style:{color:"#04e050"}})),o=Pu(()=>({display:"EIEIO",tooltip:`Get a farm point.
Reward: The dinosaur is now your friend (you can max Farm Points).`,shouldEarn:function(){return O.gte(xr.points.value,1)},onComplete(){console.log("Bork bork bork!")}})),s=[i,a,o],l=ZC(()=>({rows:2,cols:2,getStartState(c){return c},getStyle(c,f){return{backgroundColor:`#${Number(f)*1234%999999}`}},getTitle(c){let f="";return c==="101"?f="top":c==="102"?f="bottom":c==="201"?f="left":c==="202"&&(f="right"),it(()=>C(At,un({display:JSON.stringify(this.cells[c].style)},{[f]:!0}),{default:()=>[C("h3",null,[le("Gridable #"),c])]}))},getDisplay(c,f){return String(f)},getCanClick(){return O.eq(yt.points.value,10)},onClick(c,f){this.cells[c].state=Number(f)+1}})),u=it(()=>{let c,f,d;return C(Oe,null,[C(wa,null,{default:()=>[C(At,{display:i.tooltip,bottom:!0},qu(c=Bt(i))?c:{default:()=>[c]}),C(At,{display:a.tooltip,bottom:!0},qu(f=Bt(a))?f:{default:()=>[f]}),C(At,{display:o.tooltip,bottom:!0},qu(d=Bt(o))?d:{default:()=>[d]})]}),tr(l)])});return{id:Yp,color:e,name:t,points:n,achievements:s,grid:l,treeNode:r,display:u}}),yt=ss("main",()=>{const e=Ga(10),t=Tg(e),n=g2(e),r=J(()=>{if(!nr.generatorUpgrade.bought.value)return new O(0);let l=new O(3.19);return nr.lollipopMultiplierUpgrade.bought.value&&(l=l.times(nr.lollipopMultiplierEffect.value)),l});sn.on("update",l=>{e.value=O.add(e.value,O.times(r.value,l))});const i=x2(e,r),{openModal:a,modal:o}=ng(rf),s=Cg(()=>({nodes:[[nr.treeNode],[xr.treeNode,nr.spook]],leftSideNodes:[rf.treeNode,nr.h],branches:[{startNode:xr.treeNode,endNode:nr.treeNode,stroke:"blue","stroke-width":"25px",style:{filter:"blur(5px)"}}],onReset(){e.value=ot(this.resettingNode.value)===ot(nr.treeNode)?0:10,t.value=e.value,n.value=e.value},resetPropagation:B2}));return{name:"Tree",display:it(()=>C(Oe,null,[xe.devSpeed===0?C("div",null,[le("Game Paused")]):null,xe.devSpeed&&xe.devSpeed!==1?C("div",null,[le("Dev Speed: "),kt(xe.devSpeed),le("x")]):null,xe.offlineTime?C("div",null,[le("Offline Time: "),Ql(xe.offlineTime)]):null,C("div",null,[O.lt(e.value,"1e1000")?C("span",null,[le("You have ")]):null,C("h2",null,[kt(e.value)]),O.lt(e.value,"1e1e6")?C("span",null,[le(" points")]):null]),O.gt(r.value,0)?C("div",null,[le("("),i.value,le(")")]):null,C(En,null,null),C("button",{onClick:a},[le("open achievements")]),Bt(o),Bt(s),C(m2,{height:"200px",style:"margin: 10px auto; display: block"},null)])),points:e,best:t,total:n,oomps:i,tree:s,showAchievements:a}}),xR=e=>[yt,xr,nr,rf],Id=J(()=>O.gt(yt.points.value,25));function _R(e,t){}var Ny=Object.freeze(Object.defineProperty({__proto__:null,main:yt,getInitialLayers:xR,hasWon:Id,fixOldSave:_R},Symbol.toStringTag,{value:"Module"}));const ds=e=>(hr("data-v-4a50ce42"),e=e(),pr(),e),TR={class:"game-over-modal-header"},wR=["src","alt"],CR={class:"game-over-modal-title"},ER=ds(()=>P("h2",null,"Congratulations!",-1)),IR={key:0},SR=ds(()=>P("br",null,null,-1)),NR=ds(()=>P("div",null," Please check the Discord to discuss the game or to check for new content updates! ",-1)),RR=ds(()=>P("br",null,null,-1)),AR=["href"],OR=ds(()=>P("span",{class:"material-icons game-over-modal-discord"},"discord",-1)),PR=Ie({__name:"GameOverScreen",setup(e){const{title:t,logo:n,discordName:r,discordLink:i,versionNumber:a,versionTitle:o}=_t,s=J(()=>Ql(xe.timePlayed)),l=J(()=>Id.value&&!xe.keepGoing),u=Sn(xe,"autosave");function c(){xe.keepGoing=!0}function f(){Wi(Ro())}return(d,h)=>(M(),we(wi,{"model-value":x(l)},{header:Pe(()=>[P("div",TR,[x(n)?(M(),W("img",{key:0,class:"game-over-modal-logo",src:x(n),alt:x(t)},null,8,wR)):ve("",!0),P("div",CR,[ER,P("h4",null,"You've beaten "+Je(x(t))+" v"+Je(x(a))+": "+Je(x(o)),1)])])]),body:Pe(({shown:p})=>[p?(M(),W("div",IR,[P("div",null,"It took you "+Je(x(s))+" to beat the game.",1),SR,NR,RR,P("div",null,[P("a",{href:x(i),class:"game-over-modal-discord-link"},[OR,le(" "+Je(x(r)),1)],8,AR)]),C(Bn,{title:"Autosave",modelValue:x(u),"onUpdate:modelValue":h[0]||(h[0]=v=>et(u)?u.value=v:null)},null,8,["modelValue"])])):ve("",!0)]),footer:Pe(()=>[P("div",{class:"game-over-footer"},[P("button",{onClick:c,class:"button"},"Keep Going"),P("button",{onClick:f,class:"button danger"},"Play Again")])]),_:1},8,["model-value"]))}});var FR=Qe(PR,[["__scopeId","data-v-4a50ce42"]]);const uu=e=>(hr("data-v-3de07c06"),e=e(),pr(),e),MR=uu(()=>P("div",{class:"nan-modal-header"},[P("h2",null,"NaN value detected!")],-1)),LR={key:0},UR=uu(()=>P("br",null,null,-1)),BR=["href"],kR=uu(()=>P("span",{class:"material-icons nan-modal-discord"},"discord",-1)),DR=uu(()=>P("br",null,null,-1)),GR={class:"nan-footer"},VR=Ie({__name:"NaNScreen",setup(e){const{discordName:t,discordLink:n}=_t,r=Sn(xe,"autosave"),i=Sn(Rt,"hasNaN"),a=Te(null),o=J(()=>{var h;return(h=Rt.NaNPath)==null?void 0:h.join(".")}),s=J(()=>{var h;return(h=Rt.NaNPath)==null?void 0:h.slice(-1)[0]}),l=J(()=>Rt.NaNReceiver&&s.value?Rt.NaNReceiver[s.value]:null),u=J({get(){return xe.devSpeed===0},set(h){xe.devSpeed=h?null:0}});function c(){Rt.NaNReceiver&&s.value&&(Rt.NaNReceiver[s.value]=new O(0),Rt.hasNaN=!1)}function f(){Rt.NaNReceiver&&s.value&&(Rt.NaNReceiver[s.value]=new O(1),Rt.hasNaN=!1)}function d(){Rt.NaNReceiver&&s.value&&(Rt.NaNReceiver[s.value]=new O(NaN),Rt.hasNaN=!1)}return(h,p)=>(M(),W(Oe,null,[C(wi,un({modelValue:x(i),"onUpdate:modelValue":p[4]||(p[4]=v=>et(i)?i.value=v:null)},h.$attrs),{header:Pe(()=>[MR]),body:Pe(()=>[P("div",null,[le(' Attempted to assign "'+Je(x(o))+'" to NaN',1),x(l)?(M(),W("span",LR,Je(" ")+"(previously "+Je(x(kt)(x(l)))+")",1)):ve("",!0),le(". Auto-saving has been "+Je(x(r)?"enabled":"disabled")+". Check the console for more details, and consider sharing it with the developers on discord. ",1)]),UR,P("div",null,[P("a",{href:x(n),class:"nan-modal-discord-link"},[kR,le(" "+Je(x(t)),1)],8,BR)]),DR,C(Bn,{title:"Autosave",modelValue:x(r),"onUpdate:modelValue":p[0]||(p[0]=v=>et(r)?r.value=v:null)},null,8,["modelValue"]),x(_t).enablePausing?(M(),we(Bn,{key:0,title:"Pause game",modelValue:x(u),"onUpdate:modelValue":p[1]||(p[1]=v=>et(u)?u.value=v:null)},null,8,["modelValue"])):ve("",!0)]),footer:Pe(()=>[P("div",GR,[P("button",{onClick:p[2]||(p[2]=v=>{var g;return(g=a.value)==null?void 0:g.open()}),class:"button"},"Open Saves Manager"),P("button",{onClick:c,class:"button"},"Set to 0"),P("button",{onClick:f,class:"button"},"Set to 1"),x(l)&&x(O).neq(x(l),0)&&x(O).neq(x(l),1)?(M(),W("button",{key:0,onClick:p[3]||(p[3]=v=>i.value=!1),class:"button"}," Set to previous ")):ve("",!0),P("button",{onClick:d,class:"button danger"},"Ignore")])]),_:1},16,["modelValue"]),C(xg,{ref_key:"savesManager",ref:a},null,512)],64))}});var $R=Qe(VR,[["__scopeId","data-v-3de07c06"]]);const jR={key:0,class:"tpsDisplay"},HR={key:0,class:"low"},zR=Ie({__name:"TPS",setup(e){const t=J(()=>O.div(Rt.lastTenTicks.length,Rt.lastTenTicks.reduce((a,o)=>a+o,0))),n=Te([]);zt(()=>{n.value.push(Math.round(t.value.toNumber())),n.value.length>10&&(n.value=n.value.slice(1))});const r=J(()=>n.value.reduce((a,o)=>O.max(a,o),0)),i=J(()=>O.sub(t.value,r.value).gt(1));return(a,o)=>x(t).isNan()?ve("",!0):(M(),W("div",jR,[le(" TPS: "+Je(x(gn)(x(t)))+" ",1),C(Ti,{name:"fade"},{default:Pe(()=>[x(i)?(M(),W("span",HR,Je(x(gn)(x(r))),1)):ve("",!0)]),_:1})]))}});var XR=Qe(zR,[["__scopeId","data-v-46a3ed5b"]]);var WR=Ie({__name:"App",setup(e){const t=_t.useHeader,n=J(()=>Kr[bt.theme].variables),r=Sn(bt,"showTPS"),i=J(()=>Ye(it(()=>C(Oe,null,[Vx.map(Bt)]))));return(a,o)=>(M(),W(Oe,null,[P("div",{id:"modal-root",style:tt(x(n))},null,4),P("div",{class:ze(["app",{useHeader:x(t)}]),style:tt(x(n))},[x(t)?(M(),we(_g,{key:0})):ve("",!0),C(f2),x(x(r))?(M(),we(XR,{key:1})):ve("",!0),C(FR),C($R),(M(),we(gt(x(i))))],6)],64))}});var KR=Qe(WR,[["__scopeId","data-v-9417972e"]]);try{self["workbox:window:6.5.2"]&&_()}catch{}function of(e,t){return new Promise(function(n){var r=new MessageChannel;r.port1.onmessage=function(i){n(i.data)},e.postMessage(t,[r.port2])})}function YR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZR(e,t){var n;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=function(i,a){if(i){if(typeof i=="string")return Zp(i,a);var o=Object.prototype.toString.call(i).slice(8,-1);return o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set"?Array.from(i):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Zp(i,a):void 0}}(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return(n=e[Symbol.iterator]()).next.bind(n)}try{self["workbox:core:6.5.2"]&&_()}catch{}var ec=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})};function tc(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var ia=function(e,t){this.type=e,Object.assign(this,t)};function Ks(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function JR(){}var QR={type:"SKIP_WAITING"};function Jp(e,t){if(!t)return e&&e.then?e.then(JR):Promise.resolve()}var qR=function(e){var t,n;function r(s,l){var u,c;return l===void 0&&(l={}),(u=e.call(this)||this).nn={},u.tn=0,u.rn=new ec,u.en=new ec,u.on=new ec,u.un=0,u.an=new Set,u.cn=function(){var f=u.fn,d=f.installing;u.tn>0||!tc(d.scriptURL,u.sn.toString())||performance.now()>u.un+6e4?(u.vn=d,f.removeEventListener("updatefound",u.cn)):(u.hn=d,u.an.add(d),u.rn.resolve(d)),++u.tn,d.addEventListener("statechange",u.ln)},u.ln=function(f){var d=u.fn,h=f.target,p=h.state,v=h===u.vn,g={sw:h,isExternal:v,originalEvent:f};!v&&u.mn&&(g.isUpdate=!0),u.dispatchEvent(new ia(p,g)),p==="installed"?u.wn=self.setTimeout(function(){p==="installed"&&d.waiting===h&&u.dispatchEvent(new ia("waiting",g))},200):p==="activating"&&(clearTimeout(u.wn),v||u.en.resolve(h))},u.dn=function(f){var d=u.hn,h=d!==navigator.serviceWorker.controller;u.dispatchEvent(new ia("controlling",{isExternal:h,originalEvent:f,sw:d,isUpdate:u.mn})),h||u.on.resolve(d)},u.gn=(c=function(f){var d=f.data,h=f.ports,p=f.source;return Ks(u.getSW(),function(){u.an.has(p)&&u.dispatchEvent(new ia("message",{data:d,originalEvent:f,ports:h,sw:p}))})},function(){for(var f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];try{return Promise.resolve(c.apply(this,f))}catch(h){return Promise.reject(h)}}),u.sn=s,u.nn=l,navigator.serviceWorker.addEventListener("message",u.gn),u}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.register=function(s){var l=(s===void 0?{}:s).immediate,u=l!==void 0&&l;try{var c=this;return function(f,d){var h=f();return h&&h.then?h.then(d):d(h)}(function(){if(!u&&document.readyState!=="complete")return Jp(new Promise(function(f){return window.addEventListener("load",f)}))},function(){return c.mn=Boolean(navigator.serviceWorker.controller),c.yn=c.pn(),Ks(c.bn(),function(f){c.fn=f,c.yn&&(c.hn=c.yn,c.en.resolve(c.yn),c.on.resolve(c.yn),c.yn.addEventListener("statechange",c.ln,{once:!0}));var d=c.fn.waiting;return d&&tc(d.scriptURL,c.sn.toString())&&(c.hn=d,Promise.resolve().then(function(){c.dispatchEvent(new ia("waiting",{sw:d,wasWaitingBeforeRegister:!0}))}).then(function(){})),c.hn&&(c.rn.resolve(c.hn),c.an.add(c.hn)),c.fn.addEventListener("updatefound",c.cn),navigator.serviceWorker.addEventListener("controllerchange",c.dn),c.fn})})}catch(f){return Promise.reject(f)}},o.update=function(){try{return this.fn?Jp(this.fn.update()):void 0}catch(s){return Promise.reject(s)}},o.getSW=function(){return this.hn!==void 0?Promise.resolve(this.hn):this.rn.promise},o.messageSW=function(s){try{return Ks(this.getSW(),function(l){return of(l,s)})}catch(l){return Promise.reject(l)}},o.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&of(this.fn.waiting,QR)},o.pn=function(){var s=navigator.serviceWorker.controller;return s&&tc(s.scriptURL,this.sn.toString())?s:void 0},o.bn=function(){try{var s=this;return function(l,u){try{var c=l()}catch(f){return u(f)}return c&&c.then?c.then(void 0,u):c}(function(){return Ks(navigator.serviceWorker.register(s.sn,s.nn),function(l){return s.un=performance.now(),l})},function(l){throw l})}catch(l){return Promise.reject(l)}},i=r,(a=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&YR(i.prototype,a),r}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(n,r){this.Sn(n).add(r)},t.removeEventListener=function(n,r){this.Sn(n).delete(r)},t.dispatchEvent=function(n){n.target=this;for(var r,i=ZR(this.Sn(n.type));!(r=i()).done;)(0,r.value)(n)},t.Sn=function(n){return this.Pn.has(n)||this.Pn.set(n,new Set),this.Pn.get(n)},e}());function eA(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisterError:a}=e;let o,s;const l=async(u=!0)=>{u&&(o==null||o.addEventListener("controlling",c=>{c.isUpdate&&window.location.reload()})),s&&s.waiting&&await of(s.waiting,{type:"SKIP_WAITING"})};if("serviceWorker"in navigator){o=new qR("./sw.js",{scope:"./",type:"classic"}),o.addEventListener("activated",u=>{u.isUpdate||r==null||r()});{const u=()=>{n==null||n()};o.addEventListener("waiting",u),o.addEventListener("externalwaiting",u)}o.register({immediate:t}).then(u=>{s=u,i==null||i(u)}).catch(u=>{a==null||a(u)})}return l}function tA(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:r,onRegistered:i,onRegisterError:a}=e,o=Te(!1),s=Te(!1);return{updateServiceWorker:eA({immediate:t,onNeedRefresh(){o.value=!0,n==null||n()},onOfflineReady(){s.value=!0,r==null||r()},onRegistered:i,onRegisterError:a}),offlineReady:s,needRefresh:o}}document.title=_t.title;window.projInfo=_t;if(_t.id==="")throw"Project ID is empty! Please select a unique ID for this project in /src/data/projInfo.json";requestAnimationFrame(async()=>{console.log(`%cMade in Profectus%c
Learn more at www.moddingtree.com`,"font-weight: bold; font-size: 24px; color: #A3BE8C; background: #2E3440; padding: 4px 8px; border-radius: 8px;","padding: 4px;"),await Bx();const{globalBus:e,startGameLoop:t}=await sl(()=>Promise.resolve().then(function(){return Lx}),void 0),n=window.vue=Pf(KR);e.emit("setupVue",n),n.mount("#app"),tn(()=>{const r=Kf(),{updateServiceWorker:i}=tA({onNeedRefresh(){r.info("New content available, click or reload to update.",{timeout:!1,closeOnClick:!1,draggable:!1,icon:{iconClass:"material-icons",iconChildren:"refresh",iconTag:"i"},rtl:!1,onClick(){i()}})},onOfflineReady(){r.info("App ready to work offline")},onRegisterError:console.warn,onRegistered(a){a&&setInterval(a.update,60*60*1e3)}})}),t()});